Closed firebird-automations closed 9 years ago
Commented by: @sim1984
Database create as
CREATE DATABASE 'localhost/3051:TEST' USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 8192 DEFAULT CHARACTER SET WIN1251;
Commented by: Sean Leyne (seanleyne)
I don't agree that should have a "Major" priority.
Commented by: @sim1984
I agree.
Commented by: @asfernandes
They are saved correctly. They are not read correctly.
Commented by: @pavel-zotov
How can it be explained that if:
1) create new database:
$ /opt/fb30ss/bin/isql -q SQL> set names utf8; SQL> create database '192.168.0.220/3333:/var/db/fb30/c4301.fdb' default character set utf8; SQL> show version; ISQL Version: LI-T3.0.0.31740 Firebird 3.0 Beta 2 Server version: Firebird/Linux/AMD/Intel/x64 (access method), version "LI-T3.0.0.31740 Firebird 3.0 Beta 2" Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-T3.0.0.31740 Firebird 3.0 Beta 2/tcp (oel64)/P13" Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-T3.0.0.31740 Firebird 3.0 Beta 2/tcp (oel64)/P13" on disk structure version 12.0
2) and run script with only ASCII characters:
drop user tmp$c4301a; commit; drop user tmp$c4301b; commit; create user tmp$c4301a password '123'; commit; create user tmp$c4301b password '123'; commit; comment on user tmp$c4301a is 'This is user tmp$c4301a'; commit; comment on user tmp$c4301b is 'This is user tmp$c4301b'; commit; set blob all; set list on; select u.SEC$USER_NAME, u.sec$description as descr from sec$users u where upper(u.sec$user_name) starting with upper('tmp$c4301');
-- then result is NULLs in the sec$description:
SEC$USER_NAME TMP$C4301A
DESCR <null>
SEC$USER_NAME TMP$C4301B
DESCR <null>
-- ?
PS. $ cat firebird.conf AuthClient = Legacy_Auth,Srp,Win_Sspi AuthServer = Legacy_Auth,Srp
DefaultDbCachePages = 8K
ExternalFileAccess = Restrict /var/db/fb30 FileSystemCacheThreshold = 65536K
LockMemSize = 64M LockHashSlots = 22111
MaxUserTraceLogSize = 99999 RemoteServicePort = 3333 TempCacheLimit = 2147483647 TempDirectories = /dev/shm;/tmp UserManager = Legacy_UserManager WireCrypt = Disabled
Commented by: @pavel-zotov
Sorry for my previous stupid post, the reason was obvious: usage of UserManager = Legacy_UserManager in config.
If run this test on standard firebird.conf than all OK:
$ /opt/fb30ss/bin/isql -q SQL> set names utf8; SQL> create database 'localhost/3333:/var/db/fb30/c4301.fdb' default character set utf8; SQL> create user u30a password 'u30a'; commit; SQL> create user u30b password 'u30b'; commit; SQL> comment on user u30a is 'это кто-то из наших'; commit; SQL> comment on user u30b is 'é alguém do Brasil'; commit; SQL> select u.SEC$USER_NAME, u.sec$description as descr CON> from sec$users u CON> where upper(u.sec$user_name) starting with upper('u30');
Commented by: @pcisar
Test created.
Submitted by: @sim1984
Is related to QA584
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';
================= 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';
================= 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 ????????????
Commits: FirebirdSQL/firebird@79c6b2165b7d574ef6d60425eea2101412fb42ce FirebirdSQL/fbt-repository@07fe6f6308abcb3c9f5ad515782b771b6394d253
====== 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.