summaryrefslogtreecommitdiff
path: root/mysql-test/t/csv.test
diff options
context:
space:
mode:
authorunknown <petr/cps@owlet.local>2006-08-23 17:15:24 +0400
committerunknown <petr/cps@owlet.local>2006-08-23 17:15:24 +0400
commitd08dd523a2bd9f11299b9e0322987397b3009a38 (patch)
tree18f02970d02b1a968090e9a6e6f3fba656eafe40 /mysql-test/t/csv.test
parent118677a29310232df348596565af2d258ca555c9 (diff)
parent70b73788980a955e5ee4e064c053d83b73b0b295 (diff)
downloadmariadb-git-d08dd523a2bd9f11299b9e0322987397b3009a38.tar.gz
Merge mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
into mysql.com:/home/cps/mysql/trees/mysql-5.1-virgin storage/csv/ha_tina.cc: merge later mysql-test/r/csv.result: manual merge mysql-test/t/csv.test: manual merge
Diffstat (limited to 'mysql-test/t/csv.test')
-rw-r--r--mysql-test/t/csv.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index 9ba99167ab9..a042f163635 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1558,3 +1558,27 @@ select * from t1;
alter table t1 add unique key (i, v);
select * from t1 where i between 2 and 4 and v in ('def','3r4f','lmn');
drop table t1;
+
+#
+# Bug #15205 Select from CSV table without the datafile causes crash
+#
+# NOTE: the bug is not deterministic
+
+# The crash happens because the necessary cleanup after an error wasn't
+# performed. Namely, the table share, inserted in the hash during table
+# open, was not deleted from hash. At the same time the share was freed
+# when an error was encountered. Thus, subsequent access to the hash
+# resulted in scanning through deleted memory and we were geting a crash.
+# that's why we need two tables in the bugtest
+
+create table bug15205 (val int(11) default null) engine=csv;
+create table bug15205_2 (val int(11) default null) engine=csv;
+--exec rm $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
+# system error (can't open the datafile)
+--error ER_GET_ERRNO
+select * from bug15205;
+select * from bug15205_2;
+--exec touch $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
+select * from bug15205;
+drop table bug15205;
+drop table bug15205_2;