|
In HEAD in DEV_BUILD statement fails due to the following assertion:
fb_assert(sym && sym->intlsym_charset_id == constant->nod_desc.getCharSet()); I've found that constant->nod_desc has dynamic text type (127), METD_get_charset_name() successfully finds "NONE" as attachment charset, METD_get_charset() creates dsql_intlsym with charset_id==0. All this looks OK for me, therefore I suppose assert should be fixed. When I commented it out (to experiment), result was as expected - statement succeeded and SQL> show COLLATION; UNICODE_ENUS_CI, CHARACTER SET UTF8, FROM EXTERNAL ('UNICODE'), PAD SPACE, CASE INSENSITIVE, 'COLL-VERSION=49.192.5.5;LOCALE=en_US' Also looks OK. Adriano, I must say I've failed to reproduce initial bug. If you need more help please provide more details. So it is a 64bits issue :
on both MacOSX 10.5 and Linux 64 with Classic 64 : /opt/firebird/bin/isql -z ISQL Version: LI-V2.1.0.17798 Firebird 2.1 isql -z ISQL Version: UI-V2.1.0.17798 Firebird 2.1 echo "CREATE COLLATION UNICODE_ENUS_CI FOR UTF8 FROM UNICODE CASE INSENSITIVE 'LOCALE=en_US';" | /opt/firebird/bin/isql -user sysdba -pas masterkey 127.0.0.1:employee Statement failed, SQLCODE = -902 Unable to complete network request to host "127.0.0.1". -Error reading data from the connection. Statement failed, SQLCODE = -902 Unable to complete network request to host "127.0.0.1". -Error reading data from the connection. Statement failed, SQLCODE = -902 Unable to complete network request to host "127.0.0.1". -Error writing data to the connection. -Broken pipe echo "CREATE COLLATION UNICODE_ENUS_CI FOR UTF8 FROM UNICODE CASE INSENSITIVE 'LOCALE=en_US';" | isql -user sysdba -pas masterkey 127.0.0.1:/Volumes/tempo/firebird_db/coll1.fdb Statement failed, SQLCODE = -902 Unable to complete network request to host "127.0.0.1". -Error reading data from the connection. Statement failed, SQLCODE = -902 Unable to complete network request to host "127.0.0.1". -Error reading data from the connection. Philippe, unfortunately failed to reproduce. I've installed standard amd64 package, and tried both remote and embedded access. In both cases:
Statement failed, SQLCODE = -607 unsuccessful metadata update -Invalid collation attributes I'm afraid you should create core file and sent it to me. In 2.1 all you need to have core file (in /tmp) is just BugcheckAbort = 1 in firebird.conf. here the core file (Linux CS64)
I've found an exact place, where it dies.
UnicodeUtil::ICU* UnicodeUtil::Utf16Collation::loadICU( const Firebird::string& collVersion, const Firebird::string& locale, const Firebird::string& configInfo) { ObjectsArray<string> versions; getVersions(configInfo, versions); for (ObjectsArray<string>::const_iterator i(versions.begin()); i != versions.end(); ++i) { ICU* icu = UnicodeUtil::loadICU(*i, configInfo); if (!icu) continue; UErrorCode status = U_ZERO_ERROR; if (locale.hasData()) { int avail = icu->ulocCountAvailable(); while (--avail >= 0) { if (locale == icu->ulocGetAvailable(avail)) In this string::operator==() the first thing is done is strlen() of what was returned by ulocGetAvailable(avail). I can only suppose why ulocGetAvailable returns something not acceptable for strlen() - all data is stored in registers and it's already lost for the moment of AV. Certainly, it will be good to set breakpoint here on a system where it fails. Or add some debugging printf()s. May be Adriano has better ideas? The problem is that ulocCountAvailable() is returning 1 instead of 0. I didn't found any specific bug fixed in ICU SVN. This may be a problem caused by our changes to strip locales, but it doesn't cause problems in Windows.
I will investigate further, and maybe contact the ICU guys. I have not found the exact ICU bug, but adding one locale fix the problem.
test ok and qmtest made
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||
bash-2.05b# ./isql -z
ISQL Version: LI-V2.1.0.17798 Firebird 2.1
echo "CREATE COLLATION UNICODE_ENUS_CI FOR UTF8 FROM UNICODE CASE INSENSITIVE 'LOCALE=en_US';" | ./isql -user sysdba -pas masterkey localhost:/tmp/coll1.fdb
Works as expected:
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Invalid collation attributes