Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
showddl command shows details about a table. Generated
create statement could be used to recreate the table.
It currently does not put double quotes around columns in
the ON clause of SALT expression.
That results in CREATE LIKE, which internally uses showddl output,
to fail if the specified column name is invalid without quotes.
Here is an example to reproduce this issue:
>>create table t ("a.a" int not null, b int not null, primary key("a.a", b))
+>salt using 4 partitions on ("a.a");
— SQL operation complete.
>>showddl t;
CREATE TABLE TRAFODION.SEABASE.T
(
"a.a" INT NO DEFAULT NOT NULL NOT DROPPABLE
, B INT NO DEFAULT NOT NULL NOT DROPPABLE
, PRIMARY KEY ("a.a" ASC, B ASC)
)
SALT USING 4 PARTITIONS
ON (a.a)
;
— SQL operation complete.
>>create table tt like t;
-
-
- ERROR[15001] A syntax error occurred at or before:
create table TRAFODION.SEABASE.TT ( "a.a" INT
NO DEFAULT NOT NULL NOT DROPPABLE NOT
SERIALIZED , "B" INT NO DEFAULT NOT NULL NO
T DROPPABLE NOT
SERIALIZED , PRIMARY KEY ("a.a" ASC, B ASC) ) SALT USING 4 PARTITIONS
ON (a.a);
^ (304 characters from start of SQL statement)
- ERROR[15001] A syntax error occurred at or before:
-
-
-
- ERROR[8822] The statement was not prepared.
-
— SQL operation failed with errors.
>>