diff options
author | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-06-09 16:07:34 +0400 |
---|---|---|
committer | Sergey Glukhov <Sergey.Glukhov@sun.com> | 2010-06-09 16:07:34 +0400 |
commit | 60a66c451a863986d36dde676ce99eca3edc55f3 (patch) | |
tree | d54c46cf96145dabd8bac626afbeabf06354b20d /mysql-test/t/ps_3innodb.test | |
parent | 76a7cda35c2058c90fed090c4d577b0c49f3203f (diff) | |
download | mariadb-git-60a66c451a863986d36dde676ce99eca3edc55f3.tar.gz |
Bug#38999 valgrind warnings for update statement in function compare_record()
Valgrind warning happpens because of uninitialized null bytes.
In row_sel_push_cache_row_for_mysql() function we fill fetch cache
with necessary field values, row_sel_store_mysql_rec() is called
for this and leaves null bytes untouched.
Later row_sel_pop_cached_row_for_mysql() rewrites table record
buffer with uninited null bytes. We can see the problem from the
test case:
At 'SELECT...' we call row_sel_push...->row_sel_store...->row_sel_pop_cached...
chain which rewrites table->record[0] buffer with uninitialized null bytes.
When we call 'UPDATE...' statement, compare_record uses this buffer and
valgrind warning occurs.
The fix is to init null bytes with default values.
mysql-test/suite/innodb/r/innodb_mysql.result:
test case
mysql-test/suite/innodb/t/innodb_mysql.test:
test case
mysql-test/t/ps_3innodb.test:
enable valgrind testing
storage/innobase/row/row0sel.c:
init null bytes with default values as they might be
left uninitialized in some cases and these uninited bytes
might be copied into mysql record buffer that leads to
valgrind warnings on next use of the buffer.
Diffstat (limited to 'mysql-test/t/ps_3innodb.test')
-rw-r--r-- | mysql-test/t/ps_3innodb.test | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/mysql-test/t/ps_3innodb.test b/mysql-test/t/ps_3innodb.test index 10d2e7a9ae5..e25a8b1f469 100644 --- a/mysql-test/t/ps_3innodb.test +++ b/mysql-test/t/ps_3innodb.test @@ -8,10 +8,6 @@ # NOTE: PLEASE SEE ps_1general.test (bottom) # BEFORE ADDING NEW TEST CASES HERE !!! -# See Bug#38999 valgrind warnings for update statement in function -# compare_record() --- source include/not_valgrind.inc - use test; -- source include/have_innodb.inc |