1
################################################################################
2
# inc/partition_check_read2.inc #
5
# Read rows from table t1 in different ways #
6
# This routine is only useful for the partition_<feature>_<engine> tests. #
8
#------------------------------------------------------------------------------#
9
# Original Author: mleich #
10
# Original Date: 2006-04-11 #
14
################################################################################
16
## EXPLAIN PARTITIONS SELECT for one single row
17
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
19
## Check SELECT for one single row
25
SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE f_int1 = 3;
27
let $run= `SELECT @aux`;
30
--echo # Unexpected result on SELECT
31
eval SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
34
--echo # check read single success: $success
36
## Read all existing records in one step
42
eval SELECT COUNT(*) <> @max_row INTO @aux FROM t1;
44
let $run= `SELECT @aux`;
47
--echo # Unexpected result on SELECT
48
eval SELECT COUNT(*) <> @max_row FROM t1;
51
--echo # check read all success: $success
53
## Read all existing records row by row
55
let $num= `SELECT @max_row`;
62
eval SELECT COUNT(*) <> 1 INTO @aux FROM t1
65
let $run= `SELECT @aux`;
68
--echo # Unexpected result on SELECT
69
eval SELECT COUNT(*) <> 1 FROM t1
75
--echo # check read row by row success: $success