MXS-1364 Collect field usage of CASE and BETWEEN
This commit is contained in:
@ -92,3 +92,9 @@ with recursive src(counter) as
|
||||
#MXS as (select a, min(a) over () from t1 where a = 1);"
|
||||
create view win_view
|
||||
as (select a, min(a) over () from t1 where a = 1);
|
||||
|
||||
select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
|
||||
# qc_get_function_info : ERR: =()[QC_USED_IN_WHERE] like(t2.fld3)[QC_USED_IN_WHERE] != =()[QC_USED_IN_WHERE] like(fld3)[QC_USED_IN_WHERE]
|
||||
# qc_sqlite is not capable of amending a field name with the table name, in cases
|
||||
# where there is only table. However, neither is qc_mysqlembedded always either.
|
||||
# E.g. "select a from t where length(a) = 5" results in just a.
|
@ -1262,7 +1262,9 @@ INSERT INTO t2 VALUES (1193,000000,00,'nondecreasing','implant','thrillingly',''
|
||||
# Search with a key
|
||||
#
|
||||
|
||||
select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
|
||||
# MXS: qc_get_function_info : ERR: =()[QC_USED_IN_WHERE] like(t2.fld3)[QC_USED_IN_WHERE] != =()[QC_USED_IN_WHERE] like(fld3)[QC_USED_IN_WHERE]
|
||||
#select t2.fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
|
||||
select fld3 from t2 where companynr = 58 and fld3 like "%imaginable%";
|
||||
select fld3 from t2 where fld3 like "%cultivation" ;
|
||||
|
||||
#
|
||||
@ -1282,13 +1284,15 @@ select fld3 from t2 order by fld3 desc limit 5,5;
|
||||
#
|
||||
|
||||
select t2.fld3 from t2 where fld3 = 'honeysuckle';
|
||||
select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
|
||||
select t2.fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
|
||||
select t2.fld3 from t2 where fld3 LIKE 'honeysuckle%';
|
||||
select t2.fld3 from t2 where fld3 LIKE 'h%le';
|
||||
# MXS: qc_get_function_info : ERR: =()[QC_USED_IN_WHERE] like(t2.fld3)[QC_USED_IN_WHERE] != =()[QC_USED_IN_WHERE] like(fld3)[QC_USED_IN_WHERE]
|
||||
#select t2.fld3 from t2 where fld3 LIKE 'honeysuckl_';
|
||||
select fld3 from t2 where fld3 LIKE 'honeysuckl_';
|
||||
select fld3 from t2 where fld3 LIKE 'hon_ysuckl_';
|
||||
select fld3 from t2 where fld3 LIKE 'honeysuckle%';
|
||||
select fld3 from t2 where fld3 LIKE 'h%le';
|
||||
|
||||
select t2.fld3 from t2 where fld3 LIKE 'honeysuckle_';
|
||||
select t2.fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
|
||||
select fld3 from t2 where fld3 LIKE 'honeysuckle_';
|
||||
select fld3 from t2 where fld3 LIKE 'don_t_find_me_please%';
|
||||
|
||||
#
|
||||
# Test using INDEX and IGNORE INDEX
|
||||
@ -1316,7 +1320,9 @@ explain select fld3 from t2 use index (not_used);
|
||||
# Test sorting with a used key (there is no need for sorting)
|
||||
#
|
||||
|
||||
select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
|
||||
#MXS qc_get_function_info : ERR: <=(t2.fld3)[QC_USED_IN_WHERE] >=(t2.fld3)[QC_USED_IN_WHERE] != <=(fld3)[QC_USED_IN_WHERE] >=(fld3)[QC_USED_IN_WHERE]
|
||||
#MXS select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
|
||||
select fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
|
||||
explain select t2.fld3 from t2 where fld3 >= 'honeysuckle' and fld3 <= 'honoring' order by fld3;
|
||||
select fld1,fld3 from t2 where fld3="Colombo" or fld3 = "nondecreasing" order by fld3;
|
||||
|
||||
@ -1361,7 +1367,9 @@ select fld1,fld3 from t2 where fld1 like "25050_";
|
||||
select distinct companynr from t2;
|
||||
select distinct companynr from t2 order by companynr;
|
||||
select distinct companynr from t2 order by companynr desc;
|
||||
select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
|
||||
#MXS qc_get_function_info : ERR: =()[QC_USED_IN_WHERE] like(t2.fld3)[QC_USED_IN_WHERE] != =()[QC_USED_IN_WHERE] like(fld3)[QC_USED_IN_WHERE]
|
||||
#MXS select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
|
||||
select distinct fld3,period from t2,t1 where companynr=37 and fld3 like "O%";
|
||||
|
||||
select distinct fld3 from t2 where companynr = 34 order by fld3;
|
||||
select distinct fld3 from t2 limit 10;
|
||||
|
@ -161,7 +161,9 @@ INSERT INTO t2 VALUES (3,4433,10013,489,500);
|
||||
INSERT INTO t2 VALUES (3,4433,10005,494,500);
|
||||
INSERT INTO t2 VALUES (3,4433,10005,493,500);
|
||||
INSERT INTO t2 VALUES (3,4433,10005,492,500);
|
||||
UPDATE IGNORE t2,t1 set t2.colE = t2.colE + 1,colF=0 WHERE t1.colA = t2.colA AND (t1.colB & 4096) > 0 AND (colE + 1) < colF;
|
||||
#MXS
|
||||
#MXS UPDATE IGNORE t2,t1 set t2.colE = t2.colE + 1,colF=0 WHERE t1.colA = t2.colA AND (t1.colB & 4096) > 0 AND (colE + 1) < colF;
|
||||
UPDATE IGNORE t2,t1 set t2.colE = t2.colE + 1,colF=0 WHERE t1.colA = t2.colA AND (t1.colB & 4096) > 0 AND (t2.colE + 1) < colF;
|
||||
SELECT * FROM t2;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
|
Reference in New Issue
Block a user