summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorunknown <jimw@rama.(none)>2006-07-11 17:28:50 -0700
committerunknown <jimw@rama.(none)>2006-07-11 17:28:50 -0700
commit97cdd9df8a67a26335fba3ffbb9daca7b2877b10 (patch)
treec614126b30086c98bceee3d353c579a693288480 /mysql-test/r
parentc3cb46908c30895e0aafa0f7602370240a3c5a98 (diff)
downloadmariadb-git-97cdd9df8a67a26335fba3ffbb9daca7b2877b10.tar.gz
Bug #17766: The server accepts to create MERGE tables which cannot work
Changed the error reporting (and a crash) when inserting data into a MERGE table that has no underlying tables or no INSERT_METHOD specified by reporting that it is read-only. include/my_base.h: Add new handler error mysql-test/r/merge.result: Update results mysql-test/t/merge.test: Add new regression test sql/ha_myisammrg.cc: When trying to insert into a MERGE table with no underlying tables or no INSERT_METHOD, report that it is read-only. sql/handler.cc: Handle new error message
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/merge.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 568f83b7d6d..2877661e851 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -782,3 +782,15 @@ create table tm (b bit(1)) engine = merge union = (t1,t2);
select * from tm;
b
drop table tm, t1, t2;
+create table t1 (a int) insert_method = last engine = merge;
+insert into t1 values (1);
+ERROR HY000: Table 't1' is read only
+create table t2 (a int) engine = myisam;
+alter table t1 union (t2);
+insert into t1 values (1);
+alter table t1 insert_method = no;
+insert into t1 values (1);
+ERROR HY000: Table 't1' is read only
+drop table t2;
+drop table t1;
+End of 5.0 tests