Consecutive dashes in identifiers fail
Bug #1373151 reported by
Roberta Marton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
New
|
Low
|
Anuradha |
Bug Description
If consecutive dashes are part of a SQL identifiers, the parser gets confused.
Welcome to Trafodion Command Interface
SQL>create schema dbr_sch;
--- SQL operation complete.
SQL>set schema dbr_sch;
--- SQL operation complete.
SQL>create table "tab1--tab2" (a int not null not droppable, c char(1), primary key (a));
+>;
*** ERROR[15005] Unmatched quote in input (unterminated string):
It looks like the parser is treating double dashes as a comment.
Changed in trafodion: | |
importance: | Undecided → Low |
tags: | added: sql-cmp |
Changed in trafodion: | |
assignee: | nobody → Anoop Sharma (anoop-sharma) |
tags: |
added: connectivity-general removed: sql-cmp |
Changed in trafodion: | |
assignee: | Anoop Sharma (anoop-sharma) → nobody |
Changed in trafodion: | |
assignee: | nobody → Anuradha (anuradha-hegde) |
milestone: | none → r1.1 |
Changed in trafodion: | |
milestone: | r1.1 → none |
To post a comment you must log in.
Problem is not with sql parser but with trafci frontend.
trafci is treating 2 consecutive dashes as a comment and truncating the input string.
That truncated input string results in an error when seen by sql parser.
Trafci should not treat them as comment if they are within quotes.
This issue is not seen with sqlci.
Trafodion Conversational Interface 0.9.1
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>
>>create table "t--t" (a int);
--- SQL operation complete.
>>invoke "t--t";
-- Definition of Trafodion table TRAFODION. SEABASE. "t--t"
-- Definition current Sat Oct 25 18:18:37 2014
(
SYSKEY LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
, A INT DEFAULT NULL
)
--- SQL operation complete.
>>