summaryrefslogtreecommitdiff
path: root/mysql-test/r/select.result
diff options
context:
space:
mode:
authorJorgen Loland <jorgen.loland@sun.com>2009-11-13 12:22:39 +0100
committerJorgen Loland <jorgen.loland@sun.com>2009-11-13 12:22:39 +0100
commita120e969a83128f075b54a06155ccee0bb46b312 (patch)
tree647243c578e4358668d708f8fb7854fc8b3d9d76 /mysql-test/r/select.result
parentcf872354a8b20daced728a9c76c4d25648f88da8 (diff)
downloadmariadb-git-a120e969a83128f075b54a06155ccee0bb46b312.tar.gz
Bug#48052: Valgrind warning - uninitialized value in
init_read_record() - (records.cc:274) Item_cond::used_tables_cache was accessed in records.cc#init_read_record() without being initialized. It had not been initialized because it was wrongly assumed that the Item's variables would not be accessed, and hence quick_fix_field() was used instead of fix_fields() to save a few CPU cycles at creation time. The fix is to properly initilize the Item by replacing quick_fix_field() with fix_fields(). mysql-test/r/select.result: Add test for BUG#48052 mysql-test/t/select.test: Add test for BUG#48052 sql/sql_select.cc: Properly initialize Item_cond_and by calling fix_fields (instead of quick_fix_field) when the Item that "ANDs" WHERE clause conditions with HAVING clause conditions is created.
Diffstat (limited to 'mysql-test/r/select.result')
-rw-r--r--mysql-test/r/select.result18
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index e528b63ddb7..d0b2a575a32 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -4591,4 +4591,22 @@ field2
15:13:38
drop table A,AA,B,BB;
#end of test for bug#45266
+#
+# BUG#48052: Valgrind warning - uninitialized value in init_read_record()
+#
+CREATE TABLE t1 (
+pk int(11) NOT NULL,
+i int(11) DEFAULT NULL,
+v varchar(1) DEFAULT NULL,
+PRIMARY KEY (pk)
+);
+INSERT INTO t1 VALUES (2,7,'m');
+INSERT INTO t1 VALUES (3,9,'m');
+SELECT v
+FROM t1
+WHERE NOT pk > 0
+HAVING v <= 't'
+ORDER BY pk;
+v
+DROP TABLE t1;
End of 5.1 tests