Compiling a query returns internal failure in BaseTypes.cpp:118

Bug #1442966 reported by Weishiun Tsai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
Critical
Hans Zeller

Bug Description

This is a regression introduced between the v0407 build and the v1.1.0rc1 (v0410) build. Compiling the following query returns a 2006 internal error:

*** ERROR[2006] Internal error: assertion failure () in file ../common/BaseTypes.cpp at line 118.

This problem may or may not be related to another bug report https://bugs.launchpad.net/trafodion/+bug/1442932 'Query compilation returns internal error in GenItemFunc.cpp:1364 about encode storage'. In one occasion, the query returned the same 7000 internal error reported in that report instead of the 2006 error shown here. Since there is no evidence to prove one way or the other yet, for now, this separate bug report is created to track them separately unless they can be proven to be caused by the same issue.

This is reproducible on a workstation. But it requires QA’s g_arkcasedb tables. The scripts to populate this set of tables are available upon request. (It requires DCS up and running with a minimum of 3 mxosrvrs.)

------------------------------------------------------

Here is the statement to reproduce it, once the g_arkcasedb tables are populated:

prepare xx from select a.char_1, b.char_10
FROM trafodion.g_arkcasedb.btsel01 a
, trafodion.g_arkcasedb.btsel01 b
-- Join predicates:
WHERE a.char_1 = b.char_1
AND ( a.char_10 = b.char_10 )
AND ( a.pic_x_1 = b.pic_x_1 )
AND ( a.pic_x_7 = b.pic_x_7 )
AND ( a.pic_x_long = b.pic_x_long )
AND ( a.var_char = b.var_char )
AND ( a.binary_signed = b.binary_signed )
AND ( a.binary_32_u = b.binary_32_u )
AND ( a.binary_64_s = b.binary_64_s )
AND ( a.pic_comp_1 = b.pic_comp_1 )
AND ( a.pic_comp_2 = b.pic_comp_2 )
AND ( a.pic_comp_3 = b.pic_comp_3 )
AND ( a.small_int = b.small_int )
AND ( a.medium_int = b.medium_int )
AND ( a.large_int = b.large_int )
AND ( a.decimal_1 = b.decimal_1 )
AND ( a.decimal_2_signed = b.decimal_2_signed )
AND ( a.decimal_3_unsigned = b.decimal_3_unsigned )
AND ( a.pic_decimal_1 = b.pic_decimal_1 )
AND ( a.pic_decimal_2 = b.pic_decimal_2 )
AND ( a.pic_decimal_3 = b.pic_decimal_3 )
-- Add one local predicate:
AND ( a.pic_x_1 = 'Z' )
;

------------------------------------------------------

Here is the execution output:

>>prepare xx from select a.char_1, b.char_10
+>FROM trafodion.g_arkcasedb.btsel01 a
+>, trafodion.g_arkcasedb.btsel01 b
+>-- Join predicates:
+>WHERE a.char_1 = b.char_1
+>AND ( a.char_10 = b.char_10 )
+>AND ( a.pic_x_1 = b.pic_x_1 )
+>AND ( a.pic_x_7 = b.pic_x_7 )
+>AND ( a.pic_x_long = b.pic_x_long )
+>AND ( a.var_char = b.var_char )
+>AND ( a.binary_signed = b.binary_signed )
+>AND ( a.binary_32_u = b.binary_32_u )
+>AND ( a.binary_64_s = b.binary_64_s )
+>AND ( a.pic_comp_1 = b.pic_comp_1 )
+>AND ( a.pic_comp_2 = b.pic_comp_2 )
+>AND ( a.pic_comp_3 = b.pic_comp_3 )
+>AND ( a.small_int = b.small_int )
+>AND ( a.medium_int = b.medium_int )
+>AND ( a.large_int = b.large_int )
+>AND ( a.decimal_1 = b.decimal_1 )
+>AND ( a.decimal_2_signed = b.decimal_2_signed )
+>AND ( a.decimal_3_unsigned = b.decimal_3_unsigned )
+>AND ( a.pic_decimal_1 = b.pic_decimal_1 )
+>AND ( a.pic_decimal_2 = b.pic_decimal_2 )
+>AND ( a.pic_decimal_3 = b.pic_decimal_3 )
+>-- Add one local predicate:
+>AND ( a.pic_x_1 = 'Z' )
+>;

*** ERROR[2006] Internal error: assertion failure () in file ../common/BaseTypes.cpp at line 118.

*** ERROR[8822] The statement was not prepared.

Tags: sql-cmp
Changed in trafodion:
assignee: nobody → Hans Zeller (hans-zeller)
status: New → In Progress
Revision history for this message
Hans Zeller (hans-zeller) wrote :

Fix for bug 1442932, bug 1442944 and bug 1442966 was merged into the R1.1 branch on 4/15, see https://review.trafodion.org/1504.

Changed in trafodion:
status: In Progress → Fix Committed
Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

Verified on the v0416 build installed on a 4-node cluster. This problem has been fixed:

>>set schema g_arkcasedb;

--- SQL operation complete.
>>
>>prepare xx from select a.char_1, b.char_10
+> FROM trafodion.g_arkcasedb.btsel01 a
+> , trafodion.g_arkcasedb.btsel01 b
+> -- Join predicates:
+> WHERE a.char_1 = b.char_1
+> AND ( a.char_10 = b.char_10 )
+> AND ( a.pic_x_1 = b.pic_x_1 )
+> AND ( a.pic_x_7 = b.pic_x_7 )
+> AND ( a.pic_x_long = b.pic_x_long )
+> AND ( a.var_char = b.var_char )
+> AND ( a.binary_signed = b.binary_signed )
+> AND ( a.binary_32_u = b.binary_32_u )
+> AND ( a.binary_64_s = b.binary_64_s )
+> AND ( a.pic_comp_1 = b.pic_comp_1 )
+> AND ( a.pic_comp_2 = b.pic_comp_2 )
+> AND ( a.pic_comp_3 = b.pic_comp_3 )
+> AND ( a.small_int = b.small_int )
+> AND ( a.medium_int = b.medium_int )
+> AND ( a.large_int = b.large_int )
+> AND ( a.decimal_1 = b.decimal_1 )
+> AND ( a.decimal_2_signed = b.decimal_2_signed )
+> AND ( a.decimal_3_unsigned = b.decimal_3_unsigned )
+> AND ( a.pic_decimal_1 = b.pic_decimal_1 )
+> AND ( a.pic_decimal_2 = b.pic_decimal_2 )
+> AND ( a.pic_decimal_3 = b.pic_decimal_3 )
+> -- Add one local predicate:
+> AND ( a.pic_x_1 = 'Z' )
+> ;

--- SQL command prepared.

Changed in trafodion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.