mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 20:36:16 +01:00 
			
		
		
		
	Warnings are added to net_server.cc when global_system_variables.log_warnings >= 4. When the above condition holds then: - All communication errors from net_serv.cc is also written to the error log. - In case of a of not being able to read or write a packet, a more detailed error is given. Other things: - Added detection of slaves that has hangup to Ack_receiver::run() - vio_close() is now first marking the socket closed before closing it. The reason for this is to ensure that the connection that gets a read error can check if the reason was that the socket was closed. - Add a new state to vio to be able to detect if vio is acive, shutdown or closed. This is used to detect if socket is closed by another thread. - Testing of the new warnings is done in rpl_get_lock.test - Suppress some of the new warnings in mtr to allow one to run some of the tests with -mysqld=--log-warnings=4. All test in the 'rpl' suite can now be run with this option. - Ensure that global.log_warnings are restored at test end in a way that allows one to use mtr --mysqld=--log-warnings=4. Reviewed-by: <serg@mariadb.org>,<brandon.nesterenko@mariadb.com>
		
			
				
	
	
		
			39 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
	
		
			1 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
include/master-slave.inc
 | 
						|
[connection master]
 | 
						|
SET GLOBAL LOG_WARNINGS=4;
 | 
						|
create table t1(n int);
 | 
						|
insert into t1 values(get_lock("lock",2));
 | 
						|
disconnect master;
 | 
						|
connection master1;
 | 
						|
select get_lock("lock",2);
 | 
						|
get_lock("lock",2)
 | 
						|
1
 | 
						|
select release_lock("lock");
 | 
						|
release_lock("lock")
 | 
						|
1
 | 
						|
connection slave;
 | 
						|
select get_lock("lock",3);
 | 
						|
get_lock("lock",3)
 | 
						|
1
 | 
						|
select * from t1;
 | 
						|
n
 | 
						|
1
 | 
						|
select is_free_lock("lock"), is_used_lock("lock") = connection_id();
 | 
						|
is_free_lock("lock")	is_used_lock("lock") = connection_id()
 | 
						|
0	1
 | 
						|
explain extended select is_free_lock("lock"), is_used_lock("lock");
 | 
						|
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
 | 
						|
1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL	No tables used
 | 
						|
Warnings:
 | 
						|
Note	1003	select is_free_lock('lock') AS `is_free_lock("lock")`,is_used_lock('lock') AS `is_used_lock("lock")`
 | 
						|
select is_free_lock("lock2");
 | 
						|
is_free_lock("lock2")
 | 
						|
1
 | 
						|
select is_free_lock(NULL);
 | 
						|
is_free_lock(NULL)
 | 
						|
NULL
 | 
						|
connection master1;
 | 
						|
drop table t1;
 | 
						|
connection slave;
 | 
						|
connection default;
 | 
						|
include/rpl_end.inc
 |