mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	 1f6ecc0cd3
			
		
	
	1f6ecc0cd3
	
	
	
		
			
			Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print()
		
			
				
	
	
		
			34 lines
		
	
	
		
			692 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			34 lines
		
	
	
		
			692 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # Initialise
 | |
| --disable_warnings
 | |
| drop table if exists t1,t2;
 | |
| --enable_warnings
 | |
| 
 | |
| #
 | |
| # Testing of the <=> operator
 | |
| #
 | |
| 
 | |
| #
 | |
| # First some simple tests
 | |
| #
 | |
| 
 | |
| select 0<=>0,0.0<=>0.0,"A"<=>"A",NULL<=>NULL;
 | |
| select 1<=>0,0<=>NULL,NULL<=>0;
 | |
| select 1.0<=>0.0,0.0<=>NULL,NULL<=>0.0;
 | |
| select "A"<=>"B","A"<=>NULL,NULL<=>"A";
 | |
| 
 | |
| #
 | |
| # Test with tables
 | |
| #
 | |
| 
 | |
| create table t1 (id int, value int);
 | |
| create table t2 (id int, value int);
 | |
| 
 | |
| insert into t1 values (1,null);
 | |
| insert into t2 values (1,null);
 | |
| 
 | |
| select t1.*, t2.*, t1.value<=>t2.value from t1, t2 where t1.id=t2.id and t1.id=1;
 | |
| select * from t1 where id <=>id;
 | |
| select * from t1 where value <=> value;
 | |
| select * from t1 where id <=> value or value<=>id;
 | |
| drop table t1,t2;
 |