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()
		
			
				
	
	
		
			24 lines
		
	
	
		
			569 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			569 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
#
 | 
						|
# Testing of constraints
 | 
						|
# Currently MySQL only ignores the syntax.
 | 
						|
#
 | 
						|
--disable_warnings
 | 
						|
drop table if exists t1;
 | 
						|
--enable_warnings
 | 
						|
 | 
						|
create table t1 (a int check (a>0));
 | 
						|
insert into t1 values (1);
 | 
						|
insert into t1 values (0);
 | 
						|
drop table t1;
 | 
						|
create table t1 (a int ,b int, check a>b);
 | 
						|
insert into t1 values (1,0);
 | 
						|
insert into t1 values (0,1);
 | 
						|
drop table t1;
 | 
						|
create table t1 (a int ,b int, constraint abc check (a>b));
 | 
						|
insert into t1 values (1,0);
 | 
						|
insert into t1 values (0,1);
 | 
						|
drop table t1;
 | 
						|
create table t1 (a int null);
 | 
						|
insert into t1 values (1),(NULL);
 | 
						|
drop table t1;
 |