Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  partition_alter3_myisam.result   Sprache: Lisp

 

SET @max_row = 20;
SET @@session.default_storage_engine = 'MyISAM';

#------------------------------------------------------------------------
#  0. Setting of auxiliary variables + Creation of an auxiliary tables
#     needed in manyjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
#------------------------------------------------------------------------
SELECT @max_row DIV 2 INTO @SELECT MAX(f_int1), MIN(f_int2) INTO @my_max1,@my_min2 FROM t1;
SELECT @max_row DIV 3 INTO @max_row_div3;
SELECT @max_row DIV 4 INTO @max_row_div4;
SET @max_int_4 = 2147483647;
DROP TABLE IF EXISTS t0_template;
CREATE TABLE t0_template (
f_int1 INTEGER DEFAULT 0,
f_int2 INTEGER DEFAULT 0,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000) ,
PRIMARY KEY(f_int1))
ENGINE = MEMORY;
#     Logging of <max_row> INSERTs into t0_template suppressed
DROP TABLE IF EXISTS t0_definition;
CREATE TABLE t0_definition (
state  INTOjava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 44
create_command VARBINARY(5000),
file_list      VARBINARY(10000),
(java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 19
) ENGINE = MEMORY;
DROP TABLE IF EXISTS t0_aux;
CREATE TABLE t0_aux ( f_int1 INTEGER DEFAULT 0,
f_int2 INTEGER )'java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 54
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000) )
ENGINE = MEMORY;
SET AUTOCOMMIT= 1;
SET @@session.sql_mode= '';
# End of basic preparations needed for all tests
#----WHEREf_int1 BETWEEN @max_row_div2 -1 AND @max_row_div2 +1

#========================================================================
#  1.    Partition management commands on HASH partitioned table
#           column ORDERBY 
#========================================================================
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (f_date DATE, f_varchar VARCHAR(30));
INSERT INTO t1 (f_date, f_varchar)
SELECT CONCAT(CAST((f_int1 + 999) AS CHAR),'-02-10'), CAST(f_char1 AS CHAR)
FROM t0_template
WHERE f_int1 + 999 BETWEEN 1000 AND 9999;
SELECT IF(9999 - 1000 + 1 > @max_row 
INTO @exp_row_count;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
t1.MYD
t1.MYI
t1.frm
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = ' java.lang.StringIndexOutOfBoundsException: Range [30, 7) out of bounds for length 30
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
#check read java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 30
# check read all success: 1
# check read row by row success: 1
#------------------------------------------------------------------------
#  1.1   Increase number of PARTITIONS
#------------------------------------------------------------------------
#  1.1.1 ADD f_int1java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
ERROR HY000: Partition management on a not partitioned table is not possible
#  1.1.2 Assign HASH partitioning
ALTERTABLE PARTITION  YEAR(_date);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
t1#P#p0.MYD
t1#P#p0.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10  ##per##;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
#check readall success: 1
# check read row by row success: 1
#  1.1.3 Assign other HASH partitioning to already partitioned table
#        + test and switch back + test
ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ciOpMsg_type 
 PARTITION BY HASH (dayofyear(`f_date`))
t1#P#p0.MYD
t1#P#p0.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# check read all success: test.analyze statusEngine-ndependent statistics collected
# check read row by row success: 1
ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date));
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
t1#P#p0.MYD
t1#P#p0.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  1.1.4 Add PARTITIONS not fitting to HASH --> must fail
ALTER TABLE t1 ADD PARTITION (PARTITION part1 VALUES .analyze statusOK
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (0));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
#  1.1.5 Add two named partitions + test
ALTER TABLE t1 ADD CHECK    TABLE t1 EXTENDEDTABLEt1EXTENDED;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYITable  
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  116Add  partitions,name clash -->  fail
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
ERROR HY000: Duplicate partition name part1
#  1.1.7 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 27
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
Table Checksum
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  1.1.8 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 20
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `p4` ENGINE = MyISAM,
 PARTITION `p5` ENGINE = MyISAM,
 PARTITION `p6` ENGINE = MyISAM,
 PARTITION `p7` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#p5.MYD
