summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/innodb.result37
-rw-r--r--mysql-test/r/myisam.result23
-rw-r--r--mysql-test/r/show_check.result2
-rw-r--r--mysql-test/t/innodb.test26
-rw-r--r--mysql-test/t/myisam.test13
5 files changed, 96 insertions, 5 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 36bc1c814e4..718e554b904 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1354,3 +1354,40 @@ id label
3524 Societe Test
3525 Fournisseur Test
drop table t1,t2;
+create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) type=innodb;
+select * from t1;
+c1 c2 stamp
+replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+select * from t1;
+c1 c2 stamp
+replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
+ERROR HY000: Table storage engine for 't1' doesn't have this option
+select * from t1;
+c1 c2 stamp
+drop table t1;
+create table t1 (a int, b varchar(200), c text not null) checksum=1 type=myisam;
+create table t2 (a int, b varchar(200), c text not null) checksum=0 type=innodb;
+create table t3 (a int, b varchar(200), c text not null) checksum=1 type=innodb;
+insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
+insert t2 select * from t1;
+insert t3 select * from t1;
+checksum table t1, t2, t3, t4 quick;
+Table Checksum
+test.t1 968604391
+test.t2 NULL
+test.t3 NULL
+test.t4 NULL
+checksum table t1, t2, t3, t4;
+Table Checksum
+test.t1 968604391
+test.t2 968604391
+test.t3 968604391
+test.t4 NULL
+checksum table t1, t2, t3, t4 extended;
+Table Checksum
+test.t1 968604391
+test.t2 968604391
+test.t3 968604391
+test.t4 NULL
+drop table t1,t2,t3;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index d158c39cba8..5971ffedcfc 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -367,6 +367,23 @@ id select_type table type possible_keys key key_len ref rows Extra
drop table t1,t2;
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) TYPE=MyISAM;
ERROR 42000: This version of MySQL doesn't yet support 'RTREE INDEX'
-DROP TABLE IF EXISTS t1;
-Warnings:
-Note 1051 Unknown table 't1'
+create table t1 (a int, b varchar(200), c text not null) checksum=1;
+create table t2 (a int, b varchar(200), c text not null) checksum=0;
+insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
+insert t2 select * from t1;
+checksum table t1, t2, t3 quick;
+Table Checksum
+test.t1 968604391
+test.t2 NULL
+test.t3 NULL
+checksum table t1, t2, t3;
+Table Checksum
+test.t1 968604391
+test.t2 968604391
+test.t3 NULL
+checksum table t1, t2, t3 extended;
+Table Checksum
+test.t1 968604391
+test.t2 968604391
+test.t3 NULL
+drop table t1,t2;
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 201d1b541ae..682c48c9c55 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -43,7 +43,7 @@ wait_timeout 28800
show variables like "this_doesn't_exists%";
Variable_name Value
show table status from test like "this_doesn't_exists%";
-Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Charset Create_options Comment
+Name Type Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Charset Checksum Create_options Comment
show databases;
Database
mysql
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 870fc8cc2b0..823ac25cf66 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -940,3 +940,29 @@ SELECT t2.id, t1.label FROM t2 INNER JOIN
(SELECT t1.id_object as id_object FROM t1 WHERE t1.label LIKE '%test%') AS lbl
ON (t2.id = lbl.id_object) INNER JOIN t1 ON (t2.id = t1.id_object);
drop table t1,t2;
+
+#
+# Bug #1078
+#
+create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) type=innodb;
+select * from t1;
+--error 1031
+replace delayed into t1 (c1, c2) values ( "text1","11"),( "text2","12");
+select * from t1;
+--error 1031
+replace delayed into t1 (c1, c2) values ( "text1","12"),( "text2","13"),( "text3","14", "a" ),( "text4","15", "b" );
+select * from t1;
+drop table t1;
+
+create table t1 (a int, b varchar(200), c text not null) checksum=1 type=myisam;
+create table t2 (a int, b varchar(200), c text not null) checksum=0 type=innodb;
+create table t3 (a int, b varchar(200), c text not null) checksum=1 type=innodb;
+insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
+insert t2 select * from t1;
+insert t3 select * from t1;
+checksum table t1, t2, t3, t4 quick;
+checksum table t1, t2, t3, t4;
+checksum table t1, t2, t3, t4 extended;
+#show table status;
+drop table t1,t2,t3;
+
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 5267b57259b..7e6242c9b68 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -363,4 +363,15 @@ drop table t1,t2;
CREATE TABLE t1 (`a` int(11) NOT NULL default '0', `b` int(11) NOT NULL default '0', UNIQUE KEY `a` USING RTREE (`a`,`b`)) TYPE=MyISAM;
# INSERT INTO t1 VALUES (1,1),(1,1);
# DELETE FROM rt WHERE a<1;
-DROP TABLE IF EXISTS t1;
+# DROP TABLE IF EXISTS t1;
+
+create table t1 (a int, b varchar(200), c text not null) checksum=1;
+create table t2 (a int, b varchar(200), c text not null) checksum=0;
+insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
+insert t2 select * from t1;
+checksum table t1, t2, t3 quick;
+checksum table t1, t2, t3;
+checksum table t1, t2, t3 extended;
+#show table status;
+drop table t1,t2;
+