Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  galera_insert_ignore.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[115] ABAP[70] VDM[46]} [Methode: maximale Elemente, drei Dimensionen]

--source include/galera_cluster.inc
--source include/have_innodb.inc

--let $wsrep_sync_wait_orig = (SELECT @@wsrep_sync_wait)
SET GLOBAL wsrep_sync_wait = 15;

--connection node_2
SET GLOBAL wsrep_sync_wait = 15;


#
# INSERT IGNORE with PRIMARY KEY
#

--connection node_1
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);

INSERT IGNORE INTO t1 VALUES (1), (2);
SELECT * FROM t1;

--connection node_2
SELECT * FROM t1;

# 
# INSERT IGNORE ... SELECT
#

--connection node_2
CREATE TABLE t2 (f1 INTEGER) ENGINE=InnoDB;
INSERT INTO t2 VALUES (0), (2), (3);
INSERT IGNORE INTO t1 SELECT f1 FROM t2;

SELECT * FROM t1;
--connection node_1
SELECT * FROM t1;

#
# INSERT IGNORE with UNIQUE + NULLs
#

--connection node_2
CREATE TABLE t3 (f1 INTEGER UNIQUE) Engine=InnoDB;
INSERT INTO t3 VALUES (NULL);

--connection node_1
INSERT IGNORE INTO t3 VALUES (1), (NULL), (2);
SELECT * FROM t3;

--connection node_2
SELECT * FROM t3;

--eval SET GLOBAL wsrep_sync_wait = $wsrep_sync_wait_orig

--connection node_1
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
--eval SET GLOBAL wsrep_sync_wait = $wsrep_sync_wait_orig

[Dauer der Verarbeitung: 0.9 Sekunden]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126864
#Domains=1897691