403Webshell
Server IP : 104.21.38.3  /  Your IP : 172.71.152.33
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/rpl/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/rpl/t/rpl_autogen_query_multi_byte_char.test
###############################################################################
# Bug#21205695 DROP TABLE MAY CAUSE SLAVES TO BREAK
#
# Problem:
# ========
# 1) Drop table queries are re-generated by server
#    before writing the events(queries) into binlog
#    for various reasons. If table name/db name contains
#    a non regular characters (like latin characters),
#    the generated query is wrong. Hence it breaks the
#    replication.
# 2) In the edge case, when table name contains
#    64 latin characters (latin takes 2 bytes), server is
#    throwing an assert (M_TBLLEN < 128)
#
# 3) In the edge case, when db name contains 64 latin
#    characters, binlog contents are interpreted wrongly
#    which is leading to replication issues.
#
###############################################################################

--source include/not_windows.inc
--source include/master-slave.inc

--let iter=1
# Change iteration to 4 after fixing Bug #22280214
while ($iter <= 2)
{
  --connection master
  if ($iter == 1)
  {
    --echo Test case 1:- table name with one character latin name.
    --let $tblname= REPEAT(CHAR(131),1)
  }
  if ($iter == 2)
  {
    --echo Test case 2:- table name and database names with one character latin name.
    --let $tblname= REPEAT(CHAR(131),1),"`.`",REPEAT(CHAR(131),1)
    --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),1),"`")
    PREPARE STMT FROM @s; EXECUTE stmt;
  }
  # After fixing Bug #22280214 DATADIR LOCATION IS LIMITING
  # IDENTIFIER MAX LENGTH,  the following two tests (iter 3 and 4) can be
  # uncommented.
  #if ($iter == 3)
  #{
    # --echo Test case 3:- table name and database names with 64 latin characters name.
    # --let $tblname= REPEAT(CHAR(131),64),"`.`", REPEAT(CHAR(131),64)
    # --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(131),64),"`")
    # PREPARE STMT FROM @s; EXECUTE stmt;
  #}
  #if ($iter == 4)
  #{
    # --echo Test case 4:- table name and database names with 64 Euro(€) characters.
    # --let $tblname= REPEAT(CHAR(226,130,172),64),"`.`", REPEAT(CHAR(226,130,172),64)
    # --eval SET @s:=CONCAT("CREATE DATABASE `",REPEAT(CHAR(226,130,172),64),"`")
    # PREPARE STMT FROM @s; EXECUTE stmt;
  #}
  --eval SET @s:=CONCAT("CREATE TABLE `",$tblname,"` (a INT)")
  PREPARE STMT FROM @s; EXECUTE stmt;
  --eval SET @s:=CONCAT("INSERT INTO `",$tblname,"` VALUES (1)")
  PREPARE STMT FROM @s; EXECUTE stmt;
  --eval SET @s:=CONCAT("DROP TABLE `",$tblname, "`")
  PREPARE STMT FROM @s; EXECUTE stmt;
  if ($iter == 2)
  {
    --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),1),"`")
    PREPARE STMT FROM @s; EXECUTE stmt;
  }
  # After fixing Bug #22280214 DATADIR LOCATION IS LIMITING
  # IDENTIFIER MAX LENGTH, the following two tests (iter 3 and 4) can be
  # uncommented.
  #if ($iter == 3)
  #{
     # --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(131),64),"`")
     # PREPARE STMT FROM @s; EXECUTE stmt;
  #}
  #if ($iter == 4)
  #{
     # --eval SET @s:=CONCAT("DROP DATABASE `",REPEAT(CHAR(226,130,172),64),"`")
     # PREPARE STMT FROM @s; EXECUTE stmt;
  #}
  --sync_slave_with_master
  --inc $iter
}

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit