mirror of
				https://github.com/MariaDB/server.git
				synced 2025-11-03 14:33:32 +03:00 
			
		
		
		
	Cleaned up test; Removed wrong DROP TABLE commands and use standard table and database names. changed store_warning() -> push_warning_print()
		
			
				
	
	
		
			13 lines
		
	
	
		
			421 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			421 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
use test;
 | 
						|
--disable_warnings
 | 
						|
drop table if exists t1,t2;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
create table t1 (email varchar(50));
 | 
						|
insert into t1 values ('sasha@mysql.com'),('monty@mysql.com'),
 | 
						|
('foo@hotmail.com'),('foo@aol.com'),('bar@aol.com');
 | 
						|
create table t2(id int not null auto_increment primary key,
 | 
						|
 t2 varchar(50), unique(t2));
 | 
						|
insert into t2 (t2) select distinct substring(email, locate('@', email)+1) from t1;
 | 
						|
select * from t2;
 |