~drizzle-trunk/drizzle/development

1 by brian
clean slate
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
# Change: Added Order by for NDB
10
##########
11
12
# Includes
13
-- source include/master-slave.inc
14
15
16
# Begin clean up test section
17
--disable_warnings
18
connection master;
19
DROP PROCEDURE IF EXISTS test.p1;
20
DROP TABLE IF EXISTS test.t1;
21
--enable_warnings
22
23
# Section 1 test 
24
25
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a));
26
INSERT INTO test.t1  VALUES(1,'test');
27
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1;
28
delimiter |;
29
create procedure test.p1()
30
begin
31
  INSERT INTO test.t1  VALUES(2,'test');
32
  UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2;
33
end|
34
delimiter ;|
35
36
CALL test.p1();
37
SELECT * FROM test.t1 ORDER BY blob_column;
38
save_master_pos;
39
sync_slave_with_master;
40
connection slave;
41
# Need to allow some time when NDB engine is used for
42
# the injector thread to have time to populate binlog
43
let $wait_condition= SELECT INSTR(blob_column,'aberration') > 0 FROM test.t1 WHERE a = 2;
44
--source include/wait_condition.inc
45
SELECT * FROM test.t1 ORDER BY blob_column;
46
47
# Cleanup
48
connection master;
49
DROP PROCEDURE IF EXISTS test.p1;
50
DROP TABLE test.t1;
51
sync_slave_with_master;
52
53
# End of 5.0 test case