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 ################################################################################
22 ## EXPLAIN PARTITIONS SELECT for one single row
23 EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
25 ## Check SELECT for one single row
31 SELECT COUNT(*) <> 1 INTO @aux FROM t1 WHERE f_int1 = 3;
33 let $run= `SELECT @aux`;
36 --echo # Unexpected result on SELECT
37 eval SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
40 --echo # check read single success: $success
42 ## Read all existing records in one step
48 eval SELECT COUNT(*) <> @max_row INTO @aux FROM t1;
50 let $run= `SELECT @aux`;
53 --echo # Unexpected result on SELECT
54 eval SELECT COUNT(*) <> @max_row FROM t1;
57 --echo # check read all success: $success
59 ## Read all existing records row by row
61 let $num= `SELECT @max_row`;
68 eval SELECT COUNT(*) <> 1 INTO @aux FROM t1
71 let $run= `SELECT @aux`;
74 --echo # Unexpected result on SELECT
75 eval SELECT COUNT(*) <> 1 FROM t1
81 --echo # check read row by row success: $success