New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CREATE COLLATION connection lost under Posix [CORE1885] #897
Comments
Modified by: @pmakowskiassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Commented by: @AlexPeshkoff I've tried with CS 2.1.0 32-bit (standard built). bash-2.05b# ./isql -z 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: |
Commented by: @AlexPeshkoff 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 Also looks OK. Adriano, I must say I've failed to reproduce initial bug. If you need more help please provide more details. |
Commented by: @pmakowski So it is a 64bits issue : on both MacOSX 10.5 and Linux 64 with Classic 64 : 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 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 |
Commented by: @AlexPeshkoff Philippe, unfortunately failed to reproduce. I've installed standard amd64 package, and tried both remote and embedded access. In both cases: 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. |
Commented by: @pmakowski here the core file (Linux CS64) |
Modified by: @pmakowskiAttachment: core.3741.bz2 [ 10880 ] |
Commented by: @AlexPeshkoff I've found an exact place, where it dies. UnicodeUtil::ICU* UnicodeUtil::Utf16Collation::loadICU(
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? |
Commented by: @asfernandes 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. |
Modified by: @asfernandesVersion: 2.5 Initial [ 10260 ] Fix Version: 2.1.1 [ 10223 ] Fix Version: 2.5 Alpha 1 [ 10224 ] |
Commented by: @asfernandes I have not found the exact ICU bug, but adding one locale fix the problem. |
Commented by: @pmakowski test ok and qmtest made |
Modified by: @pmakowskistatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: @pavel-zotov The following statement: CREATE COLLATION UNICODE_ENUS_CI FOR UTF8 FROM UNICODE CASE INSENSITIVE 'LOCALE=en_US'; -- failed on LI-V2.5.4.26821 (though works OK on LI-T3.0.0.31703) BTW: core_1802.fbt contains now attribute 'platform': 'All' but this statement does not work on all Windows FB versions (2.5 & 3.0). May be one need to change this attribute to: 'platform': 'Linux' ? |
Submitted by: @pmakowski
Attachments:
core.3741.bz2
Under Windows :
under win32 :
C:\FB21\bin>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> create database 'c:\fb21\db\col1.fdb';
SQL> show collation;
There are no collations in this database
SQL> CREATE COLLATION UNICODE_ENUS_CI
CON> FOR UTF8
CON> FROM UNICODE
CON> CASE INSENSITIVE
CON> 'LOCALE=en_US';
Statement failed, SQLCODE = -607
unsuccessful metadata update
-Invalid collation attributes
SQL>
Expected. Our ICU doesn't have locales.
Under Linux and MacOsX :
SQL> create database '127.0.0.1:/Volumes/tempo/firebird_db/coll1.fdb';
SQL> CREATE COLLATION UNICODE_ENUS_CI
CON> FOR UTF8
CON> FROM UNICODE
CON> CASE INSENSITIVE
CON> 'LOCALE=en_US';
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.
Commits: 8aa67e6 6857e76
The text was updated successfully, but these errors were encountered: