setting the attribute DEFAULT_CHARSET to UTF8 produces wrong results for metadata queries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Committed
|
High
|
Anoop Sharma |
Bug Description
Steps to reproduce
From sqlci
insert into "_MD_".defaults values(
exit ;
From another sqlci session
set schema "_MD_" ;
get tables ;
The "get tables" command returns 0 rows, while it should return a dozen or so rows with all metadata tables. This problem is not sen if a cqd was used to specify the DEFAULT_CHARSET attribute, but that could be due to a query cache issue.
I am placing this bug to have a critical priority since we have PoCs interested in using this attribute.
Output seen in 0.9.0 build. The last line (with command "get tables") shows the wrong result.
[ssubbiah@g4t3017 scripts]$ sqlci
Trafodion Conversational Interface 0.9.0
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>insert into "_MD_".defaults values(
set schema "_MD_" ;
get tables ;
--- 1 row(s) inserted.
>>>>
--- SQL operation complete.
>>>>
Tables in Schema TRAFODION._MD_
=======
AUTHS
COLUMNS
DEFAULTS
INDEXES
KEYS
LIBRARIES
LIBRARIES_USAGE
OBJECTS
REF_CONSTRAINTS
ROUTINES
SEQ_GEN
TABLES
TABLE_CONSTRAINTS
TEXT
UNIQUE_
VERSIONS
VIEWS
VIEWS_USAGE
--- SQL operation complete.
>>cqd query_cache '0' ;
--- SQL operation complete.
>>get tables ;
Tables in Schema TRAFODION._MD_
=======
AUTHS
COLUMNS
DEFAULTS
INDEXES
KEYS
LIBRARIES
LIBRARIES_USAGE
OBJECTS
REF_CONSTRAINTS
ROUTINES
SEQ_GEN
TABLES
TABLE_CONSTRAINTS
TEXT
UNIQUE_
VERSIONS
VIEWS
VIEWS_USAGE
--- SQL operation complete.
>>exit ;
End of MXCI Session
[ssubbiah@g4t3017 scripts]$ sqlci
Trafodion Conversational Interface 0.9.0
(c) Copyright 2014 Hewlett-Packard Development Company, LP.
>>set schema "_MD_" ;
--- SQL operation complete.
>>get tables ;
--- SQL operation complete.
Changed in trafodion: | |
assignee: | nobody → Anoop Sharma (anoop-sharma) |
importance: | Critical → High |
For OSS poc, a cqd called TRAF_DEFAULT_ COL_CHARSET was added.
this sets the default charset for all columns of user tables which do not
have an explicit charset clause specified. It does not impact metadata tables.
This cqd is not yet checked into mainline but will be part of december release.
Use of the cqd mentioned in this LP case( DEFAULT_CHARSET) is unclear based on
its implementation in code.
POCs which want to have UTF8 as their default col type should use traf_default_ col_charset.
Until then, they should add an explicit 'charset' clause to their column definition.