mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	- Starting time of a query sent by file bootstrapping wasn't initialized and starting time defaulted to 0. This later used value by the Now- item and is translated to 1970-01-01 11:00:00. - marking the time with thd->set_time() before the call to mysql_parse resolves this issue.
		
			
				
	
	
		
			20 lines
		
	
	
		
			541 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			541 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#
 | 
						|
# This is a regression test for bug #2526 "--init-file crashes MySQL if it
 | 
						|
# contains a large select"
 | 
						|
#
 | 
						|
# See mysql-test/std_data/init_file.dat and
 | 
						|
# mysql-test/t/init_file-master.opt for the actual test
 | 
						|
#
 | 
						|
 | 
						|
#
 | 
						|
# Bug#23240 --init-file statements with NOW() reports '1970-01-01 11:00:00'as the date time
 | 
						|
#
 | 
						|
INSERT INTO init_file.startup VALUES ( NOW() );
 | 
						|
SELECT * INTO @X FROM init_file.startup limit 0,1;
 | 
						|
SELECT * INTO @Y FROM init_file.startup limit 1,1;
 | 
						|
SELECT YEAR(@X)-YEAR(@Y);
 | 
						|
DROP DATABASE init_file;
 | 
						|
 | 
						|
--echo ok
 | 
						|
--echo End of 4.1 tests
 |