Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  MDEV-38201.test  Sprache: unbekannt

 
Spracherkennung für: .test vermutete Sprache: SQL {SQL[98] Masm[78] ADA[49]} [Methode: maximale Elemente, drei Dimensionen]

--source include/galera_cluster.inc

--source include/force_restart.inc

# Save original auto_increment_offset values.
--let $node_1=node_1
--let $node_2=node_2
--source include/auto_increment_offset_save.inc

--connection node_1
# Set higher weight for node_1 to keep it in primary
# while node_2 is inconsistent

SET GLOBAL wsrep_provider_options ='pc.ignore_sb=true;pc.weight=2';

--connection node_2
CREATE TABLE t1 (f1 INT) ENGINE=InnoDB;
SET GLOBAL wsrep_IGNORE_apply_errors=1;
SET SESSION wsrep_dirty_reads=1;
SHOW CREATE TABLE t1;
FLUSH HOSTS;
--echo # This will cause inconsistency
--error ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 (f1 INT) ENGINE=InnoDB;
--echo # Wait until inconsistent node_2 leaves from cluster
--let $wait_condition = SELECT VARIABLE_VALUE = 'Disconnected' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status';
--source include/wait_condition.inc

# Both are possible
--error ER_GALERA_REPLICATION_NOT_SUPPORTED, ER_LOCK_WAIT_TIMEOUT
FLUSH HOSTS;

--connection node_1
--echo # Wait until inconsistent node_2 leaves from cluster
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

--connection node_2
--echo # Restart node_2
--source include/restart_mysqld.inc

call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on");

--connection node_1
--echo # Wait until node_2 is back in the cluster
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
--source include/wait_condition.inc

SET GLOBAL wsrep_provider_options ='pc.ignore_sb=false;pc.weight=1';

DROP TABLE t1;
--source include/auto_increment_offset_restore.inc
--source include/galera_end.inc

[Dauer der Verarbeitung: 0.11 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