2005-12-22 06:39:02 +01:00
|
|
|
#############################################################################
|
|
|
|
# Original Author: JBM #
|
|
|
|
# Original Date: Aug/18/2005 #
|
|
|
|
#############################################################################
|
|
|
|
# TEST: To test the LOAD_FILE() in rbr #
|
|
|
|
#############################################################################
|
2006-01-18 00:45:23 +01:00
|
|
|
# Change Author: JBM
|
|
|
|
# Change Date: 2006-01-16
|
|
|
|
# Change: Added Order by for NDB
|
|
|
|
##########
|
2005-12-22 06:39:02 +01:00
|
|
|
|
|
|
|
# Includes
|
|
|
|
-- source include/master-slave.inc
|
|
|
|
|
|
|
|
|
|
|
|
# Begin clean up test section
|
|
|
|
--disable_warnings
|
|
|
|
connection master;
|
|
|
|
DROP PROCEDURE IF EXISTS test.p1;
|
|
|
|
DROP TABLE IF EXISTS test.t1;
|
|
|
|
--enable_warnings
|
|
|
|
|
|
|
|
# Section 1 test
|
|
|
|
|
|
|
|
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a));
|
|
|
|
INSERT INTO test.t1 VALUES(1,'test');
|
2006-02-22 10:07:54 +01:00
|
|
|
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1;
|
2005-12-22 06:39:02 +01:00
|
|
|
delimiter |;
|
|
|
|
create procedure test.p1()
|
|
|
|
begin
|
|
|
|
INSERT INTO test.t1 VALUES(2,'test');
|
2006-02-22 10:07:54 +01:00
|
|
|
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2;
|
2005-12-22 06:39:02 +01:00
|
|
|
end|
|
|
|
|
delimiter ;|
|
|
|
|
|
|
|
|
CALL test.p1();
|
2006-01-18 00:45:23 +01:00
|
|
|
SELECT * FROM test.t1 ORDER BY blob_column;
|
2005-12-22 06:39:02 +01:00
|
|
|
save_master_pos;
|
2006-02-09 15:29:57 +01:00
|
|
|
# Need to allow some time when NDB engine is used for
|
|
|
|
# the injector thread to have time to populate binlog
|
|
|
|
sleep 10;
|
2005-12-22 06:39:02 +01:00
|
|
|
sync_slave_with_master;
|
|
|
|
connection slave;
|
2006-01-18 00:45:23 +01:00
|
|
|
SELECT * FROM test.t1 ORDER BY blob_column;
|
2005-12-22 06:39:02 +01:00
|
|
|
|
2006-02-13 19:03:12 +01:00
|
|
|
# Cleanup
|
2006-01-18 00:45:23 +01:00
|
|
|
connection master;
|
2005-12-22 06:39:02 +01:00
|
|
|
DROP PROCEDURE IF EXISTS test.p1;
|
|
|
|
DROP TABLE test.t1;
|
2006-02-13 19:03:12 +01:00
|
|
|
sync_slave_with_master;
|
|
|
|
|
2005-12-22 06:39:02 +01:00
|
|
|
# End of 5.0 test case
|