| 1 |
############################################################################# |
| 2 |
# Original Author: JBM # |
| 3 |
# Original Date: Aug/18/2005 # |
| 4 |
############################################################################# |
| 5 |
# TEST: To test the LOAD_FILE() in rbr # |
| 6 |
############################################################################# |
| 7 |
# Change Author: JBM |
| 8 |
# Change Date: 2006-01-16 |
| 9 |
########## |
| 10 |
|
| 11 |
# Includes |
| 12 |
-- source include/master-slave.inc |
| 13 |
|
| 14 |
--disable_query_log |
| 15 |
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT"); |
| 16 |
--enable_query_log |
| 17 |
|
| 18 |
# Begin clean up test section |
| 19 |
--disable_warnings |
| 20 |
connection master; |
| 21 |
DROP PROCEDURE IF EXISTS test.p1; |
| 22 |
DROP TABLE IF EXISTS test.t1; |
| 23 |
--enable_warnings |
| 24 |
|
| 25 |
# Section 1 test |
| 26 |
|
| 27 |
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a)); |
| 28 |
INSERT INTO test.t1 VALUES(1,'test'); |
| 29 |
--disable_warnings |
| 30 |
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=1; |
| 31 |
--enable_warnings |
| 32 |
delimiter |; |
| 33 |
create procedure test.p1() |
| 34 |
begin |
| 35 |
INSERT INTO test.t1 VALUES(2,'test'); |
| 36 |
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2; |
| 37 |
end| |
| 38 |
delimiter ;| |
| 39 |
--disable_warnings |
| 40 |
CALL test.p1(); |
| 41 |
--enable_warnings |
| 42 |
SELECT * FROM test.t1 ORDER BY blob_column; |
| 43 |
save_master_pos; |
| 44 |
--sync_slave_with_master |
| 45 |
connection slave; |
| 46 |
SELECT * FROM test.t1 ORDER BY blob_column; |
| 47 |
|
| 48 |
# Cleanup |
| 49 |
connection master; |
| 50 |
DROP PROCEDURE IF EXISTS test.p1; |
| 51 |
DROP TABLE test.t1; |
| 52 |
--sync_slave_with_master |
| 53 |
--source include/rpl_end.inc |
| 54 |
# End of 5.0 test case |