mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			810 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			810 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| -- source include/have_ndb.inc
 | |
| -- source include/not_embedded.inc
 | |
| 
 | |
| #
 | |
| # Test of REPLACE with NDB
 | |
| #
 | |
| 
 | |
| --disable_warnings
 | |
| drop table if exists t1;
 | |
| --enable_warnings
 | |
| 
 | |
| CREATE TABLE t1 (
 | |
|   gesuchnr int(11) DEFAULT '0' NOT NULL,
 | |
|   benutzer_id int(11) DEFAULT '0' NOT NULL,
 | |
|   PRIMARY KEY (gesuchnr,benutzer_id)
 | |
| ) engine=ndbcluster;
 | |
| 
 | |
| replace into t1 (gesuchnr,benutzer_id) values (2,1);
 | |
| replace into t1 (gesuchnr,benutzer_id) values (1,1);
 | |
| replace into t1 (gesuchnr,benutzer_id) values (1,1);
 | |
| insert into t1 (gesuchnr, benutzer_id) value (3,2);
 | |
| replace into t1 (gesuchnr,benutzer_id) values (1,1);
 | |
| replace into t1 (gesuchnr,benutzer_id) values (1,1);
 | |
| --error 1062
 | |
| insert into t1 (gesuchnr,benutzer_id) values (1,1);
 | |
| replace into t1 (gesuchnr,benutzer_id) values (1,1);
 | |
| select * from t1 order by gesuchnr;
 | |
| drop table t1;
 |