summaryrefslogtreecommitdiff
path: root/mysql-test/suite/parts/inc/part_supported_sql_funcs_delete.inc
blob: 844ba70df4ad5dfca72139117d6bbc8ddb7aabff (plain)
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
################################################################################
# t/part_supported_sql_funcs_delete.inc                                        #
#                                                                              #
# Purpose:                                                                     #
#  Delete access of the tests frame for allowed sql functions                  #
#                                                                              #
#                                                                              #
#------------------------------------------------------------------------------#
# Original Author: HH                                                          #
# Original Date: 2006-11-22                                                    #
# Change Author:                                                               #
# Change Date:                                                                 #
# Change:                                                                      #
################################################################################
--echo -------------------------------------------------------------------------
--echo ---  Delete rows and partitions of tables with $sqlfunc
--echo -------------------------------------------------------------------------

begin;
eval delete from $t1 where col1=$val2;
eval delete from $t2 where col1=$val2;
eval delete from $t3 where col1=$val2;
eval delete from $t4 where col1=$val2;
eval delete from $t5 where col1=$val2;
eval delete from $t6 where col1=$val2;
commit;

eval select * from $t1 order by col1;
eval select * from $t2 order by col1;
eval select * from $t3 order by col1;
eval select * from $t4 order by colint;
eval select * from $t5 order by colint;

begin;
eval insert into $t1 values ($val2);
eval insert into $t2 values ($val2);
eval insert into $t3 values ($val2);
eval insert into $t4 values (60,$val2);
eval insert into $t5 values (60,$val2);
eval insert into $t6 values (60,$val2);
commit;

eval select * from $t1 order by col1;
eval select * from $t2 order by col1;
eval select * from $t3 order by col1;
eval select * from $t4 order by colint;
eval select * from $t5 order by colint;
eval select * from $t6 order by colint;

if (!$drop_partition_not_supported)
{
eval alter table $t1 drop partition p0; 
eval alter table $t2 drop partition p0; 
eval alter table $t4 drop partition p0; 
eval alter table $t5 drop partition p0; 
eval alter table $t6 drop partition p0;  

eval select * from $t1 order by col1;
eval select * from $t2 order by col1;
eval select * from $t3 order by col1;
eval select * from $t4 order by colint;
eval select * from $t5 order by colint;
eval select * from $t6 order by colint;
}