Description
AlterTableConstantAction generates SQL statements various places. Identifiers (schema names, table names, column names) are surrounded with double quotes in case they contain special characters. This is not enough if the identifiers contain double quotes, as can be seen with this example:
ij> create table t(x int);
0 rows inserted/updated/deleted
ij> alter table t add column """" int default 42;
ERROR 42X01: Syntax error: Encountered "\"" at line 1, column 22.
I've found three places where AlterTableConstantAction generates SQL statements: updateNewColumnToDefault(), updateNewAutoincrementColumn(), getColumnMax(). All three places suffer from this problem.
Attachments
Attachments
Issue Links
- is related to
-
DERBY-5161 Cannot rollback after syntax error in internal statement
- Closed