WordPress

Briefly unavailable for scheduled maintenance.
Check back in a some hours.
Uname:Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64

Base Dir : /var/www/eduesan

User : www-data


403WebShell
403Webshell
Server IP : 202.131.237.196  /  Your IP : 216.73.216.192
Web Server : nginx/1.14.0
System : Linux wp 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.2.24-0ubuntu0.18.04.17
Disable Function : 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_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/mysql-test/extra/rpl_tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/mysql-test/extra/rpl_tests/rpl_stm_create_if_not_exists.test
--echo
--echo
connection master;

if ($is_temporary)
{
  --let $_temporary=TEMPORARY
}

CREATE TABLE t2(c1 INT, c2 char(10));
INSERT INTO t2 VALUES(1, 'abc'), (2, 'abc');

--echo
--echo # The original query should be binlogged if the table does not exist.
--echo # ------------------------------------------------------------------
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
eval CREATE $_temporary TABLE IF NOT EXISTS t1 (c1 INT , c2 INT, c3 char(10), c4 INT KEY)
  SELECT 'abc' AS c3, 1 AS c4;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

--echo
--echo # The statement should be binlogged as two events. one is 
--echo # 'CREATE $_temporary TABLE IF NOT EXISTS ..', another one is
--echo # 'INSERT ... SELECT'.
--echo # ------------------------------------------------------------------
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  SELECT 'abc', 2;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

--echo
--echo # Verify if it can be binlogged with right database name when the table
--echo # is not in the default database
--echo
--disable_warnings
DROP DATABASE IF EXISTS db1;
--enable_warnings
CREATE DATABASE db1;
USE db1;

let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
eval CREATE $_temporary TABLE IF NOT EXISTS test.t1
  SELECT 'abc', 20;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:test.t1,slave:test.t1
  --source include/diff_tables.inc
}
USE test;
DROP DATABASE db1;

--echo
--echo # It should be binlogged as 'REPLACE ... SELECT'
--echo # if the original statement has option REPLACE
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  REPLACE SELECT '123', 2;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

--echo
--echo # It should be binlogged as 'INSERT IGNORE... SELECT'
--echo # if the original statement has option IGNORE 
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  IGNORE SELECT '123', 2;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

--echo
--echo # Nothing should be binlogged if error happens and no any row is inserted
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
--error ER_DUP_ENTRY
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  SELECT '123', 2;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

--echo
--echo # Verify it can binlog well when there are some braces('(')
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  (SELECT '123', 3) UNION (SELECT '123', 4);
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  REPLACE (SELECT 'abc', 3) UNION (SELECT 'abc', 4);
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  IGNORE (SELECT '123', 3) UNION (SELECT '123', 4);
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

if (!$is_temporary)
{
  --echo
  --echo # Throw a warning that table already exists and don't insert anything
  --echo
  CREATE VIEW t3 AS SELECT * FROM t2;
  let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

  CREATE TABLE IF NOT EXISTS t3
    SELECT '123', 2;
  source include/show_binlog_events.inc;
  DROP VIEW t3;
}

--echo
--echo # The statement can be binlogged correctly when it is in a SP/EVENT/TRIGGER
--echo

--disable_warnings
DROP PROCEDURE IF EXISTS p1;
--enable_warnings
eval CREATE PROCEDURE p1(IN a INT)
  CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', a;

let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
call p1(500);
call p1(600);
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}
DROP PROCEDURE p1;

--echo
--echo # The statement can be binlogged correctly when it is in a prepared statement
--echo
eval PREPARE stm FROM "CREATE $_temporary TABLE IF NOT EXISTS t1 SELECT '123', ?";

let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
SET @a= 700;
EXECUTE stm USING @a;
SET @a= 800;
EXECUTE stm USING @a;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

--echo
--echo # The statement can be binlogged correctly when it is in a conditional comment
--echo
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

--echo # The whole statement in a conditional comment
eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1
  SELECT 'abc', 900*/;
source include/show_binlog_events.inc;
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

--echo
--echo # There is an long comment before SELECT
eval /*!CREATE $_temporary /*blabla*/ TABLE IF NOT EXISTS t1
  SELECT 'abc', 901*/;
source include/show_binlog_events.inc;
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

--echo
--echo # Conditional comment starts just from SELECT
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  /*!SELECT 'abc',*/ 902;
source include/show_binlog_events.inc;
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

--echo
--echo # Only SELECT keyword is in the conditional comment
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  /*!SELECT*/ /*!'abc',*/ 904;
source include/show_binlog_events.inc;
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

--echo
--echo # Conditional comment is after SELECT keyword
eval CREATE $_temporary TABLE IF NOT EXISTS t1
  SELECT /*!'abc',*/ 903;
source include/show_binlog_events.inc;
let binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);

--echo
--echo # Conditional comment ends just before SELECT keyword
eval /*!CREATE $_temporary TABLE IF NOT EXISTS t1
  */SELECT 'abc', 905;
source include/show_binlog_events.inc;

--sync_slave_with_master
--connection master

if (!$is_temporary)
{
  --let $diff_tables= master:t1,slave:t1
  --source include/diff_tables.inc
}

DROP TABLE t2;
eval DROP $_temporary TABLE t1;


Youez - 2016 - github.com/yon3zu
LinuXploit