Description:
When valginding mysqltest I found an "Invalid write of size 1". Have traced it to occur when "show create function sub1" is executed.
==3850== Invalid write of size 1
==3850== at 0x1B94C46B: cli_read_rows (client.c:1329)
==3850== by 0x1B94F23C: mysql_store_result (client.c:2562)
==3850== by 0x8051217: run_query_normal (mysqltest.c:3338)
==3850== by 0x8052119: run_query (mysqltest.c:3893)
==3850== by 0x80531C6: main (mysqltest.c:4355)
==3850== Address 0x1BAB05DE is 0 bytes after a block of size 38 alloc'd
==3850== at 0x1B909222: malloc (vg_replace_malloc.c:130)
==3850== by 0x1B92538E: my_malloc (my_malloc.c:35)
==3850== by 0x1B929BAF: alloc_root (my_alloc.c:154)
==3850== by 0x1B94C374: cli_read_rows (client.c:1300)
==3850== by 0x1B94F23C: mysql_store_result (client.c:2562)
==3850== by 0x8051217: run_query_normal (mysqltest.c:3338)
==3850== by 0x8052119: run_query (mysqltest.c:3893)
==3850== by 0x80531C6: main (mysqltest.c:4355)
How to repeat:
Running ./mysql-test-run --ps-protocol --do-test=information_schema --valgrind-mysqltest-all
produces two error, but iI have boiled down the srcipt into ms2.test and that is much shorter and only produces one error.