Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2(EOL)
-
None
-
10.0.29, 10.2.4-1, 10.2.4-2, 10.2.6-1
Description
http://buildbot.askmonty.org/buildbot/builders/xenial-amd64-valgrind/builds/183/steps/test/logs/stdio
Also reproducible locally with cmake . -DCMAKE_BUILD_TYPE=Debug -DWITH_VALGRIND=YES
archive.archive w7 [ fail ] Found warnings/errors in server log file!
|
Test ended at 2016-12-22 09:47:46
|
line
|
==32600== Thread 6:
|
==32600== Use of uninitialised value of size 8
|
==32600== at 0x5256A62: crc32 (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
|
==32600== by 0x81CFC07: azwrite (azio.c:613)
|
==32600== by 0x81D2FFB: ha_archive::real_write_row(unsigned char*, azio_stream*) (ha_archive.cc:858)
|
==32600== by 0x81D360A: ha_archive::write_row(unsigned char*) (ha_archive.cc:1034)
|
==32600== by 0x924026: handler::ha_write_row(unsigned char*) (handler.cc:5956)
|
==32600== by 0x67EB99: write_record(THD*, TABLE*, COPY_INFO*) (sql_insert.cc:1890)
|
==32600== by 0x67C614: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:1003)
|
==32600== by 0x6A4508: mysql_execute_command(THD*) (sql_parse.cc:4370)
|
==32600== by 0x6AFC4E: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7842)
|
==32600== by 0x69D551: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1799)
|
==32600== by 0x69BF24: do_command(THD*) (sql_parse.cc:1359)
|
==32600== by 0x7E8A06: do_handle_one_connection(CONNECT*) (sql_connect.cc:1354)
|
==32600== Use of uninitialised value of size 8
|
==32600== at 0x5256A8F: crc32 (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
|
==32600== by 0x81CFC07: azwrite (azio.c:613)
|
==32600== by 0x81D2FFB: ha_archive::real_write_row(unsigned char*, azio_stream*) (ha_archive.cc:858)
|
==32600== by 0x81D360A: ha_archive::write_row(unsigned char*) (ha_archive.cc:1034)
|
==32600== by 0x924026: handler::ha_write_row(unsigned char*) (handler.cc:5956)
|
==32600== by 0x67EB99: write_record(THD*, TABLE*, COPY_INFO*) (sql_insert.cc:1890)
|
==32600== by 0x67C614: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:1003)
|
==32600== by 0x6A4508: mysql_execute_command(THD*) (sql_parse.cc:4370)
|
==32600== by 0x6AFC4E: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7842)
|
==32600== by 0x69D551: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1799)
|
==32600== by 0x69BF24: do_command(THD*) (sql_parse.cc:1359)
|
==32600== by 0x7E8A06: do_handle_one_connection(CONNECT*) (sql_connect.cc:1354)
|
...
|
Attachments
Issue Links
- relates to
-
MDEV-7069 Fix buildbot failures in main server trees
-
- Stalled
-
Activity
Which query causes the valgrind failure? A dumb way to find out is to apply this patch
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
|
index 06387c2..16711e5 100644
|
--- a/sql/sql_parse.cc
|
+++ b/sql/sql_parse.cc
|
@@ -1781,6 +1781,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
|
char *packet_end= thd->query() + thd->query_length();
|
general_log_write(thd, command, thd->query(), thd->query_length());
|
DBUG_PRINT("query",("%-.4096s",thd->query()));
|
+ fprintf(stderr, "query: %-.4096s\n",thd->query());
|
#if defined(ENABLED_PROFILING)
|
thd->profiling.set_query_source(thd->query(), thd->query_length());
|
#endif
|
and look into the .err file.
varun, please make a small testcase.
Looking into the code:
/* We pack the row for writing */
|
r_pack_length= pack_row(buf, writer);
|
|
written= azwrite(writer, record_buffer->buffer, r_pack_length); // <- valgrind warning happens here
|
A question: does the warning go away if one adds an explicit bzero call like this:
r_pack_length= pack_row(buf, writer);
|
bzero(buf, r_pack_length);
|
r_pack_length= pack_row(buf, writer);
|
If we look at the particular table write operation that causes the failure, do the values of r_pack_length and the contents of buf make sense?
– source include/have_archive.inc
SET storage_engine=ARCHIVE;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
CREATE TABLE t2 (
auto int,
fld1 int(6) unsigned zerofill DEFAULT '000000' NOT NULL,
companynr tinyint(2) unsigned zerofill DEFAULT '00' NOT NULL,
fld3 char(30) DEFAULT '' NOT NULL,
fld4 char(35) DEFAULT '' NOT NULL,
fld5 char(35) DEFAULT '' NOT NULL,
fld6 char(4) DEFAULT '' NOT NULL
) ENGINE=archive;
--disable_query_log
INSERT INTO t2 VALUES (1,000001,00,'Omaha','teethe','neat','');
For me, the issue is easily reproducible on cset b05bf8ff0f1acf39afeb71e0e8a148090364d8fc, Ubuntu 15.04 vivid.
The part of archive.archive test that causes the error is:
--echo #
|
--echo # BUG#11756687 - 48633: ARCHIVE TABLES ARE NOT UPGRADEABLE
|
--echo #
|
copy_file std_data/bug48633.frm $MYSQLD_DATADIR/test/t1.frm;
|
copy_file std_data/bug48633.ARZ $MYSQLD_DATADIR/test/t1.ARZ;
|
copy_file std_data/bug48633.ARM $MYSQLD_DATADIR/test/t1.ARM;
|
SHOW CREATE TABLE t1;
|
# Test first table scan
|
SELECT * FROM t1;
|
# Test second table scan
|
SELECT * FROM t1;
|
# Test table close
|
FLUSH TABLE t1;
|
SELECT * FROM t1;
|
# Test check
|
CHECK TABLE t1;
|
SELECT * FROM t1;
|
# Test insert
|
INSERT INTO t1 VALUES(3, 'text', 'varchar', 'blob1', 'blob2');
|
SELECT * FROM t1;
|
# Test table close after insert
|
FLUSH TABLE t1;
|
SELECT * FROM t1;
|
# Test repair
|
REPAIR TABLE t1;
|
SELECT * FROM t1;
|
# Test check table after upgrade
|
CHECK TABLE t1;
|
DROP TABLE t1;
|
The errors are many failures like the one below:
```
main._a3 [ fail ] Found warnings/errors in server log file!
Test ended at 2017-01-22 20:10:59
line
==3287== Thread 6:
==3287== Use of uninitialised value of size 8
==3287== at 0x565BA55: crc32 (in /lib/x86_64-linux-gnu/libz.so.1.2.8)
==3287== by 0xC8AFF53: azwrite (azio.c:613)
==3287== by 0xC8B2A64: ha_archive::real_write_row(unsigned char*, azio_stream*) (ha_archive.cc:858)
==3287== by 0xC8B2B8C: ha_archive::write_row(unsigned char*) (ha_archive.cc:1034)
==3287== by 0x75C6FB: handler::ha_write_row(unsigned char*) (handler.cc:5960)
==3287== by 0x5A42CA: write_record(THD*, TABLE*, st_copy_info*) (sql_insert.cc:1886)
==3287== by 0x5AA343: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:998)
==3287== by 0x5C129D: mysql_execute_command(THD*) (sql_parse.cc:4373)
==3287== by 0x5C779E: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7843)
==3287== by 0x5CA9A9: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1801)
==3287== by 0x5CB2A6: do_command(THD*) (sql_parse.cc:1360)
==3287== by 0x692153: do_handle_one_connection(CONNECT*) (sql_connect.cc:1354)
==3287== by 0x6922F3: handle_one_connection (sql_connect.cc:1260)
==3287== by 0x998843: pfs_spawn_thread (pfs.cc:1862)
==3287== by 0x65306A9: start_thread (pthread_create.c:333)
==3287== by 0x707AEEC: clone (clone.S:109)
==3287== Use of uninitialised value of size 8
The errors end with a rather unhelpful
==3287== Address 0xe3fa3bc is 33,196 bytes inside a block of size 50,744 alloc'd
|
==3287== at 0x4C2C100: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
|
==3287== by 0xC8B25F9: ha_archive::get_share(char const*, int*) (ha_archive.cc:457)
|
==3287== by 0xC8B39DC: ha_archive::open(char const*, int, unsigned int) (ha_archive.cc:585)
|
==3287== by 0x756CF9: handler::ha_open(TABLE*, char const*, int, unsigned int) (handler.cc:2500)
|
==3287== by 0x66E6E8: open_table_from_share(THD*, TABLE_SHARE*, char const*, unsigned int, unsigned int, unsigned int, TABLE*, bool) (table.cc:3279)
|
==3287== by 0x57CC75: open_table(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:1860)
|
==3287== by 0x57F536: open_and_process_table (sql_base.cc:3392)
|
==3287== by 0x57F536: open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:3911)
|
==3287== by 0x57FC9C: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:4664)
|
==3287== by 0x5B7DCD: open_and_lock_tables (sql_base.h:493)
|
==3287== by 0x5B7DCD: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:6321)
|
==3287== by 0x5C3F4D: mysql_execute_command(THD*) (sql_parse.cc:3430)
|
==3287== by 0x5C779E: mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) (sql_parse.cc:7843)
|
==3287== by 0x5CA9A9: dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool) (sql_parse.cc:1801)
|
==3287== by 0x5CB2A6: do_command(THD*) (sql_parse.cc:1360)
|
==3287== by 0x692153: do_handle_one_connection(CONNECT*) (sql_connect.cc:1354)
|
==3287== by 0x6922F3: handle_one_connection (sql_connect.cc:1260)
|
==3287== by 0x998843: pfs_spawn_thread (pfs.cc:1862)
|
The warnings start in this query:
INSERT INTO t1 VALUES(3, 'text', 'varchar', 'blob1', 'blob2');
|
Debugging where this comes from, I can see that ha_archive::pack_row() runs
this code
if (writer->version == 1)
|
DBUG_RETURN(pack_row_v1(record));
|
When pack_row() returns to ha_archive::real_write_row, I see it returned this
buffer:
(gdb) print r_pack_length
|
$17 = 305
|
(gdb) x/305c buf
|
0x7fffecc975a0: -32 '\340' 3 '\003' 0 '\000' 0 '\000' 0 '\000' 4 '\004' 0 '\000' -56 '\310'
|
0x7fffecc975a8: 16 '\020' -62 '\302' -20 '\354' -1 '\377' 127 '\177' 0 '\000' 0 '\000' 7 '\a'
|
0x7fffecc975b0: 118 'v' 97 'a' 114 'r' 99 'c' 104 'h' 97 'a' 114 'r' -91 '\245'
|
0x7fffecc975b8: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975c0: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975c8: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975d0: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975d8: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975e0: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975e8: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975f0: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc975f8: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97600: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97608: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97610: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97618: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97620: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97628: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97630: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97638: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97640: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97648: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97650: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97658: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97660: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97668: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97670: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97678: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97680: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97688: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97690: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc97698: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc976a0: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245'
|
0x7fffecc976a8: -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' -91 '\245' 5 '\005'
|
0x7fffecc976b0: 0 '\000' -40 '\330' 16 '\020' -62 '\302' -20 '\354' -1 '\377' 127 '\177' 0 '\000'
|
0x7fffecc976b8: 0 '\000' 5 '\005' 0 '\000' -24 '\350' 16 '\020' -62 '\302' -20 '\354' -1 '\377'
|
0x7fffecc976c0: 127 '\177' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffecc976c8: -1 '\377' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffecc976d0: 0 '\000'
|
let's remind ourselves that this is written for the query:
INSERT INTO t1 VALUES(3, 'text', 'varchar', 'blob1', 'blob2');
|
So we see 'varchar' followed by a long 0xa5 a5 a5 a5 ... line.
I guess, this is where it passes garbage data to the compression function.
which produces all the errors.
Questions not resolved:
- This is legacy code (note the pack_row_v1 name) can we change it at all?
- If this is legacy code, it should be the same as in previous versions. Why do
we see the failure only in 10.2?
When I try on 10.1, I get no valgrind warning. If I debug the query, I get this:
(gdb) p table->in_use->query_string
|
$1 = {string = {str = 0x7fffd4167b50 "INSERT INTO t1 VALUES(3, 'text', 'varchar', 'blob1', 'blob2')",
|
length = 61}, cs = 0x555556c6aac0 <my_charset_latin1>}
|
(gdb) p table->s->reclength
|
$2 = 291
|
(gdb) x/291c buf
|
0x7fffd413f080: -32 '\340' 3 '\003' 0 '\000' 0 '\000' 0 '\000' 4 '\004' 0 '\000' -40 '\330'
|
0x7fffd413f088: 33 '!' 20 '\024' -44 '\324' -1 '\377' 127 '\177' 0 '\000' 0 '\000' 7 '\a'
|
0x7fffd413f090: 118 'v' 97 'a' 114 'r' 99 'c' 104 'h' 97 'a' 114 'r' 0 '\000'
|
0x7fffd413f098: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0a0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0a8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0b0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0b8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0c0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0c8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0d0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0d8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0e0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0e8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0f0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0f8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f100: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f108: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f110: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f118: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f120: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f128: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f130: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f138: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f140: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f148: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f150: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f158: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f160: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f168: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f170: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f178: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f180: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f188: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 5 '\005'
|
0x7fffd413f190: 0 '\000' -24 '\350' 71 'G' 21 '\025' -44 '\324' -1 '\377' 127 '\177' 0 '\000'
|
0x7fffd413f198: 0 '\000' 5 '\005' 0 '\000' 40 '(' -69 '\273' 23 '\027' -44 '\324' -1 '\377'
|
0x7fffd413f1a0: 127 '\177' 0 '\000' 0 '\000'
|
Note that there's no 0xa5a5a5... . The end of varchar is filled with zeros. This explains the valgrind warning.
Tip cset of what I'm trying with:
commit f1f8ebc325d2b91991ee0de8488f482dc81bbf27
|
Merge: 6fbfb4c afb4615
|
Author: Marko Mäkelä <marko.makela@mariadb.com>
|
Date: Thu Jan 26 23:40:11 2017 +0200
|
|
Merge 10.0 into 10.1
|
Confirmed in 10.1 there is no 0xa5a5a5...... . The end of varchar is filled with zeros.
(gdb) x/291c buf
|
0x7fffd413f080: -32 '\340' 3 '\003' 0 '\000' 0 '\000' 0 '\000' 4 '\004' 0 '\000' -40 '\330'
|
0x7fffd413f088: 33 '!' 20 '\024' -44 '\324' -1 '\377' 127 '\177' 0 '\000' 0 '\000' 7 '\a'
|
0x7fffd413f090: 118 'v' 97 'a' 114 'r' 99 'c' 104 'h' 97 'a' 114 'r' 0 '\000'
|
0x7fffd413f098: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0a0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0a8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0b0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0b8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0c0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0c8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0d0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0d8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0e0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0e8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0f0: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f0f8: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f100: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f108: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f110: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f118: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f120: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f128: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f130: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f138: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f140: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f148: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f150: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f158: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f160: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f168: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f170: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f178: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f180: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000'
|
0x7fffd413f188: 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 0 '\000' 5 '\005'
|
0x7fffd413f190: 0 '\000' -24 '\350' 71 'G' 21 '\025' -44 '\324' -1 '\377' 127 '\177' 0 '\000'
|
0x7fffd413f198: 0 '\000' 5 '\005' 0 '\000' 40 '(' -69 '\273' 23 '\027' -44 '\324' -1 '\377'
|
0x7fffd413f1a0: 127 '\177' 0 '\000' 0 '\000'
|
varun, please investigate.