MXS-1307 Catch "union all" selects
This commit is contained in:
@ -3551,7 +3551,7 @@ static void update_field_infos_from_select(QcSqliteInfo* pInfo,
|
||||
update_field_infos_from_with(pInfo, &aliases, pSelect->pWith);
|
||||
}
|
||||
|
||||
if ((pSelect->op == TK_UNION) && pSelect->pPrior)
|
||||
if (((pSelect->op == TK_UNION) || (pSelect->op == TK_ALL)) && pSelect->pPrior)
|
||||
{
|
||||
update_field_infos_from_subselect(pInfo, &aliases, pSelect->pPrior, usage, pExclude);
|
||||
}
|
||||
|
@ -523,7 +523,9 @@ insert t1 (data) values ('letter'), (1/0);
|
||||
--disable_ps_protocol
|
||||
update t1 set data='envelope' where 1/0 or 1;
|
||||
--enable_ps_protocol
|
||||
insert t1 (data) values (default), (1/0), ('dead beef');
|
||||
#MXS qc_mysqlem
|
||||
#MXS qc_get_function_info : ERR: != /()
|
||||
#MXS insert t1 (data) values (default), (1/0), ('dead beef');
|
||||
--disable_info
|
||||
|
||||
set sql_mode=default;
|
||||
|
10
query_classifier/test/qc_mysqlembedded_unsupported.test
Normal file
10
query_classifier/test/qc_mysqlembedded_unsupported.test
Normal file
@ -0,0 +1,10 @@
|
||||
#MXS qc_mysqlembedded does not return all functions
|
||||
#MXS qc_get_function_info : ERR: != /()
|
||||
insert t1 (data) values (default), (1/0), ('dead beef');
|
||||
|
||||
#MXS qc_mysqlembedded does not return all functions
|
||||
#MXS qc_get_function_info : ERR: coalesce() != case() coalesce() if()
|
||||
insert into t1 values
|
||||
(if(1, 9223372036854775808, 1)),
|
||||
(case when 1 then 9223372036854775808 else 1 end),
|
||||
(coalesce(9223372036854775808, 1));
|
@ -3296,10 +3296,12 @@ DROP TABLE t1,t2;
|
||||
#
|
||||
|
||||
create table t1 (a bigint unsigned);
|
||||
insert into t1 values
|
||||
(if(1, 9223372036854775808, 1)),
|
||||
(case when 1 then 9223372036854775808 else 1 end),
|
||||
(coalesce(9223372036854775808, 1));
|
||||
#MXS qc_mysqlembedded does not return all functions
|
||||
#MXS qc_get_function_info : ERR: coalesce() != case() coalesce() if()
|
||||
#insert into t1 values
|
||||
# (if(1, 9223372036854775808, 1)),
|
||||
# (case when 1 then 9223372036854775808 else 1 end),
|
||||
# (coalesce(9223372036854775808, 1));
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
create table t1 select
|
||||
|
Reference in New Issue
Block a user