summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-01-23 20:49:31 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2018-01-23 20:49:31 +0200
commitc93405b7153df01362f9869bac7c2e305dd06af9 (patch)
tree8043dec44994d714d28873d30d15e81ef3f040e7 /mysql-test/r
parentbe21a113da9748d06739b6522ea898257970b1c5 (diff)
parent8637931f118b53ff6fdadf6006ccdb8dedd6f732 (diff)
downloadmariadb-git-10.0-merge.tar.gz
WIP Merge 5.5 into bb-10.0-vicentiu10.0-merge
Unresolved conflicts: both modified: sql/item_cmpfunc.cc both modified: sql/item_cmpfunc.h both modified: sql/sql_partition.cc both modified: storage/tokudb/CMakeLists.txt
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/derived.result16
-rw-r--r--mysql-test/r/mdev_14586.result44
2 files changed, 60 insertions, 0 deletions
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 47802eca298..88ec6e4c881 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -1062,4 +1062,20 @@ SELECT * FROM v1, t2, v3 WHERE a = c AND b = d;
a b c d
DROP VIEW v1, v3;
DROP TABLE t1, t2, t3;
+#
+# MDEV-14786: Server crashes in Item_cond::transform on 2nd
+# execution of SP querying from a view
+#
+create table t1 (i int, row_start timestamp(6) not null default now(),
+row_end timestamp(6) not null default '2030-01-01 0:0:0');
+create view v1 as select i from t1 where i < 5 and (row_end =
+TIMESTAMP'2030-01-01 0:0:0' or row_end is null);
+create procedure pr(x int) select i from v1;
+call pr(1);
+i
+call pr(2);
+i
+drop procedure pr;
+drop view v1;
+drop table t1;
# end of 5.5
diff --git a/mysql-test/r/mdev_14586.result b/mysql-test/r/mdev_14586.result
new file mode 100644
index 00000000000..f6c2095d3cd
--- /dev/null
+++ b/mysql-test/r/mdev_14586.result
@@ -0,0 +1,44 @@
+create table t1(a bit(1), b int auto_increment ,id int, index(a,b));
+insert into t1 values(1,null,1);
+insert into t1 values(1,null,2);
+insert into t1 values(0,null,3);
+insert into t1 values(0,null,4);
+select a+0, b as auto_increment , id from t1 order by id;
+a+0 auto_increment id
+1 1 1
+1 2 2
+0 1 3
+0 2 4
+drop table t1;
+create table t1(a int auto_increment, b bit(5) ,id int, index (b,a));
+insert into t1 values(null,b'1',1);
+insert into t1 values(null,b'1',2);
+insert into t1 values(null,b'11',3);
+insert into t1 values(null,b'11',4);
+select a as auto_increment, b+0, id from t1 order by id;
+auto_increment b+0 id
+1 1 1
+2 1 2
+1 3 3
+2 3 4
+drop table t1;
+create table t1(a bit(1), b int auto_increment , c bit(1) , d bit(1), id int,index(a,c,b,d));
+insert into t1 values(1,null,1,1,1);
+insert into t1 values(1,null,1,1,2);
+insert into t1 values(0,null,1,1,3);
+insert into t1 values(1,null,0,1,4);
+select a+0, b as auto_increment, c+0, d+0, id from t1 order by id;
+a+0 auto_increment c+0 d+0 id
+1 1 1 1 1
+1 2 1 1 2
+0 1 1 1 3
+1 1 0 1 4
+drop table t1;
+CREATE TABLE t1 (b BIT(1), pk INTEGER AUTO_INCREMENT PRIMARY KEY);
+ALTER TABLE t1 ADD INDEX(b,pk);
+INSERT INTO t1 VALUES (1,b'1');
+ALTER TABLE t1 DROP PRIMARY KEY;
+select b+0, pk as auto_increment from t1;
+b+0 auto_increment
+1 1
+DROP TABLE t1;