summaryrefslogtreecommitdiff
path: root/mysql-test/main/check_constraint.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/check_constraint.result')
-rw-r--r--mysql-test/main/check_constraint.result63
1 files changed, 63 insertions, 0 deletions
diff --git a/mysql-test/main/check_constraint.result b/mysql-test/main/check_constraint.result
index f851b99e5c1..dab1d61cdb9 100644
--- a/mysql-test/main/check_constraint.result
+++ b/mysql-test/main/check_constraint.result
@@ -236,6 +236,66 @@ insert t1 (b) values (1);
ERROR 23000: CONSTRAINT `CONSTRAINT_1` failed for `test`.`t1`
drop table t1;
#
+# MDEV-25638 Assertion `!result' failed in convert_const_to_int
+#
+create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+select * from t1;
+v1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+select v1 from t1;
+v1
+select * from t1;
+v1
+prepare stmt from "select * from t1";
+execute stmt;
+v1
+execute stmt;
+v1
+flush tables;
+select * from t1;
+v1
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+select * from t1;
+v1
+deallocate prepare stmt;
+drop table t1;
+#
+# MDEV-26061 MariaDB server crash at Field::set_default
+#
+create table t1 (v2 date check (v1 like default (v1)), v1 date default (from_days ('x')));
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'x'
+insert ignore into t1 values ( 'x' , 'x' ) ;
+Warnings:
+Warning 1265 Data truncated for column 'v2' at row 1
+Warning 1265 Data truncated for column 'v1' at row 1
+Warning 1292 Truncated incorrect INTEGER value: 'x'
+drop table t1;
+#
+# End of 10.2 tests
+#
+#
+# MDEV-26061 MariaDB server crash at Field::set_default
+#
+create table t1 (d timestamp check (default (d) is true)) as select 1;
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() CHECK (default(`d`) is true),
+ `1` int(1) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+drop table t1;
+#
+# End of 10.3 tests
+#
+#
# MDEV-24274 ALTER TABLE with CHECK CONSTRAINTS gives "Out of Memory" error
#
create table t1 (id varchar(2), constraint id check (id regexp '[a-z]'));
@@ -247,3 +307,6 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `id` CHECK (`id` regexp '[a-z]')
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+#
+# End of 10.4 tests
+#