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
Bug in create/alter Database trigger (with Russian comment) [CORE1694] #2119
Comments
Commented by: @asfernandes This is WIN1251 text, correct? I can't reproduce the problem... What tool you used? Can the error be reproducible with SQL? Can you also test with a more recent snapshot? |
Commented by: Sviridov Sergey (sergsw) This is database on which the bug reproduce |
Modified by: Sviridov Sergey (sergsw)Attachment: BUG_TEST.FDB [ 10750 ] |
Commented by: Sviridov Sergey (sergsw) On server FB 2.1 beta 2 too reproduce |
Commented by: @asfernandes I tested with ISQL in Win32 Beta1 (15999) and Linux x86 RC1 and there is no problem. There is only a minor problem, when you try to alter a non existent trigger: |
Commented by: Sviridov Sergey (sergsw) If use client connection "utf8" that reproduce Example code //with Descr BUG |
Commented by: Sviridov Sergey (sergsw) Examle to execute |
Modified by: Sviridov Sergey (sergsw)Attachment: ibtestunicode.zip [ 10760 ] |
Modified by: @asfernandesVersion: 2.1 Beta 1 [ 10141 ] Version: 2.1 RC1 [ 10201 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 Alpha 1 [ 10224 ] |
Modified by: @pcisarWorkflow: jira [ 13823 ] => Firebird [ 14126 ] |
Modified by: @asfernandesFix Version: 2.1 RC2 [ 10250 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] Test Details: See also tests that manipulates with NULL fields/domains and check results: |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] Test Details: See also tests that manipulates with NULL fields/domains and check results: => See also tests that manipulates with NULL fields/domains and check results: |
Submitted by: Sviridov Sergey (sergsw)
Attachments:
BUG_TEST.FDB
ibtestunicode.zip
Bug in create/alter Database trigger
If execute statment
alter TRIGGER DBTRIGGER_COPY ACTIVE ON CONNECT POSITION 0
AS
/* дескрипшн переменной триггера БД
дескрипшн переменной триггера БД строка 2
database trigger description
database trigger description string 2 */
DECLARE VARIABLE NEW_VAR SMALLINT DEFAULT 4;
/* дескрипшн переменной триггера БД
дескрипшн переменной триггера БД строка 2
database trigger description
database trigger description string 2 */
DECLARE VARIABLE NEW_VAR1 VARCHAR(30) CHARACTER SET UTF8 COLLATE UTF8 DEFAULT 'Дефолт Default';
DECLARE VARIABLE EFWEF TYPE OF VARCHAR_DOMAIN2;
/* дескрипшн переменной триггера БД
дескрипшн переменной триггера БД строка 2
database trigger description
database trigger description string 2 */
DECLARE VARIABLE NEW_VAR2 TYPE OF VARCHAR_DOMAIN DEFAULT 'Дефолт Default';
/* дескрипшн переменной триггера БД
дескрипшн переменной триггера БД
database trigger description
database trigger description string 2 */
DECLARE VARIABLE NEW_VAR3 TYPE OF SMALLINT_DOMAIN DEFAULT 3;
BEGIN
/* Database Trigger body */
END
It will cause a mistake
"This operation is not defined for system tables.Unsuccessful metadata update.
Create metadata BLOB failed.
Cannot transliterate character between character sets."
But if change domain type variable EFWEF to VARCHAR_DOMAIN, or change
...
DECLARE VARIABLE NEW_VAR2 TYPE OF VARCHAR_DOMAIN DEFAULT 'Дефолт Default';
/* дескрипшн переменной триггера БД
дескрипшн переменной триггера БД
database trigger description
database trigger description string 2 */
DECLARE VARIABLE NEW_VAR3 TYPE OF SMALLINT_DOMAIN DEFAULT 3;
...
to
...
DECLARE VARIABLE NEW_VAR2 TYPE OF VARCHAR_DOMAIN DEFAULT 'Дефолт Default';
/* дескрипшн переменной триггера БД
дескрипшн
database trigger description
database trigger description string 2 */
DECLARE VARIABLE NEW_VAR3 TYPE OF SMALLINT_DOMAIN DEFAULT 3;
...
that the inquiry will be executed successfully
Domain statements(Identical):
CREATE DOMAIN VARCHAR_DOMAIN AS
VARCHAR(30) CHARACTER SET UTF8
COLLATE UTF8;
CREATE DOMAIN VARCHAR_DOMAIN2 AS
VARCHAR(30) CHARACTER SET UTF8
COLLATE UTF8;
Commits: b4a3990 b11f60b
====== Test Details ======
See also tests that manipulates with NULL fields/domains and check results:
CORE1518 Adding a non-null restricted column to a populated table renders the table inconsistent;
CORE4453 (Regression: NOT NULL constraint, declared in domain, does not work);
CORE4725 (Inconsistencies with ALTER DOMAIN and ALTER TABLE with DROP NOT NULL and PRIMARY KEYs);
CORE4733 (Command "Alter table <T> alter TYPE <C> <DOMAIN_WITH_NOT_NULL" does not verifies data in column <C> and makes incorrect assignments in <C> to ZERO / JULIAN_DATE / ASCII(0) for types INT, TIMESTAMP and VARCHAR);
The text was updated successfully, but these errors were encountered: