1
--source include/have_falcon.inc
2
--source include/big_test.inc
4
# Bug #22150: Error "Can't find record"
5
# Slightly modified not to output randon numbers. Run
6
# this test with --big-test option.
8
--echo *** Bug #22150 ***
10
# ----------------------------------------------------- #
11
# --- Initialisation --- #
12
# ----------------------------------------------------- #
13
let $engine = 'Falcon';
14
eval SET @@storage_engine = $engine;
17
DROP TABLE IF EXISTS t1;
18
DROP PROCEDURE IF EXISTS p1;
21
--echo # Establish connection conn1 (user = root)
22
connect (conn1,localhost,root,,);
25
--echo # Switch to connection default
28
CREATE TABLE t1 (a int(11), KEY a (a));
33
DECLARE v1 int default 0;
35
DECLARE CONTINUE HANDLER FOR 1020 BEGIN END;
36
DECLARE CONTINUE HANDLER FOR 1213 BEGIN END;
38
/* SELECT 'insert', v1; */
39
INSERT INTO t1 VALUES (v1);
40
SET v2 = rand() * 10000;
41
UPDATE t1 SET a = v2 WHERE a = v1;
42
/* SELECT ' update', v1; */
45
/* SELECT ' delete'; */
52
# ----------------------------------------------------- #
54
# ----------------------------------------------------- #
55
--echo # Sent call p1() to the server but do not pull the results
58
--echo # Switch to connection conn1
63
--echo # Switch to connection default
65
--echo # Pull the results of the preceeding call p1()
67
--echo # Sent call p1() to the server but do not pull the results
71
--echo # Switch to connection conn1
76
--echo # Switch to connection default
78
--echo # Pull the results of the preceeding call p1()
81
# ----------------------------------------------------- #
83
# ----------------------------------------------------- #
84
SELECT count(*) FROM t1;
86
# ----------------------------------------------------- #
87
# --- Final cleanup --- #
88
# ----------------------------------------------------- #
89
--echo # Disconnect conn1