Update stats on tables in schemas with delimited names fail with syntax error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Committed
|
High
|
Dave Birdsall |
Bug Description
Select queries on repository tables returned warnings about stats not updated, so I tried running update stats and it fails with the errors below.
[trafodion@n007 ~]$ sqid
MY_SQROOT=
who@host=
JAVA_HOME=
linux=2.
redhat=6.3
Release 1.2.0 (Build release [1.1.0rc1-
[trafodion@n007 ~]$ sqlci
Trafodion Conversational Interface 1.2.0
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>set schema "_REPOS_";
--- SQL operation complete.
>>update statistics for table metric_query_table on every column;
*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.
*** ERROR[8605] Committing a transaction which has not started.
*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.
*** ERROR[15001] A syntax error occurred at or before:
TABLE ;
^ (7 characters from start of SQL statement)
*** ERROR[8822] The statement was not prepared.
--- SQL operation failed with errors.
>>update statistics for table metric_
*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.
*** ERROR[8605] Committing a transaction which has not started.
*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.
*** ERROR[15001] A syntax error occurred at or before:
TABLE ;
^ (7 characters from start of SQL statement)
*** ERROR[8822] The statement was not prepared.
--- SQL operation failed with errors.
>>
this is not an issue related to repository tables.
this is a pbm related to delimited schema names
which are invalid identifiers if unquoted.
Looks like some internal stmt issued by upd stats
in not double quoting schema name. And that
gets an error from parser.
>>create schema "1ab";
--- SQL operation complete.
>>set schema "1ab";
--- SQL operation complete.
>>create table t (a int);
--- SQL operation complete.
>>update statistics for table t on every column;
*** ERROR[9200] UPDATE STATISTICS for table TRAFODION.1ab.T encountered an error (15001) from statement .
*** ERROR[15001] A syntax error occurred at or before:
TABLE ;
^ (7 characters from start of SQL statement)
*** ERROR[8822] The statement was not prepared.
--- SQL operation failed with errors.
>>