t1#P#p5.MYI
t1#P#p6.MYD
t1#PMIZEt1;
t1#P#p7.MYD
t1#P#p7.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where
# check read single success: 1
#checkread  :java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
# check read row by row success: 1
#------------------------------------------------------------------------
#  1.2   Decrease number of PARTITIONS
#-----------------------------------tjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
#  1.2.1 DROP PARTITION is not supported for HASH --> must fail
ALTER TABLE t1 DROP PARTITION part1;
ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
#  1.2.2 COALESCE PARTITION partitionname is not supported
ALTER TABLE t1 COALESCE PARTITION part1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'part1' at line 1
#  1.2.3 Decrease by 0 is non sense --> must fail
ALTER TABLE t1 COALESCE PARTITION 0;
ERROR HY000: At least one partition must be coalesced
#  1.2.4 COALESCE one partition + test loop
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 REPAIR   TABLEt1 java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 27
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7`OpMsg_type Msg_text
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `p4` ENGINE = MyISAM,
 PARTITION `p5` ENGINE = MyISAM,
 PARTITION `p6` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#p5.MYD
t1#P#p5.MYI
t1#P#p6.MYD
t1#P#p6.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD. java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 24
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
# check read  layoutsuccess:   1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 12
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `p4` ENGINE = MyISAM,
 PARTITION `p5` ENGINE  
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#p5.MYD
t1#P#p5.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keysjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 28
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION checklayout success:1
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 ``=MyISAM
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `p4` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
PARTITIONSSELECTCOUNT(  WHERE  = 1000-210'java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where
#    java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` datef_int1 DEFAULT 0,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 f_int2  java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 UsingVARCHAR()
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar`varchar(30 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
# check read single success: 1
# check read all success: 1
# java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `_ate DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY HASH (year(`f_date`))
(PARTITION `p0` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02PARTITION part_1 VALUES LESS THAN ()
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# SUBPARTITION subpart11SUBPARTITIONsubpart12,
# check read row by row success: 1
#  1.2.5 COALESCE of last partition --> must fail
ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: Cannot remove all partitions, use DROP TABLE insteadpart_2VALUESTHAN()
#  1.2.6 Remove partitioning
ALTER TABLE t1 REMOVE PARTITIONING;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_date` date DEFAULT NULL,
  `f_varchar` varchar(30) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
t1.MYD
t1.MYI
t1.frm
EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10';
id select_type partitions possible_keys key key_len ref rows Extra
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  1.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
ERROR HY000PARTITION part_3 VALUES LESS THAN (10)
DROP TABLE t1;

#========================================================================
#  2.    Partition management commands on KEY partitioned table
#========================================================================
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
f_int1 INTEGER DEFAULT S java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
f_int2 INTEGER DEFAULT 0,
f_char1 CHAR(20),
f_char2 CHAR(20),
f_charbig VARCHAR(1000)
);
INSERT INTO t1(f_int1,f_int2,PARTITIONpart_4 VALUES LESS  2147483646)
SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `SUBPARTITION,java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 50
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
 MyISAM  CHARSET=COLLATE=utf8mb4_uca1400_ai_ci
t1.MYD
t1.MYI
t1.frm
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows f_int2f_char1,_har2f_charbig  t0_template
1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#----------------------------------------------------------
#  2.1   Increase number of PARTITIONS
#        Some negative testcases are omitted (already checked with HASH).
#------------------------------------------------------------------------
#  2.1.1 Assign KEY partitioning
ALTER TABLE t1 PARTITION BY KEY(f_int1);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT OpOp Msg_text
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`f_int1`)
t1#P#p0.MYD
t1#P#p0.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT test analyze error Wrongpartition name or partition list
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  2.1.2 Add PARTITIONS not fitting to KEY --> must fail
ALTER TABLE t1 ADD PARTITION (PARTITION part1 VALUES IN (0));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partitionINSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig)
ALTER TABLE t1 ADD PARTITION (PARTITION part2 VALUES LESS THAN (0));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
#  2.1.3 Add two named partitions + test
ALTER TABLE t1 ADD PARTITION (PARTITION part1, PARTITION part7);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `ELECT ,f_int2,,f_char2,_charbig FROM t0_template
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITIONWHERE f_int1 BETWEEN max_row_div2AND @ax_row;
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  2.1.4 Add one named partition + test
ALTER TABLE t1 ADD PARTITION (PARTITION part2);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbigjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`f_int1`)
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
I
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
# check read single success: 1
# check read all success: 1
#t1 CREATE TABLE `1` (
#  2.1.5 Add four not named partitions + test
ALTER TABLE t1 ADD PARTITION PARTITIONS 4;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  ` char(20) ) DEFAULT ,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`f_int1`)
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 ``   MyISAM,
 PARTITION `p5` ENGINE = MyISAM,
 PARTITION `p6` ENGINE = MyISAM,
 PARTITION `p7` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#p5.MYD
