45 lines
1.2 KiB
Plaintext
45 lines
1.2 KiB
Plaintext
# ==== Purpose ====
|
|
#
|
|
# This test script serves as the functionality testing for the
|
|
# statement_digest() and statement_digest_text() functions in replication
|
|
# environment
|
|
#
|
|
# ==== Related Worklog ====
|
|
#
|
|
# WL#9637: SQL Function to return DIGEST of given SQL
|
|
|
|
--source include/master-slave.inc
|
|
|
|
--source include/rpl_connection_master.inc
|
|
--echo # test for statement_digest()
|
|
CREATE TABLE test.t1 (a VARCHAR(1000));
|
|
INSERT INTO test.t1 SELECT statement_digest("SELECT * FROM foo");
|
|
|
|
--echo # test for statement_digest_text()
|
|
CREATE TABLE test.t2 (a VARCHAR(1000));
|
|
|
|
INSERT INTO test.t2 SELECT statement_digest_text("SELECT * FROM foo");
|
|
--source include/sync_slave_sql_with_master.inc
|
|
|
|
--source include/rpl_connection_master.inc
|
|
--let $diff_tables=master:test.t1,slave:test.t1
|
|
--source include/diff_tables.inc
|
|
|
|
--let $diff_tables=master:test.t2,slave:test.t2
|
|
--source include/diff_tables.inc
|
|
|
|
SELECT * FROM test.t1;
|
|
# statement_digest_text() function adds an extra trailing space
|
|
# to the query due to Bug#26908015.
|
|
SELECT * FROM test.t2;
|
|
|
|
--echo # Clean up
|
|
DROP TABLE test.t1;
|
|
DROP TABLE test.t2;
|
|
--source include/sync_slave_sql_with_master.inc
|
|
|
|
--source include/rpl_end.inc
|
|
|
|
--connection master
|
|
--source suite/xengine/include/check_xengine_log_error.inc
|