mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	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.
		
			
				
	
	
		
			31 lines
		
	
	
		
			760 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			760 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
###############################################
 | 
						|
#                                             #
 | 
						|
#  Prepared Statements test on InnoDB tables  #
 | 
						|
#                                             #
 | 
						|
###############################################
 | 
						|
 | 
						|
#    
 | 
						|
# 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
 | 
						|
 | 
						|
let $type= 'InnoDB' ;
 | 
						|
-- source include/ps_create.inc
 | 
						|
-- source include/ps_renew.inc
 | 
						|
 | 
						|
-- source include/ps_query.inc
 | 
						|
-- source include/ps_modify.inc
 | 
						|
-- source include/ps_modify1.inc
 | 
						|
-- source include/ps_conv.inc
 | 
						|
 | 
						|
drop table t1, t9;
 | 
						|
 | 
						|
# End of 4.1 tests
 |