Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  xa_cmd.result   Sprache: Lisp

 

for master_1
for child2
child2_1
child2_2
child2_3
for child3

this test is for MDEV-19794

drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
connection child2_1;
SET @old_log_output = @@global.log_output;
SET GLOBAL log_output = 'TABLE,FILE';
CREATE DATABASE auto_test_remote;
USE auto_test_remote;

create table and insert
connection child2_1;
CHILD2_1_CREATE_TABLES
TRUNCATE TABLE mysql.general_log;
connection master_1;
CREATE TABLE tbl_a (
pkey int NOT NULL,
PRIMARY KEY (pkey)
) MASTER_1_ENGINE MASTER_1_CHARSET MASTER_1_COMMENT_2_1
Warnings:
Warning 138 Spider table params in COMMENT or CONNECTION strings have been deprecated and will be removed in a future release. Please use table options instead.
connection child2_1;
TRUNCATE TABLE mysql.general_log;
connection master_1;
XA START 'test';
INSERT INTO tbl_a (pkey) VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
XA END 'test';
XA PREPARE 'test';
XA COMMIT 'test';
# MDEV-35426 Stack smashing in spider_db_mbase::xa_end (opt), ASAN: stack-
#  buffer-overflow in Binary_string::q_append, and Assertion
#  `str.alloced_length() >= str.length() + data_len' failed in
#  spider_string::q_append on SELECT.
XA START 'xaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccc1','xaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccc2',1234567890;
INSERT INTO tbl_a (pkey) VALUES (10);
XA END 'xaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccc1','xaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccc2',1234567890;
XA ROLLBACK 'xaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccc1','xaaaaaaaaaaaaaaabbbbbbbbbbbbbbbccc2',1234567890;
# MDEV-37829 XA COMMIT ONE PHASE fails with "This xid does not
# exist" if a trigger references a SPIDER table
#
# Below we test a version of the MDEV-37829 case that is not a
# no-op on the spider table
XA START 'test1';
INSERT INTO tbl_a (pkey) VALUES (100);
XA END 'test1';
XA COMMIT 'test1' ONE PHASE;
select * from tbl_a;
pkey
0
1
2
3
4
5
6
7
8
9
100
create table t (c int);
insert into t values (1),(2);
CREATE PROCEDURE tProc()
BEGIN
SET @t := TRUE;
IF @t = TRUE THEN
INSERT INTO tbl_a select max(pkey) + 1 from tbl_a;
END IF;
END$$
CREATE TRIGGER t_au
AFTER UPDATE
ON t FOR EACH ROW
BEGIN
IF NEW.c < 50 THEN
CALL tProc();
END IF;
END$$
XA START 'test';
update t set c = c + 1 where c = 1;
XA END 'test';
XA PREPARE 'test';
XA COMMIT 'test';
XA START 'test1';
update t set c = c + 1 where c = 2;
XA END 'test1';
XA COMMIT 'test1' ONE PHASE;
drop table t;
select * from tbl_a;
pkey
0
1
2
3
4
5
6
7
8
9
100
101
102
103
connection child2_1;
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%insert %';
argument
insert into `auto_test_remote`.`tbl_a`(`pkey`)values(0),(1),(2),(3),(4),(5),(6),(7),(8),(9)
insert into `auto_test_remote`.`tbl_a`(`pkey`)values(10)
insert into `auto_test_remote`.`tbl_a`(`pkey`)values(100)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`)values(101)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`)values(102)
insert high_priority into `auto_test_remote`.`tbl_a`(`pkey`)values(103)
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%insert %'
SELECT pkey FROM tbl_a ORDER BY pkey;
pkey
0
1
2
3
4
5
6
7
8
9
100
101
102
103

deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
connection child2_1;
DROP DATABASE IF EXISTS auto_test_remote;
SET GLOBAL log_output = @old_log_output;
for master_1
for child2
child2_1
child2_2
child2_3
for child3

end of test

Messung V0.5 in Prozent
C=65 H=100 G=84

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-10-04) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126864
#Domains=1897691