summaryrefslogtreecommitdiff
path: root/mysql-test/t/user_var.test
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2010-11-22 09:57:59 +0100
committerGuilhem Bichot <guilhem@mysql.com>2010-11-22 09:57:59 +0100
commit96b0404940f7b704c4f8dd599455d4d2f013a297 (patch)
tree65c9141fa692262975bd2d03b092a1d54a142d97 /mysql-test/t/user_var.test
parenta6294cd5cbd02c48b28fe8b380f8c259f14f9d8c (diff)
downloadmariadb-git-96b0404940f7b704c4f8dd599455d4d2f013a297.tar.gz
Fix for Bug#56138 "valgrind errors about overlapping memory when double-assigning same variable",
and related small fixes. mysql-test/t/user_var.test: test for bug sql/field_conv.cc: From the C standard, memcpy() has undefined behaviour if to->ptr==from->ptr sql/item_func.cc: In the case of BUG#56138, entry->value==ptr in which case memcpy() has undefined results per the C standard. sql/sql_select.cc: Work around a bug in old gcc
Diffstat (limited to 'mysql-test/t/user_var.test')
-rw-r--r--mysql-test/t/user_var.test7
1 files changed, 7 insertions, 0 deletions
diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test
index 4f27866de23..56217fe67d5 100644
--- a/mysql-test/t/user_var.test
+++ b/mysql-test/t/user_var.test
@@ -346,4 +346,11 @@ FROM t1 GROUP BY a LIMIT 1;
DROP TABLE t1;
+#
+# BUG#56138 "valgrind errors about overlapping memory when
+# double-assigning same variable"
+#
+
+select @v:=@v:=sum(1) from dual;
+
--echo End of 5.1 tests