403Webshell
Server IP : 172.67.216.182  /  Your IP : 108.162.227.120
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_binlog_json.test
# ==== Purpose ====
#
# Verify that mysqlbinlog is able to print JSON columns for row
# events correctly (NULL if the value is NULL, blob format otherwise).
#
# ==== Implementation ====
#
# Generate INSERT/UPDATE/DELETE with NULL and non-NULL values in both
# pre- and post-image. Then run mysqlbinlog to show the result.

--echo #
--echo # Bug#21276751 JSON+MYSQLBINLOG: JSON DATA NOT PRINTING PROPERLY
--echo #              WHEN USING MYSQLBINLOG UTILITY
--echo #

--source include/have_binlog_format_row.inc
--source include/master-slave.inc
--source include/not_gtid_enabled.inc

connection master;
CREATE TABLE tab1 (json_col1 JSON);
INSERT INTO tab1 (json_col1) VALUES ('{"key": "value", "key2": [1, 2, 3]}');
SELECT json_col1 FROM tab1;
--source include/sync_slave_sql_with_master.inc
SELECT json_col1 FROM tab1;
connection master;
UPDATE tab1 SET json_col1 = JSON_SET(json_col1, '$.key3', 'abc');
SELECT json_col1 FROM tab1;
--source include/sync_slave_sql_with_master.inc
SELECT json_col1 FROM tab1;
connection master;
UPDATE tab1 SET json_col1 = NULL;
SELECT json_col1 FROM tab1;
--source include/sync_slave_sql_with_master.inc
SELECT json_col1 FROM tab1;
connection master;
UPDATE tab1 SET json_col1 = '[ 1, { "k" : "v" } ]' WHERE json_col1 IS NULL;
SELECT json_col1 FROM tab1;
--source include/sync_slave_sql_with_master.inc
SELECT json_col1 FROM tab1;
connection master;
INSERT INTO tab1 VALUES (NULL);
SELECT json_col1 FROM tab1;
--source include/sync_slave_sql_with_master.inc
SELECT json_col1 FROM tab1;
connection master;
DELETE FROM tab1;
SELECT json_col1 FROM tab1;
--source include/sync_slave_sql_with_master.inc
SELECT json_col1 FROM tab1;
connection master;
DROP TABLE tab1;

FLUSH LOGS;

--let $MYSQLD_DATADIR= `select @@datadir`
--let $mysqlbinlog_parameters= --base64-output=decode-rows --verbose $MYSQLD_DATADIR/master-bin.000001
--source include/mysqlbinlog.inc

--source include/rpl_end.inc

Youez - 2016 - github.com/yon3zu
LinuXploit