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);
|
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);
|
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
|
--disable_ps_protocol
|
||||||
update t1 set data='envelope' where 1/0 or 1;
|
update t1 set data='envelope' where 1/0 or 1;
|
||||||
--enable_ps_protocol
|
--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
|
--disable_info
|
||||||
|
|
||||||
set sql_mode=default;
|
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);
|
create table t1 (a bigint unsigned);
|
||||||
insert into t1 values
|
#MXS qc_mysqlembedded does not return all functions
|
||||||
(if(1, 9223372036854775808, 1)),
|
#MXS qc_get_function_info : ERR: coalesce() != case() coalesce() if()
|
||||||
(case when 1 then 9223372036854775808 else 1 end),
|
#insert into t1 values
|
||||||
(coalesce(9223372036854775808, 1));
|
# (if(1, 9223372036854775808, 1)),
|
||||||
|
# (case when 1 then 9223372036854775808 else 1 end),
|
||||||
|
# (coalesce(9223372036854775808, 1));
|
||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 select
|
create table t1 select
|
||||||
|
Reference in New Issue
Block a user