mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	had broken the 5.1 behaviour of --log-error: --log-error without argument sent to stderr instead of writing to a file with an autogenerated name.
		
			
				
	
	
		
			21 lines
		
	
	
		
			700 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			700 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
# Test for BUG#51215 "log-error partially works with version 5.5"
 | 
						|
# when --log-error is used without argument
 | 
						|
 | 
						|
# check displayed value. We can check only the suffix, because
 | 
						|
# the rest depends on paths, symbolic links, --vardir, etc...
 | 
						|
select (@err_log:=variable_value)*0 from information_schema.global_variables where variable_name="log_error";
 | 
						|
select instr(@err_log, ".err")>0;
 | 
						|
 | 
						|
# Check file's existence. The displayed value may be relative or not.
 | 
						|
let $err_log=`select @err_log`;
 | 
						|
let $err_log_relative=`select instr(@err_log, ".")=1`;
 | 
						|
if ($err_log_relative)
 | 
						|
{
 | 
						|
  let $MYSQLD_DATADIR= `SELECT @@datadir`;
 | 
						|
  file_exists $MYSQLD_DATADIR/$err_log;
 | 
						|
}
 | 
						|
if (!$err_log_relative)
 | 
						|
{
 | 
						|
  file_exists $err_log;
 | 
						|
}
 |