mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			20 lines
		
	
	
		
			496 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			496 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#
 | 
						|
# Check on condition on different length keys.
 | 
						|
 | 
						|
drop table if exists t1;
 | 
						|
CREATE TABLE t1 (
 | 
						|
  a char(5) NOT NULL,
 | 
						|
  b char(4) NOT NULL,
 | 
						|
  KEY (a),
 | 
						|
  KEY (b)
 | 
						|
);
 | 
						|
 | 
						|
INSERT INTO t1 VALUES ('A','B'),('b','A'),('C','c'),('D','E'),('a','a');
 | 
						|
 | 
						|
select * from t1,t1 as t2;
 | 
						|
explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
 | 
						|
#select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
 | 
						|
select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
 | 
						|
select * from t1 where a='a';
 | 
						|
drop table t1;
 |