403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/suite/rpl/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/suite/rpl/include/check_type.inc
# Helper file to perform one insert of a value into a table with
# different types on master and slave.  The file will insert the
# result into the type_conversions table *on the slave* to get a
# summary of failing and succeeding tests.

# Input:
#    $source_type      Type on the master
#    $target_type      Type on the slave
#    $source_value     Value on the master (inserted into the table)
#    $target_value     Value on the slave (expected value in the table
#                      on the slave)
#    $can_convert      True if conversion shall work, false if it
#                      shall generate an error 
#    $engine_type      The storage engine to be used for storing table
#                      on both master and slave

if (!$engine_type)
{
  # Use the default storage engine
  let $engine_type=`SELECT @@default_storage_engine`;
}

connection master;
disable_warnings;
DROP TABLE IF EXISTS t1;
enable_warnings;
if ($source_temp_format)
{
  --eval SET @@global.mysql56_temporal_format= $source_temp_format
}
eval CREATE TABLE t1(
  pk INT NOT NULL PRIMARY KEY,
  a $source_type
) ENGINE=$engine_type;
sync_slave_with_master;
if ($target_temp_format)
{
  --eval SET @@global.mysql56_temporal_format= $target_temp_format
}
eval ALTER TABLE t1 MODIFY a $target_type;

connection master;
eval INSERT INTO t1 VALUES(1, $source_value);
if ($can_convert) {
  sync_slave_with_master;
  --disable_cursor_protocol
  eval SELECT a = $target_value into @compare FROM t1;
  --enable_cursor_protocol
  eval INSERT INTO type_conversions SET
       Source = "$source_type",
       Target = "$target_type",
       Flags = @@slave_type_conversions,
       On_Master = $source_value,
       Expected = $target_value,
       Compare = @compare;
  UPDATE type_conversions
     SET On_Slave = (SELECT a FROM t1)
   WHERE TestNo = LAST_INSERT_ID();
}
if (!$can_convert) {
  connection slave;
  wait_for_slave_to_stop;
  let $error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
  eval INSERT INTO type_conversions SET
       Source = "$source_type",
       Target = "$target_type",
       Flags = @@slave_type_conversions,
       On_Master = $source_value,
       Error = $error;
  SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
  START SLAVE;
}

Youez - 2016 - github.com/yon3zu
LinuXploit