1
0
mirror of https://github.com/MariaDB/server.git synced 2025-05-28 13:01:41 +03:00
Sergey Glukhov f2aee2371e Bug#45195 valgrind warnings about uninitialized values in store_record_in_cache()
The problem becomes apparent only if HAVE_purify is undefined.
It related to the part of code placed in open_table_from_share() fuction
where we initialize record buffer only if HAVE_purify is enabled.
So in case of HAVE_purify=OFF record buffer is not initialized
on open table stage.
Next we read key, find NULL value and update appropriate null bit
but do not update record buffer. After that the record is stored
in the join cache(store_record_in_cache). For CHAR fields we
strip trailing spaces and in our case this procedure uses
uninitialized record buffer.
The fix is to skip stripping space procedure in case of null values
for CHAR fields(partially based on 6.0 JOIN_CACHE implementation).


mysql-test/r/join.result:
  test case
mysql-test/t/join.test:
  test case
sql/field.cc:
  code updated according to new CACHE_FIELD struct
sql/sql_select.cc:
  code updated according to new CACHE_FIELD struct
sql/sql_select.h:
  CACHE_FIELD struct:
  added new fields: Field *field, uint type;
  removed fields: Field_blob *blob_field, bool strip;
2010-02-10 18:56:47 +04:00
..
2009-09-29 17:38:40 +02:00
2009-09-29 17:38:40 +02:00
2010-01-29 15:08:49 +04:00
2010-01-19 17:02:51 +01:00
2007-10-11 13:29:09 -04:00
2007-10-11 13:29:09 -04:00
2010-01-13 12:28:42 +02:00
2010-01-13 12:28:42 +02:00
2009-12-22 14:38:33 +04:00
2010-01-28 19:51:40 -02:00
2010-01-28 19:51:40 -02:00
2009-11-24 18:30:21 +03:00
2009-08-28 18:21:54 +02:00
2010-01-24 15:03:23 +08:00
2010-01-27 19:27:49 +02:00
2009-09-29 17:38:40 +02:00
2007-10-11 13:29:09 -04:00
2008-11-27 12:33:04 +01:00
2007-10-16 16:11:50 -04:00
2009-07-28 22:44:28 +04:00
2008-11-22 01:10:38 +01:00
2008-11-22 01:10:38 +01:00
2008-08-25 21:18:22 +04:00
2009-06-01 16:00:38 +04:00
2007-10-11 14:37:45 -04:00
2009-11-03 20:45:52 +03:00
2010-01-28 19:51:40 -02:00
2010-01-28 19:51:40 -02:00
2009-09-29 17:38:40 +02:00
2008-07-03 23:41:22 +04:00
2010-01-24 15:03:23 +08:00
2009-04-29 07:59:10 +05:00
2009-12-18 16:44:24 -02:00
2008-01-23 13:26:41 -07:00
2009-08-28 18:21:54 +02:00
2009-06-17 16:56:44 +02:00
2009-06-17 16:56:44 +02:00
2010-01-24 15:03:23 +08:00
2010-01-24 15:03:23 +08:00
2009-12-18 16:44:24 -02:00
2008-12-10 18:16:21 +04:00
2007-10-16 16:11:50 -04:00
2010-01-28 19:51:40 -02:00
2010-01-24 15:03:23 +08:00
2009-09-17 17:25:52 +02:00
2009-06-17 16:56:44 +02:00
2010-01-24 15:03:23 +08:00
2010-01-24 15:03:23 +08:00
2010-01-24 15:03:23 +08:00
2010-01-24 15:03:23 +08:00
2010-01-28 19:51:40 -02:00
2010-01-24 15:03:23 +08:00
2010-01-24 15:03:23 +08:00
2009-01-14 18:50:51 +04:00
2010-01-25 10:55:05 +08:00
2010-01-24 15:03:23 +08:00
2009-11-03 20:45:52 +03:00
2009-06-29 16:00:47 +02:00
2009-06-17 16:56:44 +02:00
2009-09-17 17:25:52 +02:00
2009-06-17 16:56:44 +02:00
2009-07-31 15:28:15 -04:00