Issue Details (XML | Word | Printable)

Key: CORE-4301
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Adriano dos Santos Fernandes
Reporter: Simonov Denis
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Non-ASCII data in SEC$USERS is not read correctly

Created: 19/Dec/13 03:39 PM   Updated: 23/Sep/15 12:45 PM
Component/s: None
Affects Version/s: 3.0 Alpha 1, 3.0 Alpha 2
Fix Version/s: 3.0 Beta 1

Environment: windows 7 x86, isql
Issue Links:
Relate
 

QA Status: Done with caveats
Test Details:
For test content of COMMENTS field firebird.conf should contain: UserManager = Srp.
Currently it is not so on test-running host, so it was decided to check only content of FIRST_NAME field which is available on any value of `UserManager` parameter.
Test Specifics: Custom configuration required


 Description  « Hide
User comment distorts non-ASCII characters

c:\Program Files\Firebird\Firebird_3_0>chcp 1251
Текущая кодовая страница: 1251

c:\Program Files\Firebird\Firebird_3_0>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set names win1251;
SQL> connect 'localhost/3051:test' user 'sysdba' password 'masterkey';
Database: 'localhost/3051:test', User: sysdba
SQL> create table T1(id integer);
SQL> commit;
SQL> comment on table T1 is 'Моя таблица';
SQL> commit;
SQL> select r.rdb$description as descr
CON> from rdb$relations r
CON> where r.rdb$relation_name = 'T1';

            DESCR
=================
              0:3
==============================================================================
DESCR:
Моя таблица
==============================================================================

SQL> create user user1 password '123';
SQL> commit;
SQL> comment on user user1 is 'Новый пользователь';
SQL> commit;
SQL> select u.sec$description as descr
CON> from sec$users u
CON> where u.sec$user_name = 'USER1';

            DESCR
=================
              0:5
==============================================================================
DESCR:
?????????? ????????????????????????
==============================================================================

SQL> alter user user1 set tags(tag1='привет');
SQL> commit;
SQL> select * from sec$user_attributes;

SEC$USER_NAME SEC$KEY SEC$VALUE


=============================== =============================== ========================================================
=======================
USER1 TAG1 ????????????


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Simonov Denis made changes - 19/Dec/13 03:46 PM
Field Original Value New Value
Summary User comment distorts non-ASCII characters Comment for users and user attributes distorts non-ASCII characters
Description User comment distorts non-ASCII characters

c:\Program Files\Firebird\Firebird_3_0>chcp 1251
Текущая кодовая страница: 1251

c:\Program Files\Firebird\Firebird_3_0>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set names win1251;
SQL> connect 'localhost/3051:test' user 'sysdba' password 'masterkey';
Database: 'localhost/3051:test', User: sysdba
SQL> create table T1(id integer);
SQL> commit;
SQL> comment on table T1 is 'Моя таблица';
SQL> commit;
SQL> select r.rdb$description as descr
CON> from rdb$relations r
CON> where r.rdb$relation_name = 'T1';

            DESCR
=================
              0:3
==============================================================================
DESCR:
Моя таблица
==============================================================================

SQL> create user user1 password '123';
SQL> commit;
SQL> comment on user user1 is 'Новый пользователь';
SQL> commit;
SQL> select u.sec$description as descr
CON> from sec$users u
CON> where u.sec$user_name = 'USER1';

            DESCR
=================
              0:5
==============================================================================
DESCR:
?????????? ????????????????????????
==============================================================================

SQL>
User comment distorts non-ASCII characters

c:\Program Files\Firebird\Firebird_3_0>chcp 1251
Текущая кодовая страница: 1251

c:\Program Files\Firebird\Firebird_3_0>isql
Use CONNECT or CREATE DATABASE to specify a database
SQL> set names win1251;
SQL> connect 'localhost/3051:test' user 'sysdba' password 'masterkey';
Database: 'localhost/3051:test', User: sysdba
SQL> create table T1(id integer);
SQL> commit;
SQL> comment on table T1 is 'Моя таблица';
SQL> commit;
SQL> select r.rdb$description as descr
CON> from rdb$relations r
CON> where r.rdb$relation_name = 'T1';

            DESCR
=================
              0:3
==============================================================================
DESCR:
Моя таблица
==============================================================================

SQL> create user user1 password '123';
SQL> commit;
SQL> comment on user user1 is 'Новый пользователь';
SQL> commit;
SQL> select u.sec$description as descr
CON> from sec$users u
CON> where u.sec$user_name = 'USER1';

            DESCR
=================
              0:5
==============================================================================
DESCR:
?????????? ????????????????????????
==============================================================================

SQL> alter user user1 set tags(tag1='привет');
SQL> commit;
SQL> select * from sec$user_attributes;

SEC$USER_NAME SEC$KEY SEC$VALUE


=============================== =============================== ========================================================
=======================
USER1 TAG1 ????????????
Sean Leyne made changes - 19/Dec/13 04:22 PM
Summary Comment for users and user attributes distorts non-ASCII characters COMMENT ON USER with non-ASCII characters are not saved correctly
Simonov Denis made changes - 27/Jan/14 08:41 AM
Priority Major [ 3 ] Minor [ 4 ]
Adriano dos Santos Fernandes made changes - 29/Jan/14 03:29 PM
Assignee Adriano dos Santos Fernandes [ asfernandes ]
Adriano dos Santos Fernandes made changes - 29/Jan/14 03:30 PM
Summary COMMENT ON USER with non-ASCII characters are not saved correctly Non-ASCII data in SEC$USERS is not read correctly
Affects Version/s 3.0 Alpha 2 [ 10560 ]
Adriano dos Santos Fernandes made changes - 29/Jan/14 03:36 PM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 3.0 Beta 1 [ 10332 ]
Resolution Fixed [ 1 ]
Pavel Cisar made changes - 29/Mar/14 05:46 PM
Link This issue is related to QA-584 [ QA-584 ]
Pavel Zotov made changes - 28/May/15 02:37 PM
Status Resolved [ 5 ] Resolved [ 5 ]
Test Details For test content of COMMENTS field firebird.conf should contain: UserManager = Srp.
Currently it is not so on test-running host, so it was decided to check only content of FIRST_NAME field which is available on any value of `UserManager` parameter.
QA Status Done with caveats
Pavel Zotov made changes - 28/May/15 02:39 PM
Status Resolved [ 5 ] Resolved [ 5 ]
Test Specifics [Custom configuration required]
Pavel Cisar made changes - 23/Sep/15 12:45 PM
Status Resolved [ 5 ] Closed [ 6 ]