summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 14:51:21 +0400
committerAlexey Kopytov <Alexey.Kopytov@Sun.com>2010-06-11 14:51:21 +0400
commitb497e2c6b2155bfdc4fc63b0f80eba9a5062a02e (patch)
tree0a5326c23c1d2ab3752bcf621639494ca7c16fc1 /mysql-test
parent5bace3f049de457ddbeb3a1946089c0f4c479229 (diff)
parent779e2a968632a5e73c660307892ca6a868399dfc (diff)
downloadmariadb-git-b497e2c6b2155bfdc4fc63b0f80eba9a5062a02e.tar.gz
Manual merge from the bugfix tree.
conflicts: conflict sql/sql_parse.cc
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/error_simulation.result9
-rw-r--r--mysql-test/t/error_simulation.test14
2 files changed, 23 insertions, 0 deletions
diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result
index 27e51a33112..fc58687cc86 100644
--- a/mysql-test/r/error_simulation.result
+++ b/mysql-test/r/error_simulation.result
@@ -39,5 +39,14 @@ a
2
DROP TABLE t1;
#
+# Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
+#
+CREATE TABLE t1(a BLOB);
+SET SESSION debug="+d,bug42064_simulate_oom";
+INSERT INTO t1 VALUES("");
+Got one of the listed errors
+SET SESSION debug=DEFAULT;
+DROP TABLE t1;
+#
# End of 5.1 tests
#
diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test
index 7cd16a6bc5a..7a48a2e3231 100644
--- a/mysql-test/t/error_simulation.test
+++ b/mysql-test/t/error_simulation.test
@@ -47,5 +47,19 @@ DROP TABLE t1;
--echo #
+--echo # Bug#42064: low memory crash when importing hex strings, in Item_hex_string::Item_hex_string
+--echo #
+
+CREATE TABLE t1(a BLOB);
+
+SET SESSION debug="+d,bug42064_simulate_oom";
+# May fail with either ER_OUT_OF_RESOURCES or EE_OUTOFMEMORY
+--error ER_OUT_OF_RESOURCES, 5
+INSERT INTO t1 VALUES("");
+SET SESSION debug=DEFAULT;
+
+DROP TABLE t1;
+
+--echo #
--echo # End of 5.1 tests
--echo #