t1#P#p5.MYI
t1#P#p6.MYD
t1Pp6.MYI
t1#P#p7.MYD
t1#P#p7.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*)  f_char2`char)DEFAULT ,
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#-------------------------------------------
#  2.2   Decrease number of PARTITIONS
#        Some negative testcases are omitted (already checked with HASH).
#------------------------------------------------------------------------
#  2.2.1 DROP PARTITION is not ) java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 69
ALTER TABLE t1 DROP PARTITION part1;
ERROR HY000: DROP PARTITION can only be used on RANGE/LIST partitions
#  2.2java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 30
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `SUBPARTITION   (f_int1`)
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`f_int1`)
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `` = ,
 PARTITION `p5` ENGINE = MyISAM,
 PARTITION `p6` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#p5.MYD
t1#P#p5.MYI
t1#P#p6.MYD
t1#P#p6.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1Pp.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 SUBPARTITION`ubpart12` = )java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `PARTITION`part_2`VALUES LESS THAN (5)
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`ubpart21`ENGINE =java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `p4` ENGINE = MyISAM,
 PARTITION `p5` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
java.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 11
t1#P#p5.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  (SUBPARTITION subpart31`ENGINE  MyISAM,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`f_int1`)
P p0` java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM,
 PARTITION `p4` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#p4.MYD
t1#P#p4.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#P#part2.MYI
t1#SUBPARTITION`ubpart41`ENGINE  MyISAM,
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION   subpart42 =MyISAM))
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM,
 PARTITION `part2` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part2.MYD
t1#p.YI
t1#P#part7.MYD
t1#P#part7.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where
# check read single###.MYD
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW#java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 28
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
` int11)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
   (f_int1`
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM,
 PARTITION `part7` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#part1.MYD
t1#P#part1.MYI
t1#P#part7.MYD
t1#P#part7.MYIMYD
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 t1  ALL NULLNULL NULL NULL  Using 
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create #.MYD
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
 PARTITION BY KEY (`f_int1`)
(PARTITION `p0` ENGINE = MyISAM,
 PARTITION `part1` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1#P#t1##MYI
t1#P#part1.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
ALTER TABLE t1 COALESCE PARTITION 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) MYI
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM##part_4#SPP#subpart41.MYD
 PARTITION BY KEY (`f_int1`)
(PARTITION `p0` ENGINE = MyISAM)
t1#P#p0.MYD
t1#P#p0.MYI
t1.frm
t1.par
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
  ..5COALESCE  lastpartition -- must fail
ALTER TABLE t1 COALESCE PARTITION 1;
ERROR HY000: Cannot remove all partitions, use DROP TABLE instead
#  2.2.6 Remove partitioning
ALTER TABLE t1 REMOVE PARTITIONING;
SHOW CREATE TABLE t1
Table Create Table
t1 CREATE TABLE `t1` (
  `f_int1` int(11) DEFAULT 0,
  `f_int2` int(11) DEFAULT 0,
  `f_char1` char(20) DEFAULT NULL,
  `f_char2` char(20) DEFAULT NULL,
  `f_charbig` varchar(1000) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
t1.MYD
t1.MYI
t1.frm
EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3;
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 6
# check read single success: 1
# check read all success: 1
# check read row by row success: 1
#  2.2.7 Remove partitioning from not partitioned table --> ????
ALTER TABLE t1 REMOVE PARTITIONING;
ERROR HY000: Partition management on a not java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 37
DROP TABLE t1;
DROP VIEW  IF EXISTS v1;
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t0_aux;
DROP TABLE IF EXISTS t0_definition;
DROP TABLE IF EXISTS t0_template;

Messung V0.5 in Prozent
C=86 H=95 G=90

¤ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet am  2026-10-11) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723