summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorantony@ltantony.mysql.com <>2005-05-07 16:50:22 +0100
committerantony@ltantony.mysql.com <>2005-05-07 16:50:22 +0100
commit4fe845e8d02567b664e0c2bbbb65abad8c8a8c12 (patch)
tree412584e06dd49bb852f5da22c2313c5661c4530a /mysql-test
parentb4dcd8f4abbfe0e22fad84aab53aeaf20ac1587f (diff)
parenta5e9523364fe00df5675486a63ff3fe90dc9ebb6 (diff)
downloadmariadb-git-4fe845e8d02567b664e0c2bbbb65abad8c8a8c12.tar.gz
Merge
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create.result11
-rw-r--r--mysql-test/r/insert_update.result13
-rw-r--r--mysql-test/t/create.test11
-rw-r--r--mysql-test/t/insert_update.test12
4 files changed, 47 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 61de9c52765..34ccab9bcc5 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -568,3 +568,14 @@ NULL 1
Test 0
NULL 1
drop table t1, t2, t3;
+create table t1 (b bool not null default false);
+create table t2 (b bool not null default true);
+insert into t1 values ();
+insert into t2 values ();
+select * from t1;
+b
+0
+select * from t2;
+b
+1
+drop table t1,t2;
diff --git a/mysql-test/r/insert_update.result b/mysql-test/r/insert_update.result
index 1817500973e..12b83640d91 100644
--- a/mysql-test/r/insert_update.result
+++ b/mysql-test/r/insert_update.result
@@ -167,3 +167,16 @@ a b c VALUES(a)
2 1 11 NULL
DROP TABLE t1;
DROP TABLE t2;
+create table t1 (a int not null unique);
+insert into t1 values (1),(2);
+insert ignore into t1 select 1 on duplicate key update a=2;
+select * from t1;
+a
+1
+2
+insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
+select * from t1;
+a
+1
+3
+drop table t1;
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 1e2cf391221..d4733e6dc7e 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -460,3 +460,14 @@ INSERT INTO t2 VALUES ('5000000001', 'proc01', '20031029090650', '2003-10-29 13:
CREATE TABLE t3 SELECT t1.dsc,COUNT(DISTINCT t2.id) AS countOfRuns FROM t1 LEFT JOIN t2 ON (t1.id=t2.id) GROUP BY t1.id;
SELECT * FROM t3;
drop table t1, t2, t3;
+
+#
+# Bug#9666: Can't use 'DEFAULT FALSE' for column of type bool
+#
+create table t1 (b bool not null default false);
+create table t2 (b bool not null default true);
+insert into t1 values ();
+insert into t2 values ();
+select * from t1;
+select * from t2;
+drop table t1,t2;
diff --git a/mysql-test/t/insert_update.test b/mysql-test/t/insert_update.test
index 188de8a5379..0fa366586b3 100644
--- a/mysql-test/t/insert_update.test
+++ b/mysql-test/t/insert_update.test
@@ -80,3 +80,15 @@ INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
SELECT *, VALUES(a) FROM t1;
DROP TABLE t1;
DROP TABLE t2;
+
+#
+# Bug#9725 - "disapearing query/hang" and "unknown error" with "on duplicate key update"
+# INSERT INGORE...UPDATE gives bad error or breaks protocol.
+#
+create table t1 (a int not null unique);
+insert into t1 values (1),(2);
+insert ignore into t1 select 1 on duplicate key update a=2;
+select * from t1;
+insert ignore into t1 select a from t1 on duplicate key update a=a+1 ;
+select * from t1;
+drop table t1;