Commit 12e5d5b6 authored by mleich@five.local.lan's avatar mleich@five.local.lan

Fixes for the bugs

       Bug#31610 Remove outdated and redundant tests:
                 partition_02myisam partition_03ndb
       Bug#32405 testsuite parts: partition_char_myisam wrong content
and cleanup of testsuite
   - remove/correct wrong comments
   - remove workarounds for fixed bugs
   - replace error numbers with error names
   - exclude subtests from execution which fail now because of
     new limitations for partitioning functions
   - remove code for the no more intended dual use
     fast test in regression tests/slow test in testsuite
   - analyze and fix problems with partition_char_innodb
   - fix problems caused by last change of error numbers
   - Introduce error name to error number mapping which makes
     maintenance after next error renumbering easier
parent be638f60
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
###############################################
# #
# Partition tests NDB tables #
# #
###############################################
#
# NOTE: PLEASE DO NOT ADD NOT NDB SPECIFIC TESTCASES HERE !
# NON STORAGE SPECIFIC TESTCASES SHOULD BE ADDED IN
# THE SOURCED FIELS ONLY.
#
# Storage engine to be tested
let $engine= 'NDB' ;
-- source include/have_ndb.inc
eval SET SESSION storage_engine=$engine;
# Other storage engine <> storage engine to be tested
let $engine_other= 'MEMORY';
# number of rows for the INSERT/UPDATE/DELETE/SELECT experiments
# on partioned tables
# Attention: In the moment the result files fit to @max_row = 200 only
SET @max_row = 200;
-- source include/partition_1.inc
################################################################################
# include/partition_methods1.inc #
# inc/partition_methods1.inc #
# #
# Purpose: #
# Create and check partitioned tables #
......@@ -11,7 +11,7 @@
# do #
# 1. Create the partitioned table #
# 2 Insert the content of the table t0_template into t1 #
# 3. Execute include/partition_check.inc #
# 3. Execute inc/partition_check.inc #
# 4. Drop the table t1 #
# done #
# #
......@@ -21,14 +21,14 @@
# has to be set before sourcing this routine. #
# Example: #
# let $unique= , UNIQUE INDEX uidx1 (f_int1); #
# include/partition_method1s.inc #
# inc/partition_method1s.inc #
# #
# Attention: The routine include/partition_methods2.inc is very similar #
# Attention: The routine inc/partition_methods2.inc is very similar #
# to this one. So if something has to be changed here it #
# might be necessary to do it also there #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
......@@ -52,7 +52,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY KEY
......@@ -67,7 +66,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST
......@@ -90,7 +88,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE
......@@ -114,7 +111,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY HASH
......@@ -137,7 +133,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY RANGE -- SUBPARTITION BY KEY
......@@ -163,7 +158,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY HASH
......@@ -186,7 +180,6 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
#----------- PARTITION BY LIST -- SUBPARTITION BY KEY
......@@ -209,5 +202,4 @@ $unique
$partitioning;
eval $insert_all;
--source suite/parts/inc/partition_check.inc
# --source include/partition_check.inc
DROP TABLE t1;
......@@ -21,253 +21,207 @@ let $sqlfunc = ascii(col1);
let $valsqlfunc = ascii('a');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ord(col1);
let $valsqlfunc = ord('a');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = greatest(col1,15);
let $valsqlfunc = greatest(1,15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = isnull(col1);
let $valsqlfunc = isnull(15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = least(col1,15);
let $valsqlfunc = least(15,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = case when col1>15 then 20 else 10 end;
let $valsqlfunc = case when 1>30 then 20 else 15 end;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ifnull(col1,30);
let $valsqlfunc = ifnull(1,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = nullif(col1,30);
let $valsqlfunc = nullif(1,30);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = bit_length(col1);
let $valsqlfunc = bit_length(255);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = char_length(col1);
let $valsqlfunc = char_length('a');
#let $coltype = int;
#--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = character_length(col1);
let $valsqlfunc = character_length('a');
let $coltype = char(30)
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = find_in_set(col1,'1,2,3,4,5,6,7,8,9');
let $valsqlfunc = find_in_set('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = instr(col1,'acb');
let $valsqlfunc = instr('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = length(col1);
let $valsqlfunc = length('a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = locate('a',col1);
let $valsqlfunc = locate('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = octet_length(col1);
let $valsqlfunc = octet_length('a,b,c,d,e,f,g,h,i');
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = position('a' in col1);
let $valsqlfunc = position('i' in 'a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = strcmp(col1,'acb');
let $valsqlfunc = strcmp('i','a,b,c,d,e,f,g,h,i');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = crc32(col1);
let $valsqlfunc = crc32('a,b,c,d,e,f,g,h,i');
let $coltype = char(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = round(col1);
let $valsqlfunc = round(15);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = sign(col1);
let $valsqlfunc = sign(123);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = period_add(col1,5);
let $valsqlfunc = period_add(9804,5);
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = period_diff(col1,col2);
let $valsqlfunc = period_diff(9809,199907);
let $coltype = datetime,col2 datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $coltype = int,col2 int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = timestampdiff(day,5,col1);
let $valsqlfunc = timestampdiff(YEAR,'2002-05-01','2001-01-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = unix_timestamp(col1);
let $valsqlfunc = unix_timestamp ('2002-05-01');
let $coltype = date;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = week(col1);
let $valsqlfunc = week('2002-05-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = weekofyear(col1);
let $valsqlfunc = weekofyear('2002-05-01');
let $coltype = datetime;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = cast(col1 as signed);
let $valsqlfunc = cast(123 as signed);
let $coltype = varchar(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = convert(col1,unsigned);
let $valsqlfunc = convert(123,unsigned);
let $coltype = varchar(30);
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 | 20;
let $valsqlfunc = 10 | 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 & 20;
let $valsqlfunc = 10 & 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 ^ 20;
let $valsqlfunc = 10 ^ 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 << 20;
let $valsqlfunc = 10 << 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = col1 >> 20;
let $valsqlfunc = 10 >> 20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = ~col1;
let $valsqlfunc = ~20;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = bit_count(col1);
let $valsqlfunc = bit_count(20);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
let $sqlfunc = inet_aton(col1);
let $valsqlfunc = inet_aton('192.168.1.1');
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
set @var =20;
let $sqlfunc = bit_length(col1)+@var-@var;
let $valsqlfunc = bit_length(20)+@var-@var;
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
delimiter //;
......@@ -298,5 +252,4 @@ let $sqlfunc = getmaxsigned_t1(col1);
let $valsqlfunc = getmaxsigned(10);
let $coltype = int;
--source suite/parts/inc/partition_blocked_sql_funcs.inc
# --source include/partition_blocked_sql_funcs.inc
drop function if exists getmaxsigned_t1;
################################################################################
# t/part_supported_sql_funcs_delete.inc # # #
# t/part_supported_sql_funcs_delete.inc #
# #
# Purpose: #
# Delete access of the tests frame for allowed sql functions #
# #
......
......@@ -38,7 +38,6 @@ let $val2 = 13 ;
let $val3 = 17 ;
let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = ceiling(col1);
......@@ -51,7 +50,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ;
# DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = floor(col1);
let $valsqlfunc = floor(15.123);
......@@ -63,7 +61,6 @@ let $val3 = 17.987;
let $val4 = 15.654 ;
# DISABLED due to bug 30577
#--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = mod(col1,10);
let $valsqlfunc = mod(15,10);
......@@ -74,7 +71,6 @@ let $val2 = 19;
let $val3 = 17;
let $val4 = 15 ;
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = day(col1);
let $valsqlfunc = day('2006-12-21');
......@@ -85,7 +81,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofmonth(col1);
let $valsqlfunc = dayofmonth('2006-12-24');
......@@ -96,7 +91,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofweek(col1);
let $valsqlfunc = dayofweek('2006-12-24');
......@@ -107,7 +101,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = dayofyear(col1);
let $valsqlfunc = dayofyear('2006-12-25');
......@@ -118,10 +111,8 @@ let $val2 = '2006-01-17';
let $val3 = '2006-02-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = extract(month from col1);
let $valsqlfunc = extract(year from '1998-11-23');
......@@ -132,7 +123,6 @@ let $val2 = '2006-02-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-05';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = hour(col1);
let $valsqlfunc = hour('18:30');
......@@ -143,7 +133,6 @@ let $val2 = '14:30';
let $val3 = '21:59';
let $val4 = '10:30';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = microsecond(col1);
let $valsqlfunc = microsecond('10:30:10.000010');
......@@ -154,7 +143,6 @@ let $val2 = '04:30:01.000018';
let $val3 = '00:59:22.000024';
let $val4 = '05:30:34.000037';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = minute(col1);
let $valsqlfunc = minute('18:30');
......@@ -164,7 +152,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22';
let $val4 = '10:24:23';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = second(col1);
let $valsqlfunc = second('18:30:14');
......@@ -175,10 +162,8 @@ let $val2 = '14:30:20';
let $val3 = '21:59:22';
let $val4 = '10:22:33';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $coltype = char(30);
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = month(col1);
let $valsqlfunc = month('2006-10-14');
......@@ -189,7 +174,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-05-25';
let $val4 = '2006-11-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = quarter(col1);
let $valsqlfunc = quarter('2006-10-14');
......@@ -200,7 +184,6 @@ let $val2 = '2006-12-17';
let $val3 = '2006-09-25';
let $val4 = '2006-07-30';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = time_to_sec(col1)-(time_to_sec(col1)-20);
let $valsqlfunc = time_to_sec('18:30:14')-(time_to_sec('17:59:59'));
......@@ -211,7 +194,6 @@ let $val2 = '14:30:45';
let $val3 = '21:59:22';
let $val4 = '10:33:11';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = to_days(col1)-to_days('2006-01-01');
let $valsqlfunc = to_days('2006-02-02')-to_days('2006-01-01');
......@@ -222,7 +204,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2))
let $sqlfunc = datediff(col1, '2006-01-01');
......@@ -234,7 +215,6 @@ let $val2 = '2006-01-17';
let $val3 = '2006-01-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = weekday(col1);
let $valsqlfunc = weekday('2006-10-14');
......@@ -245,7 +225,6 @@ let $val2 = '2006-11-17';
let $val3 = '2006-05-25';
let $val4 = '2006-02-06';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = year(col1)-1990;
let $valsqlfunc = year('2005-10-14')-1990;
......@@ -256,7 +235,6 @@ let $val2 = '2000-02-17';
let $val3 = '2004-05-25';
let $val4 = '2002-02-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
let $sqlfunc = yearweek(col1)-200600;
let $valsqlfunc = yearweek('2006-10-14')-200600;
......@@ -267,4 +245,3 @@ let $val2 = '2006-08-17';
let $val3 = '2006-03-25';
let $val4 = '2006-11-15';
--source suite/parts/inc/partition_supported_sql_funcs.inc
# --source include/partition_supported_sql_funcs.inc
################################################################################
# include/partition.pre #
# inc/partition.pre #
# #
# Purpose: #
# Auxiliary script creating prerequisites needed by the partitioning tests #
......@@ -26,27 +26,21 @@
eval SET @@session.storage_engine = $engine;
##### Disabled/affected testcases, because of open bugs #####
--echo
--echo #------------------------------------------------------------------------
--echo # There are several testcases disabled because of the open bugs
--echo # #15890
if (`SELECT @@session.storage_engine IN('ndbcluster')`)
{
--echo # #18730, Bug#18735
}
--echo #------------------------------------------------------------------------
# Attention: Only bugs appearing in all storage engines should be mentioned above.
# The top level test wrapper (example: t/partition_basic_ndb.test)
# may set the $fixed_bug<nnnnn> variable to 0 after sourcing
# this file.
# Bug#15890 Partitions: Strange interpretation of partition number
let $fixed_bug15890= 0;
# Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
# Attention: NDB testcases set this variable later to 0
let $fixed_bug18730= 1;
# Bug#18735: Partitions: NDB, UNIQUE INDEX, UPDATE, strange server response
# Attention: NDB testcases set this variable later to 0
let $fixed_bug18735= 1;
# --echo
# --echo #------------------------------------------------------------------------
# --echo # There are several testcases disabled because of the open bugs
# if (`SELECT @@session.storage_engine IN('ndbcluster')`)
# {
# --echo # #18730
# }
# --echo #------------------------------------------------------------------------
# # Attention: Only bugs appearing in all storage engines should be mentioned above.
# # The top level test wrapper (example: t/partition_basic_ndb.test)
# # may set the $fixed_bug<nnnnn> variable to 0 after sourcing
# # this file.
# # Bug#18730: Partitions: NDB, crash on SELECT MIN(<unique column>)
# # Attention: NDB testcases set this variable later to 0
# let $fixed_bug18730= 1;
--echo
--echo #------------------------------------------------------------------------
......@@ -66,6 +60,17 @@ if ($debug)
--echo # It is to be expected, that we get huge differences.
}
let $ER_DUP_KEY= 1022;
let $ER_GET_ERRNO= 1030;
let $ER_BAD_NULL_ERROR= 1048;
let $ER_DUP_ENTRY= 1062;
let $ER_PARSE_ERROR= 1064;
let $ER_TOO_MANY_PARTITIONS_ERROR= 1499;
let $ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF= 1503;
let $ER_NO_PARTS_ERROR= 1504;
let $ER_DROP_PARTITION_NON_EXISTENT= 1507;
let $ER_SAME_NAME_PARTITION= 1517;
let $ER_NO_PARTITION_FOR_GIVEN_VALUE= 1526;
# Set the variable $engine_other to a storage engine <> $engine
--disable_query_log
......@@ -308,23 +313,23 @@ if (0)
# (t/partition_<feature>_<engine>.test)
# a) General not engine specific settings and requirements
# $debug, $ls, @max_row, $more_trigger_tests, .....
# --source include/have_partition.inc
# --source inc/have_partition.inc
# b) Engine specific settings and requirements
# $do_pk_tests, $MAX_VALUE, $engine
# SET SESSION storage_engine
# $engine_other
# c) Generate the prerequisites ($variables, @variables, tables) needed
# via
# --source include/partition.pre
# --source inc/partition.pre
# d) Set "fixed_bug<number>" variables to 1 if there are open engine
# specific bugs which need worarounds.
# e) Execute the feature specific testscript via
# --source include/partition_<feature>.inc
# --source inc/partition_<feature>.inc
# f) Perform a cleanup by removing all objects created within the tests
# --source include/partition_cleanup.inc
# --source inc/partition_cleanup.inc
#
# 2.2. script generating the prerequisites needed in all tests
# (include/partition.pre)
# (inc/partition.pre)
# a) Message about open bugs causing that
# - some testcases are disabled
# - it cannot be avoided that the file with expected results suffers
......@@ -340,8 +345,8 @@ if (0)
# c) Setting of auxiliary variables
# d) Creation of auxiliary tables ....
#
# 3. script checking a feature
# (include/partition_<feature.inc>.inc)
# 2.3. script checking a feature
# (inc/partition_<feature.inc>.inc)
# Example:
# a) "set/compute" a CREATE TABLE t1 .. and an ALTER TABLE ... statement
# b) CREATE TABLE t1 ...
......@@ -353,13 +358,13 @@ if (0)
# Now t1 and t0_template should have the same content.
# f) Check the "usability" of the current table t1
# via
# --source include/partition_check.pre
# --source inc/partition_check.pre
# g) DROP TABLE t1
# Switch to other CREATE and ALTER statements and run sequence a)-g) again
# ...
#
# 4. script checking if a certain table shows the expected behaviour
# ("usability" check): include/partition_check.inc
# 2.4. script checking if a certain table shows the expected behaviour
# ("usability" check): inc/partition_check.inc
# - SELECT/INSERT/UPDATE/DELETE affecting single and multiple records
# - check of values of special interest like NULL etc.
# - INSERT/UPDATE with BEFORE/AFTER triggers
......@@ -368,6 +373,40 @@ if (0)
# - TRUNCATE/OPTIMIZE/..
# - ...
#
#
# 2.5. There are some auxiliary scripts with sub tests where we cannot predict
# if we get an error and if we get one, which one.
# Example: INSERT a record where the value for a certain column equals
# some existing record.
# Depending on existing/not existing PRIMARY KEYs, UNIQUE INDEXes
# the response might be "no error", ER_DUP_KEY, ER_DUP_ENTRY.
# Our requirements:
# 1. We cannot abort whenever get an error message from the server.
# 2. We want the exact server message into the protocol.
# 3. We want abort testing if we know that a certain error must not happen.
# Common but unusable Solutions:
# a) --error 0, ER_DUP_KEY, ER_DUP_ENTRY
# <statment>
# We get no error message even if the statement fails.
# b) --error ER_DUP_KEY, ER_DUP_ENTRY
# <statment>
# We might get "got one of the expected errors".
# There are situations where the statement must be successful.
# c) --disable_abort_on_error
# <statment>
# --enable_abort_on_error
# And nothing extra
# We do not abort in case of unexpected server errors.
#
# Final solution:
# --disable_abort_on_error
# <statment>
# --enable_abort_on_error
# Check via error number if the error is not totally unexpected.
# The sub tests use $ER_DUP_KEY, $ER_DUP_ENTRY, etc.
# Assignment of values happen in this file.
#
#
# 3. How to analyze a partitioning bug revealed with these tests/ How to build
# a small replay script from the monstrous protocols ?
#------------------------------------------------------------------------------#
......@@ -382,19 +421,19 @@ if (0)
# protocolling of some queries.
# In most cases you will find that the r/<testcase>.<log/reject> contains at
# least a line "# # check <something>: 0".
# That means that a check within include/partition_check did not got the
# That means that a check within inc/partition_check did not got the
# expected result.
# A good start for a replay script would be
# 1. Copy t/partition_<feature>_<engine>.test to t/my_test.test
# 2. Edit t/my_test.test
# - set $debug to 1
# - replace the line
# "--source include/partition_<feature>.inc"
# "--source inc/partition_<feature>.inc"
# with all statements between the last
# CREATE TABLE t1 statement (included this)
# and the line
# "# Start usability test (include/partition_check.inc)"
# - add the content of include/partition_check.inc at the end.
# "# Start usability test (inc/partition_check.inc)"
# - add the content of inc/partition_check.inc at the end.
#
# Please excuse that the partitioning tests generate such huge protocols which
# and are not very handy when it comes to bug analysis. I tried to squeez out
......
# include/partition_10.inc
# inc/partition_10.inc
#
# Do some basic checks on a table.
#
......@@ -10,7 +10,7 @@
# is like expected.
#
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
####### Variations with multiple records
# Select on empty table
......@@ -50,20 +50,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
......
# include/partition_11.inc
# inc/partition_11.inc
#
# Try to create a table with the given partition number
#
......@@ -13,7 +13,7 @@ let $run= `SELECT @my_errno = 0`;
# If this operation was successfull, check + drop this table
if ($run)
{
--source include/partition_10.inc
--source suite/parts/inc/partition_10.inc
eval DROP TABLE t1;
}
#### Try to create a table with the given subpartition number
......@@ -29,6 +29,6 @@ let $run= `SELECT @my_errno = 0`;
# If this operation was successfull, check + drop this table
if ($run)
{
--source include/partition_10.inc
--source suite/parts/inc/partition_10.inc
eval DROP TABLE t1;
}
# include/partition_12.inc
# inc/partition_12.inc
#
# Do some basic things on a table, if the SQL command executed just before
# sourcing this file was successful.
#
--source include/partition_layout.inc
--source suite/parts/inc/partition_layout.inc
####### Variations with multiple records
# (mass) Insert max_row_div2 + 1 records
......@@ -42,20 +42,14 @@ eval UPDATE t1 SET f1 = $max_row + 2, f2 = 'ZZZZZZZ'
WHERE f1 = 0 AND f2 = '#######';
# Select
eval SELECT COUNT(*) = 1 AS my_value FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
# Bug #15968: Partitions: crash when INSERT with f1 = -1 into PARTITION BY HASH(f1)
eval UPDATE t1 SET f1 = 0 - 1, f2 = 'ZZZZZZZ'
WHERE f1 = $max_row + 1 AND f2 = '#######';
# Select
SELECT COUNT(*) AS my_value FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Delete
eval DELETE FROM t1 WHERE f1 = $max_row + 2 AND f2 = 'ZZZZZZZ';
if ($fixed_bug15968)
{
DELETE FROM t1 WHERE f1 = 0 - 1 AND f2 = 'ZZZZZZZ';
}
# Select
SELECT COUNT(*) = 0 AS my_value FROM t1 WHERE f2 = 'ZZZZZZZ';
......
################################################################################
# include/partition_20.inc #
# inc/partition_20.inc #
# #
# Purpose: #
# Auxiliary script, only useful when sourced by include/partition_check.inc. #
# Auxiliary script, only useful when sourced by #
# suite/parts/inc/partition_check.inc. #
# #
# 1. Check if the preceeding statement caused that the expected number of #
# 1. Check if the preceding statement caused that the expected number of #
# records was #
# - inserted #
# - updated or deleted+inserted #
......@@ -17,19 +18,13 @@
# must be set before sourcing this routine. #
# #
#------------------------------------------------------------------------------#
# Original Author: ML #
# Original Author: mleich #
# Original Date: 2006-03-05 #
# Change Author: #
# Change Date: #
# Change: #
################################################################################
# include/partition_20.inc
#
# Auxiliary script, only useful when sourced by include/partition_check.inc.
#
# Check of preceeding statement via Select
if ($no_debug)
{
--disable_query_log
......
################################################################################
# include/partition_alter1.inc #
# inc/partition_alter1.inc #
# #
# Purpose: #
# Execute ALTER ... OPTIMIZE/CHECK/REBUID/ANALYZE statements (maintenance) #
......@@ -22,19 +22,15 @@
--echo # 1.1 ALTER ... ANALYZE PARTITION part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.3 ALTER ... ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 1.4 ALTER ... ANALYZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 2 ALTER ... CHECK PARTITION
......@@ -42,19 +38,15 @@ let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
--echo # 2.1 ALTER ... CHECK PARTITION part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.2 ALTER ... CHECK PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.3 ALTER ... CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 2.4 ALTER ... CHECK PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 3 ALTER ... OPTIMIZE PARTITION
......@@ -62,19 +54,15 @@ let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
--echo # 3.1 ALTER ... OPTIMIZE PARTITION part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.3 ALTER ... OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 3.4 ALTER ... OPTIMIZE PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 4 ALTER ... REBUILD PARTITION
......@@ -82,19 +70,15 @@ let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
--echo # 4.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 5 ALTER ... REPAIR PARTITION
......@@ -102,19 +86,15 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 5.1 ALTER ... REBUILD PARTITION part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.2 ALTER ... REBUILD PARTITION part_1,part_2;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo # 5.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
--echo #------------------------------------------------------------------------
--echo # 6 ALTER ... REMOVE PARTITIONING
......@@ -122,5 +102,4 @@ let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
--echo # 6.1 ALTER ... REMOVE PARTITIONING;
let $alter= ALTER TABLE t1 REMOVE PARTITIONING;
--source suite/parts/inc/partition_alter_41.inc
# --source include/partition_alter_41.inc
......@@ -14,7 +14,7 @@ let $index_directory = `select @indx_dir`;
drop table if exists t1;
--enable_warnings
--error 1439
--error ER_TOO_BIG_DISPLAYWIDTH
eval create table t1 (a bit(65), primary key (a)) engine=$engine partition by key (a);
eval create table t1 (a bit(0), primary key (a)) engine=$engine partition by key (a);
......
--echo ---- Partitioning and blob data type
--disable_query_log
# DATA DIRECTORY
eval SET @data_dir = 'DATA DIRECTORY =
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment