mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	Added new big select test mysql-test/r/rpl000004.a.result: Cleanup mysql-test/r/show_check.result: Cleanup mysql-test/r/shw000001.result: Cleanup mysql-test/t/fulltext_multi.test: Cleanup mysql-test/t/fulltext_order_by.test: Cleanup mysql-test/t/rpl000001.test: Cleanup mysql-test/t/rpl000002.test: Cleanup mysql-test/t/rpl000003.test: Cleanup mysql-test/t/rpl000004.test: Cleanup mysql-test/t/rpl000005.test: Cleanup mysql-test/t/rpl000006.test: Cleanup mysql-test/t/rpl000007.test: Cleanup mysql-test/t/rpl000008.test: Cleanup mysql-test/t/rpl000009.test: Cleanup mysql-test/t/rpl000010.test: Cleanup mysql-test/t/rpl000011.test: Cleanup mysql-test/t/rpl000012.test: Cleanup mysql-test/t/rpl000013.test: Cleanup mysql-test/t/rpl000014.test: Cleanup mysql-test/t/rpl000015.test: Cleanup mysql-test/t/rpl000016.test: Cleanup mysql-test/t/sel000001.test: Cleanup mysql-test/t/sel000002.test: Cleanup mysql-test/t/sel000003.test: Cleanup mysql-test/t/sel000031.test: Cleanup mysql-test/t/sel000032.test: Cleanup mysql-test/t/sel000033.test: Cleanup mysql-test/t/sel000100.test: Cleanup mysql-test/t/show_check.test: Cleanup mysql-test/t/shw000001.test: Cleanup
		
			
				
	
	
		
			32 lines
		
	
	
		
			712 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			712 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
DROP TABLE IF EXISTS t1,t2;
 | 
						|
 | 
						|
CREATE TABLE t1 (
 | 
						|
  ID int(11) NOT NULL auto_increment,
 | 
						|
  NAME varchar(75) DEFAULT '' NOT NULL,
 | 
						|
  LINK_ID int(11) DEFAULT '0' NOT NULL,
 | 
						|
  PRIMARY KEY (ID),
 | 
						|
  KEY NAME (NAME),
 | 
						|
  KEY LINK_ID (LINK_ID)
 | 
						|
);
 | 
						|
 | 
						|
INSERT INTO t1 (ID, NAME, LINK_ID) VALUES (1,'Mike',0);
 | 
						|
INSERT INTO t1 (ID, NAME, LINK_ID) VALUES (2,'Jack',0);
 | 
						|
INSERT INTO t1 (ID, NAME, LINK_ID) VALUES (3,'Bill',0);
 | 
						|
 | 
						|
CREATE TABLE t2 (
 | 
						|
  ID int(11) NOT NULL auto_increment,
 | 
						|
  NAME varchar(150) DEFAULT '' NOT NULL,
 | 
						|
  PRIMARY KEY (ID),
 | 
						|
  KEY NAME (NAME)
 | 
						|
);
 | 
						|
 | 
						|
@r/sel000100.result SELECT DISTINCT
 | 
						|
    t2.id AS key_link_id,
 | 
						|
    t2.name AS link
 | 
						|
FROM t1
 | 
						|
LEFT JOIN t2 ON t1.link_id=t2.id
 | 
						|
GROUP BY t1.id
 | 
						|
ORDER BY link;
 | 
						|
 | 
						|
drop table t1,t2;
 |