File: rpl_innodb_bug30888.test

package info (click to toggle)
mysql-5.1 5.1.73-1%2Bdeb6u1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze-lts
  • size: 197,132 kB
  • ctags: 93,377
  • sloc: cpp: 579,952; ansic: 429,462; perl: 49,053; sh: 21,692; pascal: 21,272; yacc: 12,801; makefile: 4,545; xml: 4,114; sql: 3,297; lex: 1,265; asm: 1,023
file content (66 lines) | stat: -rw-r--r-- 1,696 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
--source include/have_innodb.inc
--source include/have_binlog_format_mixed_or_row.inc
--source include/master-slave.inc

# Set the default connection to 'master'

--vertical_results

#let $engine_type= 'myisam';
let $engine_type= 'innodb';

######## Creat Table Section #########
use test;

eval CREATE TABLE test.regular_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
                           dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
                           fkid MEDIUMINT, filler VARCHAR(255),
                           PRIMARY KEY(id)) ENGINE=$engine_type;

######## Create SPs, Functions, Views and Triggers Section ##############

delimiter |;
CREATE PROCEDURE test.proc_norm()
BEGIN
   DECLARE ins_count INT DEFAULT 1000; 
   DECLARE del_count INT;
   DECLARE cur_user VARCHAR(255);
   DECLARE local_uuid VARCHAR(255);
   DECLARE local_time TIMESTAMP;

   SET local_time= NOW();
   SET cur_user= CURRENT_USER();
   SET local_uuid= UUID();
 
   WHILE ins_count > 0 DO
     INSERT INTO test.regular_tbl VALUES (NULL, NOW(), USER() , UUID(),
                                   ins_count,'Going to test MBR for MySQL');
     SET ins_count = ins_count - 1;
   END WHILE;
   
   SELECT MAX(id) FROM test.regular_tbl INTO del_count;
   WHILE del_count > 0 DO
     DELETE FROM test.regular_tbl WHERE id = del_count;
     SET del_count = del_count - 2;
   END WHILE;
END|   

delimiter ;|

############ Finish Setup Section ###################


############ Test Section ###################

CALL test.proc_norm();

--sync_slave_with_master

###### CLEAN UP SECTION ##############

connection master;
DROP PROCEDURE test.proc_norm;
DROP TABLE test.regular_tbl;

--source include/rpl_end.inc