summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/archive.result11
-rw-r--r--mysql-test/std_data/t917689.ARZbin0 -> 8687 bytes
-rw-r--r--mysql-test/t/archive.test11
-rw-r--r--mysql-test/t/sp.test5
4 files changed, 26 insertions, 1 deletions
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 0ec84efa842..f2cdf2adfca 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -12801,3 +12801,14 @@ OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
DROP TABLE t1;
+#
+# BUG#917689 Using wrong archive table causes crash
+#
+create table t1 (a int, b char(50)) engine=archive;
+select * from t1;
+ERROR HY000: Table 't1' is marked as crashed and should be repaired
+show warnings;
+Level Code Message
+Error 127 Got error 127 when reading table `test`.`t1`
+Error 1194 Table 't1' is marked as crashed and should be repaired
+drop table t1;
diff --git a/mysql-test/std_data/t917689.ARZ b/mysql-test/std_data/t917689.ARZ
new file mode 100644
index 00000000000..4770ca0c257
--- /dev/null
+++ b/mysql-test/std_data/t917689.ARZ
Binary files differ
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 6f788fc3cc6..0f274b6225d 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1727,3 +1727,14 @@ CHECKSUM TABLE t1 EXTENDED;
FLUSH TABLE t1;
OPTIMIZE TABLE t1;
DROP TABLE t1;
+
+--echo #
+--echo # BUG#917689 Using wrong archive table causes crash
+--echo #
+create table t1 (a int, b char(50)) engine=archive;
+--remove_file $MYSQLD_DATADIR/test/t1.ARZ
+copy_file std_data/t917689.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
+--error 1194
+select * from t1;
+show warnings;
+drop table t1;
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index fa1572e561f..c7bfa42da95 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -194,12 +194,15 @@ begin
insert into test.t1 values (x, z);
end|
+let $start_value= `SELECT @@max_join_size`|
call mixset("mixset", 19)|
show variables like 'max_join_size'|
select id,data,@z from t1|
delete from t1|
drop procedure mixset|
-
+--disable_query_log
+eval SET @@max_join_size= $start_value|
+--enable_query_log
# Multiple CALL statements, one with OUT parameter.
--disable_warnings