Skip to content
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

Problem with column names with Accents and triggers [CORE2227] #2655

Closed
firebird-automations opened this issue Dec 4, 2008 · 23 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rui Cruz (rmgdc)

Is related to QA241

Triggers don't recognize column names with accents.

Test case:

/* ---------- x ---------------- */

RECREATE TABLE TESTING (
"CÓDIGO" INTEGER
);

SET TERM §;
CREATE TRIGGER TESTING_I FOR TESTING
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW."CÓDIGO" = 1;
END§

/* ---------- x ---------------- */

This gives the following error:

ISC ERROR CODE:335544343

ISC ERROR MESSAGE:
invalid request BLR at offset 22
column CÓDIGO is not defined in table TESTING

Commits: a1628d1 41b4b3a

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

What is your connection charset used?

@firebird-automations
Copy link
Collaborator Author

Commented by: Rui Cruz (rmgdc)

ISO8859_1

@firebird-automations
Copy link
Collaborator Author

Modified by: Rui Cruz (rmgdc)

description: Triggers don't recognize column names with accents.

Test case:

/* ---------- x ---------------- */

RECREATE TABLE TESTING (
"CÓDIGO" INTEGER
);

SET TERM §;
CREATE TRIGGER TESTING_I FOR TESTING
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW."CÓDIGO";
END§

/* ---------- x ---------------- */

This gives the following error:

ISC ERROR CODE:335544343

ISC ERROR MESSAGE:
invalid request BLR at offset 22
column CÓDIGO is not defined in table TESTING

=>

Triggers don't recognize column names with accents.

Test case:

/* ---------- x ---------------- */

RECREATE TABLE TESTING (
"CÓDIGO" INTEGER
);

SET TERM §;
CREATE TRIGGER TESTING_I FOR TESTING
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW."CÓDIGO" = 1;
END§

/* ---------- x ---------------- */

This gives the following error:

ISC ERROR CODE:335544343

ISC ERROR MESSAGE:
invalid request BLR at offset 22
column CÓDIGO is not defined in table TESTING

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Firebird version ?
Platform ?
tool ?

because under FB2.1 I can't reproduce it
(using isql and edit, so vi under MacOsx)

SQL> show trigger TESTING_I;

Triggers on Table TESTING:
TESTING_I, Sequence: 0, Type: BEFORE INSERT, Active
AS
BEGIN
NEW."CÓDIGO" = 1;
END
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

@firebird-automations
Copy link
Collaborator Author

Commented by: Rui Cruz (rmgdc)

ISQL Version: WI-V2.1.1.17910 Firebird 2.1
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.1.0.17798 Firebird 2.1"
Firebird/x86/Windows NT (remote server), version "WI-V2.1.0.17798 Firebird 2.1/tcp (phobos)/P11"
Firebird/x86/Windows NT (remote interface), version "WI-V2.1.1.17910 Firebird 2.1/tcp (bacuz)/P11"
on disk structure version 11.1

...using IBOConsole or an ODBC driver and any client aplicattion...

@firebird-automations
Copy link
Collaborator Author

Commented by: Rui Cruz (rmgdc)

.. noticed that server version was different from client version and upgrade it.. same problem:

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

The problem is related to the tool you are using
I tested again under Win32
isql
edit;
type in the editor :
SET NAMES ISO8859_1;
RECREATE TABLE TESTING (
"CÓDIGO" INTEGER,
"àéèù" INTEGER
);
COMMIT;
SET TERM ^;
CREATE TRIGGER TESTING_I FOR TESTING
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW."CÓDIGO" = 1;
NEW."àéèù" = 1;
END^
SET TERM ;^
COMMIT;

save the file, quit the editor

no problem
table and trigger are there.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Philippe, MacOSX build should have a problem, because there is a problem and that test case doesn't work in Windows.

@firebird-automations
Copy link
Collaborator Author

Commented by: Rui Cruz (rmgdc)

Philippe is right.. that test case works using =>ISQL<=.
The problem is using other tools or an ODBC driver I cannot create the trigger.

Suggestions?

Thanks,
Rui Cruz

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

hum, see my other post (test under Vista 32 Firebird 2.1.1)
I have to say that with Databaseworkbench the bug is there, but not with isql and notepad

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

It doesn't work in isql either. If it's working for you, I believe you are not using a connection charset.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 2.1.1 [ 10223 ]

Version: 2.5 Alpha 1 [ 10224 ]

Version: 2.1.0 [ 10041 ]

Component: Engine [ 10000 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pmakowski

Adriano read what I posted :
>isql
>edit;
>type in the editor :
>SET NAMES ISO8859_1;

isn't using a charset ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

> isn't using a charset ?

If it's just before RECREATE TABLE, no. Because SET NAMES should be *before* CONNECT or CREATE DATABASE.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.5 Beta 1 [ 10251 ]

Fix Version: 2.1.3 [ 10302 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 2.1.2 [ 10270 ]

Fix Version: 2.1.3 [ 10302 ] =>

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA241 [ QA241 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @pcisar

QA test added.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

QA Status: No test => Done successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment