From a951cfa4cd036459b1eb2406d83c3c0d564a687c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Nov 2013 11:29:37 +0100 Subject: Raise version number after cloning 5.1.73 --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 94a9d5b4e99..90422026122 100644 --- a/configure.in +++ b/configure.in @@ -12,7 +12,7 @@ dnl dnl When changing the major version number please also check the switch dnl statement in mysqlbinlog::check_master_version(). You may also need dnl to update version.c in ndb. -AC_INIT([MySQL Server], [5.1.73], [], [mysql]) +AC_INIT([MySQL Server], [5.1.74], [], [mysql]) AC_CONFIG_SRCDIR([sql/mysqld.cc]) AC_CANONICAL_SYSTEM -- cgit v1.2.1 -- cgit v1.2.1 From 7ad0e1c52795f1afb4c545f43dd1996d8ca41145 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Tue, 5 Nov 2013 10:02:57 +0100 Subject: Bug#12368495 CRASH AND/OR VALGRIND ERRORS WITH REVERSE FUNCTION AND CHARSET CONVERTS Item_func_trim::val_str: we were using the non-mb algorithm for skipping leading spaces in a multibyte-charset string. --- sql/item_strfunc.cc | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 363ca02fd7a..ae93f060956 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1005,6 +1005,7 @@ String *Item_func_reverse::val_str(String *str) if ((l= my_ismbchar(res->charset(),ptr,end))) { tmp-= l; + DBUG_ASSERT(tmp >= tmp_value.ptr()); memcpy(tmp,ptr,l); ptr+= l; } @@ -1751,18 +1752,35 @@ String *Item_func_trim::val_str(String *str) ptr= (char*) res->ptr(); end= ptr+res->length(); r_ptr= remove_str->ptr(); - while (ptr+remove_length <= end && !memcmp(ptr,r_ptr,remove_length)) - ptr+=remove_length; #ifdef USE_MB if (use_mb(res->charset())) { + while (ptr + remove_length <= end) + { + uint num_bytes= 0; + while (num_bytes < remove_length) + { + uint len; + if ((len= my_ismbchar(res->charset(), ptr + num_bytes, end))) + num_bytes+= len; + else + ++num_bytes; + } + if (num_bytes != remove_length) + break; + if (memcmp(ptr, r_ptr, remove_length)) + break; + ptr+= remove_length; + } char *p=ptr; register uint32 l; loop: while (ptr + remove_length < end) { - if ((l=my_ismbchar(res->charset(), ptr,end))) ptr+=l; - else ++ptr; + if ((l= my_ismbchar(res->charset(), ptr,end))) + ptr+= l; + else + ++ptr; } if (ptr + remove_length == end && !memcmp(ptr,r_ptr,remove_length)) { @@ -1775,6 +1793,8 @@ String *Item_func_trim::val_str(String *str) else #endif /* USE_MB */ { + while (ptr+remove_length <= end && !memcmp(ptr,r_ptr,remove_length)) + ptr+=remove_length; while (ptr + remove_length <= end && !memcmp(end-remove_length,r_ptr,remove_length)) end-=remove_length; -- cgit v1.2.1 From 5f83a7fbf8df25b444eedbc88925fe8912b12fd2 Mon Sep 17 00:00:00 2001 From: Aditya A Date: Tue, 5 Nov 2013 19:25:26 +0530 Subject: Bug#17588348: INDEX MERGE USED ON PARTITIONED TABLE CAN RETURN WRONG RESULT SET PROBLEM ------- In ha_partition::cmp_ref() we were only calling the underlying cmp_ref() of storage engine if the records are in the same partiton,else we sort by partition and returns the result.But the index merge intersect algorithm expects first to sort by row-id first and then by partition id. FIX --- Compare the refernces first using storage engine cmp_ref and then if references are equal(only happens if non clustered index is used) then sort it by partition id. [Approved by Mattiasj #rb3755] - --- sql/ha_partition.cc | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 507f202e349..bf4ba5ed765 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -7485,19 +7485,29 @@ uint ha_partition::min_record_length(uint options) const int ha_partition::cmp_ref(const uchar *ref1, const uchar *ref2) { - uint part_id; + int cmp; my_ptrdiff_t diff1, diff2; - handler *file; DBUG_ENTER("ha_partition::cmp_ref"); + cmp = m_file[0]->cmp_ref((ref1 + PARTITION_BYTES_IN_POS), + (ref2 + PARTITION_BYTES_IN_POS)); + if (cmp) + DBUG_RETURN(cmp); + if ((ref1[0] == ref2[0]) && (ref1[1] == ref2[1])) { - part_id= uint2korr(ref1); - file= m_file[part_id]; - DBUG_ASSERT(part_id < m_tot_parts); - DBUG_RETURN(file->cmp_ref((ref1 + PARTITION_BYTES_IN_POS), - (ref2 + PARTITION_BYTES_IN_POS))); + /* This means that the references are same and are in same partition.*/ + DBUG_RETURN(0); } + + /* + In Innodb we compare with either primary key value or global DB_ROW_ID so + it is not possible that the two references are equal and are in different + partitions, but in myisam it is possible since we are comparing offsets. + Remove this assert if DB_ROW_ID is changed to be per partition. + */ + DBUG_ASSERT(!m_innodb); + diff1= ref2[1] - ref1[1]; diff2= ref2[0] - ref1[0]; if (diff1 > 0) -- cgit v1.2.1 From 63819ccb34409d6d3867508ac2f0e328d56a7ea5 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Wed, 6 Nov 2013 10:22:00 +0100 Subject: Bug#17702677 WRONG INSTRUMENTATION INTERFACE FOR MYSQL_COND_TIMEDWAIT The pthread_cond_timedwait(3P) api uses a const struct timespec for parameter 3. The instrumentation api for the same, mysql_cond_timedwait, which expands to inline_mysql_cond_timedwait, should also take a const parameter for the timespec. This fix add the missing const to inline_mysql_cond_timedwait. --- include/mysql/psi/mysql_thread.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mysql/psi/mysql_thread.h b/include/mysql/psi/mysql_thread.h index 5b8ea3dc5dc..6292cbc2700 100644 --- a/include/mysql/psi/mysql_thread.h +++ b/include/mysql/psi/mysql_thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -988,7 +988,7 @@ static inline int inline_mysql_cond_wait( static inline int inline_mysql_cond_timedwait( mysql_cond_t *that, mysql_mutex_t *mutex, - struct timespec *abstime + const struct timespec *abstime #ifdef HAVE_PSI_INTERFACE , const char *src_file, uint src_line #endif -- cgit v1.2.1 From 2a2641ad7fa5db38cd2619014dbcb15f16b51ea8 Mon Sep 17 00:00:00 2001 From: Sujatha Sivakumar Date: Wed, 6 Nov 2013 15:00:49 +0530 Subject: Bug#16736412: THE SERVER WAS CRASHED WHILE EXECUTING "SHOW BINLOG EVENTS" Problem: ======== mysql was crashed after executing "show binlog events in 'mysql-bin.000005' from 99", the crash happened randomly. Analysis: ======== During construction of LOAD EVENT or NEW LOAD EVENT object if the starting offset is provided as incorrect value then all the object members that are retrieved from the offset are also invalid. Some times it will lead to out of bound address offsets. In the bug scenario, the file name is extracrated from an invalid address and the same is fed to strlen(fname) function. Passing invalid address to strlen will lead to crash. Fix: === Validate if the given offset falls within the event boundary or not. sql/log_event.cc: Added code to validate fname's address. "fname" should be within event boundary. Added code to find invalid invents. --- sql/log_event.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sql/log_event.cc b/sql/log_event.cc index a226d5a2317..436c552aa17 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4711,11 +4711,22 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len, fields = (char*)field_lens + num_fields; table_name = fields + field_block_len; db = table_name + table_name_len + 1; + DBUG_EXECUTE_IF ("simulate_invalid_address", + db_len = (4294967294U);); fname = db + db_len + 1; + if (fname > buf_end) + goto err; fname_len = (uint) strlen(fname); + if (fname + fname_len > buf_end) + goto err; // null termination is accomplished by the caller doing buf[event_len]=0 DBUG_RETURN(0); + +err: + // Invalid event. + table_name = 0; + DBUG_RETURN(1); } -- cgit v1.2.1 -- cgit v1.2.1 From 88680a99c6acdcd8be84c16e970c7616c912ff59 Mon Sep 17 00:00:00 2001 From: Neeraj Bisht Date: Thu, 7 Nov 2013 16:46:24 +0530 Subject: Bug#16691598 - ORDER BY LOWER(COLUMN) PRODUCES OUT-OF-ORDER RESULTS Problem:- We have created a table with UTF8_BIN collation. In case, when in our query we have ORDER BY clause over a function call we are getting result in incorrect order. Note:the bug is not there in 5.5. Analysis: In 5.5, for UTF16_BIN, we have min and max multi-byte length is 2 and 4 respectively.In make_sortkey(),for 2 byte character character we are assuming that the resultant length will be 2 byte/character. But when we use my_strnxfrm_unicode_full_bin(), we store sorting weights using 3 bytes per character.This result in truncated result. Same thing happen for UTF8MB4, where we have 1 byte min multi-byte and 4 byte max multi-byte.We will accsume resultant data as 1 byte/character, which result in truncated result. Solution:- use strnxfrm(means use of MY_CS_STRNXFRM macro) is used for sort, in which the resultant length is not dependent on source length. --- mysql-test/include/ctype_filesort2.inc | 9 +++++++++ mysql-test/r/ctype_utf16.result | 15 +++++++++++++++ mysql-test/r/ctype_utf32.result | 15 +++++++++++++++ mysql-test/r/ctype_utf8mb4.result | 15 +++++++++++++++ sql/filesort.cc | 32 +++++++++++++++++--------------- strings/ctype-ucs2.c | 2 +- strings/ctype-utf8.c | 3 ++- 7 files changed, 74 insertions(+), 17 deletions(-) diff --git a/mysql-test/include/ctype_filesort2.inc b/mysql-test/include/ctype_filesort2.inc index 7b09eb482a5..7b576034136 100644 --- a/mysql-test/include/ctype_filesort2.inc +++ b/mysql-test/include/ctype_filesort2.inc @@ -14,3 +14,12 @@ SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; ALTER TABLE t1 ADD KEY(a); SELECT HEX(a), HEX(CONVERT(a USING utf8mb4)) FROM t1 ORDER BY a; DROP TABLE IF EXISTS t1; +--echo # +--echo # BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +--echo # OUT-OF-ORDER RESULTS +--echo # +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +DROP TABLE t1; diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result index 42897ca580f..70b1ddde5c7 100644 --- a/mysql-test/r/ctype_utf16.result +++ b/mysql-test/r/ctype_utf16.result @@ -636,6 +636,21 @@ FF9D EFBE9D D800DF84 F0908E84 DBC0DC00 F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf16_bin diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result index 2433f2426a4..85e6220f5e8 100644 --- a/mysql-test/r/ctype_utf32.result +++ b/mysql-test/r/ctype_utf32.result @@ -635,6 +635,21 @@ HEX(a) HEX(CONVERT(a USING utf8mb4)) 00010384 F0908E84 00100000 F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf32_bin diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index c7084134cd3..fa5abc5425f 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -1012,6 +1012,21 @@ EFBE9D EFBE9D F0908E84 F0908E84 F4808080 F4808080 DROP TABLE IF EXISTS t1; +# +# BUG#16691598 - ORDER BY LOWER(COLUMN) PRODUCES +# OUT-OF-ORDER RESULTS +# +CREATE TABLE t1 SELECT ('a a') as n; +INSERT INTO t1 VALUES('a b'); +SELECT * FROM t1 ORDER BY LOWER(n) ASC; +n +a a +a b +SELECT * FROM t1 ORDER BY LOWER(n) DESC; +n +a b +a a +DROP TABLE t1; select @@collation_connection; @@collation_connection utf8mb4_bin diff --git a/sql/filesort.cc b/sql/filesort.cc index 6f59c505615..20a290d24a0 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -813,8 +813,6 @@ static void make_sortkey(register SORTPARAM *param, { CHARSET_INFO *cs=item->collation.collation; char fill_char= ((cs->state & MY_CS_BINSORT) ? (char) 0 : ' '); - int diff; - uint sort_field_length; if (maybe_null) *to++=1; @@ -842,25 +840,13 @@ static void make_sortkey(register SORTPARAM *param, break; } length= res->length(); - sort_field_length= sort_field->length - sort_field->suffix_length; - diff=(int) (sort_field_length - length); - if (diff < 0) - { - diff=0; - length= sort_field_length; - } - if (sort_field->suffix_length) - { - /* Store length last in result_string */ - store_length(to + sort_field_length, length, - sort_field->suffix_length); - } if (sort_field->need_strxnfrm) { char *from=(char*) res->ptr(); uint tmp_length; if ((uchar*) from == to) { + DBUG_ASSERT(sort_field->length >= length); set_if_smaller(length,sort_field->length); memcpy(param->tmp_buffer,from,length); from=param->tmp_buffer; @@ -871,6 +857,22 @@ static void make_sortkey(register SORTPARAM *param, } else { + uint diff; + uint sort_field_length= sort_field->length - + sort_field->suffix_length; + if (sort_field_length < length) + { + diff= 0; + length= sort_field_length; + } + else + diff= sort_field_length - length; + if (sort_field->suffix_length) + { + /* Store length last in result_string */ + store_length(to + sort_field_length, length, + sort_field->suffix_length); + } my_strnxfrm(cs,(uchar*)to,length,(const uchar*)res->ptr(),length); cs->cset->fill(cs, (char *)to+length,diff,fill_char); } diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index cecd4424108..f1d0e775804 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -1664,7 +1664,7 @@ CHARSET_INFO my_charset_utf16_general_ci= CHARSET_INFO my_charset_utf16_bin= { 55,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_NONASCII, + MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE|MY_CS_NONASCII, "utf16", /* cs name */ "utf16_bin", /* name */ "UTF-16 Unicode", /* comment */ diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 4976a9cf31a..62d5fbe0111 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -5435,7 +5435,8 @@ CHARSET_INFO my_charset_utf8mb4_general_ci= CHARSET_INFO my_charset_utf8mb4_bin= { 46,0,0, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_UNICODE|MY_CS_UNICODE_SUPPLEMENT, /* state */ + MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_STRNXFRM|MY_CS_UNICODE| + MY_CS_UNICODE_SUPPLEMENT, /* state */ MY_UTF8MB4, /* cs name */ MY_UTF8MB4_BIN, /* name */ "UTF-8 Unicode", /* comment */ -- cgit v1.2.1 From 81fd7f8ab1f4c5437bf22cd1729ba2ecdaff329e Mon Sep 17 00:00:00 2001 From: Sujatha Sivakumar Date: Thu, 7 Nov 2013 17:30:57 +0530 Subject: Bug#16736412: THE SERVER WAS CRASHED WHILE EXECUTING "SHOW BINLOG EVENTS" Fixing post push test issue. Changing the debug simulation. --- sql/log_event.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 436c552aa17..7d18b447084 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -4712,12 +4712,12 @@ int Load_log_event::copy_log_event(const char *buf, ulong event_len, table_name = fields + field_block_len; db = table_name + table_name_len + 1; DBUG_EXECUTE_IF ("simulate_invalid_address", - db_len = (4294967294U);); + db_len = data_len;); fname = db + db_len + 1; - if (fname > buf_end) + if ((db_len > data_len) || (fname > buf_end)) goto err; fname_len = (uint) strlen(fname); - if (fname + fname_len > buf_end) + if ((fname_len > data_len) || (fname + fname_len > buf_end)) goto err; // null termination is accomplished by the caller doing buf[event_len]=0 -- cgit v1.2.1 From 4189e05c1388f1161331c4fe0b3755286221de97 Mon Sep 17 00:00:00 2001 From: Christopher Powers Date: Thu, 7 Nov 2013 15:44:57 -0600 Subject: Bug#17702677 WRONG INSTRUMENTATION INTERFACE FOR MYSQL_COND_TIMEDWAIT Fix Windows build break --- include/my_pthread.h | 4 ++-- mysys/my_wincond.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/my_pthread.h b/include/my_pthread.h index 695fc2df66f..20d929ba8eb 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -134,7 +134,7 @@ int pthread_create(pthread_t *, const pthread_attr_t *, pthread_handler, void *) int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr); int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime); + const struct timespec *abstime); int pthread_cond_signal(pthread_cond_t *cond); int pthread_cond_broadcast(pthread_cond_t *cond); int pthread_cond_destroy(pthread_cond_t *cond); diff --git a/mysys/my_wincond.c b/mysys/my_wincond.c index fe06bf3ebd2..4794bb391b6 100644 --- a/mysys/my_wincond.c +++ b/mysys/my_wincond.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -305,7 +305,7 @@ int pthread_cond_signal(pthread_cond_t *cond) int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex, - struct timespec *abstime) + const struct timespec *abstime) { if (have_native_conditions) { -- cgit v1.2.1 From 7c9112b9c73d22f2b1b9a3be5b68607156e129e9 Mon Sep 17 00:00:00 2001 From: mithun Date: Tue, 12 Nov 2013 16:42:46 +0530 Subject: Bug #14057034 : WASTED CPU CYCLES IN MY_UTF8_UNI WHERE RESULTING MY_WC_T RESULT IS NOT USED Issue : handler functions my_ismbchar_utf8, my_well_formed_len_mb for charset utf8 is calling unicode converion function to validate and to find the character length. Because of this, instructions which will convert the utf8 to unicode are executed for no use. A similar issue exist with charset utf8mb4 Solution : reorganized the code such that character validation part of unicode conversion handler is extracted(duplicated) in to separate function. Hence my_ismbchar_utf8, my_well_formed_len_mb will call the new function which only validates and return the length of mb(utf8). A similar fix for charset utf8mb4. strings/ctype-utf8.c: New functions has been added for charset utf8 and utf8mb4 to validate and to get the length of the character. --- strings/ctype-utf8.c | 264 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 229 insertions(+), 35 deletions(-) diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 62d5fbe0111..52e05f17d61 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -27,6 +27,7 @@ #define EILSEQ ENOENT #endif +#define IS_CONTINUATION_BYTE(c) (((c) ^ 0x80) < 0x40) #define MY_UTF8MB3_GENERAL_CI MY_UTF8MB3 "_general_ci" #define MY_UTF8MB3_GENERAL_CS MY_UTF8MB3 "_general_cs" @@ -57,6 +58,46 @@ #define HAVE_UNIDATA #endif + +#if defined(HAVE_CHARSET_utf8) || defined(HAVE_CHARSET_utf8mb4) + +static inline +int my_valid_mbcharlen_utf8mb3(const uchar *s, const uchar *e) +{ + uchar c; + + DBUG_ASSERT(s < e); + c= s[0]; + if (c < 0x80) + return 1; + + if (c < 0xc2) + return MY_CS_ILSEQ; + + if (c < 0xe0) + { + if (s+2 > e) /* We need 2 characters */ + return MY_CS_TOOSMALL2; + + if (!(IS_CONTINUATION_BYTE(s[1]))) + return MY_CS_ILSEQ; + + return 2; + } + + DBUG_ASSERT(c < 0xf0); + if (s+3 > e) /* We need 3 characters */ + return MY_CS_TOOSMALL3; + + if (!(IS_CONTINUATION_BYTE(s[1]) && IS_CONTINUATION_BYTE(s[2]) && + (c >= 0xe1 || s[1] >= 0xa0))) + return MY_CS_ILSEQ; + + return 3; +} + +#endif /*HAVE_CHARSET_utf8 || HAVE_CHARSET_utf8mb4*/ + #ifdef HAVE_UNIDATA #include "my_uctype.h" @@ -2287,7 +2328,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; - if (!((s[1] ^ 0x80) < 0x40)) + if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); @@ -2298,7 +2339,7 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; - if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; @@ -2314,9 +2355,9 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && (c >= 0xf1 || s[1] >= 0x90))) return MY_CS_ILSEQ; @@ -2332,10 +2373,10 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if (s+5 >e) /* We need 5 characters */ return MY_CS_TOOSMALL5; - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (s[4] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && (c >= 0xf9 || s[1] >= 0x88))) return MY_CS_ILSEQ; @@ -2351,11 +2392,11 @@ static int my_utf8_uni(CHARSET_INFO *cs __attribute__((unused)), if ( s+6 >e ) /* We need 6 characters */ return MY_CS_TOOSMALL6; - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && - (s[4] ^ 0x80) < 0x40 && - (s[5] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && + IS_CONTINUATION_BYTE(s[5]) && (c >= 0xfd || s[1] >= 0x84))) return MY_CS_ILSEQ; @@ -2399,11 +2440,11 @@ static int my_utf8_uni_no_range(CHARSET_INFO *cs __attribute__((unused)), *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); return 2; } - + if (c < 0xf0) { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; @@ -2892,10 +2933,90 @@ size_t my_strnxfrmlen_utf8(CHARSET_INFO *cs __attribute__((unused)), } +static +int my_valid_mbcharlen_utf8(CHARSET_INFO *cs __attribute__((unused)), + const uchar *s, const uchar *e) +{ + uchar c; + + if (s >= e) + return MY_CS_TOOSMALL; + + c= s[0]; + if (c < 0xf0) + return my_valid_mbcharlen_utf8mb3(s, e); + +#ifdef UNICODE_32BIT + if (c < 0xf8 && sizeof(my_wc_t)*8 >= 32) + { + if (s+4 > e) /* We need 4 characters */ + return MY_CS_TOOSMALL4; + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + (c >= 0xf1 || s[1] >= 0x90))) + return MY_CS_ILSEQ; + + return 4; + } + if (c < 0xfc && sizeof(my_wc_t)*8 >= 32) + { + if (s+5 >e) /* We need 5 characters */ + return MY_CS_TOOSMALL5; + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && + (c >= 0xf9 || s[1] >= 0x88))) + return MY_CS_ILSEQ; + + return 5; + } + if (c < 0xfe && sizeof(my_wc_t)*8 >= 32) + { + if ( s+6 >e ) /* We need 6 characters */ + return MY_CS_TOOSMALL6; + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + IS_CONTINUATION_BYTE(s[4]) && + IS_CONTINUATION_BYTE(s[5]) && + (c >= 0xfd || s[1] >= 0x84))) + return MY_CS_ILSEQ; + + return 6; + } +#endif + return MY_CS_ILSEQ; +} + +static size_t +my_well_formed_len_utf8(CHARSET_INFO *cs, const char *b, const char *e, + size_t pos, int *error) +{ + const char *b_start= b; + *error= 0; + while (pos) + { + int mb_len; + + if ((mb_len= my_valid_mbcharlen_utf8(cs, (uchar*) b, (uchar*) e)) <= 0) + { + *error= b < e ? 1 : 0; + break; + } + b+= mb_len; + pos--; + } + return (size_t) (b - b_start); +} + static uint my_ismbchar_utf8(CHARSET_INFO *cs,const char *b, const char *e) { - my_wc_t wc; - int res= my_utf8_uni(cs,&wc, (const uchar*)b, (const uchar*)e); + int res= my_valid_mbcharlen_utf8(cs, (const uchar*)b, (const uchar*)e); return (res>1) ? res : 0; } @@ -2944,7 +3065,7 @@ MY_CHARSET_HANDLER my_charset_utf8_handler= my_mbcharlen_utf8, my_numchars_mb, my_charpos_mb, - my_well_formed_len_mb, + my_well_formed_len_utf8, my_lengthsp_8bit, my_numcells_mb, my_utf8_uni, @@ -4714,7 +4835,7 @@ my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), if (s + 2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; - if (!((s[1] ^ 0x80) < 0x40)) + if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); @@ -4725,7 +4846,7 @@ my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), if (s + 3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; - if (!((s[1] ^ 0x80) < 0x40 && (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; @@ -4758,9 +4879,9 @@ my_mb_wc_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), [F4][80..8F][80..BF][80..BF] */ - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && (c >= 0xf1 || s[1] >= 0x90) && (c <= 0xf3 || s[1] <= 0x8F))) return MY_CS_ILSEQ; @@ -4796,17 +4917,17 @@ my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), if (c < 0xe0) { - if (!((s[1] ^ 0x80) < 0x40)) + if (!IS_CONTINUATION_BYTE(s[1])) return MY_CS_ILSEQ; *pwc = ((my_wc_t) (c & 0x1f) << 6) | (my_wc_t) (s[1] ^ 0x80); return 2; } - + if (c < 0xf0) { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && (c >= 0xe1 || s[1] >= 0xa0))) return MY_CS_ILSEQ; *pwc= ((my_wc_t) (c & 0x0f) << 12) | @@ -4817,9 +4938,9 @@ my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), } else if (c < 0xf5) { - if (!((s[1] ^ 0x80) < 0x40 && - (s[2] ^ 0x80) < 0x40 && - (s[3] ^ 0x80) < 0x40 && + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && (c >= 0xf1 || s[1] >= 0x90) && (c <= 0xf3 || s[1] <= 0x8F))) return MY_CS_ILSEQ; @@ -5308,11 +5429,84 @@ my_strnxfrmlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), size_t len) } +static int +my_valid_mbcharlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), + const uchar *s, const uchar *e) +{ + uchar c; + + if (s >= e) + return MY_CS_TOOSMALL; + + c= s[0]; + if (c < 0xf0) + return my_valid_mbcharlen_utf8mb3(s, e); + + if (c < 0xf5) + { + if (s + 4 > e) /* We need 4 characters */ + return MY_CS_TOOSMALL4; + + /* + UTF-8 quick four-byte mask: + 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + Encoding allows to encode U+00010000..U+001FFFFF + + The maximum character defined in the Unicode standard is U+0010FFFF. + Higher characters U+00110000..U+001FFFFF are not used. + + 11110000.10010000.10xxxxxx.10xxxxxx == F0.90.80.80 == U+00010000 (min) + 11110100.10001111.10111111.10111111 == F4.8F.BF.BF == U+0010FFFF (max) + + Valid codes: + [F0][90..BF][80..BF][80..BF] + [F1][80..BF][80..BF][80..BF] + [F2][80..BF][80..BF][80..BF] + [F3][80..BF][80..BF][80..BF] + [F4][80..8F][80..BF][80..BF] + */ + + if (!(IS_CONTINUATION_BYTE(s[1]) && + IS_CONTINUATION_BYTE(s[2]) && + IS_CONTINUATION_BYTE(s[3]) && + (c >= 0xf1 || s[1] >= 0x90) && + (c <= 0xf3 || s[1] <= 0x8F))) + return MY_CS_ILSEQ; + + return 4; + } + + return MY_CS_ILSEQ; +} + + +static +size_t my_well_formed_len_utf8mb4(CHARSET_INFO *cs, + const char *b, const char *e, + size_t pos, int *error) +{ + const char *b_start= b; + *error= 0; + while (pos) + { + int mb_len; + + if ((mb_len= my_valid_mbcharlen_utf8mb4(cs, (uchar*) b, (uchar*) e)) <= 0) + { + *error= b < e ? 1 : 0; + break; + } + b+= mb_len; + pos--; + } + return (size_t) (b - b_start); +} + + static uint my_ismbchar_utf8mb4(CHARSET_INFO *cs, const char *b, const char *e) { - my_wc_t wc; - int res= my_mb_wc_utf8mb4(cs,&wc, (const uchar*)b, (const uchar*)e); + int res= my_valid_mbcharlen_utf8mb4(cs, (const uchar*)b, (const uchar*)e); return (res > 1) ? res : 0; } @@ -5373,7 +5567,7 @@ MY_CHARSET_HANDLER my_charset_utf8mb4_handler= my_mbcharlen_utf8mb4, my_numchars_mb, my_charpos_mb, - my_well_formed_len_mb, + my_well_formed_len_utf8mb4, my_lengthsp_8bit, my_numcells_mb, my_mb_wc_utf8mb4, -- cgit v1.2.1 From e0efc2c39a14337f9c3af03af1cec93d073e82f3 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Tue, 12 Nov 2013 22:09:10 +0530 Subject: Bug#17641586 INCORRECTLY PRINTED BINLOG DUMP INFORMATION Problem: When log_warnings is greater than 1, master prints binlog dump thread information in mysqld.1.err file. The information contains slave server id, binlog file and binlog position. The slave server id is uint32 and the print format was wrongly specifified (%d instead of %u). Hence a server id which is more than 2 billion is getting printed with a negative value. Eg: Start binlog_dump to slave_server(-1340259414), pos(mysql-bin.001663, 325187493) Fix: Changed the uint32 format to %u. --- sql/sql_repl.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 0ccabfe74e7..ec1ef72cd73 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -476,7 +476,7 @@ void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, set_timespec_nsec(*heartbeat_ts, 0); } if (global_system_variables.log_warnings > 1) - sql_print_information("Start binlog_dump to slave_server(%d), pos(%s, %lu)", + sql_print_information("Start binlog_dump to slave_server(%u), pos(%s, %lu)", thd->server_id, log_ident, (ulong)pos); if (RUN_HOOK(binlog_transmit, transmit_start, (thd, flags, log_ident, pos))) { -- cgit v1.2.1 From e9854f58267c3edd4b9f188b9d567c4d231dd7bb Mon Sep 17 00:00:00 2001 From: Atanu Ghosh Date: Thu, 14 Nov 2013 14:27:31 +0530 Subject: Bug #17049656 : MYSQLD --LOCAL-SERVICE PARAMETER DOES NOT WORK Problem: The "--local-install" service does not perform as expected for, at least, Windows. Fix: A NULL pointer was dereferenced due to which there was crash.A check was introduced for NULL string before dereferencing it.No test cases written as it is a bug during installation. --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 145e2220d38..bb5ceba9253 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4786,7 +4786,7 @@ default_service_handling(char **argv, /* We have to quote filename if it contains spaces */ pos= add_quoted_string(path_and_service, file_path, end); - if (*extra_opt) + if (extra_opt && *extra_opt) { /* Add option after file_path. There will be zero or one extra option. It's -- cgit v1.2.1 -- cgit v1.2.1 From 020edb1cabc5b12a621034ab5817a141635eee09 Mon Sep 17 00:00:00 2001 From: mithun Date: Mon, 18 Nov 2013 18:12:01 +0530 Subject: Bug #17708621 : EXCEEDING SORT_BUFFER_SIZE (FILE SORT) WITH SORT ABORTED LEAKS FILE DESCRIPTORS ISSUE : IO_CACHE used for index_merge quick select is freed only on successful retrieval of all rows from index merge. Suppose if there is a interrupt( or failure) to this operation of row retrieval (let it be a KILL_QUERY signal) then we are not freeing the IO_CACHE resources allocated by index_merge quick select. And hence temp file associated with it is also not closed. This lead to a file descriptor leak. SOLUTION : As part of file sort operation now we always free the IO_CACHE allocated by index_merge quick select. sql/filesort.cc: In filesort function we try to free if any IO_CACHE allocated by index_merge quick select and if it is not yet freed. --- sql/filesort.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sql/filesort.cc b/sql/filesort.cc index 20a290d24a0..57070063e84 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -34,6 +34,7 @@ #include "sql_test.h" // TEST_filesort #include "opt_range.h" // SQL_SELECT #include "debug_sync.h" +#include "sql_base.h" /// How to write record_ref. #define WRITE_REF(file,from) \ @@ -337,6 +338,14 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, { int kill_errno= thd->killed_errno(); DBUG_ASSERT(thd->is_error() || kill_errno); + + /* + We replace the table->sort at the end. + Hence calling free_io_cache to make sure table->sort.io_cache + used for QUICK_INDEX_MERGE_SELECT is free. + */ + free_io_cache(table); + my_printf_error(ER_FILSORT_ABORT, "%s: %s", MYF(ME_ERROR + ME_WAITTANG), @@ -363,6 +372,10 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, #ifdef SKIP_DBUG_IN_FILESORT DBUG_POP(); /* Ok to DBUG */ #endif + + /* table->sort.io_cache should be free by this time */ + DBUG_ASSERT(NULL == table->sort.io_cache); + memcpy(&table->sort, &table_sort, sizeof(FILESORT_INFO)); DBUG_PRINT("exit",("num_rows: %ld", (long) num_rows)); MYSQL_FILESORT_DONE(error, num_rows); @@ -602,6 +615,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, (uchar*) sort_form); sort_form->column_bitmaps_set(&sort_form->tmp_set, &sort_form->tmp_set); + DEBUG_SYNC(thd, "after_index_merge_phase1"); for (;;) { if (quick_select) -- cgit v1.2.1 From dc7db7991ac071da5e182030a4398e3869708f6e Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Wed, 20 Nov 2013 13:13:18 +0100 Subject: backport of Bug#17401628 revid:mattias.jonsson@oracle.com-20131119103616-u6t82s8cpgp0q3ex Use of uninitialized memory in the priority queue used for returning records in sorted order. It happens if no previous partition have returned a row since the beginning of index_init + an index_read* call returned HA_ERR_KEY_NOT_FOUND for all partitions (otherwise the record buffer/priority queue would be initialized) + an index_next/prev call where all partitions returns HA_ERR_END_OF_FILE. --- sql/ha_partition.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index bf4ba5ed765..aadac36e2ee 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5398,7 +5398,7 @@ void ha_partition::return_top_record(uchar *buf) int ha_partition::handle_ordered_index_scan_key_not_found() { int error; - uint i; + uint i, old_elements= m_queue.elements; uchar *part_buf= m_ordered_rec_buffer; uchar *curr_rec_buf= NULL; DBUG_ENTER("ha_partition::handle_ordered_index_scan_key_not_found"); @@ -5433,9 +5433,12 @@ int ha_partition::handle_ordered_index_scan_key_not_found() bitmap_clear_all(&m_key_not_found_partitions); m_key_not_found= false; - /* Update m_top_entry, which may have changed. */ - uchar *key_buffer= queue_top(&m_queue); - m_top_entry= uint2korr(key_buffer); + if (m_queue.elements > old_elements) + { + /* Update m_top_entry, which may have changed. */ + uchar *key_buffer= queue_top(&m_queue); + m_top_entry= uint2korr(key_buffer); + } DBUG_RETURN(0); } -- cgit v1.2.1 From 946c24685094cca439d8baaa2262a89ca5992ba2 Mon Sep 17 00:00:00 2001 From: Arun Kuruvila Date: Mon, 25 Nov 2013 12:31:09 +0530 Subject: Bug #17168602 MYSQL_PLUGIN REMOVES NON-DIRECTORY TYPE FILES SPECIFIED WITH THE BASEDIR OPTION Description: The mysql_plugin client attempts to remove any filename specified to the --basedir option. The problem is that if the filename does not end with a slash, it will attempt to unlink it, which succeeds for files, but not for directories. Analysis: When we are starting mysql_plugin with basedir option and if we are giving path of a file as basedir, it deletes that file. It was because it uses a function my_delete which unlinks the file path given. Fix: As a fix we replace that line using another function my_free, which will only free the pointer which is having that file path. --- client/mysql_plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 72bab3ad528..7fbfeb9e9a6 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -856,7 +856,7 @@ static int process_options(int argc, char *argv[], char *operation) strncat(buff, FN_DIRSEP, sizeof(buff) - strlen(buff) - 1); #endif buff[sizeof(buff) - 1]= 0; - my_delete(opt_basedir, MYF(0)); + my_free(opt_basedir); opt_basedir= my_strdup(buff, MYF(MY_FAE)); } } -- cgit v1.2.1 From f80d5653778ce324866744de92574491557f529f Mon Sep 17 00:00:00 2001 From: Anirudh Mangipudi Date: Mon, 25 Nov 2013 13:49:07 +0530 Subject: Bug#12428404 MYSQLD.EXE CRASHES WHEN EXTRACTVALUE() IS CALLED WITH MALFORMED XPATH EXP Problem: A malformed XPATH expression in the ExtractValue query is causing a server crash. This malformed XPATH expression is resulted when the position attribute in the substring function contains ".." in the beginning. Solution: The original crash is happening because the "../" is being evaluated prematurely. It tries to access XML while it hasn't been parsed yet. The premature evaluation is happening because the val_nodeset function is being set to constant, in which case we proceed to evaluate them in JOIN:prepare stage only. The solution to this is setting the val_nodeset functions as non-constant. This forces us to evaluate the function in the JOIN:exec stage and thus avoid any premature evaluation of the XML strings. --- sql/item_xmlfunc.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index ef2cd8fa2c1..173791c3128 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -220,6 +220,9 @@ public: { max_length= MAX_BLOB_WIDTH; collation.collation= pxml->charset(); + // To avoid premature evaluation, mark all nodeset functions as non-const. + used_tables_cache= RAND_TABLE_BIT; + const_item_cache= false; } const char *func_name() const { return "nodeset"; } }; -- cgit v1.2.1 From fac6e3ea0c231868336e4620c430680fc2e63ae8 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Mon, 25 Nov 2013 14:49:29 +0100 Subject: Backport 5.5.35 EL6 uln repo rpms --- CMakeLists.txt | 1 + packaging/rpm-oel/CMakeLists.txt | 36 + packaging/rpm-oel/filter-provides.sh | 6 + packaging/rpm-oel/filter-requires.sh | 6 + packaging/rpm-oel/my.cnf | 31 + packaging/rpm-oel/my_config.h | 30 + packaging/rpm-oel/mysql-embedded-check.c | 26 + packaging/rpm-oel/mysql-systemd-start | 52 + packaging/rpm-oel/mysql.conf | 1 + packaging/rpm-oel/mysql.init | 209 ++++ packaging/rpm-oel/mysql.spec.in | 1556 ++++++++++++++++++++++++++++++ packaging/rpm-oel/mysql_config.sh | 28 + packaging/rpm-oel/mysqld.service | 48 + 13 files changed, 2030 insertions(+) create mode 100644 packaging/rpm-oel/CMakeLists.txt create mode 100644 packaging/rpm-oel/filter-provides.sh create mode 100644 packaging/rpm-oel/filter-requires.sh create mode 100644 packaging/rpm-oel/my.cnf create mode 100644 packaging/rpm-oel/my_config.h create mode 100644 packaging/rpm-oel/mysql-embedded-check.c create mode 100644 packaging/rpm-oel/mysql-systemd-start create mode 100644 packaging/rpm-oel/mysql.conf create mode 100644 packaging/rpm-oel/mysql.init create mode 100644 packaging/rpm-oel/mysql.spec.in create mode 100644 packaging/rpm-oel/mysql_config.sh create mode 100644 packaging/rpm-oel/mysqld.service diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a85f630d21..a9c0da97525 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -406,6 +406,7 @@ IF(NOT WITHOUT_SERVER) ADD_SUBDIRECTORY(internal) ENDIF() ADD_SUBDIRECTORY(packaging/rpm-uln) + ADD_SUBDIRECTORY(packaging/rpm-oel) ENDIF() INCLUDE(cmake/abi_check.cmake) diff --git a/packaging/rpm-oel/CMakeLists.txt b/packaging/rpm-oel/CMakeLists.txt new file mode 100644 index 00000000000..fb1a1c1600c --- /dev/null +++ b/packaging/rpm-oel/CMakeLists.txt @@ -0,0 +1,36 @@ +# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +IF(UNIX) + SET(prefix ${CMAKE_INSTALL_PREFIX}) + + SET(SPECFILENAME "mysql.spec") + IF("${VERSION}" MATCHES "-ndb-") + STRING(REGEX REPLACE "^.*-ndb-" "" NDBVERSION "${VERSION}") + SET(SPECFILENAME "mysql-cluster-${NDBVERSION}.spec") + ENDIF() + + # Left in current directory, to be taken during build + CONFIGURE_FILE(mysql.spec.in ${CMAKE_CURRENT_BINARY_DIR}/${SPECFILENAME} @ONLY) + + FOREACH(fedfile my.cnf my_config.h mysql_config.sh + mysqld.service mysql-systemd-start mysql.conf + filter-requires.sh filter-provides.sh + mysql-embedded-check.c mysql.init) + CONFIGURE_FILE(${fedfile} ${CMAKE_CURRENT_BINARY_DIR}/${fedfile} COPYONLY) + ENDFOREACH() +ENDIF() + diff --git a/packaging/rpm-oel/filter-provides.sh b/packaging/rpm-oel/filter-provides.sh new file mode 100644 index 00000000000..bc166bd82d0 --- /dev/null +++ b/packaging/rpm-oel/filter-provides.sh @@ -0,0 +1,6 @@ +#! /bin/bash +# + +/usr/lib/rpm/perl.prov $* | +sed -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d' + diff --git a/packaging/rpm-oel/filter-requires.sh b/packaging/rpm-oel/filter-requires.sh new file mode 100644 index 00000000000..521eb0ca7d9 --- /dev/null +++ b/packaging/rpm-oel/filter-requires.sh @@ -0,0 +1,6 @@ +#! /bin/bash +# + +/usr/lib/rpm/perl.req $* | +sed -e '/perl(hostnames)/d' -e '/perl(lib::mtr.*/d' -e '/perl(lib::v1.*/d' -e '/perl(mtr_.*/d' -e '/perl(My::.*/d' + diff --git a/packaging/rpm-oel/my.cnf b/packaging/rpm-oel/my.cnf new file mode 100644 index 00000000000..28e6aa806b1 --- /dev/null +++ b/packaging/rpm-oel/my.cnf @@ -0,0 +1,31 @@ +# For advice on how to change settings please see +# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html + +[mysqld] +# +# Remove leading # and set to the amount of RAM for the most important data +# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%. +# innodb_buffer_pool_size = 128M +# +# Remove leading # to turn on a very important data integrity option: logging +# changes to the binary log between backups. +# log_bin +# +# Remove leading # to set options mainly useful for reporting servers. +# The server defaults are faster for transactions and fast SELECTs. +# Adjust sizes as needed, experiment to find the optimal values. +# join_buffer_size = 128M +# sort_buffer_size = 2M +# read_rnd_buffer_size = 2M +datadir=/var/lib/mysql +socket=/var/lib/mysql/mysql.sock + +# Disabling symbolic-links is recommended to prevent assorted security risks +symbolic-links=0 + +# Recommended in standard MySQL setup +sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES + +[mysqld_safe] +log-error=/var/log/mysqld.log +pid-file=/var/run/mysqld/mysqld.pid diff --git a/packaging/rpm-oel/my_config.h b/packaging/rpm-oel/my_config.h new file mode 100644 index 00000000000..75dc5e1d754 --- /dev/null +++ b/packaging/rpm-oel/my_config.h @@ -0,0 +1,30 @@ +/* + * Fedora supports multi arch: having 32 and 64 versions of MySQL + * installed at the same time. my_config.h will differ due arch + * dependent defs creating a file conflict. We move arch specific + * headers to arch specific file names and include the correct arch + * specific file by installing this generic file. + * + */ + +#if defined(__i386__) +#include "my_config_i386.h" +#elif defined(__ia64__) +#include "my_config_ia64.h" +#elif defined(__powerpc__) +#include "my_config_ppc.h" +#elif defined(__powerpc64__) +#include "my_config_ppc64.h" +#elif defined(__s390x__) +#include "my_config_s390x.h" +#elif defined(__s390__) +#include "my_config_s390.h" +#elif defined(__sparc__) && defined(__arch64__) +#include "my_config_sparc64.h" +#elif defined(__sparc__) +#include "my_config_sparc.h" +#elif defined(__x86_64__) +#include "my_config_x86_64.h" +#else +#error "This MySQL devel package does not work your architecture?" +#endif diff --git a/packaging/rpm-oel/mysql-embedded-check.c b/packaging/rpm-oel/mysql-embedded-check.c new file mode 100644 index 00000000000..8bf8ca53dad --- /dev/null +++ b/packaging/rpm-oel/mysql-embedded-check.c @@ -0,0 +1,26 @@ +/* simple test program to see if we can link the embedded server library */ + +#include +#include +#include + +#include "mysql.h" + +MYSQL *mysql; + +static char *server_options[] = \ + { "mysql_test", "--defaults-file=my.cnf", NULL }; +int num_elements = (sizeof(server_options) / sizeof(char *)) - 1; + +static char *server_groups[] = { "libmysqld_server", + "libmysqld_client", NULL }; + +int main(int argc, char **argv) +{ + mysql_library_init(num_elements, server_options, server_groups); + mysql = mysql_init(NULL); + mysql_close(mysql); + mysql_library_end(); + + return 0; +} diff --git a/packaging/rpm-oel/mysql-systemd-start b/packaging/rpm-oel/mysql-systemd-start new file mode 100644 index 00000000000..9cb2a25c990 --- /dev/null +++ b/packaging/rpm-oel/mysql-systemd-start @@ -0,0 +1,52 @@ +#! /bin/bash +# +# Scripts to run by MySQL systemd service +# +# Needed argument: pre | post +# +# pre mode : try to run mysql_install_db and fix perms and SELinux contexts +# post mode : ping server until answer is received +# + +install_db () { + # Note: something different than datadir=/var/lib/mysql requires SELinux policy changes (in enforcing mode) + datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p') + + # Restore log, dir, perms and SELinux contexts + [ -d "$datadir" ] || install -d -m 0755 -omysql -gmysql "$datadir" || exit 1 + log=/var/log/mysqld.log + [ -e $log ] || touch $log + chmod 0640 $log + chown mysql:mysql $log || exit 1 + if [ -x /usr/sbin/restorecon ]; then + /usr/sbin/restorecon "$datadir" + /usr/sbin/restorecon $log + fi + + # If special mysql dir is in place, skip db install + [ -d "$datadir/mysql" ] && exit 0 + + # Create initial db + /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql + exit 0 +} + +pinger () { + # Wait for ping to answer to signal startup completed, + # might take a while in case of e.g. crash recovery + # MySQL systemd service will timeout script if no answer + while /bin/true ; do + sleep 1 + mysqladmin ping >/dev/null 2>&1 && break + done + exit 0 +} + +# main +case $1 in + "pre") install_db ;; + "post") pinger ;; +esac + +exit 0 + diff --git a/packaging/rpm-oel/mysql.conf b/packaging/rpm-oel/mysql.conf new file mode 100644 index 00000000000..74cd5f836e7 --- /dev/null +++ b/packaging/rpm-oel/mysql.conf @@ -0,0 +1 @@ +d /var/run/mysqld 0755 mysql mysql - diff --git a/packaging/rpm-oel/mysql.init b/packaging/rpm-oel/mysql.init new file mode 100644 index 00000000000..d6f8f023850 --- /dev/null +++ b/packaging/rpm-oel/mysql.init @@ -0,0 +1,209 @@ +#!/bin/sh +# +# mysqld This shell script takes care of starting and stopping +# the MySQL subsystem (mysqld). +# +# chkconfig: - 64 36 +# description: MySQL database server. +# processname: mysqld +# config: /etc/my.cnf +# pidfile: /var/run/mysqld/mysqld.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + + +exec="/usr/bin/mysqld_safe" +prog="mysqld" + +# Set timeouts here so they can be overridden from /etc/sysconfig/mysqld +STARTTIMEOUT=120 +STOPTIMEOUT=60 + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + + +# extract value of a MySQL option from config files +# Usage: get_mysql_option SECTION VARNAME DEFAULT +# result is returned in $result +# We use my_print_defaults which prints all options from multiple files, +# with the more specific ones later; hence take the last match. +get_mysql_option(){ + result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1` + if [ -z "$result" ]; then + # not found, use default + result="$3" + fi +} + +get_mysql_option mysqld datadir "/var/lib/mysql" +datadir="$result" +get_mysql_option mysqld socket "$datadir/mysql.sock" +socketfile="$result" +get_mysql_option mysqld_safe log-error "/var/log/mysqld.log" +errlogfile="$result" +get_mysql_option mysqld_safe pid-file "/var/run/mysqld/mysqld.pid" +mypidfile="$result" + + +start(){ + [ -x $exec ] || exit 5 + # check to see if it's already running + RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` + if [ $? = 0 ]; then + # already running, do nothing + action $"Starting $prog: " /bin/true + ret=0 + elif echo "$RESPONSE" | grep -q "Access denied for user" + then + # already running, do nothing + action $"Starting $prog: " /bin/true + ret=0 + else + # prepare for start + touch "$errlogfile" + chown mysql:mysql "$errlogfile" + chmod 0640 "$errlogfile" + [ -x /sbin/restorecon ] && /sbin/restorecon "$errlogfile" + if [ ! -d "$datadir/mysql" ] ; then + # First, make sure $datadir is there with correct permissions + if [ ! -e "$datadir" -a ! -h "$datadir" ] + then + mkdir -p "$datadir" || exit 1 + fi + chown mysql:mysql "$datadir" + chmod 0755 "$datadir" + [ -x /sbin/restorecon ] && /sbin/restorecon "$datadir" + # Now create the database + action $"Initializing MySQL database: " /usr/bin/mysql_install_db --rpm --datadir="$datadir" --user=mysql + ret=$? + chown -R mysql:mysql "$datadir" + if [ $ret -ne 0 ] ; then + return $ret + fi + fi + chown mysql:mysql "$datadir" + chmod 0755 "$datadir" + # Pass all the options determined above, to ensure consistent behavior. + # In many cases mysqld_safe would arrive at the same conclusions anyway + # but we need to be sure. (An exception is that we don't force the + # log-error setting, since this script doesn't really depend on that, + # and some users might prefer to configure logging to syslog.) + # Note: set --basedir to prevent probes that might trigger SELinux + # alarms, per bug #547485 + $exec --datadir="$datadir" --socket="$socketfile" \ + --pid-file="$mypidfile" \ + --basedir=/usr --user=mysql >/dev/null 2>&1 & + safe_pid=$! + # Spin for a maximum of N seconds waiting for the server to come up; + # exit the loop immediately if mysqld_safe process disappears. + # Rather than assuming we know a valid username, accept an "access + # denied" response as meaning the server is functioning. + ret=0 + TIMEOUT="$STARTTIMEOUT" + while [ $TIMEOUT -gt 0 ]; do + RESPONSE=`/usr/bin/mysqladmin --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` && break + echo "$RESPONSE" | grep -q "Access denied for user" && break + if ! /bin/kill -0 $safe_pid 2>/dev/null; then + echo "MySQL Daemon failed to start." + ret=1 + break + fi + sleep 1 + let TIMEOUT=${TIMEOUT}-1 + done + if [ $TIMEOUT -eq 0 ]; then + echo "Timeout error occurred trying to start MySQL Daemon." + ret=1 + fi + if [ $ret -eq 0 ]; then + action $"Starting $prog: " /bin/true + touch $lockfile + else + action $"Starting $prog: " /bin/false + fi + fi + return $ret +} + +stop(){ + if [ ! -f "$mypidfile" ]; then + # not running; per LSB standards this is "ok" + action $"Stopping $prog: " /bin/true + return 0 + fi + MYSQLPID=`cat "$mypidfile"` + if [ -n "$MYSQLPID" ]; then + /bin/kill "$MYSQLPID" >/dev/null 2>&1 + ret=$? + if [ $ret -eq 0 ]; then + TIMEOUT="$STOPTIMEOUT" + while [ $TIMEOUT -gt 0 ]; do + /bin/kill -0 "$MYSQLPID" >/dev/null 2>&1 || break + sleep 1 + let TIMEOUT=${TIMEOUT}-1 + done + if [ $TIMEOUT -eq 0 ]; then + echo "Timeout error occurred trying to stop MySQL Daemon." + ret=1 + action $"Stopping $prog: " /bin/false + else + rm -f $lockfile + rm -f "$socketfile" + action $"Stopping $prog: " /bin/true + fi + else + action $"Stopping $prog: " /bin/false + fi + else + # failed to read pidfile, probably insufficient permissions + action $"Stopping $prog: " /bin/false + ret=4 + fi + return $ret +} + +restart(){ + stop + start +} + +condrestart(){ + [ -e $lockfile ] && restart || : +} + + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status -p "$mypidfile" $prog + ;; + restart) + restart + ;; + condrestart|try-restart) + condrestart + ;; + reload) + exit 3 + ;; + force-reload) + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac + +exit $? diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in new file mode 100644 index 00000000000..47a11053b28 --- /dev/null +++ b/packaging/rpm-oel/mysql.spec.in @@ -0,0 +1,1556 @@ +# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + + +# NOTE: "vendor" is used in upgrade/downgrade check, so you can't +# change these, has to be exactly as is. + +%global mysql_vendor Oracle and/or its affiliates +%global mysqldatadir /var/lib/mysql + +# By default, a build will include the bundeled "yaSSL" library for SSL. +%{?with_ssl: %global ssl_option -DWITH_SSL=%{with_ssl}} + +# Regression tests may take a long time, override the default to skip them +%{!?runselftest:%global runselftest 0} + +%{!?with_systemd: %global systemd 0} +%{!?with_debuginfo: %global nodebuginfo 1} +%{!?product_suffix: %global product_suffix community} +%{!?feature_set: %global feature_set community} +%{!?compilation_comment_release: %global compilation_comment_release MySQL Community Server - (GPL)} +%{!?compilation_comment_debug: %global compilation_comment_debug MySQL Community Server - Debug (GPL)} +%{!?src_base: %global src_base mysql} + +%global libmysqld_so_major 0 +%global libmysqld_so_long 0.0.1 + +# Version for compat libs +%global compatver 5.1.72 + +%global src_dir %{src_base}-%{version} + +# No debuginfo for now, ships /usr/sbin/mysqld-debug and libmysqlcliet-debug.a +%if 0%{?nodebuginfo} +%global _enable_debug_package 0 +%global debug_package %{nil} +%global __os_install_post /usr/lib/rpm/brp-compress %{nil} +%endif + +# multiarch +%global multiarchs ppc %{power64} %{ix86} x86_64 %{sparc} + +%if 0%{?commercial} +%global license_files_server %{src_dir}/LICENSE.mysql +%global license_type Commercial +%else +%global license_files_server %{src_dir}/COPYING %{src_dir}/README +%global license_type GPLv2 +%endif + + +Name: mysql-%{product_suffix} +Summary: A very fast and reliable SQL database server +Group: Applications/Databases +Version: @VERSION@ +Release: 1%{?dist} +License: Copyright (c) 2000, @MYSQL_COPYRIGHT_YEAR@, %{mysql_vendor}. All rights reserved. Under %{?license_type} license as shown in the Description field. +Source0: https://cdn.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/%{src_dir}.tar.gz +URL: http://www.mysql.com/ +Packager: MySQL Release Engineering +Vendor: %{mysql_vendor} +Source1: mysql-systemd-start +Source2: mysqld.service +Source3: mysql.conf +Source4: my_config.h +Source5: mysql_config.sh +Source6: mysql-embedded-check.c +Source7: https://cdn.mysql.com/Downloads/MySQL-5.5/mysql-%{compatver}.tar.gz +Source90: filter-provides.sh +Source91: filter-requires.sh +BuildRequires: cmake +BuildRequires: perl +BuildRequires: time +BuildRequires: libaio-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: zlib-devel +%if 0%{?systemd} +BuildRequires: systemd-units +%endif +BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) + +# https://fedoraproject.org/wiki/EPEL:Packaging#Generic_Filtering_on_EPEL6 +%global __perl_provides %{SOURCE90} +%global __perl_requires %{SOURCE91} + +%description +The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. MySQL Server +is intended for mission-critical, heavy-load production systems as well +as for embedding into mass-deployed software. MySQL is a trademark of +%{mysql_vendor} + +The MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest +news and information about the MySQL software. Also please see the +documentation and the manual for more information. + +%package server +Summary: A very fast and reliable SQL database server +Group: Applications/Databases +Requires: coreutils +Requires: grep +Requires: procps +Requires: shadow-utils +Requires: net-tools +%if 0%{?commercial} +Obsoletes: mysql-community-server < %{version}-%{release} +Requires: mysql-enterprise-client%{?_isa} = %{version}-%{release} +Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-client%{?_isa} = %{version}-%{release} +Requires: mysql-community-common%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-server < %{version}-%{release} +Provides: mysql-server = %{version}-%{release} +Provides: mysql-server%{?_isa} = %{version}-%{release} +%if 0%{?systemd} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +%else +Requires(post): /sbin/chkconfig +Requires(preun): /sbin/chkconfig +Requires(preun): /sbin/service +%endif + +%description server +The MySQL(TM) software delivers a very fast, multi-threaded, multi-user, +and robust SQL (Structured Query Language) database server. MySQL Server +is intended for mission-critical, heavy-load production systems as well +as for embedding into mass-deployed software. MySQL is a trademark of +%{mysql_vendor} + +The MySQL software has Dual Licensing, which means you can use the MySQL +software free of charge under the GNU General Public License +(http://www.gnu.org/licenses/). You can also purchase commercial MySQL +licenses from %{mysql_vendor} if you do not wish to be bound by the terms of +the GPL. See the chapter "Licensing and Support" in the manual for +further info. + +The MySQL web site (http://www.mysql.com/) provides the latest news and +information about the MySQL software. Also please see the documentation +and the manual for more information. + +This package includes the MySQL server binary as well as related utilities +to run and administer a MySQL server. + +%package client +Summary: MySQL database client applications and tools +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-client < %{version}-%{release} +Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql < %{version}-%{release} +Provides: mysql = %{version}-%{release} +Provides: mysql%{?_isa} = %{version}-%{release} + +%description client +This package contains the standard MySQL clients and administration +tools. + +%package common +Summary: MySQL database common files for server and client libs +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-common < %{version}-%{release} +%endif +Provides: mysql-common = %{version}-%{release} +Provides: mysql-common%{?_isa} = %{version}-%{release} + +%description common +This packages contains common files needed by MySQL client library, +MySQL database server, and MySQL embedded server. + + +%package test +Summary: Test suite for the MySQL database server +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-test < %{version}-%{release} +Requires: mysql-enterprise-server%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-server%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-test < %{version}-%{release} +Provides: mysql-test = %{version}-%{release} +Provides: mysql-test%{?_isa} = %{version}-%{release} + + +%description test +This package contains the MySQL regression test suite for MySQL +database server. + + +%package devel +Summary: Development header files and libraries for MySQL database client applications +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-devel < %{version}-%{release} +Requires: mysql-enterprise-libs%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-libs%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-devel < %{version}-%{release} +Provides: mysql-devel = %{version}-%{release} +Provides: mysql-devel%{?_isa} = %{version}-%{release} + +%description devel +This package contains the development header files and libraries necessary +to develop MySQL client applications. + +%package libs +Summary: Shared libraries for MySQL database client applications +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-libs < %{version}-%{release} +Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-common%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-libs < %{version}-%{release} +Provides: mysql-libs = %{version}-%{release} +Provides: mysql-libs%{?_isa} = %{version}-%{release} + +%description libs +This package contains the shared libraries for MySQL client +applications. + +%package libs-compat +Summary: Shared compat libraries for MySQL 5.1 database client applications +Group: Applications/Databases +Obsoletes: mysql-libs-compat < %{version}-%{release} +Provides: mysql-libs-compat = %{version}-%{release} +Provides: mysql-libs-compat%{?_isa} = %{version}-%{release} + +%description libs-compat +This package contains the shared compat libraries for MySQL 5.1 client +applications. + +%package embedded +Summary: MySQL embedded library +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-embedded < %{version}-%{release} +Requires: mysql-enterprise-common%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-common%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-embedded < %{version}-%{release} +Provides: mysql-embedded = %{version}-%{release} +Provides: mysql-emdedded%{?_isa} = %{version}-%{release} + +%description embedded +This package contains the mysql server as an embedded library. + +The embedded MySQL server library makes it possible to run a full-featured +MySQL server inside the client application. The main benefits are increased +speed and more simple management for embedded applications. + +The API is identical for the embedded MySQL version and the +client/server version. + +For a description of MySQL see the base MySQL RPM or http://www.mysql.com/ + +%package embedded-devel +Summary: Development header files and libraries for MySQL as an embeddable library +Group: Applications/Databases +%if 0%{?commercial} +Obsoletes: mysql-community-embedded-devel < %{version}-%{release} +Requires: mysql-enterprise-devel%{?_isa} = %{version}-%{release} +Requires: mysql-enterprise-embedded%{?_isa} = %{version}-%{release} +%else +Requires: mysql-community-devel%{?_isa} = %{version}-%{release} +Requires: mysql-community-embedded%{?_isa} = %{version}-%{release} +%endif +Obsoletes: mysql-embedded-devel < %{version}-%{release} +Provides: mysql-embedded-devel = %{version}-%{release} +Provides: mysql-embedded-devel%{?_isa} = %{version}-%{release} + +%description embedded-devel +This package contains files needed for developing applicatison using +the embedded version of the MySQL server. + +%prep +%setup -q -T -a 0 -a 7 -c -n %{src_dir} +cd %{src_dir} + +%build +# Fail quickly and obviously if user tries to build as root +%if 0%{?runselftest} +if [ "x$(id -u)" = "x0" ] ; then + echo "The MySQL regression tests may fail if run as root." + echo "If you really need to build the RPM as root, use" + echo "--define='runselftest 0' to skip the regression tests." + exit 1 +fi +%endif + +# Build compat libs +( +export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv" +export CXXFLAGS="$CFLAGS -felide-constructors -fno-rtti -fno-exceptions" +pushd mysql-%{compatver} +%configure \ + --with-readline \ + --with-ssl=%{_prefix} \ + --without-debug \ + --enable-shared \ + --with-embedded-server \ + --localstatedir=/var/lib/mysql \ + --with-unix-socket-path=/var/lib/mysql/mysql.sock \ + --with-mysqld-user="mysql" \ + --with-extra-charsets=all \ + --with-big-tables \ + --with-pic \ + --with-plugin-innobase \ + --with-plugin-innodb_plugin \ + --with-plugin-partition \ + --enable-local-infile \ + --enable-largefile \ + --enable-thread-safe-client \ + --disable-dependency-tracking +make %{?_smp_mflags} +popd +) + +export CFLAGS="%{optflags}" +export CXXFLAGS="%{optflags}" + +# Build debug versions of mysqld and libmysqld.a +mkdir debug +( + cd debug + # Attempt to remove any optimisation flags from the debug build + CFLAGS=$(echo "${CFLAGS}" | sed -e 's/-O2 / /' -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /') + CXXFLAGS=$(echo "${CFLAGS}" | sed -e 's/-O2 / /' -e 's/-Wp,-D_FORTIFY_SOURCE=2/ /') + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=Debug \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_debug}" \ + -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" + echo BEGIN_DEBUG_CONFIG ; egrep '^#define' include/config.h ; echo END_DEBUG_CONFIG + make %{?_smp_mflags} VERBOSE=1 +) + +# Build full release +mkdir release +( + cd release + cmake ../%{src_dir} \ + -DBUILD_CONFIG=mysql_release \ + -DINSTALL_LAYOUT=RPM \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DWITH_INNODB_MEMCACHED=1 \ + -DINSTALL_LIBDIR="%{_lib}/mysql" \ + -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ + -DMYSQL_UNIX_ADDR="%{mysqldatadir}/mysql.sock" \ + -DFEATURE_SET="%{feature_set}" \ + %{?ssl_option} \ + -DCOMPILATION_COMMENT="%{compilation_comment_release}" \ + -DMYSQL_SERVER_SUFFIX="%{?server_suffix}" + echo BEGIN_NORMAL_CONFIG ; egrep '^#define' include/config.h ; echo END_NORMAL_CONFIG + make %{?_smp_mflags} VERBOSE=1 + +# Need to build libmysqld.so for distros +mkdir libmysqld/work +pushd libmysqld/work + +ar -x ../libmysqld.a +[ -e ../../extra/yassl/libyassl.a ] && ar -x ../../extra/yassl/libyassl.a +rm -f sql_binlog.cc.o rpl_utility.cc.o +%{__cc} $CFLAGS $LDFLAGS -DEMBEDDED_LIBRARY -shared -Wl,-soname,libmysqld.so.%{libmysqld_so_major} \ + -o libmysqld.so.%{libmysqld_so_long} *.o \ + -lpthread -laio -lcrypt -lssl -lcrypto -lz -lrt -lstdc++ -ldl -lm -lc + +# Compile check +cp %{SOURCE6} . +ln -s libmysqld.so.%{libmysqld_so_long} libmysqld.so.%{libmysqld_so_major} +%{__cc} -I../../../%{src_dir}/include -I../../include $CFLAGS \ + mysql-embedded-check.c libmysqld.so.%{libmysqld_so_major} +LD_LIBRARY_PATH=. ldd ./a.out +) + +%install +# Install compat libs +for dir in libmysql libmysql_r ; do + pushd mysql-%{compatver}/$dir + make DESTDIR=%{buildroot} install + popd +done +rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient{,_r}.{a,la,so} + +MBD=$RPM_BUILD_DIR/%{src_dir} + +# Ensure that needed directories exists +install -d -m 0755 %{buildroot}%{_datadir}/mysql/SELinux/RHEL4 +install -d -m 0755 %{buildroot}/var/lib/mysql +install -d -m 0755 %{buildroot}/var/run/mysqld + +# Install all binaries +cd $MBD/release +make DESTDIR=%{buildroot} install + +# Install logrotate and autostart +install -D -m 0644 $MBD/release/support-files/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysql +install -D -m 0644 $MBD/release/packaging/rpm-oel/my.cnf %{buildroot}%{_sysconfdir}/my.cnf +%if 0%{?systemd} +install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/mysql-systemd-start +install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/mysqld.service +%else +install -D -m 0755 $MBD/release/packaging/rpm-oel/mysql.init %{buildroot}%{_sysconfdir}/init.d/mysqld +%endif +install -D -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/tmpfiles.d/mysql.conf + +install -m 0755 $MBD/release/libmysqld/work/libmysqld.so.%{libmysqld_so_long} \ + %{buildroot}%{_libdir}/mysql/libmysqld.so.%{libmysqld_so_long} +ln -s libmysqld.so.%{libmysqld_so_long} %{buildroot}%{_libdir}/mysql/libmysqld.so.%{libmysqld_so_major} +ln -s libmysqld.so.%{libmysqld_so_long} %{buildroot}%{_libdir}/mysql/libmysqld.so + + +# Make library links +install -d -m 0755 %{buildroot}%{_sysconfdir}/ld.so.conf.d +echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf + +# multiarch support +%ifarch %{multiarchs} +mv %{buildroot}/%{_includedir}/mysql/my_config.h \ + %{buildroot}/%{_includedir}/mysql/my_config_%{_arch}.h +install -p -m 0644 %{SOURCE4} %{buildroot}/%{_includedir}/mysql/my_config.h +mv %{buildroot}/%{_bindir}/mysql_config %{buildroot}/%{_bindir}/mysql_config-%{__isa_bits} +install -p -m 0755 %{SOURCE5} %{buildroot}/%{_bindir}/mysql_config +%endif + +# Install SELinux files in datadir +install -m 0644 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \ + %{buildroot}%{_datadir}/mysql/SELinux/RHEL4 + +# Remove files pages we explicitly do not want to package +rm -rf %{buildroot}%{_datadir}/mysql/solaris +rm -rf %{buildroot}%{_infodir}/mysql.info* +rm -rf %{buildroot}%{_datadir}/mysql/binary-configure +rm -rf %{buildroot}%{_datadir}/mysql/mysql.server +rm -rf %{buildroot}%{_datadir}/mysql/mysqld_multi.server +rm -f %{buildroot}%{_datadir}/mysql/{ndb-config-2-node,config*}.ini +rm -f %{buildroot}%{_datadir}/mysql/my-*.cnf +%if 0%{?systemd} +rm -rf %{buildroot}%{_sysconfdir}/init.d/mysqld +%endif +rm -rf %{buildroot}%{_bindir}/mysql_embedded +rm -rf %{buildroot}%{_bindir}/mysql_setpermission +rm -rf %{buildroot}%{_mandir}/man1/mysql_setpermission.1* + +%check +%if 0%{?runselftest} +pushd release +make test VERBOSE=1 +export MTR_BUILD_THREAD=auto +pushd mysql-test +./mtr \ + --mem --parallel=auto --force --retry=0 \ + --mysqld=--binlog-format=mixed \ + --suite-timeout=720 --testcase-timeout=30 +rm -rf var/* +%endif + +%pre server +/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || : +/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /bin/bash \ + -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : + +%post server +datadir=$(/usr/bin/my_print_defaults server mysqld | grep '^--datadir=' | sed -n 's/--datadir=//p') +/bin/chmod 0755 "$datadir" +/bin/touch /var/log/mysqld.log +%if 0%{?systemd} +%systemd_post mysqld.service +/sbin/service mysqld enable >/dev/null 2>&1 || : +%else +/sbin/chkconfig --add mysqld +%endif + +%preun server +%if 0%{?systemd} +%systemd_preun mysqld.service +%else +if [ "$1" = 0 ]; then + /sbin/service mysqld stop >/dev/null 2>&1 || : + /sbin/chkconfig --del mysqld +fi +%endif + +%postun server +%if 0%{?systemd} +%systemd_postun_with_restart mysqld.service +%else +if [ $1 -ge 1 ]; then + /sbin/service mysqld condrestart >/dev/null 2>&1 || : +fi +%endif + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%post libs-compat -p /sbin/ldconfig + +%postun libs-compat -p /sbin/ldconfig + +%post embedded -p /sbin/ldconfig + +%postun embedded -p /sbin/ldconfig + +%files server +%defattr(-, root, root, -) +%doc %{?license_files_server} %{src_dir}/Docs/ChangeLog +%doc %{src_dir}/Docs/INFO_SRC* +%doc release/Docs/INFO_BIN* +%attr(644, root, root) %{_mandir}/man1/innochecksum.1* +%attr(644, root, root) %{_mandir}/man1/my_print_defaults.1* +%attr(644, root, root) %{_mandir}/man1/myisam_ftdump.1* +%attr(644, root, root) %{_mandir}/man1/myisamchk.1* +%attr(644, root, root) %{_mandir}/man1/myisamlog.1* +%attr(644, root, root) %{_mandir}/man1/myisampack.1* +%attr(644, root, root) %{_mandir}/man1/mysql_convert_table_format.1* +%attr(644, root, root) %{_mandir}/man1/mysql_fix_extensions.1* +%attr(644, root, root) %{_mandir}/man8/mysqld.8* +%attr(644, root, root) %{_mandir}/man1/mysqld_multi.1* +%attr(644, root, root) %{_mandir}/man1/mysqld_safe.1* +%attr(644, root, root) %{_mandir}/man1/mysqldumpslow.1* +%attr(644, root, root) %{_mandir}/man1/mysql_install_db.1* +%attr(644, root, root) %{_mandir}/man1/mysql_plugin.1* +%attr(644, root, root) %{_mandir}/man1/mysql_secure_installation.1* +%attr(644, root, root) %{_mandir}/man1/mysql_upgrade.1* +%attr(644, root, root) %{_mandir}/man1/mysqlhotcopy.1* +%attr(644, root, root) %{_mandir}/man1/mysqlman.1* +%attr(644, root, root) %{_mandir}/man1/mysql.server.1* +%attr(644, root, root) %{_mandir}/man1/mysqltest.1* +%attr(644, root, root) %{_mandir}/man1/mysql_tzinfo_to_sql.1* +%attr(644, root, root) %{_mandir}/man1/mysql_zap.1* +%attr(644, root, root) %{_mandir}/man1/mysqlbug.1* +%attr(644, root, root) %{_mandir}/man1/perror.1* +%attr(644, root, root) %{_mandir}/man1/replace.1* +%attr(644, root, root) %{_mandir}/man1/resolve_stack_dump.1* +%attr(644, root, root) %{_mandir}/man1/resolveip.1* + +%config(noreplace) %{_sysconfdir}/my.cnf + +%attr(755, root, root) %{_bindir}/innochecksum +%attr(755, root, root) %{_bindir}/my_print_defaults +%attr(755, root, root) %{_bindir}/myisam_ftdump +%attr(755, root, root) %{_bindir}/myisamchk +%attr(755, root, root) %{_bindir}/myisamlog +%attr(755, root, root) %{_bindir}/myisampack +%attr(755, root, root) %{_bindir}/mysql_convert_table_format +%attr(755, root, root) %{_bindir}/mysql_fix_extensions +%attr(755, root, root) %{_bindir}/mysql_install_db +%attr(755, root, root) %{_bindir}/mysql_plugin +%attr(755, root, root) %{_bindir}/mysql_secure_installation +%attr(755, root, root) %{_bindir}/mysql_tzinfo_to_sql +%attr(755, root, root) %{_bindir}/mysql_upgrade +%attr(755, root, root) %{_bindir}/mysql_zap +%attr(755, root, root) %{_bindir}/mysqlbug +%attr(755, root, root) %{_bindir}/mysqld_multi +%attr(755, root, root) %{_bindir}/mysqld_safe +%attr(755, root, root) %{_bindir}/mysqldumpslow +%attr(755, root, root) %{_bindir}/mysqlhotcopy +%attr(755, root, root) %{_bindir}/mysqltest +%attr(755, root, root) %{_bindir}/perror +%attr(755, root, root) %{_bindir}/replace +%attr(755, root, root) %{_bindir}/resolve_stack_dump +%attr(755, root, root) %{_bindir}/resolveip +%if 0%{?systemd} +%attr(755, root, root) %{_bindir}/mysql-systemd-start +%endif +%attr(755, root, root) %{_sbindir}/mysqld +%attr(755, root, root) %{_sbindir}/mysqld-debug + +%{_libdir}/mysql/plugin + +%attr(644, root, root) %{_datadir}/mysql/fill_help_tables.sql +%attr(644, root, root) %{_datadir}/mysql/mysql_system_tables.sql +%attr(644, root, root) %{_datadir}/mysql/mysql_system_tables_data.sql +%attr(644, root, root) %{_datadir}/mysql/mysql_test_data_timezone.sql +%attr(644, root, root) %{_datadir}/mysql/mysql-log-rotate +%attr(644, root, root) %{_datadir}/mysql/SELinux/RHEL4/mysql.fc +%attr(644, root, root) %{_datadir}/mysql/SELinux/RHEL4/mysql.te +%attr(644, root, root) %{_datadir}/mysql/magic +%attr(644, root, root) %{_prefix}/lib/tmpfiles.d/mysql.conf +%if 0%{?systemd} +%attr(644, root, root) %{_unitdir}/mysql.service +%else +%attr(755, root, root) %{_sysconfdir}/init.d/mysqld +%endif +%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql +%dir %attr(755, mysql, mysql) /var/lib/mysql +%dir %attr(755, mysql, mysql) /var/run/mysqld + +%files common +%defattr(-, root, root, -) +%{_datadir}/mysql/charsets/ +%{_datadir}/mysql/errmsg-utf8.txt +%{_datadir}/mysql/czech/ +%{_datadir}/mysql/danish/ +%{_datadir}/mysql/dutch/ +%{_datadir}/mysql/english/ +%{_datadir}/mysql/estonian/ +%{_datadir}/mysql/french/ +%{_datadir}/mysql/german/ +%{_datadir}/mysql/greek/ +%{_datadir}/mysql/hungarian/ +%{_datadir}/mysql/italian/ +%{_datadir}/mysql/japanese/ +%{_datadir}/mysql/korean/ +%{_datadir}/mysql/norwegian-ny/ +%{_datadir}/mysql/norwegian/ +%{_datadir}/mysql/polish/ +%{_datadir}/mysql/portuguese/ +%{_datadir}/mysql/romanian/ +%{_datadir}/mysql/russian/ +%{_datadir}/mysql/serbian/ +%{_datadir}/mysql/slovak/ +%{_datadir}/mysql/spanish/ +%{_datadir}/mysql/swedish/ +%{_datadir}/mysql/ukrainian/ + +%files client +%defattr(-, root, root, -) +%attr(755, root, root) %{_bindir}/msql2mysql +%attr(755, root, root) %{_bindir}/mysql +%attr(755, root, root) %{_bindir}/mysql_find_rows +%attr(755, root, root) %{_bindir}/mysql_waitpid +%attr(755, root, root) %{_bindir}/mysqlaccess +# XXX: This should be moved to %{_sysconfdir} +%attr(644, root, root) %{_bindir}/mysqlaccess.conf +%attr(755, root, root) %{_bindir}/mysqladmin +%attr(755, root, root) %{_bindir}/mysqlbinlog +%attr(755, root, root) %{_bindir}/mysqlcheck +%attr(755, root, root) %{_bindir}/mysqldump +%attr(755, root, root) %{_bindir}/mysqlimport +%attr(755, root, root) %{_bindir}/mysqlshow +%attr(755, root, root) %{_bindir}/mysqlslap +%attr(755, root, root) %{_bindir}/mysql_config +%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} + +%attr(644, root, root) %{_mandir}/man1/msql2mysql.1* +%attr(644, root, root) %{_mandir}/man1/mysql.1* +%attr(644, root, root) %{_mandir}/man1/mysql_find_rows.1* +%attr(644, root, root) %{_mandir}/man1/mysql_waitpid.1* +%attr(644, root, root) %{_mandir}/man1/mysqlaccess.1* +%attr(644, root, root) %{_mandir}/man1/mysqladmin.1* +%attr(644, root, root) %{_mandir}/man1/mysqlbinlog.1* +%attr(644, root, root) %{_mandir}/man1/mysqlcheck.1* +%attr(644, root, root) %{_mandir}/man1/mysqldump.1* +%attr(644, root, root) %{_mandir}/man1/mysqlimport.1* +%attr(644, root, root) %{_mandir}/man1/mysqlshow.1* +%attr(644, root, root) %{_mandir}/man1/mysqlslap.1* + +%files devel +%defattr(-, root, root, -) +%attr(644, root, root) %{_mandir}/man1/comp_err.1* +%attr(644, root, root) %{_mandir}/man1/mysql_config.1* +%attr(755, root, root) %{_bindir}/mysql_config +%attr(755, root, root) %{_bindir}/mysql_config-%{__isa_bits} +%{_includedir}/mysql +%{_datadir}/aclocal/mysql.m4 +%{_libdir}/mysql/libmysqlclient.a +%{_libdir}/mysql/libmysqlclient_r.a +%{_libdir}/mysql/libmysqlservices.a +%{_libdir}/mysql/libmysqlclient_r.so +%{_libdir}/mysql/libmysqlclient.so + +%files libs +%defattr(-, root, root, -) +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/libmysqlclient.so.18* +%{_libdir}/mysql/libmysqlclient_r.so.18* + +%files libs-compat +%defattr(-, root, root, -) +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%{_libdir}/mysql/libmysqlclient.so.16 +%{_libdir}/mysql/libmysqlclient.so.16.0.0 +%{_libdir}/mysql/libmysqlclient_r.so.16 +%{_libdir}/mysql/libmysqlclient_r.so.16.0.0 + +%files test +%defattr(-, root, root, -) +%attr(-, root, root) %{_datadir}/mysql-test +%attr(755, root, root) %{_bindir}/mysql_client_test +%attr(755, root, root) %{_bindir}/mysql_client_test_embedded +%attr(755, root, root) %{_bindir}/mysqltest_embedded +%attr(644, root, root) %{_mandir}/man1/mysql_client_test.1* +%attr(644, root, root) %{_mandir}/man1/mysql-stress-test.pl.1* +%attr(644, root, root) %{_mandir}/man1/mysql-test-run.pl.1* +%attr(644, root, root) %{_mandir}/man1/mysql_client_test_embedded.1* +%attr(644, root, root) %{_mandir}/man1/mysqltest_embedded.1* + +%files embedded +%defattr(-, root, root, -) +%dir %attr(755, root, root) %{_libdir}/mysql +%attr(644, root, root) %{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf +%attr(644, root, root) %{_libdir}/mysql/libmysqld.so.* + +%files embedded-devel +%defattr(-, root, root, -) +%attr(644, root, root) %{_libdir}/mysql/libmysqld.a +%attr(644, root, root) %{_libdir}/mysql/libmysqld-debug.a +%attr(755, root, root) %{_libdir}/mysql/libmysqld.so + +%changelog +* Fri Oct 25 2013 Balasubramanian Kandasamy - 5.6.15-1 +- Fixed uln advanced rpm libyassl.a error +- Updated to 5.6.15 + +* Wed Oct 16 2013 Balasubramanian Kandasamy - 5.6.14-3 +- Fixed mysql_install_db usage +- Improved handling of plugin directory + +* Fri Sep 27 2013 Balasubramanian Kandasamy - 5.6.14-2 +- Refresh mysql-install patch and service renaming + +* Mon Sep 16 2013 Balasubramanian Kandasamy - 5.6.14-1 +- Updated to 5.6.14 + +* Wed Sep 04 2013 Balasubramanian Kandasamy - 5.6.13-5 +- Support upgrade from 5.5 ULN packages to 5.6 + +* Tue Aug 27 2013 Balasubramanian Kandasamy - 5.6.13-4 +- Enhanced perl filtering +- Added openssl-devel to buildreq + +* Wed Aug 21 2013 Balasubramanian Kandasamy - 5.6.13-3 +- Removed mysql_embedded binary to resolve multilib conflict issue + +* Fri Aug 16 2013 Balasubramanian Kandasamy - 5.6.13-2 +- Fixed Provides and Obsoletes issues in server, test packages + +* Wed Aug 14 2013 Balasubramanian Kandasamy - 5.6.13-1 +- Updated to 5.6.13 + +* Mon Aug 05 2013 Balasubramanian Kandasamy - 5.6.12-9 +- Added files list to embedded packages + +* Thu Aug 01 2013 Balasubramanian Kandasamy - 5.6.12-8 +- Updated libmysqld.a with libmysqld.so in embedded package + +* Mon Jul 29 2013 Balasubramanian Kandasamy - 5.6.12-7 +- Updated test package dependency from client to server + +* Wed Jul 24 2013 Balasubramanian Kandasamy - 5.6.12-6 +- Added libs-compat dependency under libs package to resolve server + installation conflicts issue. + +* Wed Jul 17 2013 Balasubramanian Kandasamy - 5.6.12-5 +- Removed libmysqlclient.so.16 from libs package + +* Fri Jul 05 2013 Balasubramanian Kandasamy - 5.6.12-4 +- Adjusted to work on OEL6 + +* Wed Jun 26 2013 Balasubramanian Kandasamy - 5.6.12-3 +- Move libs to mysql/ +- Basic multi arch support +- Fix changelog dates + +* Thu Jun 20 2013 Balasubramanian Kandasamy - 5.6.12-2 +- Major cleanup + +* Tue Jun 04 2013 Balasubramanian Kandasamy - 5.6.12-1 +- Updated to 5.6.12 + +* Mon Nov 05 2012 Joerg Bruehe + +- Allow to override the default to use the bundled yaSSL by an option like + --define="with_ssl /path/to/ssl" + +* Wed Oct 10 2012 Bjorn Munch + +- Replace old my-*.cnf config file examples with template my-default.cnf + +* Fri Oct 05 2012 Joerg Bruehe + +- Let the installation use the new option "--random-passwords" of "mysql_install_db". + (Bug# 12794345 Ensure root password) +- Fix an inconsistency: "new install" vs "upgrade" are told from the (non)existence + of "$mysql_datadir/mysql" (holding table "mysql.user" and other system stuff). + +* Tue Jul 24 2012 Joerg Bruehe + +- Add a macro "runselftest": + if set to 1 (default), the test suite will be run during the RPM build; + this can be oveeridden via the command line by adding + --define "runselftest 0" + Failures of the test suite will NOT make the RPM build fail! + +* Mon Jul 16 2012 Joerg Bruehe + +- Add the man page for the "mysql_config_editor". + +* Mon Jun 11 2012 Joerg Bruehe + +- Make sure newly added "SPECIFIC-ULN/" directory does not disturb packaging. + +* Wed Feb 29 2012 Brajmohan Saxena + +- Removal all traces of the readline library from mysql (BUG 13738013) + +* Wed Sep 28 2011 Joerg Bruehe + +- Fix duplicate mentioning of "mysql_plugin" and its manual page, + it is better to keep alphabetic order in the files list (merging!). + +* Wed Sep 14 2011 Joerg Bruehe + +- Let the RPM capabilities ("obsoletes" etc) ensure that an upgrade may replace + the RPMs of any configuration (of the current or the preceding release series) + by the new ones. This is done by not using the implicitly generated capabilities + (which include the configuration name) and relying on more generic ones which + just list the function ("server", "client", ...). + The implicit generation cannot be prevented, so all these capabilities must be + explicitly listed in "Obsoletes:" + +* Tue Sep 13 2011 Jonathan Perkin + +- Add support for Oracle Linux 6 and Red Hat Enterprise Linux 6. Due to + changes in RPM behaviour ($RPM_BUILD_ROOT is removed prior to install) + this necessitated a move of the libmygcc.a installation to the install + phase, which is probably where it belonged in the first place. + +* Tue Sep 13 2011 Joerg Bruehe + +- "make_win_bin_dist" and its manual are dropped, cmake does it different. + +* Thu Sep 08 2011 Daniel Fischer + +- Add mysql_plugin man page. + +* Tue Aug 30 2011 Tor Didriksen + +- Set CXX=g++ by default to add a dependency on libgcc/libstdc++. + Also, remove the use of the -fno-exceptions and -fno-rtti flags. + TODO: update distro_buildreq/distro_requires + +* Tue Aug 30 2011 Joerg Bruehe + +- Add the manual page for "mysql_plugin" to the server package. + +* Fri Aug 19 2011 Joerg Bruehe + +- Null-upmerge the fix of bug#37165: This spec file is not affected. +- Replace "/var/lib/mysql" by the spec file variable "%{mysqldatadir}". + +* Fri Aug 12 2011 Daniel Fischer + +- Source plugin library files list from cmake-generated file. + +* Mon Jul 25 2011 Chuck Bell + +- Added the mysql_plugin client - enables or disables plugins. + +* Thu Jul 21 2011 Sunanda Menon + +- Fix bug#12561297: Added the MySQL embedded binary + +* Thu Jul 07 2011 Joerg Bruehe + +- Fix bug#45415: "rpm upgrade recreates test database" + Let the creation of the "test" database happen only during a new installation, + not in an RPM upgrade. + This affects both the "mkdir" and the call of "mysql_install_db". + +* Wed Feb 09 2011 Joerg Bruehe + +- Fix bug#56581: If an installation deviates from the default file locations + ("datadir" and "pid-file"), the mechanism to detect a running server (on upgrade) + should still work, and use these locations. + The problem was that the fix for bug#27072 did not check for local settings. + +* Mon Jan 31 2011 Joerg Bruehe + +- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN". + +* Tue Nov 23 2010 Jonathan Perkin + +- EXCEPTIONS-CLIENT has been deleted, remove it from here too +- Support MYSQL_BUILD_MAKE_JFLAG environment variable for passing + a '-j' argument to make. + +* Mon Nov 1 2010 Georgi Kodinov + +- Added test authentication (WL#1054) plugin binaries + +* Wed Oct 6 2010 Georgi Kodinov + +- Added example external authentication (WL#1054) plugin binaries + +* Wed Aug 11 2010 Joerg Bruehe + +- With a recent spec file cleanup, names have changed: A "-community" part was dropped. + Reflect that in the "Obsoletes" specifications. +- Add a "triggerpostun" to handle the uninstall of the "-community" server RPM. +- This fixes bug#55015 "MySQL server is not restarted properly after RPM upgrade". + +* Tue Jun 15 2010 Joerg Bruehe + +- Change the behaviour on installation and upgrade: + On installation, do not autostart the server. + *Iff* the server was stopped before the upgrade is started, this is taken as a + sign the administrator is handling that manually, and so the new server will + not be started automatically at the end of the upgrade. + The start/stop scripts will still be installed, so the server will be started + on the next machine boot. + This is the 5.5 version of fixing bug#27072 (RPM autostarting the server). + +* Tue Jun 1 2010 Jonathan Perkin + +- Implement SELinux checks from distribution-specific spec file. + +* Wed May 12 2010 Jonathan Perkin + +- Large number of changes to build using CMake +- Introduce distribution-specific RPMs +- Drop debuginfo, build all binaries with debug/symbols +- Remove __os_install_post, use native macro +- Remove _unpackaged_files_terminate_build, make it an error to have + unpackaged files +- Remove cluster RPMs + +* Wed Mar 24 2010 Joerg Bruehe + +- Add "--with-perfschema" to the configure options. + +* Mon Mar 22 2010 Joerg Bruehe + +- User "usr/lib*" to allow for both "usr/lib" and "usr/lib64", + mask "rmdir" return code 1. +- Remove "ha_example.*" files from the list, they aren't built. + +* Wed Mar 17 2010 Joerg Bruehe + +- Fix a wrong path name in handling the debug plugins. + +* Wed Mar 10 2010 Joerg Bruehe + +- Take the result of the debug plugin build and put it into the optimized tree, + so that it becomes part of the final installation; + include the files in the packlist. Part of the fixes for bug#49022. + +* Mon Mar 01 2010 Joerg Bruehe + +- Set "Oracle and/or its affiliates" as the vendor and copyright owner, + accept upgrading from packages showing MySQL or Sun as vendor. + +* Fri Feb 12 2010 Joerg Bruehe + +- Formatting changes: + Have a consistent structure of separator lines and of indentation + (8 leading blanks => tab). +- Introduce the variable "src_dir". +- Give the environment variables "MYSQL_BUILD_CC(CXX)" precedence + over "CC" ("CXX"). +- Drop the old "with_static" argument analysis, this is not supported + in 5.1 since ages. +- Introduce variables to control the handlers individually, as well + as other options. +- Use the new "--with-plugin" notation for the table handlers. +- Drop handling "/etc/rc.d/init.d/mysql", the switch to "/etc/init.d/mysql" + was done back in 2002 already. +- Make "--with-zlib-dir=bundled" the default, add an option to disable it. +- Add missing manual pages to the file list. +- Improve the runtime check for "libgcc.a", protect it against being tried + with the Intel compiler "icc". + +* Mon Jan 11 2010 Joerg Bruehe + +- Change RPM file naming: + - Suffix like "-m2", "-rc" becomes part of version as "_m2", "_rc". + - Release counts from 1, not 0. + +* Wed Dec 23 2009 Joerg Bruehe + +- The "semisync" plugin file name has lost its introductory "lib", + adapt the file lists for the subpackages. + This is a part missing from the fix for bug#48351. +- Remove the "fix_privilege_tables" manual, it does not exist in 5.5 + (and likely, the whole script will go, too). + +* Mon Nov 16 2009 Joerg Bruehe + +- Fix some problems with the directives around "tcmalloc" (experimental), + remove erroneous traces of the InnoDB plugin (that is 5.1 only). + +* Tue Oct 06 2009 Magnus Blaudd + +- Removed mysql_fix_privilege_tables + +* Fri Oct 02 2009 Alexander Nozdrin + +- "mysqlmanager" got removed from version 5.4, all references deleted. + +* Fri Aug 28 2009 Joerg Bruehe + +- Merge up from 5.1 to 5.4: Remove handling for the InnoDB plugin. + +* Thu Aug 27 2009 Joerg Bruehe + +- This version does not contain the "Instance manager", "mysqlmanager": + Remove it from the spec file so that packaging succeeds. + +* Mon Aug 24 2009 Jonathan Perkin + +- Add conditionals for bundled zlib and innodb plugin + +* Fri Aug 21 2009 Jonathan Perkin + +- Install plugin libraries in appropriate packages. +- Disable libdaemon_example and ftexample plugins. + +* Thu Aug 20 2009 Jonathan Perkin + +- Update variable used for mysql-test suite location to match source. + +* Fri Nov 07 2008 Joerg Bruehe + +- Correct yesterday's fix, so that it also works for the last flag, + and fix a wrong quoting: un-quoted quote marks must not be escaped. + +* Thu Nov 06 2008 Kent Boortz + +- Removed "mysql_upgrade_shell" +- Removed some copy/paste between debug and normal build + +* Thu Nov 06 2008 Joerg Bruehe + +- Modify CFLAGS and CXXFLAGS such that a debug build is not optimized. + This should cover both gcc and icc flags. Fixes bug#40546. + +* Fri Aug 29 2008 Kent Boortz + +- Removed the "Federated" storage engine option, and enabled in all + +* Tue Aug 26 2008 Joerg Bruehe + +- Get rid of the "warning: Installed (but unpackaged) file(s) found:" + Some generated files aren't needed in RPMs: + - the "sql-bench/" subdirectory + Some files were missing: + - /usr/share/aclocal/mysql.m4 ("devel" subpackage) + - Manual "mysqlbug" ("server" subpackage) + - Program "innochecksum" and its manual ("server" subpackage) + - Manual "mysql_find_rows" ("client" subpackage) + - Script "mysql_upgrade_shell" ("client" subpackage) + - Program "ndb_cpcd" and its manual ("ndb-extra" subpackage) + - Manuals "ndb_mgm" + "ndb_restore" ("ndb-tools" subpackage) + +* Mon Mar 31 2008 Kent Boortz + +- Made the "Federated" storage engine an option +- Made the "Cluster" storage engine and sub packages an option + +* Wed Mar 19 2008 Joerg Bruehe + +- Add the man pages for "ndbd" and "ndb_mgmd". + +* Mon Feb 18 2008 Timothy Smith + +- Require a manual upgrade if the alread-installed mysql-server is + from another vendor, or is of a different major version. + +* Wed May 02 2007 Joerg Bruehe + +- "ndb_size.tmpl" is not needed any more, + "man1/mysql_install_db.1" lacked the trailing '*'. + +* Sat Apr 07 2007 Kent Boortz + +- Removed man page for "mysql_create_system_tables" + +* Wed Mar 21 2007 Daniel Fischer + +- Add debug server. + +* Mon Mar 19 2007 Daniel Fischer + +- Remove Max RPMs; the server RPMs contain a mysqld compiled with all + features that previously only were built into Max. + +* Fri Mar 02 2007 Joerg Bruehe + +- Add several man pages for NDB which are now created. + +* Fri Jan 05 2007 Kent Boortz + +- Put back "libmygcc.a", found no real reason it was removed. + +- Add CFLAGS to gcc call with --print-libgcc-file, to make sure the + correct "libgcc.a" path is returned for the 32/64 bit architecture. + +* Mon Dec 18 2006 Joerg Bruehe + +- Fix the move of "mysqlmanager" to section 8: Directory name was wrong. + +* Thu Dec 14 2006 Joerg Bruehe + +- Include the new man pages for "my_print_defaults" and "mysql_tzinfo_to_sql" + in the server RPM. +- The "mysqlmanager" man page got moved from section 1 to 8. + +* Thu Nov 30 2006 Joerg Bruehe + +- Call "make install" using "benchdir_root=%{_datadir}", + because that is affecting the regression test suite as well. + +* Thu Nov 16 2006 Joerg Bruehe + +- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB) + replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading + (bug#22081). + +* Mon Nov 13 2006 Joerg Bruehe + +- Add "--with-partition" t 2006 Joerg Bruehe + +- Use the Perl script to run the tests, because it will automatically check + whether the server is configured with SSL. + +* Tue Jun 27 2006 Joerg Bruehe + +- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216) + +- Revert all previous attempts to call "mysql_upgrade" during RPM upgrade, + there are some more aspects which need to be solved before this is possible. + For now, just ensure the binary "mysql_upgrade" is delivered and installysql.com> + +- To run "mysql_upgrade", we need a running server; + start it in isolation and skip password checks. + +* Sat May 20 2006 Kent Boortz + +- Always compile for PIC, position independent code. + +* Wed May 10 2006 Kent Boortz + +- Use character set "all" when compiling with Cluster, to make Cluster + nodes independent on the character set directory, and the problem + that two RPM sub packages both wants to install this directory. + +* Mon May 01 2006 Kent Boortz + +- Use "./libtool --mode=execute" instead of searching for the + executable in current directory and ".libs". + +* Fri Apr 28 2006 Kent Boortz + +- Install and run "mysql_upgrade" + +* Wed Apr 12 2006 Jim Winstead + +- Remove sql-bench, and MySQL-bench RPM (will be built as an independent + project from the mysql-bench repository) + +* Tue Apr 11 2006 Jim Winstead + +- Remove old mysqltestmanager and related programs +* Sat Apr 01 2006 Kent Boortz + +- Set $LDFLAGS from $MYSQL_BUILD_LDFLAGS + +* Tue Mar 07 2006 Kent Boortz + +- Changed product name from "Community Edition" to "Community Server" + +* Mon Mar 06 2006 Kent Boortz + +- Fast mutexes is now disabled by default, but should be + used in Linux builds. + +* Mon Feb 20 2006 Kent Boortz + +- Reintroduced a max build +- Limited testing of 'debug' and 'max' servers +- Berkeley DB only in 'max' + +* Mon Feb 13 2006 Joerg Bruehe + +- Use "-i" on "make test-force"; + this is essential for later evaluation of this log file. + +* Thu Feb 09 2006 Kent Boortz + +- Pass '-static' to libtool, link static with our own libraries, dynamic + with system libraries. Link with the bundled zlib. + +* Wed Feb 08 2006 Kristian Nielsen + +- Modified RPM spec to match new 5.1 debug+max combined community packaging. + +* Sun Dec 18 2005 Kent Boortz + +- Added "client/mysqlslap" + +* Mon Dec 12 2005 Rodrigo Novo + +- Added zlib to the list of (static) libraries installed +- Added check against libtool wierdness (WRT: sql/mysqld || sql/.libs/mysqld) +- Compile MySQL with bundled zlib +- Fixed %packager name to "MySQL Production Engineering Team" + +* Mon Dec 05 2005 Joerg Bruehe + +- Avoid using the "bundled" zlib on "shared" builds: + As it is not installed (on the build system), this gives dependency + problems with "libtool" causing the build to fail. + (Change was done on Nov 11, but left uncommented.) + +* Tue Nov 22 2005 Joerg Bruehe + +- Extend the file existence check for "init.d/mysql" on un-install + to also guard the call to "insserv"/"chkconfig". + +* Thu Oct 27 2005 Lenz Grimmer + +- added more man pages + +* Wed Oct 19 2005 Kent Boortz + +- Made yaSSL support an option (off by default) + +* Wed Oct 19 2005 Kent Boortz + +- Enabled yaSSL support + +* Sat Oct 15 2005 Kent Boortz + +- Give mode arguments the same way in all places +lenz@mysql.com> + +- fixed the removing of the RPM_BUILD_ROOT in the %clean section (the + $RBR variable did not get expanded, thus leaving old build roots behind) + +* Thu Aug 04 2005 Lenz Grimmer + +- Fixed the creation of the mysql user group account in the postinstall + section (BUG 12348) +- Fixed enabling the Archive storage engine in the Max binary + +* Tue Aug 02 2005 Lenz Grimmer + +- Fixed the Requires: tag for the server RPM (BUG 12233) + +* Fri Jul 15 2005 Lenz Grimmer + +- create a "mysql" user group and assign the mysql user account to that group + in the server postinstall section. (BUG 10984) + +* Tue Jun 14 2005 Lenz Grimmer + +- Do not build statically on i386 by default, only when adding either "--with + static" or "--define '_with_static 1'" to the RPM build options. Static + linking really only makes sense when linking against the specially patched + glibc 2.2.5. + +* Mon Jun 06 2005 Lenz Grimmer + +- added mysql_client_test to the "bench" subpackage (BUG 10676) +- added the libndbclient static and shared libraries (BUG 10676) + +* Wed Jun 01 2005 Lenz Grimmer + +- use "mysqldatadir" variable instead of hard-coding the path multiple times +- use the "mysqld_user" variable on all occasions a user name is referenced +- removed (incomplete) Brazilian translations +- removed redundant release tags from the subpackage descriptions + +* Wed May 25 2005 Joerg Bruehe + +- Added a "make clean" between separate calls to "BuildMySQL". + +* Thu May 12 2005 Guilhem Bichot + +- Removed the mysql_tableinfo script made obsolete by the information schema + +* Wed Apr 20 2005 Lenz Grimmer + +- Enabled the "blackhole" storage engine for the Max RPM + +* Wed Apr 13 2005 Lenz Grimmer + +- removed the MySQL manual files (html/ps/texi) - they have been removed + from the MySQL sources and are now available seperately. + +* Mon Apr 4 2005 Petr Chardin + +- old mysqlmanager, mysq* Mon Feb 7 2005 Tomas Ulin + +- enabled the "Ndbcluster" storage engine for the max binary +- added extra make install in ndb subdir after Max build to get ndb binaries +- added packages for ndbcluster storage engine + +* Fri Jan 14 2005 Lenz Grimmer + +- replaced obsoleted "BuildPrereq" with "BuildRequires" instead + +* Thu Jan 13 2005 Lenz Grimmer + +- enabled the "Federated" storage engine for the max binary + +* Tue Jan 04 2005 Petr Chardin + +- ISAM and merge storage engines were purged. As well as appropriate + tools and manpages (isamchk and isamlog) + +* Fri Dec 31 2004 Lenz Grimmer + +- enabled the "Archive" storage engine for the max binary +- enabled the "CSV" storage engine for the max binary +- enabled the "Example" storage engine for the max binary + +* Thu Aug 26 2004 Lenz Grimmer + +- MySQL-Max now requires MySQL-server instead of MySQL (BUG 3860) + +* Fri Aug 20 2004 Lenz Grimmer + +- do not link statically on IA64/AMD64 as these systems do not have + a patched glibc installed + +* Tue Aug 10 2004 Lenz Grimmer + +- Added libmygcc.a to the devel subpackage (required to link applications + against the the embedded server libmysqld.a) (BUG 4921) + +* Mon Aug 09 2004 Lenz Grimmer + +- Added EXCEPTIONS-CLIENT to the "devel" package + +* Thu Jul 29 2004 Lenz Grimmer + +- disabled OpenSSL in the Max binaries again (the RPM packages were the + only exception to this anyway) (BUG 1043) + +* Wed Jun 30 2004 Lenz Grimmer + +- fixed server postinstall (mysql_install_db was called with the wrong + parameter) + +* Thu Jun 24 2004 Lenz Grimmer + +- added mysql_tzinfo_to_sql to the server subpackage +- run "make clean" instead of "make distclean" + +* Mon Apr 05 2004 Lenz Grimmer + +- added ncurses-devel to the build prerequisites (BUG 3377) + +* Thu Feb 12 2004 Lenz Grimmer + +- when using gcc, _always_ use CXX=gcc +- replaced Copyright with License field (Copyright is obsolete) + +* Tue Feb 03 2004 Lenz Grimmer + +- added myisam_ftdump to the Server package + +* Tue Jan 13 2004 Lenz Grimmer + +- link the mysql client against libreadline instead of libedit (BUG 2289) + +* Mon Dec 22 2003 Lenz Grimmer + +- marked /etc/logrotate.d/mysql as a config file (BUG 2156) + +* Sat Dec 13 2003 Lenz Grimmer + +- fixed file permissions (BUG 1672) + +* Thu Dec 11 2003 Lenz Grimmer + +- made testing for gcc3 a bit more robust + +* Fri Dec 05 2003 Lenz Grimmer + +- added missing file mysql_create_system_tables to the server subpackage + +* Fri Nov 21 2003 Lenz Grimmer + +- removed dependency on MySQL-client from the MySQL-devel subpackage + as it is not really required. (BUG 1610) + +* Fri Aug 29 2003 Lenz Grimmer + +- Fixed BUG 1162 (removed macro names from the changelog) +- Really fixed BUG 998 (disable the checking for installed but + unpackaged files) + +* Tue Aug 05 2003 Lenz Grimmer + +- Fixed BUG 959 (libmysqld not being compiled properly) +- Fixed BUG 998 (RPM build errors): added missing files to the + distribution (mysql_fix_extensions, mysql_tableinfo, mysqldumpslow, + mysql_fix_privilege_tables.1), removed "-n" from install section. + +* Wed Jul 09 2003 Lenz Grimmer + +- removed the GIF Icon (file was not included in the sources anyway) +- removed unused variable shared_lib_version +- do not run automake before building the standard binary + (should not be necessary) +- add server suffix '-standard' to standard binary (to be in line + with the binary tarball distributions) +- Use more RPM macros (_exec_prefix, _sbindir, _libdir, _sysconfdir, + _datadir, _includedir) throughout the spec file. +- allow overriding CC and CXX (required when building with other compilers) + +* Fri May 16 2003 Lenz Grimmer + +- re-enabled RAID again + +* Wed Apr 30 2003 Lenz Grimmer + +- disabled MyISAM RAID (--with-raid)- it throws an assertion which + needs to be investigated first. + +* Mon Mar 10 2003 Lenz Grimmer + +- added missing file mysql_secure_installation to server subpackage + (BUG 141) + +* Tue Feb 11 2003 Lenz Grimmer + +- re-added missing pre- and post(un)install scripts to server subpackage +- added config file /etc/my.cnf to the file list (just for completeness) +- make sure to create the datadir with 755 permissions + +* Mon Jan 27 2003 Lenz Grimmer + +- removed unusedql.com> + +- Reworked the build steps a little bit: the Max binary is supposed + to include OpenSSL, which cannot be linked statically, thus trying + to statically link against a special glibc is futile anyway +- because of this, it is not required to make yet another build run + just to compile the shared libs (saves a lot of time) +- updated package description of the Max subpackage +- clean up the BuildRoot directory afterwards + +* Mon Jul 15 2002 Lenz Grimmer + +- Updated Packager information +- Fixed the build options: the regular package is supposed to + include InnoDB and linked statically, while the Max package + should include BDB and SSL support + +* Fri May 03 2002 Lenz Grimmer + +- Use more RPM macros (e.g. infodir, mandir) to make the spec + file more portable +- reorganized the installation of documentation files: let RPM + take care of this +- reorganized the file list: actually install man pages along + with the binaries of the respective subpackage +- do not include libmysqld.a in the devel subpackage as well, if we + have a special "embedded" subpackage +- reworked the package descriptions + +* Mon Oct 8 2001 Monty + +- Added embedded server as a separate RPM + +* Fri Apr 13 2001 Monty + +- Added mysqld-max to the distribution + +* Tue Jan 2 2001 Monty + +- Added mysql-test to the bench package + +* Fri Aug 18 2000 Tim Smith + +- Added separate libmysql_r directory; now both a threaded + and non-threaded library is shipped. + +* Tue Sep 28 1999 David Axmark + +- Added the support-files/my-example.cnf to the docs directory. + +- Removed devel dependency on base since it is about client + development. + +* Wed Sep 8 1999 David Axmark + +- Cleaned up some for 3.23. + +* Thu Jul 1 1999 David Axmark + +- Added support for shared libraries in a separate sub + package. Original fix by David Fox (dsfox@cogsci.ucsd.edu) + +- The --enable-assembler switch is now automatically disables on + platforms there assembler code is unavailable. This should allow + building this RPM on non i386 systems. + +* Mon Feb 22 1999 David Axmark + +- Removed unportable cc switches from the spec file. The defaults can + now be overridden with environment variables. This feature is used + to compile the official RPM with optimal (but compiler version + specific) switches. + +- Removed the repetitive description parts for the sub rpms. Maybe add + again if RPM gets a multiline macro capability. + +- Added support for a pt_BR translation. Translation contributed by + Jorge Godoy . + +* Wed Nov 4 1998 David Axmark + +- A lot of changes in all the rpm and install scripts. This may even + be a working RPM :-) + +* Sun Aug 16 1998 David Axmark + +- A developers changelog for MySQL is available in the source RPM. And + there is a history of major user visible changed in the Reference + Manual. Only RPM specific changes will be documented here. diff --git a/packaging/rpm-oel/mysql_config.sh b/packaging/rpm-oel/mysql_config.sh new file mode 100644 index 00000000000..abe46e0ed74 --- /dev/null +++ b/packaging/rpm-oel/mysql_config.sh @@ -0,0 +1,28 @@ +#! /bin/bash +# +# Wrapper script for mysql_config to support multilib +# +# Only works on OEL6/RHEL6 and similar +# +# This command respects setarch + +bits=$(rpm --eval %__isa_bits) + +case $bits in + 32|64) status=known ;; + *) status=unknown ;; +esac + +if [ "$status" = "unknown" ] ; then + echo "$0: error: command 'rpm --eval %__isa_bits' returned unknown value: $bits" + exit 1 +fi + + +if [ -x /usr/bin/mysql_config-$bits ] ; then + /usr/bin/mysql_config-$bits "$@" +else + echo "$0: error: needed binary: /usr/bin/mysql_config-$bits is missing. Please check your MySQL installation." + exit 1 +fi + diff --git a/packaging/rpm-oel/mysqld.service b/packaging/rpm-oel/mysqld.service new file mode 100644 index 00000000000..78ef3bffe60 --- /dev/null +++ b/packaging/rpm-oel/mysqld.service @@ -0,0 +1,48 @@ +# +# Simple MySQL systemd service file +# +# systemd supports lots of fancy features, look here (and linked docs) for a full list: +# http://www.freedesktop.org/software/systemd/man/systemd.exec.html +# +# Note: this file ( /usr/lib/systemd/system/mysql.service ) +# will be overwritten on package upgrade, please copy the file to +# +# /etc/systemd/system/mysql.service +# +# to make needed changes. +# +# systemd-delta can be used to check differences between the two mysql.service files. +# + +[Unit] +Description=MySQL Community Server +After=network.target +After=syslog.target + +[Install] +WantedBy=multi-user.target +Alias=mysql.service + +[Service] +User=mysql +Group=mysql + +# Execute pre and post scripts as root +PermissionsStartOnly=true + +# Needed to create system tables etc. +ExecStartPre=/usr/bin/mysql-systemd-start pre + +# Start main service +ExecStart=/usr/bin/mysqld_safe + +# Don't signal startup success before a ping works +ExecStartPost=/usr/bin/mysql-systemd-start post + +# Give up if ping don't get an answer +TimeoutSec=600 + +Restart=always +PrivateTmp=false + + -- cgit v1.2.1 From 4fe19a25385a410b992a53ee90a047108f309ccf Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Mon, 25 Nov 2013 15:08:52 +0100 Subject: Updated the url and sql_mode in my.cnf --- packaging/rpm-oel/my.cnf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/rpm-oel/my.cnf b/packaging/rpm-oel/my.cnf index 28e6aa806b1..b8ee584d485 100644 --- a/packaging/rpm-oel/my.cnf +++ b/packaging/rpm-oel/my.cnf @@ -1,5 +1,5 @@ # For advice on how to change settings please see -# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html +# http://dev.mysql.com/doc/refman/5.5/en/server-configuration-defaults.html [mysqld] # @@ -24,7 +24,7 @@ socket=/var/lib/mysql/mysql.sock symbolic-links=0 # Recommended in standard MySQL setup -sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES +#sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysqld_safe] log-error=/var/log/mysqld.log -- cgit v1.2.1 -- cgit v1.2.1 From 1c0122c5c121010cc2250e27af88b9e8d58bc761 Mon Sep 17 00:00:00 2001 From: Pavan Naik Date: Fri, 29 Nov 2013 15:13:47 +0530 Subject: BUG#16321920 : CREATE A SEPARATE INNODB_ZIP TEST SUITE Fix : ------- Created separate suites called innodb_zip ans i_innodb_zip that contain all compression tests. Running the new suites with following compression-related parameters : * innodb_compression_level = {1/9} * innodb_log_compressed_pages = {ON/OFF} --- mysql-test/collections/default.weekly | 3 + mysql-test/mysql-test-run.pl | 2 +- .../suite/innodb/r/innodb-create-options.result | 854 ------------ mysql-test/suite/innodb/r/innodb-zip.result | 410 ------ mysql-test/suite/innodb/r/innodb_bug36169.result | 2 - mysql-test/suite/innodb/r/innodb_bug36172.result | 1 - mysql-test/suite/innodb/r/innodb_bug52745.result | 130 -- mysql-test/suite/innodb/r/innodb_bug53591.result | 15 - mysql-test/suite/innodb/r/innodb_bug56680.result | 109 -- .../suite/innodb/r/innodb_cmp_drop_table.result | 14 - .../innodb/r/innodb_index_large_prefix.result | 184 --- .../r/innodb_prefix_index_liftedlimit.result | 1353 -------------------- .../suite/innodb/t/innodb-create-options.test | 573 --------- mysql-test/suite/innodb/t/innodb-zip.test | 342 ----- mysql-test/suite/innodb/t/innodb_bug36169.test | 1160 ----------------- mysql-test/suite/innodb/t/innodb_bug36172.test | 30 - mysql-test/suite/innodb/t/innodb_bug52745.test | 107 -- mysql-test/suite/innodb/t/innodb_bug53591.test | 20 - mysql-test/suite/innodb/t/innodb_bug56680.test | 140 -- .../innodb/t/innodb_cmp_drop_table-master.opt | 1 - .../suite/innodb/t/innodb_cmp_drop_table.test | 59 - .../suite/innodb/t/innodb_index_large_prefix.test | 269 ---- .../innodb/t/innodb_prefix_index_liftedlimit.test | 1338 ------------------- .../innodb_zip/r/innodb-create-options.result | 854 ++++++++++++ mysql-test/suite/innodb_zip/r/innodb-zip.result | 410 ++++++ .../suite/innodb_zip/r/innodb_bug36169.result | 2 + .../suite/innodb_zip/r/innodb_bug36172.result | 1 + .../suite/innodb_zip/r/innodb_bug52745.result | 130 ++ .../suite/innodb_zip/r/innodb_bug53591.result | 15 + .../suite/innodb_zip/r/innodb_bug56680.result | 109 ++ .../innodb_zip/r/innodb_cmp_drop_table.result | 14 + .../innodb_zip/r/innodb_index_large_prefix.result | 184 +++ .../r/innodb_prefix_index_liftedlimit.result | 1353 ++++++++++++++++++++ .../suite/innodb_zip/t/innodb-create-options.test | 573 +++++++++ mysql-test/suite/innodb_zip/t/innodb-zip.test | 342 +++++ mysql-test/suite/innodb_zip/t/innodb_bug36169.test | 1160 +++++++++++++++++ mysql-test/suite/innodb_zip/t/innodb_bug36172.test | 30 + mysql-test/suite/innodb_zip/t/innodb_bug52745.test | 107 ++ mysql-test/suite/innodb_zip/t/innodb_bug53591.test | 20 + mysql-test/suite/innodb_zip/t/innodb_bug56680.test | 140 ++ .../innodb_zip/t/innodb_cmp_drop_table-master.opt | 1 + .../suite/innodb_zip/t/innodb_cmp_drop_table.test | 59 + .../innodb_zip/t/innodb_index_large_prefix.test | 269 ++++ .../t/innodb_prefix_index_liftedlimit.test | 1338 +++++++++++++++++++ 44 files changed, 7115 insertions(+), 7112 deletions(-) delete mode 100644 mysql-test/suite/innodb/r/innodb-create-options.result delete mode 100644 mysql-test/suite/innodb/r/innodb-zip.result delete mode 100644 mysql-test/suite/innodb/r/innodb_bug36169.result delete mode 100644 mysql-test/suite/innodb/r/innodb_bug36172.result delete mode 100644 mysql-test/suite/innodb/r/innodb_bug52745.result delete mode 100644 mysql-test/suite/innodb/r/innodb_bug53591.result delete mode 100644 mysql-test/suite/innodb/r/innodb_bug56680.result delete mode 100644 mysql-test/suite/innodb/r/innodb_cmp_drop_table.result delete mode 100644 mysql-test/suite/innodb/r/innodb_index_large_prefix.result delete mode 100644 mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result delete mode 100644 mysql-test/suite/innodb/t/innodb-create-options.test delete mode 100644 mysql-test/suite/innodb/t/innodb-zip.test delete mode 100644 mysql-test/suite/innodb/t/innodb_bug36169.test delete mode 100644 mysql-test/suite/innodb/t/innodb_bug36172.test delete mode 100644 mysql-test/suite/innodb/t/innodb_bug52745.test delete mode 100644 mysql-test/suite/innodb/t/innodb_bug53591.test delete mode 100644 mysql-test/suite/innodb/t/innodb_bug56680.test delete mode 100644 mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt delete mode 100644 mysql-test/suite/innodb/t/innodb_cmp_drop_table.test delete mode 100644 mysql-test/suite/innodb/t/innodb_index_large_prefix.test delete mode 100644 mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test create mode 100644 mysql-test/suite/innodb_zip/r/innodb-create-options.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb-zip.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_bug36169.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_bug36172.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_bug52745.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_bug53591.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_bug56680.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result create mode 100644 mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result create mode 100644 mysql-test/suite/innodb_zip/t/innodb-create-options.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb-zip.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_bug36169.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_bug36172.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_bug52745.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_bug53591.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_bug56680.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt create mode 100644 mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test create mode 100644 mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test diff --git a/mysql-test/collections/default.weekly b/mysql-test/collections/default.weekly index 40f0548f374..a03e2593cfe 100755 --- a/mysql-test/collections/default.weekly +++ b/mysql-test/collections/default.weekly @@ -5,3 +5,6 @@ perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list + +# Run innodb compression tests +perl mysql-test-run.pl --force --debug-server --comment=innodb_compression --vardir=var-innodb-zip --big-test --testcase-timeout=60 --parallel=auto --experimental=collections/default.experimental --suite=innodb_zip diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 27f99941637..7900b54c3fb 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -163,7 +163,7 @@ our $opt_vs_config = $ENV{'MTR_VS_CONFIG'}; # If you add a new suite, please check TEST_DIRS in Makefile.am. # -my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,perfschema"; +my $DEFAULT_SUITES= "main,sys_vars,binlog,federated,rpl,innodb,innodb_zip,perfschema"; my $opt_suites; our $opt_verbose= 0; # Verbose output, enable with --verbose diff --git a/mysql-test/suite/innodb/r/innodb-create-options.result b/mysql-test/suite/innodb/r/innodb-create-options.result deleted file mode 100644 index aec9d731ce6..00000000000 --- a/mysql-test/suite/innodb/r/innodb-create-options.result +++ /dev/null @@ -1,854 +0,0 @@ -SET storage_engine=InnoDB; -SET GLOBAL innodb_file_format=`Barracuda`; -SET GLOBAL innodb_file_per_table=ON; -SET SESSION innodb_strict_mode = ON; -# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 -# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -# 'FIXED' is sent to InnoDB since it is used by MyISAM. -# But it is an invalid mode in InnoDB -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact -# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE -# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 -# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid ROW_FORMAT specifier. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 -# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -ALTER TABLE t1 KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED -ALTER TABLE t1 KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=1 -# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE -# ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ROW_FORMAT=COMPACT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1005 Can't create table 'test.t1' (errno: 1478) -# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and -# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope -# and that they can be set to default values during strict mode. -SET GLOBAL innodb_file_format=Antelope; -DROP TABLE IF EXISTS t1; -Warnings: -Note 1051 Unknown table 't1' -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 KEY_BLOCK_SIZE=8; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -SET GLOBAL innodb_file_format=Barracuda; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SET GLOBAL innodb_file_format=Barracuda; -# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and -# and a valid non-zero KEY_BLOCK_SIZE are rejected with -# innodb_file_per_table=OFF and that they can be set to default -# values during strict mode. -SET GLOBAL innodb_file_per_table=OFF; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table 'test.t1' (errno: 1478) -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 KEY_BLOCK_SIZE=1; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact -SET GLOBAL innodb_file_per_table=ON; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1005 Can't create table '#sql-temporary' (errno: 1478) -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SET GLOBAL innodb_file_per_table=ON; -################################################## -SET SESSION innodb_strict_mode = OFF; -# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 -# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' -# 'FIXED' is sent to InnoDB since it is used by MyISAM. -# It is an invalid mode in InnoDB, use COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -Warnings: -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=FIXED -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -Warnings: -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=FIXED -# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE -# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 -# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=FIXED KEY_BLOCK_SIZE=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=8 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 -# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=2 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed KEY_BLOCK_SIZE=8 -# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE -# ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -Level Code Message -SHOW CREATE TABLE t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL, - `f1` int(11) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=COMPACT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPACT -# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact KEY_BLOCK_SIZE=15 -# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a -valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT -is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=1 -SET GLOBAL innodb_file_format=Barracuda; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=DYNAMIC -SET GLOBAL innodb_file_format=Barracuda; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a -valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF -and then used again when innodb_file_per_table=ON. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=2 -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -Warnings: -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SHOW WARNINGS; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Compact row_format=DYNAMIC -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -Level Code Message -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -TABLE_NAME ROW_FORMAT CREATE_OPTIONS -t1 Dynamic row_format=DYNAMIC -# Cleanup -DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/innodb/r/innodb-zip.result b/mysql-test/suite/innodb/r/innodb-zip.result deleted file mode 100644 index db7fd6d812c..00000000000 --- a/mysql-test/suite/innodb/r/innodb-zip.result +++ /dev/null @@ -1,410 +0,0 @@ -set session innodb_strict_mode=0; -set global innodb_file_per_table=off; -set global innodb_file_format=`0`; -create table t0(a int primary key) engine=innodb row_format=compressed; -Warnings: -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -create table t00(a int primary key) engine=innodb -key_block_size=4 row_format=compressed; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -create table t1(a int primary key) engine=innodb row_format=dynamic; -Warnings: -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -create table t2(a int primary key) engine=innodb row_format=redundant; -create table t3(a int primary key) engine=innodb row_format=compact; -create table t4(a int primary key) engine=innodb key_block_size=9; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9. -create table t5(a int primary key) engine=innodb -key_block_size=1 row_format=redundant; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. -set global innodb_file_per_table=on; -create table t6(a int primary key) engine=innodb -key_block_size=1 row_format=redundant; -Warnings: -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. -set global innodb_file_format=`1`; -create table t7(a int primary key) engine=innodb -key_block_size=1 row_format=redundant; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -create table t8(a int primary key) engine=innodb -key_block_size=1 row_format=fixed; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. -create table t9(a int primary key) engine=innodb -key_block_size=1 row_format=compact; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -create table t10(a int primary key) engine=innodb -key_block_size=1 row_format=dynamic; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. -create table t11(a int primary key) engine=innodb -key_block_size=1 row_format=compressed; -create table t12(a int primary key) engine=innodb -key_block_size=1; -create table t13(a int primary key) engine=innodb -row_format=compressed; -create table t14(a int primary key) engine=innodb key_block_size=9; -Warnings: -Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9. -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t0 Compact 16384 0 -test t00 Compact 16384 0 -test t1 Compact 16384 0 -test t10 Dynamic 16384 0 -test t11 Compressed 1024 0 -test t12 Compressed 1024 0 -test t13 Compressed 8192 0 -test t14 Compact 16384 0 -test t2 Redundant 16384 0 -test t3 Compact 16384 0 -test t4 Compact 16384 0 -test t5 Redundant 16384 0 -test t6 Redundant 16384 0 -test t7 Redundant 16384 0 -test t8 Compact 16384 0 -test t9 Compact 16384 0 -drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14; -alter table t1 key_block_size=0; -alter table t1 row_format=dynamic; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t1 Dynamic 16384 0 -alter table t1 row_format=compact; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t1 Compact 16384 0 -alter table t1 row_format=redundant; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t1 Redundant 16384 0 -drop table t1; -create table t1(a int not null, b text, index(b(10))) engine=innodb -key_block_size=1; -create table t2(b text)engine=innodb; -insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000))); -insert into t1 select 1, b from t2; -commit; -begin; -update t1 set b=repeat('B',100); -select a,left(b,40) from t1 natural join t2; -a left(b,40) -1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA -rollback; -select a,left(b,40) from t1 natural join t2; -a left(b,40) -1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t1 Compressed 2048 1024 -test t2 Compact 16384 0 -drop table t1,t2; -SET SESSION innodb_strict_mode = off; -CREATE TABLE t1( -c TEXT NOT NULL, d TEXT NOT NULL, -PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1( -c TEXT NOT NULL, d TEXT NOT NULL, -PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; -ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1( -c TEXT NOT NULL, d TEXT NOT NULL, -PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; -CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); -DROP TABLE t1; -create table t1( c1 int not null, c2 blob, c3 blob, c4 blob, -primary key(c1, c2(22), c3(22))) -engine = innodb row_format = dynamic; -begin; -insert into t1 values(1, repeat('A', 20000), repeat('B', 20000), -repeat('C', 20000)); -update t1 set c3 = repeat('D', 20000) where c1 = 1; -commit; -select count(*) from t1 where c2 = repeat('A', 20000); -count(*) -1 -select count(*) from t1 where c3 = repeat('D', 20000); -count(*) -1 -select count(*) from t1 where c4 = repeat('C', 20000); -count(*) -1 -update t1 set c3 = repeat('E', 20000) where c1 = 1; -drop table t1; -set global innodb_file_format=`0`; -select @@innodb_file_format; -@@innodb_file_format -Antelope -set global innodb_file_format=`1`; -select @@innodb_file_format; -@@innodb_file_format -Barracuda -set global innodb_file_format=`2`; -ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2' -set global innodb_file_format=`-1`; -ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1' -set global innodb_file_format=`Antelope`; -set global innodb_file_format=`Barracuda`; -set global innodb_file_format=`Cheetah`; -ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah' -set global innodb_file_format=`abc`; -ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'abc' -set global innodb_file_format=`1a`; -ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '1a' -set global innodb_file_format=``; -ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '' -set global innodb_file_per_table = on; -set global innodb_file_format = `1`; -set innodb_strict_mode = off; -create table t1 (id int primary key) engine = innodb key_block_size = 0; -drop table t1; -set innodb_strict_mode = on; -create table t1 (id int primary key) engine = innodb key_block_size = 0; -create table t2 (id int primary key) engine = innodb key_block_size = 9; -ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Error 1005 Can't create table 'test.t2' (errno: 1478) -create table t3 (id int primary key) engine = innodb key_block_size = 1; -create table t4 (id int primary key) engine = innodb key_block_size = 2; -create table t5 (id int primary key) engine = innodb key_block_size = 4; -create table t6 (id int primary key) engine = innodb key_block_size = 8; -create table t7 (id int primary key) engine = innodb key_block_size = 16; -create table t8 (id int primary key) engine = innodb row_format = compressed; -create table t9 (id int primary key) engine = innodb row_format = dynamic; -create table t10(id int primary key) engine = innodb row_format = compact; -create table t11(id int primary key) engine = innodb row_format = redundant; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t1 Compact 16384 0 -test t10 Compact 16384 0 -test t11 Redundant 16384 0 -test t3 Compressed 1024 0 -test t4 Compressed 2048 0 -test t5 Compressed 4096 0 -test t6 Compressed 8192 0 -test t7 Compressed 16384 0 -test t8 Compressed 8192 0 -test t9 Dynamic 16384 0 -drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; -create table t1 (id int primary key) engine = innodb -key_block_size = 8 row_format = compressed; -create table t2 (id int primary key) engine = innodb -key_block_size = 8 row_format = redundant; -ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t2' (errno: 1478) -create table t3 (id int primary key) engine = innodb -key_block_size = 8 row_format = compact; -ERROR HY000: Can't create table 'test.t3' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t3' (errno: 1478) -create table t4 (id int primary key) engine = innodb -key_block_size = 8 row_format = dynamic; -ERROR HY000: Can't create table 'test.t4' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t4' (errno: 1478) -create table t5 (id int primary key) engine = innodb -key_block_size = 8 row_format = default; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t1 Compressed 8192 0 -test t5 Compressed 8192 0 -drop table t1, t5; -create table t1 (id int primary key) engine = innodb -key_block_size = 9 row_format = redundant; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t1' (errno: 1478) -create table t2 (id int primary key) engine = innodb -key_block_size = 9 row_format = compact; -ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t2' (errno: 1478) -create table t2 (id int primary key) engine = innodb -key_block_size = 9 row_format = dynamic; -ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] -Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. -Error 1005 Can't create table 'test.t2' (errno: 1478) -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -set global innodb_file_per_table = off; -create table t1 (id int primary key) engine = innodb key_block_size = 1; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table 'test.t1' (errno: 1478) -create table t2 (id int primary key) engine = innodb key_block_size = 2; -ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table 'test.t2' (errno: 1478) -create table t3 (id int primary key) engine = innodb key_block_size = 4; -ERROR HY000: Can't create table 'test.t3' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table 'test.t3' (errno: 1478) -create table t4 (id int primary key) engine = innodb key_block_size = 8; -ERROR HY000: Can't create table 'test.t4' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table 'test.t4' (errno: 1478) -create table t5 (id int primary key) engine = innodb key_block_size = 16; -ERROR HY000: Can't create table 'test.t5' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. -Error 1005 Can't create table 'test.t5' (errno: 1478) -create table t6 (id int primary key) engine = innodb row_format = compressed; -ERROR HY000: Can't create table 'test.t6' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. -Error 1005 Can't create table 'test.t6' (errno: 1478) -create table t7 (id int primary key) engine = innodb row_format = dynamic; -ERROR HY000: Can't create table 'test.t7' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. -Error 1005 Can't create table 'test.t7' (errno: 1478) -create table t8 (id int primary key) engine = innodb row_format = compact; -create table t9 (id int primary key) engine = innodb row_format = redundant; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t8 Compact 16384 0 -test t9 Redundant 16384 0 -drop table t8, t9; -set global innodb_file_per_table = on; -set global innodb_file_format = `0`; -create table t1 (id int primary key) engine = innodb key_block_size = 1; -ERROR HY000: Can't create table 'test.t1' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t1' (errno: 1478) -create table t2 (id int primary key) engine = innodb key_block_size = 2; -ERROR HY000: Can't create table 'test.t2' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t2' (errno: 1478) -create table t3 (id int primary key) engine = innodb key_block_size = 4; -ERROR HY000: Can't create table 'test.t3' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t3' (errno: 1478) -create table t4 (id int primary key) engine = innodb key_block_size = 8; -ERROR HY000: Can't create table 'test.t4' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t4' (errno: 1478) -create table t5 (id int primary key) engine = innodb key_block_size = 16; -ERROR HY000: Can't create table 'test.t5' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t5' (errno: 1478) -create table t6 (id int primary key) engine = innodb row_format = compressed; -ERROR HY000: Can't create table 'test.t6' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t6' (errno: 1478) -create table t7 (id int primary key) engine = innodb row_format = dynamic; -ERROR HY000: Can't create table 'test.t7' (errno: 1478) -show warnings; -Level Code Message -Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. -Error 1005 Can't create table 'test.t7' (errno: 1478) -create table t8 (id int primary key) engine = innodb row_format = compact; -create table t9 (id int primary key) engine = innodb row_format = redundant; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -table_schema table_name row_format data_length index_length -test t8 Compact 16384 0 -test t9 Redundant 16384 0 -drop table t8, t9; -set global innodb_file_per_table=0; -set global innodb_file_format=Antelope; -set global innodb_file_per_table=on; -set global innodb_file_format=`Barracuda`; -set global innodb_file_format_max=`Antelope`; -create table normal_table ( -c1 int -) engine = innodb; -select @@innodb_file_format_max; -@@innodb_file_format_max -Antelope -create table zip_table ( -c1 int -) engine = innodb key_block_size = 8; -select @@innodb_file_format_max; -@@innodb_file_format_max -Barracuda -set global innodb_file_format_max=`Antelope`; -select @@innodb_file_format_max; -@@innodb_file_format_max -Antelope -show table status; -select @@innodb_file_format_max; -@@innodb_file_format_max -Barracuda -drop table normal_table, zip_table; diff --git a/mysql-test/suite/innodb/r/innodb_bug36169.result b/mysql-test/suite/innodb/r/innodb_bug36169.result deleted file mode 100644 index aa80e4d7aa4..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug36169.result +++ /dev/null @@ -1,2 +0,0 @@ -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/suite/innodb/r/innodb_bug36172.result b/mysql-test/suite/innodb/r/innodb_bug36172.result deleted file mode 100644 index 195775f74c8..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug36172.result +++ /dev/null @@ -1 +0,0 @@ -SET storage_engine=InnoDB; diff --git a/mysql-test/suite/innodb/r/innodb_bug52745.result b/mysql-test/suite/innodb/r/innodb_bug52745.result deleted file mode 100644 index 927ba0e0e53..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug52745.result +++ /dev/null @@ -1,130 +0,0 @@ -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; -CREATE TABLE bug52745 ( -a2 int(10) unsigned DEFAULT NULL, -col37 time DEFAULT NULL, -col38 char(229) CHARACTER SET utf8 DEFAULT NULL, -col39 text, -col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -col41 int(10) unsigned DEFAULT NULL, -col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL, -col43 smallint(5) unsigned zerofill DEFAULT NULL, -col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL, -col45 float unsigned zerofill DEFAULT NULL, -col46 binary(1) DEFAULT NULL, -col47 tinyint(4) DEFAULT NULL, -col48 tinyint(1) DEFAULT NULL, -col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', -col50 binary(1) DEFAULT NULL, -col51 double unsigned zerofill DEFAULT NULL, -col52 int(10) unsigned DEFAULT NULL, -col53 time DEFAULT NULL, -col54 double unsigned DEFAULT NULL, -col55 time DEFAULT NULL, -col56 mediumtext CHARACTER SET latin2, -col57 blob, -col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000', -col59 binary(1) DEFAULT NULL, -col60 longblob, -col61 time DEFAULT NULL, -col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci, -col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', -col64 int(10) unsigned DEFAULT NULL, -col65 date DEFAULT NULL, -col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', -col67 binary(1) DEFAULT NULL, -col68 tinyblob, -col69 date DEFAULT NULL, -col70 tinyint(3) unsigned zerofill DEFAULT NULL, -col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL, -col72 datetime DEFAULT NULL, -col73 smallint(5) unsigned zerofill DEFAULT NULL, -col74 longblob, -col75 bit(34) DEFAULT NULL, -col76 float unsigned zerofill DEFAULT NULL, -col77 year(2) DEFAULT NULL, -col78 tinyint(3) unsigned DEFAULT NULL, -col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL, -col80 datetime DEFAULT NULL, -col81 smallint(6) DEFAULT NULL, -col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL, -col83 bigint(20) unsigned zerofill DEFAULT NULL, -col84 float unsigned zerofill DEFAULT NULL, -col85 double DEFAULT NULL, -col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL, -col87 varbinary(221) DEFAULT NULL, -col88 double unsigned DEFAULT NULL, -col89 float unsigned zerofill DEFAULT NULL, -col90 tinyblob -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -Warnings: -Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead -Note 1291 Column 'col82' has duplicated value '' in ENUM -Note 1291 Column 'col82' has duplicated value '' in ENUM -INSERT INTO bug52745 SET -col40='0000-00-00 00:00:00', -col51=16547, -col53='7711484', -col54=-28604, -col55='7112612', -col56='wakefulness\'', -col57=repeat('absorbefacient\'',106), -col58=11027, -col59='AM09gW7', -col60=repeat('Noelani\'',16), -col61='2520576', -col62='substitutiv', -col63='19950106155112', -col64=-12038, -col65='86238806', -col66='19600719080256', -col68=repeat('Sagittarius\'',54), -col69='38943902', -col70=1232, -col71='Elora\'', -col74=repeat('zipp',11), -col75='0', -col76=23254, -col78=13247, -col79='56219', -col80='20500609035724', -col81=11632, -col82=7, -col84=-23863, -col85=6341, -col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W', -col88=16894, -col89=6161, -col90=repeat('gale',48); -Warnings: -Warning 1265 Data truncated for column 'col53' at row 1 -Warning 1264 Out of range value for column 'col54' at row 1 -Warning 1265 Data truncated for column 'col59' at row 1 -Warning 1265 Data truncated for column 'col61' at row 1 -Warning 1264 Out of range value for column 'col64' at row 1 -Warning 1265 Data truncated for column 'col65' at row 1 -Warning 1264 Out of range value for column 'col66' at row 1 -Warning 1265 Data truncated for column 'col68' at row 1 -Warning 1265 Data truncated for column 'col69' at row 1 -Warning 1264 Out of range value for column 'col70' at row 1 -Warning 1264 Out of range value for column 'col78' at row 1 -Warning 1265 Data truncated for column 'col79' at row 1 -Warning 1264 Out of range value for column 'col84' at row 1 -SHOW WARNINGS; -Level Code Message -Warning 1265 Data truncated for column 'col53' at row 1 -Warning 1264 Out of range value for column 'col54' at row 1 -Warning 1265 Data truncated for column 'col59' at row 1 -Warning 1265 Data truncated for column 'col61' at row 1 -Warning 1264 Out of range value for column 'col64' at row 1 -Warning 1265 Data truncated for column 'col65' at row 1 -Warning 1264 Out of range value for column 'col66' at row 1 -Warning 1265 Data truncated for column 'col68' at row 1 -Warning 1265 Data truncated for column 'col69' at row 1 -Warning 1264 Out of range value for column 'col70' at row 1 -Warning 1264 Out of range value for column 'col78' at row 1 -Warning 1265 Data truncated for column 'col79' at row 1 -Warning 1264 Out of range value for column 'col84' at row 1 -DROP TABLE bug52745; -SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb/r/innodb_bug53591.result b/mysql-test/suite/innodb/r/innodb_bug53591.result deleted file mode 100644 index dae9f0d64d0..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug53591.result +++ /dev/null @@ -1,15 +0,0 @@ -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; -set old_alter_table=0; -CREATE TABLE bug53591(a text charset utf8 not null) -ENGINE=InnoDB KEY_BLOCK_SIZE=1; -ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); -ERROR HY000: Too big row -SHOW WARNINGS; -Level Code Message -Error 139 Too big row -Error 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -Error 1030 Got error 139 from storage engine -DROP TABLE bug53591; -SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb/r/innodb_bug56680.result b/mysql-test/suite/innodb/r/innodb_bug56680.result deleted file mode 100644 index 5e798b69167..00000000000 --- a/mysql-test/suite/innodb/r/innodb_bug56680.result +++ /dev/null @@ -1,109 +0,0 @@ -SET GLOBAL tx_isolation='REPEATABLE-READ'; -SET GLOBAL innodb_file_format=Barracuda; -SET GLOBAL innodb_file_per_table=on; -CREATE TABLE bug56680( -a INT AUTO_INCREMENT PRIMARY KEY, -b CHAR(1), -c INT, -INDEX(b)) -ENGINE=InnoDB; -INSERT INTO bug56680 VALUES(0,'x',1); -BEGIN; -SELECT b FROM bug56680; -b -x -BEGIN; -UPDATE bug56680 SET b='X'; -SELECT b FROM bug56680; -b -x -SELECT * FROM bug56680; -a b c -1 x 1 -ROLLBACK; -SELECT b FROM bug56680; -b -x -SET GLOBAL tx_isolation='READ-UNCOMMITTED'; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -BEGIN; -SELECT b FROM bug56680 LIMIT 2; -b -x -x -BEGIN; -DELETE FROM bug56680 WHERE a=1; -INSERT INTO bug56680 VALUES(1,'X',1); -SELECT b FROM bug56680 LIMIT 3; -b -X -x -x -SELECT b FROM bug56680 LIMIT 2; -b -x -x -CHECK TABLE bug56680; -Table Op Msg_type Msg_text -test.bug56680 check status OK -ROLLBACK; -SELECT b FROM bug56680 LIMIT 2; -b -x -x -CHECK TABLE bug56680; -Table Op Msg_type Msg_text -test.bug56680 check status OK -SELECT b FROM bug56680 LIMIT 2; -b -x -x -CREATE TABLE bug56680_2( -a INT AUTO_INCREMENT PRIMARY KEY, -b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci, -c INT, -INDEX(b)) -ENGINE=InnoDB; -INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680; -BEGIN; -SELECT HEX(b) FROM bug56680_2 LIMIT 2; -HEX(b) -DF -DF -DELETE FROM bug56680_2 WHERE a=1; -INSERT INTO bug56680_2 VALUES(1,'SS',1); -SELECT HEX(b) FROM bug56680_2 LIMIT 3; -HEX(b) -5353 -DF -DF -CHECK TABLE bug56680_2; -Table Op Msg_type Msg_text -test.bug56680_2 check status OK -ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SELECT HEX(b) FROM bug56680_2 LIMIT 2; -HEX(b) -5353 -DF -DELETE FROM bug56680_2 WHERE a=1; -INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1); -SELECT HEX(b) FROM bug56680_2 LIMIT 3; -HEX(b) -DF -DF -DF -CHECK TABLE bug56680_2; -Table Op Msg_type Msg_text -test.bug56680_2 check status OK -DROP TABLE bug56680_2; -DROP TABLE bug56680; diff --git a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result deleted file mode 100644 index 1f6d6948756..00000000000 --- a/mysql-test/suite/innodb/r/innodb_cmp_drop_table.result +++ /dev/null @@ -1,14 +0,0 @@ -set global innodb_file_per_table=on; -set global innodb_file_format=`1`; -create table t1(a text) engine=innodb key_block_size=8; -SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; -page_size -8192 -drop table t1; -SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; -page_size -8192 -create table t2(a text) engine=innodb; -SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; -page_size -drop table t2; diff --git a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb/r/innodb_index_large_prefix.result deleted file mode 100644 index 354508fd9b7..00000000000 --- a/mysql-test/suite/innodb/r/innodb_index_large_prefix.result +++ /dev/null @@ -1,184 +0,0 @@ -set global innodb_file_format="Barracuda"; -set global innodb_file_per_table=1; -set global innodb_large_prefix=1; -create table worklog5743(a TEXT not null, primary key (a(1000))) -ROW_FORMAT=DYNAMIC, engine = innodb; -insert into worklog5743 values(repeat("a", 20000)); -update worklog5743 set a = (repeat("b", 16000)); -create index idx on worklog5743(a(2000)); -begin; -update worklog5743 set a = (repeat("x", 17000)); -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -select a = repeat("x", 17000) from worklog5743; -a = repeat("x", 17000) -0 -select a = repeat("b", 16000) from worklog5743; -a = repeat("b", 16000) -1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -select a = repeat("x", 17000) from worklog5743; -a = repeat("x", 17000) -1 -rollback; -drop table worklog5743; -create table worklog5743(a1 int, a2 TEXT not null) -ROW_FORMAT=DYNAMIC, engine = innodb; -create index idx on worklog5743(a1, a2(2000)); -insert into worklog5743 values(9, repeat("a", 10000)); -begin; -update worklog5743 set a1 = 1000; -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743 ref idx idx 5 const 1 Using where -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -a1 a2 = repeat("a", 10000) -9 1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -a1 a2 = repeat("a", 10000) -rollback; -drop table worklog5743; -create table worklog5743(a1 int, a2 TEXT not null) -ROW_FORMAT=DYNAMIC, engine = innodb; -create index idx on worklog5743(a1, a2(50)); -insert into worklog5743 values(9, repeat("a", 10000)); -begin; -update worklog5743 set a1 = 1000; -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743 ref idx idx 5 const 1 Using where -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -a1 a2 = repeat("a", 10000) -9 1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -a1 a2 = repeat("a", 10000) -rollback; -drop table worklog5743; -create table worklog5743_2(a1 int, a2 TEXT not null) -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -create table worklog5743_4(a1 int, a2 TEXT not null) -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -create index idx1 on worklog5743_2(a1, a2(942)); -ERROR HY000: Too big row -create index idx1 on worklog5743_2(a1, a2(940)); -create index idx1 on worklog5743_4(a1, a2(1966)); -ERROR HY000: Too big row -create index idx1 on worklog5743_4(a1, a2(1964)); -insert into worklog5743_2 values(9, repeat("a", 10000)); -insert into worklog5743_4 values(9, repeat("a", 10000)); -begin; -update worklog5743_2 set a1 = 1000; -update worklog5743_4 set a1 = 1000; -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743_2 ref idx1 idx1 5 const 1 Using where -select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; -a1 a2 = repeat("a", 10000) -9 1 -select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; -a1 a2 = repeat("a", 10000) -9 1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; -a1 a2 = repeat("a", 10000) -select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; -a1 a2 = repeat("a", 10000) -rollback; -drop table worklog5743_2; -drop table worklog5743_4; -create table worklog5743(a1 int, a2 varchar(3000)) -ROW_FORMAT=DYNAMIC, engine = innodb; -create index idx on worklog5743(a1, a2); -insert into worklog5743 values(9, repeat("a", 3000)); -begin; -update worklog5743 set a1 = 1000; -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -explain select a1 from worklog5743 where a1 = 9; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE worklog5743 ref idx idx 5 const 1 Using where; Using index -select a1 from worklog5743 where a1 = 9; -a1 -9 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -select a1 from worklog5743 where a1 = 9; -a1 -rollback; -drop table worklog5743; -create table worklog5743(a TEXT not null, primary key (a(1000))) -engine = innodb; -ERROR HY000: Index column size too large. The maximum column size is 767 bytes. -create table worklog5743(a TEXT) engine = innodb; -create index idx on worklog5743(a(1000)); -ERROR HY000: Index column size too large. The maximum column size is 767 bytes. -create index idx on worklog5743(a(725)); -insert into worklog5743 values(repeat("a", 20000)); -begin; -insert into worklog5743 values(repeat("b", 20000)); -update worklog5743 set a = (repeat("x", 25000)); -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -select a = repeat("a", 20000) from worklog5743; -a = repeat("a", 20000) -1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -select a = repeat("x", 25000) from worklog5743; -a = repeat("x", 25000) -1 -1 -rollback; -drop table worklog5743; -create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC, engine = innodb; -create index idx on worklog5743(a(3073)); -Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes -Warning 1071 Specified key was too long; max key length is 3072 bytes -create index idx2 on worklog5743(a(3072)); -show create table worklog5743; -Table Create Table -worklog5743 CREATE TABLE `worklog5743` ( - `a` text NOT NULL, - KEY `idx` (`a`(3072)), - KEY `idx2` (`a`(3072)) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC -drop table worklog5743; -create table worklog5743(a TEXT not null) engine = innodb; -create index idx on worklog5743(a(768)); -ERROR HY000: Index column size too large. The maximum column size is 767 bytes. -create index idx2 on worklog5743(a(767)); -drop table worklog5743; -SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_per_table=0; -SET GLOBAL innodb_large_prefix=0; diff --git a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result deleted file mode 100644 index 0c68c8a6975..00000000000 --- a/mysql-test/suite/innodb/r/innodb_prefix_index_liftedlimit.result +++ /dev/null @@ -1,1353 +0,0 @@ -set global innodb_file_format="Barracuda"; -set global innodb_file_per_table=1; -set global innodb_large_prefix=1; -DROP TABLE IF EXISTS worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM -INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE -col_1_varchar PRIMARY 3072 BTREE -col_1_varchar prefix_idx 3072 BTREE -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM -INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE -col_1_text PRIMARY 3072 BTREE -col_1_text prefix_idx 3072 BTREE -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; -col_1_text = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT , -PRIMARY KEY (col_1_mediumtext(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000) -FROM worklog5743; -col_1_mediumtext = REPEAT("a", 4000) col_2_mediumtext = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000) -WHERE col_1_mediumtext = REPEAT("a", 4000) -AND col_2_mediumtext = REPEAT("o", 4000); -SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_mediumtext = REPEAT("c", 4000) -AND col_2_mediumtext = REPEAT("o", 4000); -col_1_mediumtext = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000); -SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743; -col_1_mediumtext = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_longtext LONGTEXT , col_2_longtext LONGTEXT , -PRIMARY KEY (col_1_longtext(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000) -FROM worklog5743; -col_1_longtext = REPEAT("a", 4000) col_2_longtext = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000) -WHERE col_1_longtext = REPEAT("a", 4000) -AND col_2_longtext = REPEAT("o", 4000); -SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_longtext = REPEAT("c", 4000) -AND col_2_longtext = REPEAT("o", 4000); -col_1_longtext = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000); -SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743; -col_1_longtext = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072)); -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM -INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE -col_1_blob PRIMARY 3072 BTREE -col_1_blob prefix_idx 3072 BTREE -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743; -col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -col_1_blob = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743; -col_1_blob = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB , -PRIMARY KEY (col_1_mediumblob(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000) -FROM worklog5743; -col_1_mediumblob = REPEAT("a", 4000) col_2_mediumblob = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000) -WHERE col_1_mediumblob = REPEAT("a", 4000) -AND col_2_mediumblob = REPEAT("o", 4000); -SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_mediumblob = REPEAT("c", 4000) -AND col_2_mediumblob = REPEAT("o", 4000); -col_1_mediumblob = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000); -SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743; -col_1_mediumblob = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_longblob LONGBLOB , col_2_longblob LONGBLOB , -PRIMARY KEY (col_1_longblob(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000) -FROM worklog5743; -col_1_longblob = REPEAT("a", 4000) col_2_longblob = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000) -WHERE col_1_longblob = REPEAT("a", 4000) -AND col_2_longblob = REPEAT("o", 4000); -SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_longblob = REPEAT("c", 4000) -AND col_2_longblob = REPEAT("o", 4000); -col_1_longblob = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000); -SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743; -col_1_longblob = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , -PRIMARY KEY (col_1_varbinary(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -col_1_varbinary = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255), -col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255), -col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255), -col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255), -col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) -); -CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250), -col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250), -col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250), -col_11_char(250),col_12_char(250),col_13_char(72) -); -INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) -); -SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743; -col_1_char = REPEAT("a", 255) col_2_char = REPEAT("o", 255) -1 1 -0 0 -UPDATE worklog5743 SET col_1_char = REPEAT("c", 255) -WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255); -SELECT col_1_char = REPEAT("c", 255) FROM worklog5743 -WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255); -col_1_char = REPEAT("c", 255) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255); -SELECT col_1_char = REPEAT("c", 255) FROM worklog5743; -col_1_char = REPEAT("c", 255) -1 -0 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255), -col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255), -col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255), -col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255), -col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) -); -CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250), -col_3_binary (250),col_4_binary (250),col_5_binary (250), -col_6_binary (250),col_7_binary (250),col_8_binary (250), -col_9_binary (250),col_10_binary (250),col_11_binary (250), -col_12_binary (250),col_13_binary (72) -); -INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) -); -SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743; -col_1_binary = REPEAT("a", 255) col_2_binary = REPEAT("o", 255) -1 1 -0 0 -UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255) -WHERE col_1_binary = REPEAT("a", 255) -AND col_2_binary = REPEAT("o", 255); -SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743 -WHERE col_1_binary = REPEAT("c", 255) -AND col_2_binary = REPEAT("o", 255); -col_1_binary = REPEAT("c", 255) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255); -SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743; -col_1_binary = REPEAT("c", 255) -1 -0 -DROP TABLE worklog5743; -CREATE TABLE worklog5743_key2 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743_key2; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key2 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2 -WHERE col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("c", 4000) -1 -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key2; -CREATE TABLE worklog5743_key4 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(1964)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743_key4; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key4 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) -AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key4 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key4; -CREATE TABLE worklog5743_key8 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743_key8; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key8 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key8 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key8; -CREATE TABLE worklog5743_key2 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743_key2; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2; -col_1_text = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key2; -CREATE TABLE worklog5743_key4 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(1964)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743_key4; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4; -col_1_text = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key4; -CREATE TABLE worklog5743_key8 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743_key8; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8; -col_1_text = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key8; -CREATE TABLE worklog5743_key2 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743_key2; -col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -col_1_blob = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2; -col_1_blob = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key2; -CREATE TABLE worklog5743_key4 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(1964)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743_key4; -col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -col_1_blob = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4; -col_1_blob = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key4; -CREATE TABLE worklog5743_key8 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(3072)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743_key8; -col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -col_1_blob = REPEAT("b", 3500) -0 -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8; -col_1_blob = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743_key8; -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , -col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), -col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -col_1_varbinary = REPEAT("c", 4000) -1 -0 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , -col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), -col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072)); -CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072)); -CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); -CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); -CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -ROLLBACK; -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -COMMIT; -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -ROLLBACK; -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -col_1_varbinary = REPEAT("c", 4000) -0 -0 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) CHARACTER SET 'utf8', -col_2_text TEXT (4000) CHARACTER SET 'utf8', -PRIMARY KEY (col_1_text(1024)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; -col_1_text = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8', -col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' , -PRIMARY KEY (col_1_varchar(1024)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , -col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8', -col_3_text TEXT (4000) CHARACTER SET 'utf8', -col_4_blob BLOB (4000),col_5_text TEXT (4000), -col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500)); -CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500)); -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -ROLLBACK; -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -COMMIT; -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -ROLLBACK; -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varchar = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -col_1_varbinary = REPEAT("c", 4000) -0 -0 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) CHARACTER SET 'utf8', -col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(1024)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743; -col_1_text = REPEAT("स", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000) -WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("क", 4000) -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743; -col_1_text = REPEAT("क", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT(4000) , col_2_text TEXT(4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -"In connection 1" -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -"In connection 2" -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -0 1 -"In connection 1" -select @@session.tx_isolation; -@@session.tx_isolation -REPEATABLE-READ -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) -0 1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) -0 1 -1 1 -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -START TRANSACTION; -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -"In connection 2" -COMMIT; -"In connection 1" -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) -0 1 -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -COMMIT; -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT(4000) , col_2_text TEXT(4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -"In connection 1" -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -START TRANSACTION; -"In connection 2" -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -0 1 -COMMIT; -"In connection 1" -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -@@session.tx_isolation -READ-UNCOMMITTED -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) -1 1 -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) -1 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -COMMIT; -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT(4000) , col_2_text TEXT(4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -"In connection 1" -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -1 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -START TRANSACTION; -"In connection 2" -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) -0 1 -ROLLBACK; -"In connection 1" -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) -0 1 -SELECT COUNT(*) FROM worklog5743; -COUNT(*) -1 -COMMIT; -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) -AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) -AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("c", 4000) -1 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -col_1_varchar = REPEAT("c", 4000) -0 -0 -1 -SELECT tbl1.col_1_varchar = tbl2.col_1_varchar -FROM worklog5743 tbl1 , worklog5743 tbl2 -WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ; -tbl1.col_1_varchar = tbl2.col_1_varchar -1 -1 -1 -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; -tbl1.col_1_varchar = REPEAT("c", 4000) -0 -0 -1 -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; -tbl1.col_1_varchar = REPEAT("c", 4000) -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE -col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) -AND col_1_varchar = REPEAT("c", 4000); -tbl1.col_1_varchar = REPEAT("c", 4000) -1 -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar in ( -SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 -WHERE tbl1.col_1_varchar != tbl2.col_1_varchar -) ; -tbl1.col_1_varchar = REPEAT("c", 4000) -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar in ( -SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 -WHERE tbl1.col_1_varchar = tbl2.col_1_varchar -) ; -tbl1.col_1_varchar = REPEAT("c", 4000) -0 -0 -1 -SELECT -REVERSE(col_1_varchar) = REPEAT("c", 4000) , -REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000) -FROM worklog5743; -REVERSE(col_1_varchar) = REPEAT("c", 4000) REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000) -0 0 -0 0 -1 1 -SELECT -UPPER(col_1_varchar) = REPEAT("c", 4000) , -UPPER(col_1_varchar) = REPEAT("C", 4000) , -LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000) -FROM worklog5743; -UPPER(col_1_varchar) = REPEAT("c", 4000) UPPER(col_1_varchar) = REPEAT("C", 4000) LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000) -0 0 0 -0 0 0 -1 1 1 -SELECT -col_1_varchar = REPEAT("c", 4000) -FROM worklog5743 WHERE col_1_varchar like '%c__%'; -col_1_varchar = REPEAT("c", 4000) -1 -SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ; -SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) -kkkkaaaaaa -kkkkbbbbbb -kkkkcccccc -SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ; -CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') -aaaappend -bbbappend -cccappend -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , -col_2_varchar VARCHAR (4000) , -UNIQUE INDEX (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), REPEAT("o", 4000)); -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); -INSERT INTO worklog5743 VALUES(NULL,NULL); -INSERT INTO worklog5743 VALUES(NULL,NULL); -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE -FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE -col_1_varchar col_1_varchar 3072 BTREE -SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL; -col_1_varchar -NULL -NULL -SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000)) -FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1; -col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000)) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -DROP INDEX prefix_idx ON worklog5743; -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("c", 4000) -1 -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) -AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) -AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("c", 4000) -1 -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -DROP INDEX prefix_idx ON worklog5743; -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -col_1_varchar = REPEAT("c", 4000) -1 -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -col_1_varchar = REPEAT("c", 4000) -0 -1 -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) , -PRIMARY KEY (col_1_varchar (3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -" Switching to con1 connection For select " -SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500) -FROM worklog5743; -col_1_varchar = REPEAT("c", 3500) col_2_varchar = REPEAT("o", 3500) -1 1 -" Switching to default connection For DMLs " -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500)); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 -WHERE col_2_varchar = REPEAT("o", 3500); -col_1_varchar = REPEAT("b", 3500) -0 -0 -COMMIT; -" Switching to con1 connection For Dropping index and some DMLs " -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500) -WHERE col_1_varchar = REPEAT("a", 3500) -AND col_2_varchar = REPEAT("o", 3500); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 -WHERE col_2_varchar = REPEAT("o", 3500); -col_1_varchar = REPEAT("b", 3500) -1 -0 -" Switching to default connection For DELETE " -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500); -SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743 -WHERE col_2_varchar = REPEAT("p", 3500); -col_1_varchar = REPEAT("a", 3500) -0 -" Switching to con1 connection to commit changes " -COMMIT; -" Switching to default connection to drop and end sub-test " -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , -PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) -FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -1 -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -DROP INDEX prefix_idx ON worklog5743; -SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("b", 4000) -AND col_2_varbinary = REPEAT("p", 4000); -col_1_varbinary = REPEAT("b", 4000) -1 -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) -1 -0 -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -DROP INDEX prefix_idx ON worklog5743; -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000)); -Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes -Warning 1071 Specified key was too long; max key length is 3072 bytes -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; -col_1_varbinary = REPEAT("a", 4000) -1 -0 -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -col_1_varbinary = REPEAT("c", 4000) -DROP TABLE worklog5743; -CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(500)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -1 -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -DROP INDEX prefix_idx ON worklog5743; -SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000); -col_1_text = REPEAT("b", 4000) -1 -CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -col_1_text = REPEAT("a", 4000) -1 -0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -DROP INDEX prefix_idx ON worklog5743; -CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000)); -Warnings: -Warning 1071 Specified key was too long; max key length is 3072 bytes -Warning 1071 Specified key was too long; max key length is 3072 bytes -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -col_1_text = REPEAT("a", 4000) -1 -0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; -col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) -1 1 -0 0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -1 -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -ALTER TABLE worklog5743 DROP PRIMARY KEY; -SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("b", 4000) -AND col_2_text = REPEAT("p", 4000); -col_1_text = REPEAT("b", 4000) -1 -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -col_1_text = REPEAT("a", 4000) -1 -0 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950)); -ERROR HY000: Too big row -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -col_1_text = REPEAT("a", 4000) -0 -1 -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -col_1_text = REPEAT("c", 4000) -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073)); -ERROR 42000: Specified key was too long; max key length is 3072 bytes -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073)); -ERROR 42000: Specified key was too long; max key length is 3072 bytes -DROP TABLE worklog5743; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), -REPEAT("o", 4000)); -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); -ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000)); -ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' -DROP TABLE worklog5743; -set global innodb_large_prefix=0; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -ERROR 42000: Specified key was too long; max key length is 767 bytes -set global innodb_large_prefix=0; -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(767)) -) engine = innodb; -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000)); -Warnings: -Warning 1071 Specified key was too long; max key length is 767 bytes -Warning 1071 Specified key was too long; max key length is 767 bytes -DROP TABLE worklog5743; -SET GLOBAL innodb_file_format=Antelope; -SET GLOBAL innodb_file_per_table=0; -SET GLOBAL innodb_large_prefix=0; diff --git a/mysql-test/suite/innodb/t/innodb-create-options.test b/mysql-test/suite/innodb/t/innodb-create-options.test deleted file mode 100644 index d6726683e7e..00000000000 --- a/mysql-test/suite/innodb/t/innodb-create-options.test +++ /dev/null @@ -1,573 +0,0 @@ -# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE -# Related bugs; -# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact -# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error -# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED -# Rules for interpreting CREATE_OPTIONS -# 1) Create options on an ALTER are added to the options on the -# previous CREATE or ALTER statements. -# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value. -# If the current ROW_FORMAT has explicitly been set to COMPRESSED, -# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE -# will not be used. -# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT. -# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to -# unset or erase the values persisted in the MySQL dictionary and -# by SHOW CTREATE TABLE. -# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are -# both explicitly given, the ROW_FORMAT is always used in non-strict -# mode. -# 6) InnoDB will automatically convert a table to COMPRESSED only if a -# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT -# or has not been used on a previous CREATE TABLE or ALTER TABLE. -# 7) InnoDB strict mode is designed to prevent incompatible create -# options from being used together. -# 8) The non-strict behavior is intended to permit you to import a -# mysqldump file into a database that does not support compressed -# tables, even if the source database contained compressed tables. -# All invalid values and/or incompatible combinations of ROW_FORMAT -# and KEY_BLOCK_SIZE are automatically corrected -# -# *** innodb_strict_mode=ON *** -# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC -# & REDUNDANT. All others are rejected. -# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected. -# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'. -# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC & -# REDUNDANT. -# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED and -# ROW_FORMAT=DYNAMIC are incompatible with innodb_file_format=Antelope -# and innodb_file_per_table=OFF -# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED -# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified -# as COMPACT, DYNAMIC or REDUNDANT. -# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the -# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified. -# -# *** innodb_strict_mode=OFF *** -# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8. -# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT. -# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid -# ROW_FORMAT is specified. -# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF -# it will ignore ROW_FORMAT=COMPRESSED or DYNAMIC and it will -# ignore all non-zero KEY_BLOCK_SIZEs. -# -# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors" - --- source include/have_innodb.inc -SET storage_engine=InnoDB; - ---disable_query_log -# These values can change during the test -LET $innodb_file_format_orig=`select @@innodb_file_format`; -LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; ---enable_query_log - -SET GLOBAL innodb_file_format=`Barracuda`; -SET GLOBAL innodb_file_per_table=ON; - -# The first half of these tests are with strict mode ON. -SET SESSION innodb_strict_mode = ON; - ---echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 ---echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' -DROP TABLE IF EXISTS t1; ---echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. ---echo # But it is an invalid mode in InnoDB ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - - ---echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE ---echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 KEY_BLOCK_SIZE=2; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 KEY_BLOCK_SIZE=4; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 KEY_BLOCK_SIZE=8; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE ---echo # ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; -SHOW CREATE TABLE t1; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW CREATE TABLE t1; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=COMPACT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. -DROP TABLE IF EXISTS t1; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; -SHOW WARNINGS; - ---echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and ---echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope ---echo # and that they can be set to default values during strict mode. -SET GLOBAL innodb_file_format=Antelope; -DROP TABLE IF EXISTS t1; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 KEY_BLOCK_SIZE=8; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -SET GLOBAL innodb_file_format=Barracuda; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_format=Antelope; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ADD COLUMN f1 INT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SET GLOBAL innodb_file_format=Barracuda; - ---echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and ---echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with ---echo # innodb_file_per_table=OFF and that they can be set to default ---echo # values during strict mode. -SET GLOBAL innodb_file_per_table=OFF; -DROP TABLE IF EXISTS t1; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; ---error ER_CANT_CREATE_TABLE -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 KEY_BLOCK_SIZE=1; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=ON; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; -SET GLOBAL innodb_file_per_table=OFF; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ ---error ER_CANT_CREATE_TABLE -ALTER TABLE t1 ADD COLUMN f1 INT; ---replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ -SHOW WARNINGS; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SET GLOBAL innodb_file_per_table=ON; - ---echo ################################################## -SET SESSION innodb_strict_mode = OFF; - ---echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 ---echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' ---echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. ---echo # It is an invalid mode in InnoDB, use COMPACT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE ---echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ); -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 KEY_BLOCK_SIZE=4; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE ---echo # ALTER with each ROW_FORMAT -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; -SHOW WARNINGS; -SHOW CREATE TABLE t1; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SHOW CREATE TABLE t1; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=REDUNDANT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPRESSED; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -ALTER TABLE t1 ROW_FORMAT=COMPACT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8 -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a ---echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT ---echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Barracuda; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Antelope; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_format=Barracuda; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - ---echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a ---echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF ---echo and then used again when innodb_file_per_table=ON. -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=OFF; -ALTER TABLE t1 ADD COLUMN f1 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; -SET GLOBAL innodb_file_per_table=ON; -ALTER TABLE t1 ADD COLUMN f2 INT; -SHOW WARNINGS; -SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; - - ---echo # Cleanup -DROP TABLE IF EXISTS t1; - ---disable_query_log -EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig; -EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; -EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; ---enable_query_log - diff --git a/mysql-test/suite/innodb/t/innodb-zip.test b/mysql-test/suite/innodb/t/innodb-zip.test deleted file mode 100644 index 39a094d0359..00000000000 --- a/mysql-test/suite/innodb/t/innodb-zip.test +++ /dev/null @@ -1,342 +0,0 @@ --- source include/have_innodb.inc - -let $per_table=`select @@innodb_file_per_table`; -let $format=`select @@innodb_file_format`; -let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; - -set session innodb_strict_mode=0; -set global innodb_file_per_table=off; -set global innodb_file_format=`0`; - -create table t0(a int primary key) engine=innodb row_format=compressed; -create table t00(a int primary key) engine=innodb -key_block_size=4 row_format=compressed; -create table t1(a int primary key) engine=innodb row_format=dynamic; -create table t2(a int primary key) engine=innodb row_format=redundant; -create table t3(a int primary key) engine=innodb row_format=compact; -create table t4(a int primary key) engine=innodb key_block_size=9; -create table t5(a int primary key) engine=innodb -key_block_size=1 row_format=redundant; - -set global innodb_file_per_table=on; -create table t6(a int primary key) engine=innodb -key_block_size=1 row_format=redundant; -set global innodb_file_format=`1`; -create table t7(a int primary key) engine=innodb -key_block_size=1 row_format=redundant; -create table t8(a int primary key) engine=innodb -key_block_size=1 row_format=fixed; -create table t9(a int primary key) engine=innodb -key_block_size=1 row_format=compact; -create table t10(a int primary key) engine=innodb -key_block_size=1 row_format=dynamic; -create table t11(a int primary key) engine=innodb -key_block_size=1 row_format=compressed; -create table t12(a int primary key) engine=innodb -key_block_size=1; -create table t13(a int primary key) engine=innodb -row_format=compressed; -create table t14(a int primary key) engine=innodb key_block_size=9; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; - -drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14; -alter table t1 key_block_size=0; -alter table t1 row_format=dynamic; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -alter table t1 row_format=compact; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -alter table t1 row_format=redundant; -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -drop table t1; - -create table t1(a int not null, b text, index(b(10))) engine=innodb -key_block_size=1; - -create table t2(b text)engine=innodb; -insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000))); - -insert into t1 select 1, b from t2; -commit; - -connect (a,localhost,root,,); -connect (b,localhost,root,,); - -connection a; -begin; -update t1 set b=repeat('B',100); - -connection b; -select a,left(b,40) from t1 natural join t2; - -connection a; -rollback; - -connection b; -select a,left(b,40) from t1 natural join t2; - -connection default; -disconnect a; -disconnect b; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -drop table t1,t2; - -# The following should fail in non-strict mode too. -# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.) -SET SESSION innodb_strict_mode = off; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1( - c TEXT NOT NULL, d TEXT NOT NULL, - PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1( - c TEXT NOT NULL, d TEXT NOT NULL, - PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; -CREATE TABLE t1( - c TEXT NOT NULL, d TEXT NOT NULL, - PRIMARY KEY (c(767),d(767))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; -drop table t1; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) -ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; -INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); -DROP TABLE t1; - -# -# Test blob column inheritance (mantis issue#36) -# - -create table t1( c1 int not null, c2 blob, c3 blob, c4 blob, - primary key(c1, c2(22), c3(22))) - engine = innodb row_format = dynamic; -begin; -insert into t1 values(1, repeat('A', 20000), repeat('B', 20000), - repeat('C', 20000)); - -update t1 set c3 = repeat('D', 20000) where c1 = 1; -commit; - -# one blob column which is unchanged in update and part of PK -# one blob column which is changed and part of of PK -# one blob column which is not part of PK and is unchanged -select count(*) from t1 where c2 = repeat('A', 20000); -select count(*) from t1 where c3 = repeat('D', 20000); -select count(*) from t1 where c4 = repeat('C', 20000); - -update t1 set c3 = repeat('E', 20000) where c1 = 1; -drop table t1; - -# -# -# Test innodb_file_format -# -set global innodb_file_format=`0`; -select @@innodb_file_format; -set global innodb_file_format=`1`; -select @@innodb_file_format; --- error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format=`2`; --- error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format=`-1`; -set global innodb_file_format=`Antelope`; -set global innodb_file_format=`Barracuda`; --- error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format=`Cheetah`; --- error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format=`abc`; --- error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format=`1a`; --- error ER_WRONG_VALUE_FOR_VAR -set global innodb_file_format=``; - -#test strict mode. -# this does not work anymore, has been removed from mysqltest -# -- enable_errors -set global innodb_file_per_table = on; -set global innodb_file_format = `1`; - -set innodb_strict_mode = off; -create table t1 (id int primary key) engine = innodb key_block_size = 0; -drop table t1; - -#set strict_mode -set innodb_strict_mode = on; - -#Test different values of KEY_BLOCK_SIZE - -create table t1 (id int primary key) engine = innodb key_block_size = 0; - ---error ER_CANT_CREATE_TABLE -create table t2 (id int primary key) engine = innodb key_block_size = 9; -show warnings; - - -create table t3 (id int primary key) engine = innodb key_block_size = 1; -create table t4 (id int primary key) engine = innodb key_block_size = 2; -create table t5 (id int primary key) engine = innodb key_block_size = 4; -create table t6 (id int primary key) engine = innodb key_block_size = 8; -create table t7 (id int primary key) engine = innodb key_block_size = 16; - -#check various ROW_FORMAT values. -create table t8 (id int primary key) engine = innodb row_format = compressed; -create table t9 (id int primary key) engine = innodb row_format = dynamic; -create table t10(id int primary key) engine = innodb row_format = compact; -create table t11(id int primary key) engine = innodb row_format = redundant; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; - -#test different values of ROW_FORMAT with KEY_BLOCK_SIZE -create table t1 (id int primary key) engine = innodb -key_block_size = 8 row_format = compressed; - ---error ER_CANT_CREATE_TABLE -create table t2 (id int primary key) engine = innodb -key_block_size = 8 row_format = redundant; -show warnings; - ---error ER_CANT_CREATE_TABLE -create table t3 (id int primary key) engine = innodb -key_block_size = 8 row_format = compact; -show warnings; - ---error ER_CANT_CREATE_TABLE -create table t4 (id int primary key) engine = innodb -key_block_size = 8 row_format = dynamic; -show warnings; - -create table t5 (id int primary key) engine = innodb -key_block_size = 8 row_format = default; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -drop table t1, t5; - -#test multiple errors ---error ER_CANT_CREATE_TABLE -create table t1 (id int primary key) engine = innodb -key_block_size = 9 row_format = redundant; -show warnings; - ---error ER_CANT_CREATE_TABLE -create table t2 (id int primary key) engine = innodb -key_block_size = 9 row_format = compact; -show warnings; - ---error ER_CANT_CREATE_TABLE -create table t2 (id int primary key) engine = innodb -key_block_size = 9 row_format = dynamic; -show warnings; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; - -#test valid values with innodb_file_per_table unset -set global innodb_file_per_table = off; - ---error ER_CANT_CREATE_TABLE -create table t1 (id int primary key) engine = innodb key_block_size = 1; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t2 (id int primary key) engine = innodb key_block_size = 2; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t3 (id int primary key) engine = innodb key_block_size = 4; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t4 (id int primary key) engine = innodb key_block_size = 8; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t5 (id int primary key) engine = innodb key_block_size = 16; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t6 (id int primary key) engine = innodb row_format = compressed; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t7 (id int primary key) engine = innodb row_format = dynamic; -show warnings; -create table t8 (id int primary key) engine = innodb row_format = compact; -create table t9 (id int primary key) engine = innodb row_format = redundant; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -drop table t8, t9; - -#test valid values with innodb_file_format unset -set global innodb_file_per_table = on; -set global innodb_file_format = `0`; - ---error ER_CANT_CREATE_TABLE -create table t1 (id int primary key) engine = innodb key_block_size = 1; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t2 (id int primary key) engine = innodb key_block_size = 2; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t3 (id int primary key) engine = innodb key_block_size = 4; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t4 (id int primary key) engine = innodb key_block_size = 8; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t5 (id int primary key) engine = innodb key_block_size = 16; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t6 (id int primary key) engine = innodb row_format = compressed; -show warnings; ---error ER_CANT_CREATE_TABLE -create table t7 (id int primary key) engine = innodb row_format = dynamic; -show warnings; -create table t8 (id int primary key) engine = innodb row_format = compact; -create table t9 (id int primary key) engine = innodb row_format = redundant; - -SELECT table_schema, table_name, row_format, data_length, index_length -FROM information_schema.tables WHERE engine='innodb'; -drop table t8, t9; - -eval set global innodb_file_per_table=$per_table; -eval set global innodb_file_format=$format; -# -# Testing of tablespace tagging -# --- disable_info -set global innodb_file_per_table=on; -set global innodb_file_format=`Barracuda`; -set global innodb_file_format_max=`Antelope`; -create table normal_table ( - c1 int -) engine = innodb; -select @@innodb_file_format_max; -create table zip_table ( - c1 int -) engine = innodb key_block_size = 8; -select @@innodb_file_format_max; -set global innodb_file_format_max=`Antelope`; -select @@innodb_file_format_max; --- disable_result_log -show table status; --- enable_result_log -select @@innodb_file_format_max; -drop table normal_table, zip_table; --- disable_result_log - -# -# restore environment to the state it was before this test execution -# - --- disable_query_log -eval set global innodb_file_format=$format; -eval set global innodb_file_per_table=$per_table; -eval set session innodb_strict_mode=$innodb_strict_mode_orig; diff --git a/mysql-test/suite/innodb/t/innodb_bug36169.test b/mysql-test/suite/innodb/t/innodb_bug36169.test deleted file mode 100644 index 5bbbf45d484..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug36169.test +++ /dev/null @@ -1,1160 +0,0 @@ -# -# Bug#36169 create innodb compressed table with too large row size crashed -# http://bugs.mysql.com/36169 -# - --- source include/have_innodb.inc - -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=ON; - -# -# The following is copied from http://bugs.mysql.com/36169 -# (http://bugs.mysql.com/file.php?id=9121) -# Probably it can be simplified but that is not obvious. -# - -# we care only that the following SQL commands do produce errors -# as expected and do not crash the server --- disable_query_log --- disable_result_log - -# Generating 10 tables -# Creating a table with 94 columns and 24 indexes -DROP TABLE IF EXISTS `table0`; -set innodb_strict_mode=on; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table0` -(`col0` BOOL, -`col1` BOOL, -`col2` TINYINT, -`col3` DATE, -`col4` TIME, -`col5` SET ('test1','test2','test3'), -`col6` TIME, -`col7` TEXT, -`col8` DECIMAL, -`col9` SET ('test1','test2','test3'), -`col10` FLOAT, -`col11` DOUBLE PRECISION, -`col12` ENUM ('test1','test2','test3'), -`col13` TINYBLOB, -`col14` YEAR, -`col15` SET ('test1','test2','test3'), -`col16` NUMERIC, -`col17` NUMERIC, -`col18` BLOB, -`col19` DATETIME, -`col20` DOUBLE PRECISION, -`col21` DECIMAL, -`col22` DATETIME, -`col23` NUMERIC, -`col24` NUMERIC, -`col25` LONGTEXT, -`col26` TINYBLOB, -`col27` TIME, -`col28` TINYBLOB, -`col29` ENUM ('test1','test2','test3'), -`col30` SMALLINT, -`col31` REAL, -`col32` FLOAT, -`col33` CHAR (175), -`col34` TINYTEXT, -`col35` TINYTEXT, -`col36` TINYBLOB, -`col37` TINYBLOB, -`col38` TINYTEXT, -`col39` MEDIUMBLOB, -`col40` TIMESTAMP, -`col41` DOUBLE, -`col42` SMALLINT, -`col43` LONGBLOB, -`col44` VARCHAR (80), -`col45` MEDIUMTEXT, -`col46` NUMERIC, -`col47` BIGINT, -`col48` DATE, -`col49` TINYBLOB, -`col50` DATE, -`col51` BOOL, -`col52` MEDIUMINT, -`col53` FLOAT, -`col54` TINYBLOB, -`col55` LONGTEXT, -`col56` SMALLINT, -`col57` ENUM ('test1','test2','test3'), -`col58` DATETIME, -`col59` MEDIUMTEXT, -`col60` VARCHAR (232), -`col61` NUMERIC, -`col62` YEAR, -`col63` SMALLINT, -`col64` TIMESTAMP, -`col65` BLOB, -`col66` LONGBLOB, -`col67` INT, -`col68` LONGTEXT, -`col69` ENUM ('test1','test2','test3'), -`col70` INT, -`col71` TIME, -`col72` TIMESTAMP, -`col73` TIMESTAMP, -`col74` VARCHAR (170), -`col75` SET ('test1','test2','test3'), -`col76` TINYBLOB, -`col77` BIGINT, -`col78` NUMERIC, -`col79` DATETIME, -`col80` YEAR, -`col81` NUMERIC, -`col82` LONGBLOB, -`col83` TEXT, -`col84` CHAR (83), -`col85` DECIMAL, -`col86` FLOAT, -`col87` INT, -`col88` VARCHAR (145), -`col89` DATE, -`col90` DECIMAL, -`col91` DECIMAL, -`col92` MEDIUMBLOB, -`col93` TIME, -KEY `idx0` (`col69`,`col90`,`col8`), -KEY `idx1` (`col60`), -KEY `idx2` (`col60`,`col70`,`col74`), -KEY `idx3` (`col22`,`col32`,`col72`,`col30`), -KEY `idx4` (`col29`), -KEY `idx5` (`col19`,`col45`(143)), -KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), -KEY `idx7` (`col48`,`col61`), -KEY `idx8` (`col93`), -KEY `idx9` (`col31`), -KEY `idx10` (`col30`,`col21`), -KEY `idx11` (`col67`), -KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), -KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), -KEY `idx14` (`col78`), -KEY `idx15` (`col63`,`col67`,`col64`), -KEY `idx16` (`col17`,`col86`), -KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), -KEY `idx18` (`col62`), -KEY `idx19` (`col31`,`col57`,`col56`,`col53`), -KEY `idx20` (`col46`), -KEY `idx21` (`col83`(54)), -KEY `idx22` (`col51`,`col7`(120)), -KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 10 columns and 32 indexes -DROP TABLE IF EXISTS `table1`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table1` -(`col0` CHAR (113), -`col1` FLOAT, -`col2` BIGINT, -`col3` DECIMAL, -`col4` BLOB, -`col5` LONGTEXT, -`col6` SET ('test1','test2','test3'), -`col7` BIGINT, -`col8` BIGINT, -`col9` TINYBLOB, -KEY `idx0` (`col5`(101),`col7`,`col8`), -KEY `idx1` (`col8`), -KEY `idx2` (`col4`(177),`col9`(126),`col6`,`col3`), -KEY `idx3` (`col5`(160)), -KEY `idx4` (`col9`(242)), -KEY `idx5` (`col4`(139),`col2`,`col3`), -KEY `idx6` (`col7`), -KEY `idx7` (`col6`,`col2`,`col0`,`col3`), -KEY `idx8` (`col9`(66)), -KEY `idx9` (`col5`(253)), -KEY `idx10` (`col1`,`col7`,`col2`), -KEY `idx11` (`col9`(242),`col0`,`col8`,`col5`(163)), -KEY `idx12` (`col8`), -KEY `idx13` (`col0`,`col9`(37)), -KEY `idx14` (`col0`), -KEY `idx15` (`col5`(111)), -KEY `idx16` (`col8`,`col0`,`col5`(13)), -KEY `idx17` (`col4`(139)), -KEY `idx18` (`col5`(189),`col2`,`col3`,`col9`(136)), -KEY `idx19` (`col0`,`col3`,`col1`,`col8`), -KEY `idx20` (`col8`), -KEY `idx21` (`col0`,`col7`,`col9`(227),`col3`), -KEY `idx22` (`col0`), -KEY `idx23` (`col2`), -KEY `idx24` (`col3`), -KEY `idx25` (`col2`,`col3`), -KEY `idx26` (`col0`), -KEY `idx27` (`col5`(254)), -KEY `idx28` (`col3`), -KEY `idx29` (`col3`), -KEY `idx30` (`col7`,`col3`,`col0`,`col4`(220)), -KEY `idx31` (`col4`(1),`col0`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 141 columns and 18 indexes -DROP TABLE IF EXISTS `table2`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table2` -(`col0` BOOL, -`col1` MEDIUMINT, -`col2` VARCHAR (209), -`col3` MEDIUMBLOB, -`col4` CHAR (13), -`col5` DOUBLE, -`col6` TINYTEXT, -`col7` REAL, -`col8` SMALLINT, -`col9` BLOB, -`col10` TINYINT, -`col11` DECIMAL, -`col12` BLOB, -`col13` DECIMAL, -`col14` LONGBLOB, -`col15` SMALLINT, -`col16` LONGBLOB, -`col17` TINYTEXT, -`col18` FLOAT, -`col19` CHAR (78), -`col20` MEDIUMTEXT, -`col21` SET ('test1','test2','test3'), -`col22` MEDIUMINT, -`col23` INT, -`col24` MEDIUMBLOB, -`col25` ENUM ('test1','test2','test3'), -`col26` TINYBLOB, -`col27` VARCHAR (116), -`col28` TIMESTAMP, -`col29` BLOB, -`col30` SMALLINT, -`col31` DOUBLE PRECISION, -`col32` DECIMAL, -`col33` DECIMAL, -`col34` TEXT, -`col35` MEDIUMINT, -`col36` MEDIUMINT, -`col37` BIGINT, -`col38` VARCHAR (253), -`col39` TINYBLOB, -`col40` MEDIUMBLOB, -`col41` BIGINT, -`col42` DOUBLE, -`col43` TEXT, -`col44` BLOB, -`col45` TIME, -`col46` MEDIUMINT, -`col47` DOUBLE PRECISION, -`col48` SET ('test1','test2','test3'), -`col49` DOUBLE PRECISION, -`col50` VARCHAR (97), -`col51` TEXT, -`col52` NUMERIC, -`col53` ENUM ('test1','test2','test3'), -`col54` MEDIUMTEXT, -`col55` MEDIUMINT, -`col56` DATETIME, -`col57` DATETIME, -`col58` MEDIUMTEXT, -`col59` CHAR (244), -`col60` LONGBLOB, -`col61` MEDIUMBLOB, -`col62` DOUBLE, -`col63` SMALLINT, -`col64` BOOL, -`col65` SMALLINT, -`col66` VARCHAR (212), -`col67` TIME, -`col68` REAL, -`col69` BOOL, -`col70` BIGINT, -`col71` DATE, -`col72` TINYINT, -`col73` ENUM ('test1','test2','test3'), -`col74` DATE, -`col75` TIME, -`col76` DATETIME, -`col77` BOOL, -`col78` TINYTEXT, -`col79` MEDIUMINT, -`col80` NUMERIC, -`col81` LONGTEXT, -`col82` SET ('test1','test2','test3'), -`col83` DOUBLE PRECISION, -`col84` NUMERIC, -`col85` VARCHAR (184), -`col86` DOUBLE PRECISION, -`col87` MEDIUMTEXT, -`col88` MEDIUMBLOB, -`col89` BOOL, -`col90` SMALLINT, -`col91` TINYINT, -`col92` ENUM ('test1','test2','test3'), -`col93` BOOL, -`col94` TIMESTAMP, -`col95` BOOL, -`col96` MEDIUMTEXT, -`col97` DECIMAL, -`col98` BOOL, -`col99` DECIMAL, -`col100` MEDIUMINT, -`col101` DOUBLE PRECISION, -`col102` TINYINT, -`col103` BOOL, -`col104` MEDIUMINT, -`col105` DECIMAL, -`col106` NUMERIC, -`col107` TIMESTAMP, -`col108` MEDIUMBLOB, -`col109` TINYBLOB, -`col110` SET ('test1','test2','test3'), -`col111` YEAR, -`col112` TIMESTAMP, -`col113` CHAR (201), -`col114` BOOL, -`col115` TINYINT, -`col116` DOUBLE, -`col117` TINYINT, -`col118` TIMESTAMP, -`col119` SET ('test1','test2','test3'), -`col120` SMALLINT, -`col121` TINYBLOB, -`col122` TIMESTAMP, -`col123` BLOB, -`col124` DATE, -`col125` SMALLINT, -`col126` ENUM ('test1','test2','test3'), -`col127` MEDIUMBLOB, -`col128` DOUBLE PRECISION, -`col129` REAL, -`col130` VARCHAR (159), -`col131` MEDIUMBLOB, -`col132` BIGINT, -`col133` INT, -`col134` SET ('test1','test2','test3'), -`col135` CHAR (198), -`col136` SET ('test1','test2','test3'), -`col137` MEDIUMTEXT, -`col138` SMALLINT, -`col139` BLOB, -`col140` LONGBLOB, -KEY `idx0` (`col14`(139),`col24`(208),`col38`,`col35`), -KEY `idx1` (`col48`,`col118`,`col29`(131),`col100`), -KEY `idx2` (`col86`,`col67`,`col43`(175)), -KEY `idx3` (`col19`), -KEY `idx4` (`col40`(220),`col67`), -KEY `idx5` (`col99`,`col56`), -KEY `idx6` (`col68`,`col28`,`col137`(157)), -KEY `idx7` (`col51`(160),`col99`,`col45`,`col39`(9)), -KEY `idx8` (`col15`,`col52`,`col90`,`col94`), -KEY `idx9` (`col24`(3),`col139`(248),`col108`(118),`col41`), -KEY `idx10` (`col36`,`col92`,`col114`), -KEY `idx11` (`col115`,`col9`(116)), -KEY `idx12` (`col130`,`col93`,`col134`), -KEY `idx13` (`col123`(65)), -KEY `idx14` (`col44`(90),`col86`,`col119`), -KEY `idx15` (`col69`), -KEY `idx16` (`col132`,`col81`(118),`col18`), -KEY `idx17` (`col24`(250),`col7`,`col92`,`col45`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 199 columns and 1 indexes -DROP TABLE IF EXISTS `table3`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table3` -(`col0` SMALLINT, -`col1` SET ('test1','test2','test3'), -`col2` TINYTEXT, -`col3` DOUBLE, -`col4` NUMERIC, -`col5` DATE, -`col6` BIGINT, -`col7` DOUBLE, -`col8` TEXT, -`col9` INT, -`col10` REAL, -`col11` TINYINT, -`col12` NUMERIC, -`col13` NUMERIC, -`col14` TIME, -`col15` DOUBLE, -`col16` REAL, -`col17` MEDIUMBLOB, -`col18` YEAR, -`col19` TINYTEXT, -`col20` YEAR, -`col21` CHAR (250), -`col22` TINYINT, -`col23` TINYINT, -`col24` SMALLINT, -`col25` DATETIME, -`col26` MEDIUMINT, -`col27` LONGBLOB, -`col28` VARCHAR (106), -`col29` FLOAT, -`col30` MEDIUMTEXT, -`col31` TINYBLOB, -`col32` BIGINT, -`col33` YEAR, -`col34` REAL, -`col35` MEDIUMBLOB, -`col36` LONGTEXT, -`col37` LONGBLOB, -`col38` BIGINT, -`col39` FLOAT, -`col40` TIME, -`col41` DATETIME, -`col42` BOOL, -`col43` BIGINT, -`col44` SMALLINT, -`col45` TIME, -`col46` DOUBLE PRECISION, -`col47` TIME, -`col48` TINYTEXT, -`col49` DOUBLE PRECISION, -`col50` BIGINT, -`col51` NUMERIC, -`col52` TINYBLOB, -`col53` DATE, -`col54` DECIMAL, -`col55` SMALLINT, -`col56` TINYTEXT, -`col57` ENUM ('test1','test2','test3'), -`col58` YEAR, -`col59` TIME, -`col60` TINYINT, -`col61` DECIMAL, -`col62` DOUBLE, -`col63` DATE, -`col64` LONGTEXT, -`col65` DOUBLE, -`col66` VARCHAR (88), -`col67` MEDIUMTEXT, -`col68` DATE, -`col69` MEDIUMINT, -`col70` DECIMAL, -`col71` MEDIUMTEXT, -`col72` LONGTEXT, -`col73` REAL, -`col74` DOUBLE, -`col75` TIME, -`col76` DATE, -`col77` DECIMAL, -`col78` MEDIUMBLOB, -`col79` NUMERIC, -`col80` BIGINT, -`col81` YEAR, -`col82` SMALLINT, -`col83` MEDIUMINT, -`col84` TINYINT, -`col85` MEDIUMBLOB, -`col86` TIME, -`col87` MEDIUMBLOB, -`col88` LONGTEXT, -`col89` BOOL, -`col90` BLOB, -`col91` LONGBLOB, -`col92` YEAR, -`col93` BLOB, -`col94` INT, -`col95` TINYTEXT, -`col96` TINYINT, -`col97` DECIMAL, -`col98` ENUM ('test1','test2','test3'), -`col99` MEDIUMINT, -`col100` TINYINT, -`col101` MEDIUMBLOB, -`col102` TINYINT, -`col103` SET ('test1','test2','test3'), -`col104` TIMESTAMP, -`col105` TEXT, -`col106` DATETIME, -`col107` MEDIUMTEXT, -`col108` CHAR (220), -`col109` TIME, -`col110` VARCHAR (131), -`col111` DECIMAL, -`col112` FLOAT, -`col113` SMALLINT, -`col114` BIGINT, -`col115` LONGBLOB, -`col116` SET ('test1','test2','test3'), -`col117` ENUM ('test1','test2','test3'), -`col118` BLOB, -`col119` MEDIUMTEXT, -`col120` SET ('test1','test2','test3'), -`col121` DATETIME, -`col122` FLOAT, -`col123` VARCHAR (242), -`col124` YEAR, -`col125` MEDIUMBLOB, -`col126` TIME, -`col127` BOOL, -`col128` TINYBLOB, -`col129` DOUBLE, -`col130` TINYINT, -`col131` BIGINT, -`col132` SMALLINT, -`col133` INT, -`col134` DOUBLE PRECISION, -`col135` MEDIUMBLOB, -`col136` SET ('test1','test2','test3'), -`col137` TINYTEXT, -`col138` DOUBLE PRECISION, -`col139` NUMERIC, -`col140` BLOB, -`col141` SET ('test1','test2','test3'), -`col142` INT, -`col143` VARCHAR (26), -`col144` BLOB, -`col145` REAL, -`col146` SET ('test1','test2','test3'), -`col147` LONGBLOB, -`col148` TEXT, -`col149` BLOB, -`col150` CHAR (189), -`col151` LONGTEXT, -`col152` INT, -`col153` FLOAT, -`col154` LONGTEXT, -`col155` DATE, -`col156` LONGBLOB, -`col157` TINYBLOB, -`col158` REAL, -`col159` DATE, -`col160` TIME, -`col161` YEAR, -`col162` DOUBLE, -`col163` VARCHAR (90), -`col164` FLOAT, -`col165` NUMERIC, -`col166` ENUM ('test1','test2','test3'), -`col167` DOUBLE PRECISION, -`col168` DOUBLE PRECISION, -`col169` TINYBLOB, -`col170` TIME, -`col171` SMALLINT, -`col172` TINYTEXT, -`col173` SMALLINT, -`col174` DOUBLE, -`col175` VARCHAR (14), -`col176` VARCHAR (90), -`col177` REAL, -`col178` MEDIUMINT, -`col179` TINYBLOB, -`col180` FLOAT, -`col181` TIMESTAMP, -`col182` REAL, -`col183` DOUBLE PRECISION, -`col184` BIGINT, -`col185` INT, -`col186` MEDIUMTEXT, -`col187` TIME, -`col188` FLOAT, -`col189` TIME, -`col190` INT, -`col191` FLOAT, -`col192` MEDIUMINT, -`col193` TINYINT, -`col194` MEDIUMTEXT, -`col195` DATE, -`col196` TIME, -`col197` YEAR, -`col198` CHAR (206), -KEY `idx0` (`col39`,`col23`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 133 columns and 16 indexes -DROP TABLE IF EXISTS `table4`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table4` -(`col0` VARCHAR (60), -`col1` NUMERIC, -`col2` LONGTEXT, -`col3` MEDIUMTEXT, -`col4` LONGTEXT, -`col5` LONGBLOB, -`col6` LONGBLOB, -`col7` DATETIME, -`col8` TINYTEXT, -`col9` BLOB, -`col10` BOOL, -`col11` BIGINT, -`col12` TEXT, -`col13` VARCHAR (213), -`col14` TINYBLOB, -`col15` BOOL, -`col16` MEDIUMTEXT, -`col17` DOUBLE, -`col18` TEXT, -`col19` BLOB, -`col20` SET ('test1','test2','test3'), -`col21` TINYINT, -`col22` DATETIME, -`col23` TINYINT, -`col24` ENUM ('test1','test2','test3'), -`col25` REAL, -`col26` BOOL, -`col27` FLOAT, -`col28` LONGBLOB, -`col29` DATETIME, -`col30` FLOAT, -`col31` SET ('test1','test2','test3'), -`col32` LONGBLOB, -`col33` NUMERIC, -`col34` YEAR, -`col35` VARCHAR (146), -`col36` BIGINT, -`col37` DATETIME, -`col38` DATE, -`col39` SET ('test1','test2','test3'), -`col40` CHAR (112), -`col41` FLOAT, -`col42` YEAR, -`col43` TIME, -`col44` DOUBLE, -`col45` NUMERIC, -`col46` FLOAT, -`col47` DECIMAL, -`col48` BIGINT, -`col49` DECIMAL, -`col50` YEAR, -`col51` MEDIUMTEXT, -`col52` LONGBLOB, -`col53` SET ('test1','test2','test3'), -`col54` BLOB, -`col55` FLOAT, -`col56` REAL, -`col57` REAL, -`col58` TEXT, -`col59` MEDIUMBLOB, -`col60` INT, -`col61` INT, -`col62` DATE, -`col63` TEXT, -`col64` DATE, -`col65` ENUM ('test1','test2','test3'), -`col66` DOUBLE PRECISION, -`col67` TINYTEXT, -`col68` TINYBLOB, -`col69` FLOAT, -`col70` BLOB, -`col71` DATETIME, -`col72` DOUBLE, -`col73` LONGTEXT, -`col74` TIME, -`col75` DATETIME, -`col76` VARCHAR (122), -`col77` MEDIUMTEXT, -`col78` MEDIUMTEXT, -`col79` BOOL, -`col80` LONGTEXT, -`col81` TINYTEXT, -`col82` NUMERIC, -`col83` DOUBLE PRECISION, -`col84` DATE, -`col85` YEAR, -`col86` BLOB, -`col87` TINYTEXT, -`col88` DOUBLE PRECISION, -`col89` MEDIUMINT, -`col90` MEDIUMTEXT, -`col91` NUMERIC, -`col92` DATETIME, -`col93` NUMERIC, -`col94` SET ('test1','test2','test3'), -`col95` TINYTEXT, -`col96` SET ('test1','test2','test3'), -`col97` YEAR, -`col98` MEDIUMINT, -`col99` TEXT, -`col100` TEXT, -`col101` TIME, -`col102` VARCHAR (225), -`col103` TINYTEXT, -`col104` TEXT, -`col105` MEDIUMTEXT, -`col106` TINYINT, -`col107` TEXT, -`col108` LONGBLOB, -`col109` LONGTEXT, -`col110` TINYTEXT, -`col111` CHAR (56), -`col112` YEAR, -`col113` ENUM ('test1','test2','test3'), -`col114` TINYBLOB, -`col115` DATETIME, -`col116` DATE, -`col117` TIME, -`col118` MEDIUMTEXT, -`col119` DOUBLE PRECISION, -`col120` FLOAT, -`col121` TIMESTAMP, -`col122` MEDIUMINT, -`col123` YEAR, -`col124` DATE, -`col125` TEXT, -`col126` FLOAT, -`col127` TINYTEXT, -`col128` BOOL, -`col129` NUMERIC, -`col130` TIMESTAMP, -`col131` INT, -`col132` MEDIUMBLOB, -KEY `idx0` (`col130`), -KEY `idx1` (`col30`,`col55`,`col19`(31)), -KEY `idx2` (`col104`(186)), -KEY `idx3` (`col131`), -KEY `idx4` (`col64`,`col93`,`col2`(11)), -KEY `idx5` (`col34`,`col121`,`col22`), -KEY `idx6` (`col33`,`col55`,`col83`), -KEY `idx7` (`col17`,`col87`(245),`col99`(17)), -KEY `idx8` (`col65`,`col120`), -KEY `idx9` (`col82`), -KEY `idx10` (`col9`(72)), -KEY `idx11` (`col88`), -KEY `idx12` (`col128`,`col9`(200),`col71`,`col66`), -KEY `idx13` (`col77`(126)), -KEY `idx14` (`col105`(26),`col13`,`col117`), -KEY `idx15` (`col4`(246),`col130`,`col115`,`col3`(141)) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 176 columns and 13 indexes -DROP TABLE IF EXISTS `table5`; ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table5` -(`col0` MEDIUMTEXT, -`col1` VARCHAR (90), -`col2` TINYTEXT, -`col3` TIME, -`col4` BOOL, -`col5` TINYTEXT, -`col6` BOOL, -`col7` TIMESTAMP, -`col8` TINYBLOB, -`col9` TINYINT, -`col10` YEAR, -`col11` SET ('test1','test2','test3'), -`col12` TEXT, -`col13` CHAR (248), -`col14` BIGINT, -`col15` TEXT, -`col16` TINYINT, -`col17` NUMERIC, -`col18` SET ('test1','test2','test3'), -`col19` LONGBLOB, -`col20` FLOAT, -`col21` INT, -`col22` TEXT, -`col23` BOOL, -`col24` DECIMAL, -`col25` DOUBLE PRECISION, -`col26` FLOAT, -`col27` TINYBLOB, -`col28` NUMERIC, -`col29` MEDIUMBLOB, -`col30` DATE, -`col31` LONGTEXT, -`col32` DATE, -`col33` FLOAT, -`col34` BIGINT, -`col35` TINYTEXT, -`col36` MEDIUMTEXT, -`col37` TIME, -`col38` INT, -`col39` TINYINT, -`col40` SET ('test1','test2','test3'), -`col41` CHAR (130), -`col42` SMALLINT, -`col43` INT, -`col44` MEDIUMTEXT, -`col45` VARCHAR (126), -`col46` INT, -`col47` DOUBLE PRECISION, -`col48` BIGINT, -`col49` MEDIUMTEXT, -`col50` TINYBLOB, -`col51` MEDIUMINT, -`col52` TEXT, -`col53` VARCHAR (208), -`col54` VARCHAR (207), -`col55` NUMERIC, -`col56` DATETIME, -`col57` ENUM ('test1','test2','test3'), -`col58` NUMERIC, -`col59` TINYBLOB, -`col60` VARCHAR (73), -`col61` MEDIUMTEXT, -`col62` TINYBLOB, -`col63` DATETIME, -`col64` NUMERIC, -`col65` MEDIUMINT, -`col66` DATETIME, -`col67` NUMERIC, -`col68` TINYINT, -`col69` VARCHAR (58), -`col70` DECIMAL, -`col71` MEDIUMTEXT, -`col72` DATE, -`col73` TIME, -`col74` DOUBLE PRECISION, -`col75` DECIMAL, -`col76` MEDIUMBLOB, -`col77` REAL, -`col78` YEAR, -`col79` YEAR, -`col80` LONGBLOB, -`col81` BLOB, -`col82` BIGINT, -`col83` ENUM ('test1','test2','test3'), -`col84` NUMERIC, -`col85` SET ('test1','test2','test3'), -`col86` MEDIUMTEXT, -`col87` LONGBLOB, -`col88` TIME, -`col89` ENUM ('test1','test2','test3'), -`col90` DECIMAL, -`col91` FLOAT, -`col92` DATETIME, -`col93` TINYTEXT, -`col94` TIMESTAMP, -`col95` TIMESTAMP, -`col96` TEXT, -`col97` REAL, -`col98` VARCHAR (198), -`col99` TIME, -`col100` TINYINT, -`col101` BIGINT, -`col102` LONGBLOB, -`col103` LONGBLOB, -`col104` MEDIUMINT, -`col105` MEDIUMTEXT, -`col106` TIMESTAMP, -`col107` SMALLINT, -`col108` NUMERIC, -`col109` DECIMAL, -`col110` FLOAT, -`col111` DECIMAL, -`col112` REAL, -`col113` TINYTEXT, -`col114` FLOAT, -`col115` VARCHAR (7), -`col116` LONGTEXT, -`col117` DATE, -`col118` BIGINT, -`col119` TEXT, -`col120` BIGINT, -`col121` BLOB, -`col122` CHAR (110), -`col123` NUMERIC, -`col124` MEDIUMBLOB, -`col125` NUMERIC, -`col126` NUMERIC, -`col127` BOOL, -`col128` TIME, -`col129` TINYBLOB, -`col130` TINYBLOB, -`col131` DATE, -`col132` INT, -`col133` VARCHAR (123), -`col134` CHAR (238), -`col135` VARCHAR (225), -`col136` LONGTEXT, -`col137` LONGBLOB, -`col138` REAL, -`col139` TINYBLOB, -`col140` DATETIME, -`col141` TINYTEXT, -`col142` LONGBLOB, -`col143` BIGINT, -`col144` VARCHAR (236), -`col145` TEXT, -`col146` YEAR, -`col147` DECIMAL, -`col148` TEXT, -`col149` MEDIUMBLOB, -`col150` TINYINT, -`col151` BOOL, -`col152` VARCHAR (72), -`col153` INT, -`col154` VARCHAR (165), -`col155` TINYINT, -`col156` MEDIUMTEXT, -`col157` DOUBLE PRECISION, -`col158` TIME, -`col159` MEDIUMBLOB, -`col160` LONGBLOB, -`col161` DATETIME, -`col162` DOUBLE PRECISION, -`col163` BLOB, -`col164` ENUM ('test1','test2','test3'), -`col165` TIMESTAMP, -`col166` DATE, -`col167` TINYBLOB, -`col168` TINYBLOB, -`col169` LONGBLOB, -`col170` DATETIME, -`col171` BIGINT, -`col172` VARCHAR (30), -`col173` LONGTEXT, -`col174` TIME, -`col175` FLOAT, -KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`), -KEY `idx1` (`col24`,`col0`(108)), -KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`), -KEY `idx3` (`col2`(86)), -KEY `idx4` (`col2`(43)), -KEY `idx5` (`col83`,`col35`(87),`col111`), -KEY `idx6` (`col6`,`col134`,`col92`), -KEY `idx7` (`col56`), -KEY `idx8` (`col30`,`col53`,`col129`(66)), -KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)), -KEY `idx10` (`col34`), -KEY `idx11` (`col126`), -KEY `idx12` (`col24`) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -# Creating a table with 179 columns and 46 indexes -DROP TABLE IF EXISTS `table6`; --- error ER_TOO_BIG_ROWSIZE ---error ER_TOO_BIG_ROWSIZE -CREATE TABLE IF NOT EXISTS `table6` -(`col0` ENUM ('test1','test2','test3'), -`col1` MEDIUMBLOB, -`col2` MEDIUMBLOB, -`col3` DATETIME, -`col4` DATE, -`col5` YEAR, -`col6` REAL, -`col7` NUMERIC, -`col8` MEDIUMBLOB, -`col9` TEXT, -`col10` TIMESTAMP, -`col11` DOUBLE, -`col12` DOUBLE, -`col13` SMALLINT, -`col14` TIMESTAMP, -`col15` DECIMAL, -`col16` DATE, -`col17` TEXT, -`col18` LONGBLOB, -`col19` BIGINT, -`col20` FLOAT, -`col21` DATETIME, -`col22` TINYINT, -`col23` MEDIUMBLOB, -`col24` SET ('test1','test2','test3'), -`col25` TIME, -`col26` TEXT, -`col27` LONGTEXT, -`col28` BIGINT, -`col29` REAL, -`col30` YEAR, -`col31` MEDIUMBLOB, -`col32` MEDIUMINT, -`col33` FLOAT, -`col34` TEXT, -`col35` DATE, -`col36` TIMESTAMP, -`col37` REAL, -`col38` BLOB, -`col39` BLOB, -`col40` BLOB, -`col41` TINYBLOB, -`col42` INT, -`col43` TINYINT, -`col44` REAL, -`col45` BIGINT, -`col46` TIMESTAMP, -`col47` BLOB, -`col48` ENUM ('test1','test2','test3'), -`col49` BOOL, -`col50` CHAR (109), -`col51` DOUBLE, -`col52` DOUBLE PRECISION, -`col53` ENUM ('test1','test2','test3'), -`col54` FLOAT, -`col55` DOUBLE PRECISION, -`col56` CHAR (166), -`col57` TEXT, -`col58` TIME, -`col59` DECIMAL, -`col60` TEXT, -`col61` ENUM ('test1','test2','test3'), -`col62` LONGTEXT, -`col63` YEAR, -`col64` DOUBLE, -`col65` CHAR (87), -`col66` DATE, -`col67` BOOL, -`col68` MEDIUMBLOB, -`col69` DATETIME, -`col70` DECIMAL, -`col71` TIME, -`col72` REAL, -`col73` LONGTEXT, -`col74` BLOB, -`col75` REAL, -`col76` INT, -`col77` INT, -`col78` FLOAT, -`col79` DOUBLE, -`col80` MEDIUMINT, -`col81` ENUM ('test1','test2','test3'), -`col82` VARCHAR (221), -`col83` BIGINT, -`col84` TINYINT, -`col85` BIGINT, -`col86` FLOAT, -`col87` MEDIUMBLOB, -`col88` CHAR (126), -`col89` MEDIUMBLOB, -`col90` DATETIME, -`col91` TINYINT, -`col92` DOUBLE, -`col93` NUMERIC, -`col94` DATE, -`col95` BLOB, -`col96` DATETIME, -`col97` TIME, -`col98` LONGBLOB, -`col99` INT, -`col100` SET ('test1','test2','test3'), -`col101` TINYBLOB, -`col102` INT, -`col103` MEDIUMBLOB, -`col104` MEDIUMTEXT, -`col105` FLOAT, -`col106` TINYBLOB, -`col107` VARCHAR (26), -`col108` TINYINT, -`col109` TIME, -`col110` TINYBLOB, -`col111` LONGBLOB, -`col112` TINYTEXT, -`col113` FLOAT, -`col114` TINYINT, -`col115` NUMERIC, -`col116` TIME, -`col117` SET ('test1','test2','test3'), -`col118` DATE, -`col119` SMALLINT, -`col120` BLOB, -`col121` TINYTEXT, -`col122` REAL, -`col123` YEAR, -`col124` REAL, -`col125` BOOL, -`col126` BLOB, -`col127` REAL, -`col128` MEDIUMBLOB, -`col129` TIMESTAMP, -`col130` LONGBLOB, -`col131` MEDIUMBLOB, -`col132` YEAR, -`col133` YEAR, -`col134` INT, -`col135` MEDIUMINT, -`col136` MEDIUMINT, -`col137` TINYTEXT, -`col138` TINYBLOB, -`col139` BLOB, -`col140` SET ('test1','test2','test3'), -`col141` ENUM ('test1','test2','test3'), -`col142` ENUM ('test1','test2','test3'), -`col143` TINYTEXT, -`col144` DATETIME, -`col145` TEXT, -`col146` DOUBLE PRECISION, -`col147` DECIMAL, -`col148` MEDIUMTEXT, -`col149` TINYTEXT, -`col150` SET ('test1','test2','test3'), -`col151` MEDIUMTEXT, -`col152` CHAR (126), -`col153` DOUBLE, -`col154` CHAR (243), -`col155` SET ('test1','test2','test3'), -`col156` SET ('test1','test2','test3'), -`col157` DATETIME, -`col158` DOUBLE, -`col159` NUMERIC, -`col160` DECIMAL, -`col161` FLOAT, -`col162` LONGBLOB, -`col163` LONGTEXT, -`col164` INT, -`col165` TIME, -`col166` CHAR (27), -`col167` VARCHAR (63), -`col168` TEXT, -`col169` TINYBLOB, -`col170` TINYBLOB, -`col171` ENUM ('test1','test2','test3'), -`col172` INT, -`col173` TIME, -`col174` DECIMAL, -`col175` DOUBLE, -`col176` MEDIUMBLOB, -`col177` LONGBLOB, -`col178` CHAR (43), -KEY `idx0` (`col131`(219)), -KEY `idx1` (`col67`,`col122`,`col59`,`col87`(33)), -KEY `idx2` (`col83`,`col42`,`col57`(152)), -KEY `idx3` (`col106`(124)), -KEY `idx4` (`col173`,`col80`,`col165`,`col89`(78)), -KEY `idx5` (`col174`,`col145`(108),`col23`(228),`col141`), -KEY `idx6` (`col157`,`col140`), -KEY `idx7` (`col130`(188),`col15`), -KEY `idx8` (`col52`), -KEY `idx9` (`col144`), -KEY `idx10` (`col155`), -KEY `idx11` (`col62`(230),`col1`(109)), -KEY `idx12` (`col151`(24),`col95`(85)), -KEY `idx13` (`col114`), -KEY `idx14` (`col42`,`col98`(56),`col146`), -KEY `idx15` (`col147`,`col39`(254),`col35`), -KEY `idx16` (`col79`), -KEY `idx17` (`col65`), -KEY `idx18` (`col149`(165),`col168`(119),`col32`,`col117`), -KEY `idx19` (`col64`), -KEY `idx20` (`col93`), -KEY `idx21` (`col64`,`col113`,`col104`(182)), -KEY `idx22` (`col52`,`col111`(189)), -KEY `idx23` (`col45`), -KEY `idx24` (`col154`,`col107`,`col110`(159)), -KEY `idx25` (`col149`(1),`col87`(131)), -KEY `idx26` (`col58`,`col115`,`col63`), -KEY `idx27` (`col95`(9),`col0`,`col87`(113)), -KEY `idx28` (`col92`,`col130`(1)), -KEY `idx29` (`col151`(129),`col137`(254),`col13`), -KEY `idx30` (`col49`), -KEY `idx31` (`col28`), -KEY `idx32` (`col83`,`col146`), -KEY `idx33` (`col155`,`col90`,`col17`(245)), -KEY `idx34` (`col174`,`col169`(44),`col107`), -KEY `idx35` (`col113`), -KEY `idx36` (`col52`), -KEY `idx37` (`col16`,`col120`(190)), -KEY `idx38` (`col28`), -KEY `idx39` (`col131`(165)), -KEY `idx40` (`col135`,`col26`(86)), -KEY `idx41` (`col69`,`col94`), -KEY `idx42` (`col105`,`col151`(38),`col97`), -KEY `idx43` (`col88`), -KEY `idx44` (`col176`(100),`col42`,`col73`(189),`col94`), -KEY `idx45` (`col2`(27),`col27`(116)) -)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -DROP TABLE IF EXISTS table0; -DROP TABLE IF EXISTS table1; -DROP TABLE IF EXISTS table2; -DROP TABLE IF EXISTS table3; -DROP TABLE IF EXISTS table4; -DROP TABLE IF EXISTS table5; -DROP TABLE IF EXISTS table6; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_bug36172.test b/mysql-test/suite/innodb/t/innodb_bug36172.test deleted file mode 100644 index 8a143da752d..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug36172.test +++ /dev/null @@ -1,30 +0,0 @@ -# -# Test case for bug 36172 -# - --- source include/not_embedded.inc --- source include/have_innodb.inc - -SET storage_engine=InnoDB; - -# we do not really care about what gets printed, we are only -# interested in getting success or failure according to our -# expectations - --- disable_query_log --- disable_result_log - -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; - -DROP TABLE IF EXISTS `table0`; -CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; -insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366'; -CHECK TABLE table0 EXTENDED; -INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278'; -CHECK TABLE table0 EXTENDED; -DROP TABLE table0; -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_bug52745.test b/mysql-test/suite/innodb/t/innodb_bug52745.test deleted file mode 100644 index 3c5d79826f0..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug52745.test +++ /dev/null @@ -1,107 +0,0 @@ --- source include/have_innodb.inc - -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; - -CREATE TABLE bug52745 ( - a2 int(10) unsigned DEFAULT NULL, - col37 time DEFAULT NULL, - col38 char(229) CHARACTER SET utf8 DEFAULT NULL, - col39 text, - col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - col41 int(10) unsigned DEFAULT NULL, - col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL, - col43 smallint(5) unsigned zerofill DEFAULT NULL, - col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL, - col45 float unsigned zerofill DEFAULT NULL, - col46 binary(1) DEFAULT NULL, - col47 tinyint(4) DEFAULT NULL, - col48 tinyint(1) DEFAULT NULL, - col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - col50 binary(1) DEFAULT NULL, - col51 double unsigned zerofill DEFAULT NULL, - col52 int(10) unsigned DEFAULT NULL, - col53 time DEFAULT NULL, - col54 double unsigned DEFAULT NULL, - col55 time DEFAULT NULL, - col56 mediumtext CHARACTER SET latin2, - col57 blob, - col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000', - col59 binary(1) DEFAULT NULL, - col60 longblob, - col61 time DEFAULT NULL, - col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci, - col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - col64 int(10) unsigned DEFAULT NULL, - col65 date DEFAULT NULL, - col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - col67 binary(1) DEFAULT NULL, - col68 tinyblob, - col69 date DEFAULT NULL, - col70 tinyint(3) unsigned zerofill DEFAULT NULL, - col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL, - col72 datetime DEFAULT NULL, - col73 smallint(5) unsigned zerofill DEFAULT NULL, - col74 longblob, - col75 bit(34) DEFAULT NULL, - col76 float unsigned zerofill DEFAULT NULL, - col77 year(2) DEFAULT NULL, - col78 tinyint(3) unsigned DEFAULT NULL, - col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL, - col80 datetime DEFAULT NULL, - col81 smallint(6) DEFAULT NULL, - col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL, - col83 bigint(20) unsigned zerofill DEFAULT NULL, - col84 float unsigned zerofill DEFAULT NULL, - col85 double DEFAULT NULL, - col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL, - col87 varbinary(221) DEFAULT NULL, - col88 double unsigned DEFAULT NULL, - col89 float unsigned zerofill DEFAULT NULL, - col90 tinyblob -) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -INSERT INTO bug52745 SET -col40='0000-00-00 00:00:00', -col51=16547, -col53='7711484', -col54=-28604, -col55='7112612', -col56='wakefulness\'', -col57=repeat('absorbefacient\'',106), -col58=11027, -col59='AM09gW7', -col60=repeat('Noelani\'',16), -col61='2520576', -col62='substitutiv', -col63='19950106155112', -col64=-12038, -col65='86238806', -col66='19600719080256', -col68=repeat('Sagittarius\'',54), -col69='38943902', -col70=1232, -col71='Elora\'', -col74=repeat('zipp',11), -col75='0', -col76=23254, -col78=13247, -col79='56219', -col80='20500609035724', -col81=11632, -col82=7, -col84=-23863, -col85=6341, -col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W', -col88=16894, -col89=6161, -col90=repeat('gale',48); - -SHOW WARNINGS; - -DROP TABLE bug52745; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_bug53591.test b/mysql-test/suite/innodb/t/innodb_bug53591.test deleted file mode 100644 index 5c3f2b2bc83..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug53591.test +++ /dev/null @@ -1,20 +0,0 @@ --- source include/have_innodb.inc - -let $file_format=`select @@innodb_file_format`; -let $file_per_table=`select @@innodb_file_per_table`; - -SET GLOBAL innodb_file_format='Barracuda'; -SET GLOBAL innodb_file_per_table=on; - -set old_alter_table=0; - -CREATE TABLE bug53591(a text charset utf8 not null) -ENGINE=InnoDB KEY_BLOCK_SIZE=1; --- error 139 -ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); -SHOW WARNINGS; - -DROP TABLE bug53591; - -EVAL SET GLOBAL innodb_file_format=$file_format; -EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb/t/innodb_bug56680.test b/mysql-test/suite/innodb/t/innodb_bug56680.test deleted file mode 100644 index 936191a9b9f..00000000000 --- a/mysql-test/suite/innodb/t/innodb_bug56680.test +++ /dev/null @@ -1,140 +0,0 @@ -# -# Bug #56680 InnoDB may return wrong results from a case-insensitive index -# --- source include/have_innodb.inc - --- disable_query_log -SET @tx_isolation_orig = @@tx_isolation; -SET @innodb_file_per_table_orig = @@innodb_file_per_table; -SET @innodb_file_format_orig = @@innodb_file_format; -# The flag innodb_change_buffering_debug is only available in debug builds. -# It instructs InnoDB to try to evict pages from the buffer pool when -# change buffering is possible, so that the change buffer will be used -# whenever possible. --- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; --- error 0,ER_UNKNOWN_SYSTEM_VARIABLE -SET GLOBAL innodb_change_buffering_debug = 1; --- enable_query_log -SET GLOBAL tx_isolation='REPEATABLE-READ'; -SET GLOBAL innodb_file_format=Barracuda; -SET GLOBAL innodb_file_per_table=on; - -CREATE TABLE bug56680( - a INT AUTO_INCREMENT PRIMARY KEY, - b CHAR(1), - c INT, - INDEX(b)) -ENGINE=InnoDB; - -INSERT INTO bug56680 VALUES(0,'x',1); -BEGIN; -SELECT b FROM bug56680; - -connect (con1,localhost,root,,); -connection con1; -BEGIN; -UPDATE bug56680 SET b='X'; - -connection default; -# This should return the last committed value 'x', but would return 'X' -# due to a bug in row_search_for_mysql(). -SELECT b FROM bug56680; -# This would always return the last committed value 'x'. -SELECT * FROM bug56680; - -connection con1; -ROLLBACK; -disconnect con1; - -connection default; - -SELECT b FROM bug56680; - -# For the rest of this test, use the READ UNCOMMITTED isolation level -# to see what exists in the secondary index. -SET GLOBAL tx_isolation='READ-UNCOMMITTED'; - -# Create enough rows for the table, so that the insert buffer will be -# used for modifying the secondary index page. There must be multiple -# index pages, because changes to the root page are never buffered. - -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; -INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; - -BEGIN; -SELECT b FROM bug56680 LIMIT 2; - -connect (con1,localhost,root,,); -connection con1; -BEGIN; -DELETE FROM bug56680 WHERE a=1; -# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. -INSERT INTO bug56680 VALUES(1,'X',1); - -# This should force an insert buffer merge, and return 'X' in the first row. -SELECT b FROM bug56680 LIMIT 3; - -connection default; -SELECT b FROM bug56680 LIMIT 2; -CHECK TABLE bug56680; - -connection con1; -ROLLBACK; -SELECT b FROM bug56680 LIMIT 2; -CHECK TABLE bug56680; - -connection default; -disconnect con1; - -SELECT b FROM bug56680 LIMIT 2; - -CREATE TABLE bug56680_2( - a INT AUTO_INCREMENT PRIMARY KEY, - b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci, - c INT, - INDEX(b)) -ENGINE=InnoDB; - -INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680; - -BEGIN; -SELECT HEX(b) FROM bug56680_2 LIMIT 2; -DELETE FROM bug56680_2 WHERE a=1; -# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. -INSERT INTO bug56680_2 VALUES(1,'SS',1); - -# This should force an insert buffer merge, and return 'SS' in the first row. -SELECT HEX(b) FROM bug56680_2 LIMIT 3; -CHECK TABLE bug56680_2; - -# Test this with compressed tables. -ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; - -SELECT HEX(b) FROM bug56680_2 LIMIT 2; -DELETE FROM bug56680_2 WHERE a=1; -# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. -INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1); - -# This should force an insert buffer merge, and return 0xdf in the first row. -SELECT HEX(b) FROM bug56680_2 LIMIT 3; -CHECK TABLE bug56680_2; - -DROP TABLE bug56680_2; -DROP TABLE bug56680; - --- disable_query_log -SET GLOBAL tx_isolation = @tx_isolation_orig; -SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; -SET GLOBAL innodb_file_format = @innodb_file_format_orig; --- error 0, ER_UNKNOWN_SYSTEM_VARIABLE -SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig; diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt b/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt deleted file mode 100644 index a9a3d8c3db8..00000000000 --- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-buffer-pool-size=8M diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test deleted file mode 100644 index 92f4f715241..00000000000 --- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test +++ /dev/null @@ -1,59 +0,0 @@ --- source include/have_innodb.inc - -let $per_table=`select @@innodb_file_per_table`; -let $format=`select @@innodb_file_format`; - --- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0 - -set global innodb_file_per_table=on; -set global innodb_file_format=`1`; - -create table t1(a text) engine=innodb key_block_size=8; - --- disable_query_log - -# insert some rows so we are using compressed pages --- let $i = 10 -while ($i) -{ - insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100)); - dec $i; -} --- enable_query_log - -# we should be using some 8K pages --- eval $query_i_s - -drop table t1; - -# because of lazy eviction at drop table in 5.5 there should be some -# used 8K pages --- eval $query_i_s - -# create a non-compressed table and insert enough into it to evict -# compressed pages -create table t2(a text) engine=innodb; - --- disable_query_log - --- let $i = 400 -while ($i) -{ - insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000)); - dec $i; -} - --- enable_query_log - -# now there should be no 8K pages in the buffer pool --- eval $query_i_s - -drop table t2; - -# -# restore environment to the state it was before this test execution -# - --- disable_query_log -eval set global innodb_file_format=$format; -eval set global innodb_file_per_table=$per_table; diff --git a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb/t/innodb_index_large_prefix.test deleted file mode 100644 index 54fb5651649..00000000000 --- a/mysql-test/suite/innodb/t/innodb_index_large_prefix.test +++ /dev/null @@ -1,269 +0,0 @@ -# Testcase for worklog #5743: Lift the limit of index key prefixes - ---source include/have_innodb.inc - -let $innodb_file_format_orig=`select @@innodb_file_format`; -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -let $innodb_large_prefix_orig=`select @@innodb_large_prefix`; - -set global innodb_file_format="Barracuda"; -set global innodb_file_per_table=1; -set global innodb_large_prefix=1; - -# Create a table of DYNAMIC format, with a primary index of 1000 bytes in -# size -create table worklog5743(a TEXT not null, primary key (a(1000))) -ROW_FORMAT=DYNAMIC, engine = innodb; - -# Do some insertion and update to excercise the external cache -# code path -insert into worklog5743 values(repeat("a", 20000)); - -# default session, update the table -update worklog5743 set a = (repeat("b", 16000)); - -# Create a secondary index -create index idx on worklog5743(a(2000)); - -# Start a few sessions to do selections on table being updated in default -# session, so it would rebuild the previous version from undo log. -# 1) Default session: Initiate an update on the externally stored column -# 2) Session con1: Select from table with repeated read -# 3) Session con2: Select from table with read uncommitted -# 4) Default session: rollback updates - -begin; -update worklog5743 set a = (repeat("x", 17000)); - -# Start a new session to select the column to force it build -# an earlier version of the clustered index through undo log. So it should -# just see the result of repeat("b", 16000) -select @@session.tx_isolation; ---connect (con1,localhost,root,,) -select a = repeat("x", 17000) from worklog5743; -select a = repeat("b", 16000) from worklog5743; - -# Start another session doing "read uncommitted" query, it -# should see the uncommitted update ---connect (con2,localhost,root,,) -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -select a = repeat("x", 17000) from worklog5743; - -# Roll back the transaction ---connection default -rollback; - -drop table worklog5743; - -# Create a table with only a secondary index has large prefix column -create table worklog5743(a1 int, a2 TEXT not null) -ROW_FORMAT=DYNAMIC, engine = innodb; - -create index idx on worklog5743(a1, a2(2000)); - -insert into worklog5743 values(9, repeat("a", 10000)); - -begin; - -update worklog5743 set a1 = 1000; - -# Do a select from another connection that would use the secondary index ---connection con1 -select @@session.tx_isolation; -explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; - -# Do read uncommitted in another session, it would show there is no -# row with a1 = 9 ---connection con2 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; - ---connection default -rollback; - -drop table worklog5743; - -# Create a table with a secondary index has small (50 bytes) prefix column -create table worklog5743(a1 int, a2 TEXT not null) -ROW_FORMAT=DYNAMIC, engine = innodb; - -create index idx on worklog5743(a1, a2(50)); - -insert into worklog5743 values(9, repeat("a", 10000)); - -begin; - -update worklog5743 set a1 = 1000; - -# Do a select from another connection that would use the secondary index ---connection con1 -select @@session.tx_isolation; -explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; - -# Do read uncommitted in another session, it would show there is no -# row with a1 = 9 ---connection con2 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; - ---connection default -rollback; - -drop table worklog5743; - -# Create a table of ROW_FORMAT=COMPRESSED format -create table worklog5743_2(a1 int, a2 TEXT not null) -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; - -create table worklog5743_4(a1 int, a2 TEXT not null) -ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; - -# The maximum overall index record (not prefix) length for this table -# is page_zip_empty_size() / 2, which is 960. "Too big row" error ( -# HA_ERR_TO_BIG_ROW) will be printed if this limit is exceeded. -# Considering other fields and their overhead, the maximum length -# for column a2 is 940 or 941 depending on the zlib version used and -# compressBound() value used in page_zip_empty_size() (please refer -# to Bug #47495 for more detail). --- error 139 -create index idx1 on worklog5743_2(a1, a2(942)); - -create index idx1 on worklog5743_2(a1, a2(940)); - -# similarly, the maximum index record length for the table is -# 1984. Considering other fields and their overhead, the -# maximum length for column a2 is 1964 or 1965 (please refer -# to Bug #47495 for more detail). --- error 139 -create index idx1 on worklog5743_4(a1, a2(1966)); - -create index idx1 on worklog5743_4(a1, a2(1964)); - -insert into worklog5743_2 values(9, repeat("a", 10000)); -insert into worklog5743_4 values(9, repeat("a", 10000)); - -begin; - -update worklog5743_2 set a1 = 1000; -update worklog5743_4 set a1 = 1000; - -# Do a select from another connection that would use the secondary index ---connection con1 -select @@session.tx_isolation; -explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; -select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; -select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; - -# Do read uncommitted in another session, it would show there is no -# row with a1 = 9 ---connection con2 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; -select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; - ---connection default -rollback; - -drop table worklog5743_2; -drop table worklog5743_4; - -# Create a table with varchar column, and create index directly on this -# large column (without prefix) -create table worklog5743(a1 int, a2 varchar(3000)) -ROW_FORMAT=DYNAMIC, engine = innodb; - -# Create an index with large column without prefix -create index idx on worklog5743(a1, a2); - -insert into worklog5743 values(9, repeat("a", 3000)); - -begin; - -update worklog5743 set a1 = 1000; - -# Do a select from another connection that would use the secondary index ---connection con1 -select @@session.tx_isolation; -explain select a1 from worklog5743 where a1 = 9; -select a1 from worklog5743 where a1 = 9; - -# Do read uncommitted, it would show there is no row with a1 = 9 ---connection con2 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -select a1 from worklog5743 where a1 = 9; - ---connection default -rollback; - -drop table worklog5743; - -# Create a table with old format, and the limit is 768 bytes. --- error ER_INDEX_COLUMN_TOO_LONG -create table worklog5743(a TEXT not null, primary key (a(1000))) -engine = innodb; - -create table worklog5743(a TEXT) engine = innodb; - -# Excercise the column length check in ha_innobase::add_index() --- error ER_INDEX_COLUMN_TOO_LONG -create index idx on worklog5743(a(1000)); - -# This should be successful -create index idx on worklog5743(a(725)); - -# Perform some DMLs -insert into worklog5743 values(repeat("a", 20000)); - -begin; -insert into worklog5743 values(repeat("b", 20000)); -update worklog5743 set a = (repeat("x", 25000)); - -# Start a new session to select the table to force it build -# an earlier version of the cluster index through undo log -select @@session.tx_isolation; ---connection con1 -select a = repeat("a", 20000) from worklog5743; - ---connection con2 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -select a = repeat("x", 25000) from worklog5743; - ---connection default -rollback; - -drop table worklog5743; - -# Some border line test on the column length. -# We have a limit of 3072 bytes for Barracuda table -create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC, engine = innodb; - -# Length exceeds maximum supported key length, will auto-truncated to 3072 -create index idx on worklog5743(a(3073)); - -create index idx2 on worklog5743(a(3072)); - -show create table worklog5743; - -drop table worklog5743; - -# We have a limit of 767 bytes for Antelope table -create table worklog5743(a TEXT not null) engine = innodb; - --- error ER_INDEX_COLUMN_TOO_LONG -create index idx on worklog5743(a(768)); - -create index idx2 on worklog5743(a(767)); - -drop table worklog5743; - -eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; -eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; -eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig; diff --git a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test deleted file mode 100644 index 6019a2fcaaa..00000000000 --- a/mysql-test/suite/innodb/t/innodb_prefix_index_liftedlimit.test +++ /dev/null @@ -1,1338 +0,0 @@ -######## suite/innodb/t/innodb_prefix_index_liftedlimit.test ########## -# # -# Testcase for worklog WL#5743: Lift the limit of index key prefixes # -# Accorrding to WL#5743 - prefix index limit is increased from 767 # -# to 3072 for innodb. This change is applicable with Barracuda file # -# format. # -# All sub-test in this file focus on prefix index along with other # -# operations # -# # -# # -# Creation: # -# 2011-05-19 Implemented this test as part of WL#5743 # -# # -###################################################################### - - ---source include/have_innodb.inc -# Save innodb variables -let $innodb_file_format_orig=`select @@innodb_file_format`; -let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; -let $innodb_large_prefix_orig=`select @@innodb_large_prefix`; - -# Set Innodb file format as feature works for Barracuda file format -set global innodb_file_format="Barracuda"; -set global innodb_file_per_table=1; -set global innodb_large_prefix=1; - --- disable_warnings -DROP TABLE IF EXISTS worklog5743; --- enable_warnings -#------------------------------------------------------------------------------ -# Prefix index with VARCHAR data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -# check IS -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM -INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with TEXT data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); -# check IS -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM -INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with MEDIUMTEXT data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT , -PRIMARY KEY (col_1_mediumtext(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000) -WHERE col_1_mediumtext = REPEAT("a", 4000) -AND col_2_mediumtext = REPEAT("o", 4000); -SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_mediumtext = REPEAT("c", 4000) -AND col_2_mediumtext = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000); -SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with LONGTEXT data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_longtext LONGTEXT , col_2_longtext LONGTEXT , -PRIMARY KEY (col_1_longtext(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000) -WHERE col_1_longtext = REPEAT("a", 4000) -AND col_2_longtext = REPEAT("o", 4000); -SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_longtext = REPEAT("c", 4000) -AND col_2_longtext = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000); -SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with BLOB data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072)); -# check IS -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM -INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with MEDIUMBLOB data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB , -PRIMARY KEY (col_1_mediumblob(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000) -WHERE col_1_mediumblob = REPEAT("a", 4000) -AND col_2_mediumblob = REPEAT("o", 4000); -SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_mediumblob = REPEAT("c", 4000) -AND col_2_mediumblob = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000); -SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with LONGBLOB data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_longblob LONGBLOB , col_2_longblob LONGBLOB , -PRIMARY KEY (col_1_longblob(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000) -WHERE col_1_longblob = REPEAT("a", 4000) -AND col_2_longblob = REPEAT("o", 4000); -SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_longblob = REPEAT("c", 4000) -AND col_2_longblob = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000); -SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with VARBINARY data type , primary/secondary index and DML ops -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , -PRIMARY KEY (col_1_varbinary(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with CHAR data type , composite index and DML ops -CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255), -col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255), -col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255), -col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255), -col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) -); -# Create index with total prefix index length = 3072 -CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250), -col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250), -col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250), -col_11_char(250),col_12_char(250),col_13_char(72) -); -INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) -); -SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743; -UPDATE worklog5743 SET col_1_char = REPEAT("c", 255) -WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255); -SELECT col_1_char = REPEAT("c", 255) FROM worklog5743 -WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255); -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255); -SELECT col_1_char = REPEAT("c", 255) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with BINARY data type , composite index and DML ops -CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255), -col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255), -col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255), -col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255), -col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) -); -# Create index with total prefix index length = 3072 -CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250), -col_3_binary (250),col_4_binary (250),col_5_binary (250), -col_6_binary (250),col_7_binary (250),col_8_binary (250), -col_9_binary (250),col_10_binary (250),col_11_binary (250), -col_12_binary (250),col_13_binary (72) -); -INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) -); -SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743; -UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255) -WHERE col_1_binary = REPEAT("a", 255) -AND col_2_binary = REPEAT("o", 255); -SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743 -WHERE col_1_binary = REPEAT("c", 255) -AND col_2_binary = REPEAT("o", 255); -INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), -REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255); -SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with VARCHAR data type , primary/seconday index , DML ops -# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8. - -# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following -CREATE TABLE worklog5743_key2 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_varchar (767)); -INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743_key2; -UPDATE worklog5743_key2 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2 -WHERE col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2; -DROP TABLE worklog5743_key2; - -# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following -CREATE TABLE worklog5743_key4 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(1964)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_varchar (767)); -INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743_key4; -UPDATE worklog5743_key4 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) -AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key4 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4; -DROP TABLE worklog5743_key4; - -# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following -CREATE TABLE worklog5743_key8 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_varchar (767)); -INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743_key8; -UPDATE worklog5743_key8 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key8 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8; -DROP TABLE worklog5743_key8; - -# Prefix index with TEXT data type , primary/seconday index , DML ops -# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8. - -# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following -CREATE TABLE worklog5743_key2 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_text (767)); -INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743_key2; -UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2; -DROP TABLE worklog5743_key2; - -# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following -CREATE TABLE worklog5743_key4 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(1964)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_text (767)); -INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743_key4; -UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4; -DROP TABLE worklog5743_key4; - -# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following -CREATE TABLE worklog5743_key8 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_text (767)); -INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743_key8; -UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8; -DROP TABLE worklog5743_key8; - -# Prefix index with BLOB data type , primary/seconday index , DML ops -# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8. - -# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following -CREATE TABLE worklog5743_key2 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_blob (767)); -INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743_key2; -UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2; -DROP TABLE worklog5743_key2; - -# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following -CREATE TABLE worklog5743_key4 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(1964)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_blob (767)); -INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743_key4; -UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4; -DROP TABLE worklog5743_key4; - -# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following -CREATE TABLE worklog5743_key8 ( -col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , -PRIMARY KEY (col_1_blob(3072)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_blob (767)); -INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) -FROM worklog5743_key8; -UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000) -WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); -SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8 -WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); -INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000); -SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8; -DROP TABLE worklog5743_key8; - - -#------------------------------------------------------------------------------ -# Create mutiple prefix index. We can not create prefix index length > 16K -# as index is written in undo log page which of 16K size. -# So we can create max 5 prefix index of length 3072 on table -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , -col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), -col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); - -# Update hangs if we create following 5 indexes. Uncomment them once its fix -# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE -#CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072)); -#CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072)); -#CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); -#CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); -#CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); - -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Create mutiple prefix index. We can not create prefix index length > 16K as -# we write in undo log page which of 16K size. -# so we can create max 5 prefix index of length 3072 on table. -# Similar to above case but with transactions -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , -col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), -col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; - - -# Update hangs if we create following 5 indexes. Uncomment them once its fix -CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072)); -CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072)); -CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); -CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); -CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); - -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -ROLLBACK; -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -COMMIT; -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; - -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -ROLLBACK; -# Uncomment Update fater Bug#12547647 is fixed - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE -# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE -#UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -#WHERE col_1_varbinary = REPEAT("a", 4000) -#AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with utf8 charset -# utf8 charcter takes 3 bytes in mysql so prefix index limit is 3072/3 = 1024 -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) CHARACTER SET 'utf8', -col_2_text TEXT (4000) CHARACTER SET 'utf8', -PRIMARY KEY (col_1_text(1024)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -# Prefix index with utf8 charset + varchar. -# For varchar we also log the column itself as oppose of TEXT so it error -# with limit 1024 due to overhead. ---replace_regex /> [0-9]*/> max_row_size/ --- error 1118 -CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8', -col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' , -PRIMARY KEY (col_1_varchar(1024)) -) ROW_FORMAT=DYNAMIC, engine = innodb; - -#------------------------------------------------------------------------------ -# prefinx index on utf8 charset with transaction -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , -col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8', -col_3_text TEXT (4000) CHARACTER SET 'utf8', -col_4_blob BLOB (4000),col_5_text TEXT (4000), -col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) -) ROW_FORMAT=DYNAMIC, engine = innodb; - - -CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500)); -CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500)); - -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -ROLLBACK; -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -COMMIT; -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; - -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -ROLLBACK; -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), -REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), -REPEAT("a", 4000) , REPEAT("a", 255) -); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with utf8 charset on TEXT data type with actual utf8 character -# like "स" and "क" -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) CHARACTER SET 'utf8', -col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(1024)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000) -WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); -SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with transaction when 2 client are ruuning there transaction -# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and -# READ UNCOMMITTED. -CREATE TABLE worklog5743 ( -col_1_text TEXT(4000) , col_2_text TEXT(4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; - ---echo "In connection 1" ---connect (con1,localhost,root,,) -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; - - ---echo "In connection 2" ---connect (con2,localhost,root,,) -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); -# Uncomment after Bug#12552164 - TRANSACTION CAN NOT SEE OLD VERSION ROWS THAT -# BEING UPDATED -#UPDATE worklog5743 SET col_1_varchar = REPEAT("d", 200) WHERE col_1_varchar = -#REPEAT("a", 200) AND col_2_varchar = REPEAT("o", 200); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; - - ---echo "In connection 1" ---connection con1 -select @@session.tx_isolation; -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; - -START TRANSACTION; - -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; - ---echo "In connection 2" ---connection con2 -COMMIT; -# Wait for commit -let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist -WHERE info='COMMIT'; ---source include/wait_condition.inc - ---echo "In connection 1" ---connection con1 -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; -COMMIT; - ---connection default -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Prefix index with transaction when 2 client are ruuning there transaction -# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and -# READ UNCOMMITTED. Same as above case but con2 starts tnx before con1 - -CREATE TABLE worklog5743 ( -col_1_text TEXT(4000) , col_2_text TEXT(4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; - ---echo "In connection 1" ---connection con1 -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; -START TRANSACTION; - - ---echo "In connection 2" ---connection con2 -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -COMMIT; -# Wait for commit -let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist -WHERE info='COMMIT'; ---source include/wait_condition.inc - - ---echo "In connection 1" ---connection con1 -SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; -select @@session.tx_isolation; -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; - -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; -COMMIT; - ---connection default -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ - -# Prefix index with transaction when 2 client are ruuning there transaction -# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and -# READ UNCOMMITTED. Same as above cases but with ROLLBACK - -CREATE TABLE worklog5743 ( -col_1_text TEXT(4000) , col_2_text TEXT(4000) , -PRIMARY KEY (col_1_text(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; - ---echo "In connection 1" ---connection con1 -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; -START TRANSACTION; - - ---echo "In connection 2" ---connection con2 -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); -SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -ROLLBACK; -# Wait for rollback -let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist -WHERE info='COMMIT'; ---source include/wait_condition.inc - - ---echo "In connection 1" ---connection con1 -SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM -worklog5743; -SELECT COUNT(*) FROM worklog5743; -COMMIT; - ---disconnect con1 ---disconnect con2 - ---connection default -DROP TABLE worklog5743; - - -#------------------------------------------------------------------------------ -# Select queries on prefix index column as index will be used in queries. -# Use few select functions , join condition , subqueries. - -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) -AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) -AND col_2_varchar = REPEAT("o", 4000); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; - -# Select with Join -SELECT tbl1.col_1_varchar = tbl2.col_1_varchar -FROM worklog5743 tbl1 , worklog5743 tbl2 -WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ; - -# Select in subquey -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE -col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) -AND col_1_varchar = REPEAT("c", 4000); -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar in ( -SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 -WHERE tbl1.col_1_varchar != tbl2.col_1_varchar -) ; -SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 -WHERE col_1_varchar in ( -SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 -WHERE tbl1.col_1_varchar = tbl2.col_1_varchar -) ; - -# function -SELECT -REVERSE(col_1_varchar) = REPEAT("c", 4000) , -REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000) -FROM worklog5743; -SELECT -UPPER(col_1_varchar) = REPEAT("c", 4000) , -UPPER(col_1_varchar) = REPEAT("C", 4000) , -LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000) -FROM worklog5743; -SELECT -col_1_varchar = REPEAT("c", 4000) -FROM worklog5743 WHERE col_1_varchar like '%c__%'; -SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ; -SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ; - - -DROP TABLE worklog5743; - -#------------------------------------------------------------------------------ -# Prefix index with NULL values -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , -col_2_varchar VARCHAR (4000) , -UNIQUE INDEX (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), REPEAT("o", 4000)); -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); -INSERT INTO worklog5743 VALUES(NULL,NULL); -INSERT INTO worklog5743 VALUES(NULL,NULL); -# check IS -SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE -FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; -SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL; -SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000)) -FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1; - - -DROP TABLE worklog5743; - -# ----------------------------------------------------------------------------- -# Try drop and add secondary prefix index -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -# Create index -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -# Drop index -DROP INDEX prefix_idx ON worklog5743; - -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -# Again add index -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - -# ----------------------------------------------------------------------------- - -# Try drop and add primary prefix index -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -# Create index -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -# Drop index -ALTER TABLE worklog5743 DROP PRIMARY KEY; - -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) -AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) -AND col_2_varchar = REPEAT("o", 4000); -# Again add index -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); - -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); ---error 1062 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -# ----------------------------------------------------------------------------- - -# Try drop and add both (primary/secondary) prefix index -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -# Create index -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -# Drop primary index -ALTER TABLE worklog5743 DROP PRIMARY KEY; -# Drop secondary index -DROP INDEX prefix_idx ON worklog5743; - -SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) -WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); -# Again add index -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); - -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); ---error 1062 -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); -SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; -DROP TABLE worklog5743; - - -# ----------------------------------------------------------------------------- -# Drop index from differnt session -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) , -PRIMARY KEY (col_1_varchar (3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500)); -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); - -# Start new session ---connect (con1,localhost,root,,) - - ---echo " Switching to con1 connection For select " ---connection con1 -SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500) -FROM worklog5743; - ---echo " Switching to default connection For DMLs " ---connection default -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500)); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 -WHERE col_2_varchar = REPEAT("o", 3500); -COMMIT; - ---echo " Switching to con1 connection For Dropping index and some DMLs " ---connection con1 -START TRANSACTION; -INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500)); -# Drop primary index -ALTER TABLE worklog5743 DROP PRIMARY KEY; -UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500) -WHERE col_1_varchar = REPEAT("a", 3500) -AND col_2_varchar = REPEAT("o", 3500); -SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 -WHERE col_2_varchar = REPEAT("o", 3500); - ---echo " Switching to default connection For DELETE " ---connection default -DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500); -SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743 -WHERE col_2_varchar = REPEAT("p", 3500); - ---echo " Switching to con1 connection to commit changes " ---connection con1 -COMMIT; - ---echo " Switching to default connection to drop and end sub-test " ---connection default -DROP TABLE worklog5743; - - - -# ----------------------------------------------------------------------------- -# Create prefix index with length < 3072 , length = 3072 , length > 3072 -# - varbinary data type + secondary index -CREATE TABLE worklog5743 ( -col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , -PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -# Create index of 3072 -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -# Drop index -DROP INDEX prefix_idx ON worklog5743; -SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("b", 4000) -AND col_2_varbinary = REPEAT("p", 4000); - - -# Again add index length < 3072 -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -# Drop index -DROP INDEX prefix_idx ON worklog5743; - -# Again add index length > 3072. -# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072 -# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does -# not support prefix > 767, the create index will be rejected. -CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) -WHERE col_1_varbinary = REPEAT("a", 4000) -AND col_2_varbinary = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); -SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_varbinary = REPEAT("c", 4000) -AND col_2_varbinary = REPEAT("o", 4000); - - -DROP TABLE worklog5743; - -# ----------------------------------------------------------------------------- -# Create prefix index with length < 3072 , length = 3072 , length > 3072 -# text data type + secondary index -CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(500)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -# Create index of 3072 -CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) -FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -# Drop index -DROP INDEX prefix_idx ON worklog5743; -SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000); - -# Again add index length < 3072 -CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); -# Drop index -DROP INDEX prefix_idx ON worklog5743; - -# Again add index length > 3072. Expect error.Length exceeds maximum supported -# key length -# Again add index length > 3072. -# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072 -# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does -# not support prefix > 767, the create index will be rejected. -CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); - -DROP TABLE worklog5743; - - -# ----------------------------------------------------------------------------- -# Create prefix index with length < 948 , length = 948 , length > 948 -# For compressed row type + primary key -CREATE TABLE worklog5743 ( -col_1_text TEXT (4000) , col_2_text TEXT (4000) , -PRIMARY KEY (col_1_text(948)) -) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); -# Create index of 767 -INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); -SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -# Drop index -#DROP INDEX prefix_idx ON worklog5743; -ALTER TABLE worklog5743 DROP PRIMARY KEY; -SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("b", 4000) -AND col_2_text = REPEAT("p", 4000); - -# Again add index length < 767 -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); -# Drop index -ALTER TABLE worklog5743 DROP PRIMARY KEY; - -# Again add index length > 948. Expect error 'to big row ' due to exceed -# in key length. --- error 139 -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950)); -INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); -SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; -UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) -WHERE col_1_text = REPEAT("a", 4000) -AND col_2_text = REPEAT("o", 4000); -DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); -SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 -WHERE col_1_text = REPEAT("c", 4000) -AND col_2_text = REPEAT("o", 4000); - -DROP TABLE worklog5743; - -# ----------------------------------------------------------------------------- -# Create prefix index with length < 3072 , length = 3072 , length > 3072 -# data types VARCHAR -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -# Again add index length > 3072. Expect error.Length exceeds maximum supported -# key length -# Again add index length > 3072. -# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072 -# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does -# not support prefix > 767, the create index will be rejected. -# Index length is truncated only for 'create index' , but error if we add -# prefix index with length > 3072 ---error ER_TOO_LONG_KEY -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073)); -DROP TABLE worklog5743; - - -CREATE TABLE worklog5743 ( -col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; -ALTER TABLE worklog5743 DROP PRIMARY KEY; -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500)); -ALTER TABLE worklog5743 DROP PRIMARY KEY; -# Negative case -# Again add index length > 3072. Expect error.Length exceeds maximum supported -# key length -# Index length is truncated only for 'create index' , but error if we add -# prefix index with length > 3072 ---error ER_TOO_LONG_KEY -ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073)); - -DROP TABLE worklog5743; - -# ----------------------------------------------------------------------------- -# Error on adding larger prefix if violates unique index. -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) -) ROW_FORMAT=DYNAMIC, engine = innodb; -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), -REPEAT("o", 4000)); -INSERT INTO worklog5743 -VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); ---error 1062 -ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000)); -DROP TABLE worklog5743; - -# ----------------------------------------------------------------------------- -set global innodb_large_prefix=0; -# Prefix index > 767 is allowed if innodb_large_prefix is set to 1 ---error ER_TOO_LONG_KEY -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(3072)) -) ROW_FORMAT=DYNAMIC, engine = innodb; - - -# ----------------------------------------------------------------------------- -set global innodb_large_prefix=0; -# Backward compatibility test - Index lenghth > 767 is truncated for REDUNDANT -# and COMPACT -CREATE TABLE worklog5743 ( -col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , -PRIMARY KEY (col_1_varchar(767)) -) engine = innodb; -# Prefix index > 767 is truncated with REDUNDANT and COMPACT -CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000)); -DROP TABLE worklog5743; -#------------------------------------------------------------------------------ - -eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; -eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; -eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig; diff --git a/mysql-test/suite/innodb_zip/r/innodb-create-options.result b/mysql-test/suite/innodb_zip/r/innodb-create-options.result new file mode 100644 index 00000000000..aec9d731ce6 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb-create-options.result @@ -0,0 +1,854 @@ +SET storage_engine=InnoDB; +SET GLOBAL innodb_file_format=`Barracuda`; +SET GLOBAL innodb_file_per_table=ON; +SET SESSION innodb_strict_mode = ON; +# Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +# 'FIXED' is sent to InnoDB since it is used by MyISAM. +# But it is an invalid mode in InnoDB +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid ROW_FORMAT specifier. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid ROW_FORMAT specifier. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +# Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +# KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +# Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid ROW_FORMAT specifier. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +# Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED +ALTER TABLE t1 KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=1 +# Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE +# ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=COMPACT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +# Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Error 1005 Can't create table 'test.t1' (errno: 1478) +# Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +# and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope +# and that they can be set to default values during strict mode. +SET GLOBAL innodb_file_format=Antelope; +DROP TABLE IF EXISTS t1; +Warnings: +Note 1051 Unknown table 't1' +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +SET GLOBAL innodb_file_format=Barracuda; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SET GLOBAL innodb_file_format=Barracuda; +# Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +# and a valid non-zero KEY_BLOCK_SIZE are rejected with +# innodb_file_per_table=OFF and that they can be set to default +# values during strict mode. +SET GLOBAL innodb_file_per_table=OFF; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 KEY_BLOCK_SIZE=1; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +SET GLOBAL innodb_file_per_table=ON; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +ERROR HY000: Can't create table '#sql-temporary' (errno: 1478) +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table '#sql-temporary' (errno: 1478) +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SET GLOBAL innodb_file_per_table=ON; +################################################## +SET SESSION innodb_strict_mode = OFF; +# Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +# KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +# 'FIXED' is sent to InnoDB since it is used by MyISAM. +# It is an invalid mode in InnoDB, use COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +Warnings: +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=FIXED +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +Warnings: +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=FIXED +# Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +# KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +# Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=FIXED KEY_BLOCK_SIZE=1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=8 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +# Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=2 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=4 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed KEY_BLOCK_SIZE=8 +# Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE +# ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +Level Code Message +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `i` int(11) DEFAULT NULL, + `f1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPACT; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Redundant row_format=REDUNDANT KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=16 unless ROW_FORMAT=COMPRESSED. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=16 +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPACT +# Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=15. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact KEY_BLOCK_SIZE=15 +# Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT +is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=1 +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=1 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=DYNAMIC +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +# Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF +and then used again when innodb_file_per_table=ON. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=2. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=COMPRESSED KEY_BLOCK_SIZE=2 +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compressed row_format=COMPRESSED KEY_BLOCK_SIZE=2 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SHOW WARNINGS; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Compact row_format=DYNAMIC +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +Level Code Message +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +TABLE_NAME ROW_FORMAT CREATE_OPTIONS +t1 Dynamic row_format=DYNAMIC +# Cleanup +DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/innodb_zip/r/innodb-zip.result b/mysql-test/suite/innodb_zip/r/innodb-zip.result new file mode 100644 index 00000000000..db7fd6d812c --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb-zip.result @@ -0,0 +1,410 @@ +set session innodb_strict_mode=0; +set global innodb_file_per_table=off; +set global innodb_file_format=`0`; +create table t0(a int primary key) engine=innodb row_format=compressed; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +create table t00(a int primary key) engine=innodb +key_block_size=4 row_format=compressed; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=4. +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +create table t1(a int primary key) engine=innodb row_format=dynamic; +Warnings: +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +create table t2(a int primary key) engine=innodb row_format=redundant; +create table t3(a int primary key) engine=innodb row_format=compact; +create table t4(a int primary key) engine=innodb key_block_size=9; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9. +create table t5(a int primary key) engine=innodb +key_block_size=1 row_format=redundant; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. +set global innodb_file_per_table=on; +create table t6(a int primary key) engine=innodb +key_block_size=1 row_format=redundant; +Warnings: +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1. +set global innodb_file_format=`1`; +create table t7(a int primary key) engine=innodb +key_block_size=1 row_format=redundant; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +create table t8(a int primary key) engine=innodb +key_block_size=1 row_format=fixed; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +Warning 1478 InnoDB: assuming ROW_FORMAT=COMPACT. +create table t9(a int primary key) engine=innodb +key_block_size=1 row_format=compact; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +create table t10(a int primary key) engine=innodb +key_block_size=1 row_format=dynamic; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=1 unless ROW_FORMAT=COMPRESSED. +create table t11(a int primary key) engine=innodb +key_block_size=1 row_format=compressed; +create table t12(a int primary key) engine=innodb +key_block_size=1; +create table t13(a int primary key) engine=innodb +row_format=compressed; +create table t14(a int primary key) engine=innodb key_block_size=9; +Warnings: +Warning 1478 InnoDB: ignoring KEY_BLOCK_SIZE=9. +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t0 Compact 16384 0 +test t00 Compact 16384 0 +test t1 Compact 16384 0 +test t10 Dynamic 16384 0 +test t11 Compressed 1024 0 +test t12 Compressed 1024 0 +test t13 Compressed 8192 0 +test t14 Compact 16384 0 +test t2 Redundant 16384 0 +test t3 Compact 16384 0 +test t4 Compact 16384 0 +test t5 Redundant 16384 0 +test t6 Redundant 16384 0 +test t7 Redundant 16384 0 +test t8 Compact 16384 0 +test t9 Compact 16384 0 +drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14; +alter table t1 key_block_size=0; +alter table t1 row_format=dynamic; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t1 Dynamic 16384 0 +alter table t1 row_format=compact; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t1 Compact 16384 0 +alter table t1 row_format=redundant; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t1 Redundant 16384 0 +drop table t1; +create table t1(a int not null, b text, index(b(10))) engine=innodb +key_block_size=1; +create table t2(b text)engine=innodb; +insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000))); +insert into t1 select 1, b from t2; +commit; +begin; +update t1 set b=repeat('B',100); +select a,left(b,40) from t1 natural join t2; +a left(b,40) +1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA +rollback; +select a,left(b,40) from t1 natural join t2; +a left(b,40) +1 1abcdefghijklmnopqrstuvwxyzAAAAAAAAAAAAA +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t1 Compressed 2048 1024 +test t2 Compact 16384 0 +drop table t1,t2; +SET SESSION innodb_strict_mode = off; +CREATE TABLE t1( +c TEXT NOT NULL, d TEXT NOT NULL, +PRIMARY KEY (c(767),d(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +CREATE TABLE t1( +c TEXT NOT NULL, d TEXT NOT NULL, +PRIMARY KEY (c(767),d(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; +ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +CREATE TABLE t1( +c TEXT NOT NULL, d TEXT NOT NULL, +PRIMARY KEY (c(767),d(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; +drop table t1; +CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +ERROR 42000: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); +DROP TABLE t1; +create table t1( c1 int not null, c2 blob, c3 blob, c4 blob, +primary key(c1, c2(22), c3(22))) +engine = innodb row_format = dynamic; +begin; +insert into t1 values(1, repeat('A', 20000), repeat('B', 20000), +repeat('C', 20000)); +update t1 set c3 = repeat('D', 20000) where c1 = 1; +commit; +select count(*) from t1 where c2 = repeat('A', 20000); +count(*) +1 +select count(*) from t1 where c3 = repeat('D', 20000); +count(*) +1 +select count(*) from t1 where c4 = repeat('C', 20000); +count(*) +1 +update t1 set c3 = repeat('E', 20000) where c1 = 1; +drop table t1; +set global innodb_file_format=`0`; +select @@innodb_file_format; +@@innodb_file_format +Antelope +set global innodb_file_format=`1`; +select @@innodb_file_format; +@@innodb_file_format +Barracuda +set global innodb_file_format=`2`; +ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '2' +set global innodb_file_format=`-1`; +ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '-1' +set global innodb_file_format=`Antelope`; +set global innodb_file_format=`Barracuda`; +set global innodb_file_format=`Cheetah`; +ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'Cheetah' +set global innodb_file_format=`abc`; +ERROR 42000: Variable 'innodb_file_format' can't be set to the value of 'abc' +set global innodb_file_format=`1a`; +ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '1a' +set global innodb_file_format=``; +ERROR 42000: Variable 'innodb_file_format' can't be set to the value of '' +set global innodb_file_per_table = on; +set global innodb_file_format = `1`; +set innodb_strict_mode = off; +create table t1 (id int primary key) engine = innodb key_block_size = 0; +drop table t1; +set innodb_strict_mode = on; +create table t1 (id int primary key) engine = innodb key_block_size = 0; +create table t2 (id int primary key) engine = innodb key_block_size = 9; +ERROR HY000: Can't create table 'test.t2' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Error 1005 Can't create table 'test.t2' (errno: 1478) +create table t3 (id int primary key) engine = innodb key_block_size = 1; +create table t4 (id int primary key) engine = innodb key_block_size = 2; +create table t5 (id int primary key) engine = innodb key_block_size = 4; +create table t6 (id int primary key) engine = innodb key_block_size = 8; +create table t7 (id int primary key) engine = innodb key_block_size = 16; +create table t8 (id int primary key) engine = innodb row_format = compressed; +create table t9 (id int primary key) engine = innodb row_format = dynamic; +create table t10(id int primary key) engine = innodb row_format = compact; +create table t11(id int primary key) engine = innodb row_format = redundant; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t1 Compact 16384 0 +test t10 Compact 16384 0 +test t11 Redundant 16384 0 +test t3 Compressed 1024 0 +test t4 Compressed 2048 0 +test t5 Compressed 4096 0 +test t6 Compressed 8192 0 +test t7 Compressed 16384 0 +test t8 Compressed 8192 0 +test t9 Dynamic 16384 0 +drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; +create table t1 (id int primary key) engine = innodb +key_block_size = 8 row_format = compressed; +create table t2 (id int primary key) engine = innodb +key_block_size = 8 row_format = redundant; +ERROR HY000: Can't create table 'test.t2' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t2' (errno: 1478) +create table t3 (id int primary key) engine = innodb +key_block_size = 8 row_format = compact; +ERROR HY000: Can't create table 'test.t3' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t3' (errno: 1478) +create table t4 (id int primary key) engine = innodb +key_block_size = 8 row_format = dynamic; +ERROR HY000: Can't create table 'test.t4' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t4' (errno: 1478) +create table t5 (id int primary key) engine = innodb +key_block_size = 8 row_format = default; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t1 Compressed 8192 0 +test t5 Compressed 8192 0 +drop table t1, t5; +create table t1 (id int primary key) engine = innodb +key_block_size = 9 row_format = redundant; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t1' (errno: 1478) +create table t2 (id int primary key) engine = innodb +key_block_size = 9 row_format = compact; +ERROR HY000: Can't create table 'test.t2' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: cannot specify ROW_FORMAT = COMPACT with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t2' (errno: 1478) +create table t2 (id int primary key) engine = innodb +key_block_size = 9 row_format = dynamic; +ERROR HY000: Can't create table 'test.t2' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: invalid KEY_BLOCK_SIZE = 9. Valid values are [1, 2, 4, 8, 16] +Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE. +Error 1005 Can't create table 'test.t2' (errno: 1478) +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +set global innodb_file_per_table = off; +create table t1 (id int primary key) engine = innodb key_block_size = 1; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t1' (errno: 1478) +create table t2 (id int primary key) engine = innodb key_block_size = 2; +ERROR HY000: Can't create table 'test.t2' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t2' (errno: 1478) +create table t3 (id int primary key) engine = innodb key_block_size = 4; +ERROR HY000: Can't create table 'test.t3' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t3' (errno: 1478) +create table t4 (id int primary key) engine = innodb key_block_size = 8; +ERROR HY000: Can't create table 'test.t4' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t4' (errno: 1478) +create table t5 (id int primary key) engine = innodb key_block_size = 16; +ERROR HY000: Can't create table 'test.t5' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table. +Error 1005 Can't create table 'test.t5' (errno: 1478) +create table t6 (id int primary key) engine = innodb row_format = compressed; +ERROR HY000: Can't create table 'test.t6' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_per_table. +Error 1005 Can't create table 'test.t6' (errno: 1478) +create table t7 (id int primary key) engine = innodb row_format = dynamic; +ERROR HY000: Can't create table 'test.t7' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. +Error 1005 Can't create table 'test.t7' (errno: 1478) +create table t8 (id int primary key) engine = innodb row_format = compact; +create table t9 (id int primary key) engine = innodb row_format = redundant; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t8 Compact 16384 0 +test t9 Redundant 16384 0 +drop table t8, t9; +set global innodb_file_per_table = on; +set global innodb_file_format = `0`; +create table t1 (id int primary key) engine = innodb key_block_size = 1; +ERROR HY000: Can't create table 'test.t1' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t1' (errno: 1478) +create table t2 (id int primary key) engine = innodb key_block_size = 2; +ERROR HY000: Can't create table 'test.t2' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t2' (errno: 1478) +create table t3 (id int primary key) engine = innodb key_block_size = 4; +ERROR HY000: Can't create table 'test.t3' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t3' (errno: 1478) +create table t4 (id int primary key) engine = innodb key_block_size = 8; +ERROR HY000: Can't create table 'test.t4' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t4' (errno: 1478) +create table t5 (id int primary key) engine = innodb key_block_size = 16; +ERROR HY000: Can't create table 'test.t5' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t5' (errno: 1478) +create table t6 (id int primary key) engine = innodb row_format = compressed; +ERROR HY000: Can't create table 'test.t6' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=COMPRESSED requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t6' (errno: 1478) +create table t7 (id int primary key) engine = innodb row_format = dynamic; +ERROR HY000: Can't create table 'test.t7' (errno: 1478) +show warnings; +Level Code Message +Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope. +Error 1005 Can't create table 'test.t7' (errno: 1478) +create table t8 (id int primary key) engine = innodb row_format = compact; +create table t9 (id int primary key) engine = innodb row_format = redundant; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +table_schema table_name row_format data_length index_length +test t8 Compact 16384 0 +test t9 Redundant 16384 0 +drop table t8, t9; +set global innodb_file_per_table=0; +set global innodb_file_format=Antelope; +set global innodb_file_per_table=on; +set global innodb_file_format=`Barracuda`; +set global innodb_file_format_max=`Antelope`; +create table normal_table ( +c1 int +) engine = innodb; +select @@innodb_file_format_max; +@@innodb_file_format_max +Antelope +create table zip_table ( +c1 int +) engine = innodb key_block_size = 8; +select @@innodb_file_format_max; +@@innodb_file_format_max +Barracuda +set global innodb_file_format_max=`Antelope`; +select @@innodb_file_format_max; +@@innodb_file_format_max +Antelope +show table status; +select @@innodb_file_format_max; +@@innodb_file_format_max +Barracuda +drop table normal_table, zip_table; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug36169.result b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result new file mode 100644 index 00000000000..aa80e4d7aa4 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_bug36169.result @@ -0,0 +1,2 @@ +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=ON; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug36172.result b/mysql-test/suite/innodb_zip/r/innodb_bug36172.result new file mode 100644 index 00000000000..195775f74c8 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_bug36172.result @@ -0,0 +1 @@ +SET storage_engine=InnoDB; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result new file mode 100644 index 00000000000..927ba0e0e53 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result @@ -0,0 +1,130 @@ +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=on; +CREATE TABLE bug52745 ( +a2 int(10) unsigned DEFAULT NULL, +col37 time DEFAULT NULL, +col38 char(229) CHARACTER SET utf8 DEFAULT NULL, +col39 text, +col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, +col41 int(10) unsigned DEFAULT NULL, +col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL, +col43 smallint(5) unsigned zerofill DEFAULT NULL, +col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL, +col45 float unsigned zerofill DEFAULT NULL, +col46 binary(1) DEFAULT NULL, +col47 tinyint(4) DEFAULT NULL, +col48 tinyint(1) DEFAULT NULL, +col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +col50 binary(1) DEFAULT NULL, +col51 double unsigned zerofill DEFAULT NULL, +col52 int(10) unsigned DEFAULT NULL, +col53 time DEFAULT NULL, +col54 double unsigned DEFAULT NULL, +col55 time DEFAULT NULL, +col56 mediumtext CHARACTER SET latin2, +col57 blob, +col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000', +col59 binary(1) DEFAULT NULL, +col60 longblob, +col61 time DEFAULT NULL, +col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci, +col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +col64 int(10) unsigned DEFAULT NULL, +col65 date DEFAULT NULL, +col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', +col67 binary(1) DEFAULT NULL, +col68 tinyblob, +col69 date DEFAULT NULL, +col70 tinyint(3) unsigned zerofill DEFAULT NULL, +col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL, +col72 datetime DEFAULT NULL, +col73 smallint(5) unsigned zerofill DEFAULT NULL, +col74 longblob, +col75 bit(34) DEFAULT NULL, +col76 float unsigned zerofill DEFAULT NULL, +col77 year(2) DEFAULT NULL, +col78 tinyint(3) unsigned DEFAULT NULL, +col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL, +col80 datetime DEFAULT NULL, +col81 smallint(6) DEFAULT NULL, +col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL, +col83 bigint(20) unsigned zerofill DEFAULT NULL, +col84 float unsigned zerofill DEFAULT NULL, +col85 double DEFAULT NULL, +col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL, +col87 varbinary(221) DEFAULT NULL, +col88 double unsigned DEFAULT NULL, +col89 float unsigned zerofill DEFAULT NULL, +col90 tinyblob +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +Note 1291 Column 'col82' has duplicated value '' in ENUM +Note 1291 Column 'col82' has duplicated value '' in ENUM +INSERT INTO bug52745 SET +col40='0000-00-00 00:00:00', +col51=16547, +col53='7711484', +col54=-28604, +col55='7112612', +col56='wakefulness\'', +col57=repeat('absorbefacient\'',106), +col58=11027, +col59='AM09gW7', +col60=repeat('Noelani\'',16), +col61='2520576', +col62='substitutiv', +col63='19950106155112', +col64=-12038, +col65='86238806', +col66='19600719080256', +col68=repeat('Sagittarius\'',54), +col69='38943902', +col70=1232, +col71='Elora\'', +col74=repeat('zipp',11), +col75='0', +col76=23254, +col78=13247, +col79='56219', +col80='20500609035724', +col81=11632, +col82=7, +col84=-23863, +col85=6341, +col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W', +col88=16894, +col89=6161, +col90=repeat('gale',48); +Warnings: +Warning 1265 Data truncated for column 'col53' at row 1 +Warning 1264 Out of range value for column 'col54' at row 1 +Warning 1265 Data truncated for column 'col59' at row 1 +Warning 1265 Data truncated for column 'col61' at row 1 +Warning 1264 Out of range value for column 'col64' at row 1 +Warning 1265 Data truncated for column 'col65' at row 1 +Warning 1264 Out of range value for column 'col66' at row 1 +Warning 1265 Data truncated for column 'col68' at row 1 +Warning 1265 Data truncated for column 'col69' at row 1 +Warning 1264 Out of range value for column 'col70' at row 1 +Warning 1264 Out of range value for column 'col78' at row 1 +Warning 1265 Data truncated for column 'col79' at row 1 +Warning 1264 Out of range value for column 'col84' at row 1 +SHOW WARNINGS; +Level Code Message +Warning 1265 Data truncated for column 'col53' at row 1 +Warning 1264 Out of range value for column 'col54' at row 1 +Warning 1265 Data truncated for column 'col59' at row 1 +Warning 1265 Data truncated for column 'col61' at row 1 +Warning 1264 Out of range value for column 'col64' at row 1 +Warning 1265 Data truncated for column 'col65' at row 1 +Warning 1264 Out of range value for column 'col66' at row 1 +Warning 1265 Data truncated for column 'col68' at row 1 +Warning 1265 Data truncated for column 'col69' at row 1 +Warning 1264 Out of range value for column 'col70' at row 1 +Warning 1264 Out of range value for column 'col78' at row 1 +Warning 1265 Data truncated for column 'col79' at row 1 +Warning 1264 Out of range value for column 'col84' at row 1 +DROP TABLE bug52745; +SET GLOBAL innodb_file_format=Antelope; +SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug53591.result b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result new file mode 100644 index 00000000000..dae9f0d64d0 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_bug53591.result @@ -0,0 +1,15 @@ +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=on; +set old_alter_table=0; +CREATE TABLE bug53591(a text charset utf8 not null) +ENGINE=InnoDB KEY_BLOCK_SIZE=1; +ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); +ERROR HY000: Too big row +SHOW WARNINGS; +Level Code Message +Error 139 Too big row +Error 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +Error 1030 Got error 139 from storage engine +DROP TABLE bug53591; +SET GLOBAL innodb_file_format=Antelope; +SET GLOBAL innodb_file_per_table=0; diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug56680.result b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result new file mode 100644 index 00000000000..5e798b69167 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_bug56680.result @@ -0,0 +1,109 @@ +SET GLOBAL tx_isolation='REPEATABLE-READ'; +SET GLOBAL innodb_file_format=Barracuda; +SET GLOBAL innodb_file_per_table=on; +CREATE TABLE bug56680( +a INT AUTO_INCREMENT PRIMARY KEY, +b CHAR(1), +c INT, +INDEX(b)) +ENGINE=InnoDB; +INSERT INTO bug56680 VALUES(0,'x',1); +BEGIN; +SELECT b FROM bug56680; +b +x +BEGIN; +UPDATE bug56680 SET b='X'; +SELECT b FROM bug56680; +b +x +SELECT * FROM bug56680; +a b c +1 x 1 +ROLLBACK; +SELECT b FROM bug56680; +b +x +SET GLOBAL tx_isolation='READ-UNCOMMITTED'; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +BEGIN; +SELECT b FROM bug56680 LIMIT 2; +b +x +x +BEGIN; +DELETE FROM bug56680 WHERE a=1; +INSERT INTO bug56680 VALUES(1,'X',1); +SELECT b FROM bug56680 LIMIT 3; +b +X +x +x +SELECT b FROM bug56680 LIMIT 2; +b +x +x +CHECK TABLE bug56680; +Table Op Msg_type Msg_text +test.bug56680 check status OK +ROLLBACK; +SELECT b FROM bug56680 LIMIT 2; +b +x +x +CHECK TABLE bug56680; +Table Op Msg_type Msg_text +test.bug56680 check status OK +SELECT b FROM bug56680 LIMIT 2; +b +x +x +CREATE TABLE bug56680_2( +a INT AUTO_INCREMENT PRIMARY KEY, +b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci, +c INT, +INDEX(b)) +ENGINE=InnoDB; +INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680; +BEGIN; +SELECT HEX(b) FROM bug56680_2 LIMIT 2; +HEX(b) +DF +DF +DELETE FROM bug56680_2 WHERE a=1; +INSERT INTO bug56680_2 VALUES(1,'SS',1); +SELECT HEX(b) FROM bug56680_2 LIMIT 3; +HEX(b) +5353 +DF +DF +CHECK TABLE bug56680_2; +Table Op Msg_type Msg_text +test.bug56680_2 check status OK +ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SELECT HEX(b) FROM bug56680_2 LIMIT 2; +HEX(b) +5353 +DF +DELETE FROM bug56680_2 WHERE a=1; +INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1); +SELECT HEX(b) FROM bug56680_2 LIMIT 3; +HEX(b) +DF +DF +DF +CHECK TABLE bug56680_2; +Table Op Msg_type Msg_text +test.bug56680_2 check status OK +DROP TABLE bug56680_2; +DROP TABLE bug56680; diff --git a/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result new file mode 100644 index 00000000000..1f6d6948756 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_cmp_drop_table.result @@ -0,0 +1,14 @@ +set global innodb_file_per_table=on; +set global innodb_file_format=`1`; +create table t1(a text) engine=innodb key_block_size=8; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +8192 +drop table t1; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +8192 +create table t2(a text) engine=innodb; +SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0; +page_size +drop table t2; diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result new file mode 100644 index 00000000000..354508fd9b7 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result @@ -0,0 +1,184 @@ +set global innodb_file_format="Barracuda"; +set global innodb_file_per_table=1; +set global innodb_large_prefix=1; +create table worklog5743(a TEXT not null, primary key (a(1000))) +ROW_FORMAT=DYNAMIC, engine = innodb; +insert into worklog5743 values(repeat("a", 20000)); +update worklog5743 set a = (repeat("b", 16000)); +create index idx on worklog5743(a(2000)); +begin; +update worklog5743 set a = (repeat("x", 17000)); +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +select a = repeat("x", 17000) from worklog5743; +a = repeat("x", 17000) +0 +select a = repeat("b", 16000) from worklog5743; +a = repeat("b", 16000) +1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +select a = repeat("x", 17000) from worklog5743; +a = repeat("x", 17000) +1 +rollback; +drop table worklog5743; +create table worklog5743(a1 int, a2 TEXT not null) +ROW_FORMAT=DYNAMIC, engine = innodb; +create index idx on worklog5743(a1, a2(2000)); +insert into worklog5743 values(9, repeat("a", 10000)); +begin; +update worklog5743 set a1 = 1000; +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743 ref idx idx 5 const 1 Using where +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +a1 a2 = repeat("a", 10000) +9 1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +a1 a2 = repeat("a", 10000) +rollback; +drop table worklog5743; +create table worklog5743(a1 int, a2 TEXT not null) +ROW_FORMAT=DYNAMIC, engine = innodb; +create index idx on worklog5743(a1, a2(50)); +insert into worklog5743 values(9, repeat("a", 10000)); +begin; +update worklog5743 set a1 = 1000; +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743 ref idx idx 5 const 1 Using where +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +a1 a2 = repeat("a", 10000) +9 1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +a1 a2 = repeat("a", 10000) +rollback; +drop table worklog5743; +create table worklog5743_2(a1 int, a2 TEXT not null) +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +create table worklog5743_4(a1 int, a2 TEXT not null) +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +create index idx1 on worklog5743_2(a1, a2(942)); +ERROR HY000: Too big row +create index idx1 on worklog5743_2(a1, a2(940)); +create index idx1 on worklog5743_4(a1, a2(1966)); +ERROR HY000: Too big row +create index idx1 on worklog5743_4(a1, a2(1964)); +insert into worklog5743_2 values(9, repeat("a", 10000)); +insert into worklog5743_4 values(9, repeat("a", 10000)); +begin; +update worklog5743_2 set a1 = 1000; +update worklog5743_4 set a1 = 1000; +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743_2 ref idx1 idx1 5 const 1 Using where +select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; +a1 a2 = repeat("a", 10000) +9 1 +select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; +a1 a2 = repeat("a", 10000) +9 1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; +a1 a2 = repeat("a", 10000) +select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; +a1 a2 = repeat("a", 10000) +rollback; +drop table worklog5743_2; +drop table worklog5743_4; +create table worklog5743(a1 int, a2 varchar(3000)) +ROW_FORMAT=DYNAMIC, engine = innodb; +create index idx on worklog5743(a1, a2); +insert into worklog5743 values(9, repeat("a", 3000)); +begin; +update worklog5743 set a1 = 1000; +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +explain select a1 from worklog5743 where a1 = 9; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE worklog5743 ref idx idx 5 const 1 Using where; Using index +select a1 from worklog5743 where a1 = 9; +a1 +9 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +select a1 from worklog5743 where a1 = 9; +a1 +rollback; +drop table worklog5743; +create table worklog5743(a TEXT not null, primary key (a(1000))) +engine = innodb; +ERROR HY000: Index column size too large. The maximum column size is 767 bytes. +create table worklog5743(a TEXT) engine = innodb; +create index idx on worklog5743(a(1000)); +ERROR HY000: Index column size too large. The maximum column size is 767 bytes. +create index idx on worklog5743(a(725)); +insert into worklog5743 values(repeat("a", 20000)); +begin; +insert into worklog5743 values(repeat("b", 20000)); +update worklog5743 set a = (repeat("x", 25000)); +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +select a = repeat("a", 20000) from worklog5743; +a = repeat("a", 20000) +1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +select a = repeat("x", 25000) from worklog5743; +a = repeat("x", 25000) +1 +1 +rollback; +drop table worklog5743; +create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC, engine = innodb; +create index idx on worklog5743(a(3073)); +Warnings: +Warning 1071 Specified key was too long; max key length is 3072 bytes +Warning 1071 Specified key was too long; max key length is 3072 bytes +create index idx2 on worklog5743(a(3072)); +show create table worklog5743; +Table Create Table +worklog5743 CREATE TABLE `worklog5743` ( + `a` text NOT NULL, + KEY `idx` (`a`(3072)), + KEY `idx2` (`a`(3072)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC +drop table worklog5743; +create table worklog5743(a TEXT not null) engine = innodb; +create index idx on worklog5743(a(768)); +ERROR HY000: Index column size too large. The maximum column size is 767 bytes. +create index idx2 on worklog5743(a(767)); +drop table worklog5743; +SET GLOBAL innodb_file_format=Antelope; +SET GLOBAL innodb_file_per_table=0; +SET GLOBAL innodb_large_prefix=0; diff --git a/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result new file mode 100644 index 00000000000..0c68c8a6975 --- /dev/null +++ b/mysql-test/suite/innodb_zip/r/innodb_prefix_index_liftedlimit.result @@ -0,0 +1,1353 @@ +set global innodb_file_format="Barracuda"; +set global innodb_file_per_table=1; +set global innodb_large_prefix=1; +DROP TABLE IF EXISTS worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM +INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE +col_1_varchar PRIMARY 3072 BTREE +col_1_varchar prefix_idx 3072 BTREE +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM +INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE +col_1_text PRIMARY 3072 BTREE +col_1_text prefix_idx 3072 BTREE +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; +col_1_text = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT , +PRIMARY KEY (col_1_mediumtext(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000) +FROM worklog5743; +col_1_mediumtext = REPEAT("a", 4000) col_2_mediumtext = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000) +WHERE col_1_mediumtext = REPEAT("a", 4000) +AND col_2_mediumtext = REPEAT("o", 4000); +SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_mediumtext = REPEAT("c", 4000) +AND col_2_mediumtext = REPEAT("o", 4000); +col_1_mediumtext = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000); +SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743; +col_1_mediumtext = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_longtext LONGTEXT , col_2_longtext LONGTEXT , +PRIMARY KEY (col_1_longtext(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000) +FROM worklog5743; +col_1_longtext = REPEAT("a", 4000) col_2_longtext = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000) +WHERE col_1_longtext = REPEAT("a", 4000) +AND col_2_longtext = REPEAT("o", 4000); +SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_longtext = REPEAT("c", 4000) +AND col_2_longtext = REPEAT("o", 4000); +col_1_longtext = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000); +SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743; +col_1_longtext = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072)); +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM +INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE +col_1_blob PRIMARY 3072 BTREE +col_1_blob prefix_idx 3072 BTREE +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743; +col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +col_1_blob = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743; +col_1_blob = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB , +PRIMARY KEY (col_1_mediumblob(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000) +FROM worklog5743; +col_1_mediumblob = REPEAT("a", 4000) col_2_mediumblob = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000) +WHERE col_1_mediumblob = REPEAT("a", 4000) +AND col_2_mediumblob = REPEAT("o", 4000); +SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_mediumblob = REPEAT("c", 4000) +AND col_2_mediumblob = REPEAT("o", 4000); +col_1_mediumblob = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000); +SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743; +col_1_mediumblob = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_longblob LONGBLOB , col_2_longblob LONGBLOB , +PRIMARY KEY (col_1_longblob(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000) +FROM worklog5743; +col_1_longblob = REPEAT("a", 4000) col_2_longblob = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000) +WHERE col_1_longblob = REPEAT("a", 4000) +AND col_2_longblob = REPEAT("o", 4000); +SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_longblob = REPEAT("c", 4000) +AND col_2_longblob = REPEAT("o", 4000); +col_1_longblob = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000); +SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743; +col_1_longblob = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , +PRIMARY KEY (col_1_varbinary(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +col_1_varbinary = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255), +col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255), +col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255), +col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255), +col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) +); +CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250), +col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250), +col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250), +col_11_char(250),col_12_char(250),col_13_char(72) +); +INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) +); +SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743; +col_1_char = REPEAT("a", 255) col_2_char = REPEAT("o", 255) +1 1 +0 0 +UPDATE worklog5743 SET col_1_char = REPEAT("c", 255) +WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255); +SELECT col_1_char = REPEAT("c", 255) FROM worklog5743 +WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255); +col_1_char = REPEAT("c", 255) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255); +SELECT col_1_char = REPEAT("c", 255) FROM worklog5743; +col_1_char = REPEAT("c", 255) +1 +0 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255), +col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255), +col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255), +col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255), +col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) +); +CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250), +col_3_binary (250),col_4_binary (250),col_5_binary (250), +col_6_binary (250),col_7_binary (250),col_8_binary (250), +col_9_binary (250),col_10_binary (250),col_11_binary (250), +col_12_binary (250),col_13_binary (72) +); +INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) +); +SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743; +col_1_binary = REPEAT("a", 255) col_2_binary = REPEAT("o", 255) +1 1 +0 0 +UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255) +WHERE col_1_binary = REPEAT("a", 255) +AND col_2_binary = REPEAT("o", 255); +SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743 +WHERE col_1_binary = REPEAT("c", 255) +AND col_2_binary = REPEAT("o", 255); +col_1_binary = REPEAT("c", 255) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255); +SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743; +col_1_binary = REPEAT("c", 255) +1 +0 +DROP TABLE worklog5743; +CREATE TABLE worklog5743_key2 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743_key2; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key2 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2 +WHERE col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("c", 4000) +1 +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key2; +CREATE TABLE worklog5743_key4 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(1964)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743_key4; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key4 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) +AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key4 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key4; +CREATE TABLE worklog5743_key8 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743_key8; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key8 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key8 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key8; +CREATE TABLE worklog5743_key2 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743_key2; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2; +col_1_text = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key2; +CREATE TABLE worklog5743_key4 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(1964)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743_key4; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4; +col_1_text = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key4; +CREATE TABLE worklog5743_key8 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743_key8; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8; +col_1_text = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key8; +CREATE TABLE worklog5743_key2 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743_key2; +col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +col_1_blob = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2; +col_1_blob = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key2; +CREATE TABLE worklog5743_key4 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(1964)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743_key4; +col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +col_1_blob = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4; +col_1_blob = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key4; +CREATE TABLE worklog5743_key8 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(3072)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743_key8; +col_1_blob = REPEAT("a", 4000) col_2_blob = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +col_1_blob = REPEAT("b", 3500) +0 +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8; +col_1_blob = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743_key8; +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , +col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +col_1_varbinary = REPEAT("c", 4000) +1 +0 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , +col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072)); +CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072)); +CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); +CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); +CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +ROLLBACK; +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +COMMIT; +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +ROLLBACK; +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +col_1_varbinary = REPEAT("c", 4000) +0 +0 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) CHARACTER SET 'utf8', +col_2_text TEXT (4000) CHARACTER SET 'utf8', +PRIMARY KEY (col_1_text(1024)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; +col_1_text = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8', +col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' , +PRIMARY KEY (col_1_varchar(1024)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +ERROR 42000: Row size too large (> max_row_size). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline. +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , +col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8', +col_3_text TEXT (4000) CHARACTER SET 'utf8', +col_4_blob BLOB (4000),col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500)); +CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500)); +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +ROLLBACK; +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +COMMIT; +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +ROLLBACK; +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varchar = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +col_1_varbinary = REPEAT("c", 4000) +0 +0 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) CHARACTER SET 'utf8', +col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(1024)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743; +col_1_text = REPEAT("स", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000) +WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("क", 4000) +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743; +col_1_text = REPEAT("क", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT(4000) , col_2_text TEXT(4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +"In connection 1" +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +"In connection 2" +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +0 1 +"In connection 1" +select @@session.tx_isolation; +@@session.tx_isolation +REPEATABLE-READ +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) +0 1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) +0 1 +1 1 +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +START TRANSACTION; +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +"In connection 2" +COMMIT; +"In connection 1" +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) +0 1 +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +COMMIT; +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT(4000) , col_2_text TEXT(4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +"In connection 1" +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +START TRANSACTION; +"In connection 2" +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +0 1 +COMMIT; +"In connection 1" +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +@@session.tx_isolation +READ-UNCOMMITTED +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) +1 1 +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) +1 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +COMMIT; +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT(4000) , col_2_text TEXT(4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +"In connection 1" +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +1 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +START TRANSACTION; +"In connection 2" +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("a", 200) col_2_text = REPEAT("o", 200) +0 1 +ROLLBACK; +"In connection 1" +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +col_1_text = REPEAT("b", 200) col_2_text = REPEAT("o", 200) +0 1 +SELECT COUNT(*) FROM worklog5743; +COUNT(*) +1 +COMMIT; +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) +AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) +AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("c", 4000) +1 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +col_1_varchar = REPEAT("c", 4000) +0 +0 +1 +SELECT tbl1.col_1_varchar = tbl2.col_1_varchar +FROM worklog5743 tbl1 , worklog5743 tbl2 +WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ; +tbl1.col_1_varchar = tbl2.col_1_varchar +1 +1 +1 +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; +tbl1.col_1_varchar = REPEAT("c", 4000) +0 +0 +1 +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; +tbl1.col_1_varchar = REPEAT("c", 4000) +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE +col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) +AND col_1_varchar = REPEAT("c", 4000); +tbl1.col_1_varchar = REPEAT("c", 4000) +1 +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar in ( +SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 +WHERE tbl1.col_1_varchar != tbl2.col_1_varchar +) ; +tbl1.col_1_varchar = REPEAT("c", 4000) +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar in ( +SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 +WHERE tbl1.col_1_varchar = tbl2.col_1_varchar +) ; +tbl1.col_1_varchar = REPEAT("c", 4000) +0 +0 +1 +SELECT +REVERSE(col_1_varchar) = REPEAT("c", 4000) , +REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000) +FROM worklog5743; +REVERSE(col_1_varchar) = REPEAT("c", 4000) REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000) +0 0 +0 0 +1 1 +SELECT +UPPER(col_1_varchar) = REPEAT("c", 4000) , +UPPER(col_1_varchar) = REPEAT("C", 4000) , +LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000) +FROM worklog5743; +UPPER(col_1_varchar) = REPEAT("c", 4000) UPPER(col_1_varchar) = REPEAT("C", 4000) LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000) +0 0 0 +0 0 0 +1 1 1 +SELECT +col_1_varchar = REPEAT("c", 4000) +FROM worklog5743 WHERE col_1_varchar like '%c__%'; +col_1_varchar = REPEAT("c", 4000) +1 +SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ; +SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) +kkkkaaaaaa +kkkkbbbbbb +kkkkcccccc +SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ; +CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') +aaaappend +bbbappend +cccappend +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , +col_2_varchar VARCHAR (4000) , +UNIQUE INDEX (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), REPEAT("o", 4000)); +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); +INSERT INTO worklog5743 VALUES(NULL,NULL); +INSERT INTO worklog5743 VALUES(NULL,NULL); +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE +FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +COLUMN_NAME INDEX_NAME SUB_PART INDEX_TYPE +col_1_varchar col_1_varchar 3072 BTREE +SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL; +col_1_varchar +NULL +NULL +SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000)) +FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1; +col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000)) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +DROP INDEX prefix_idx ON worklog5743; +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("c", 4000) +1 +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) +AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) +AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("c", 4000) +1 +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +DROP INDEX prefix_idx ON worklog5743; +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +col_1_varchar = REPEAT("a", 4000) col_2_varchar = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +col_1_varchar = REPEAT("c", 4000) +1 +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +col_1_varchar = REPEAT("c", 4000) +0 +1 +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) , +PRIMARY KEY (col_1_varchar (3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +" Switching to con1 connection For select " +SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500) +FROM worklog5743; +col_1_varchar = REPEAT("c", 3500) col_2_varchar = REPEAT("o", 3500) +1 1 +" Switching to default connection For DMLs " +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500)); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 +WHERE col_2_varchar = REPEAT("o", 3500); +col_1_varchar = REPEAT("b", 3500) +0 +0 +COMMIT; +" Switching to con1 connection For Dropping index and some DMLs " +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500) +WHERE col_1_varchar = REPEAT("a", 3500) +AND col_2_varchar = REPEAT("o", 3500); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 +WHERE col_2_varchar = REPEAT("o", 3500); +col_1_varchar = REPEAT("b", 3500) +1 +0 +" Switching to default connection For DELETE " +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500); +SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743 +WHERE col_2_varchar = REPEAT("p", 3500); +col_1_varchar = REPEAT("a", 3500) +0 +" Switching to con1 connection to commit changes " +COMMIT; +" Switching to default connection to drop and end sub-test " +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , +PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) +FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) col_2_varbinary = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +1 +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +DROP INDEX prefix_idx ON worklog5743; +SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("b", 4000) +AND col_2_varbinary = REPEAT("p", 4000); +col_1_varbinary = REPEAT("b", 4000) +1 +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) +1 +0 +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +DROP INDEX prefix_idx ON worklog5743; +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000)); +Warnings: +Warning 1071 Specified key was too long; max key length is 3072 bytes +Warning 1071 Specified key was too long; max key length is 3072 bytes +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; +col_1_varbinary = REPEAT("a", 4000) +1 +0 +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +col_1_varbinary = REPEAT("c", 4000) +DROP TABLE worklog5743; +CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(500)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +1 +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +DROP INDEX prefix_idx ON worklog5743; +SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000); +col_1_text = REPEAT("b", 4000) +1 +CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +col_1_text = REPEAT("a", 4000) +1 +0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +DROP INDEX prefix_idx ON worklog5743; +CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000)); +Warnings: +Warning 1071 Specified key was too long; max key length is 3072 bytes +Warning 1071 Specified key was too long; max key length is 3072 bytes +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +col_1_text = REPEAT("a", 4000) +1 +0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; +col_1_text = REPEAT("a", 4000) col_2_text = REPEAT("o", 4000) +1 1 +0 0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +1 +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +ALTER TABLE worklog5743 DROP PRIMARY KEY; +SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("b", 4000) +AND col_2_text = REPEAT("p", 4000); +col_1_text = REPEAT("b", 4000) +1 +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +col_1_text = REPEAT("a", 4000) +1 +0 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950)); +ERROR HY000: Too big row +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +col_1_text = REPEAT("a", 4000) +0 +1 +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +col_1_text = REPEAT("c", 4000) +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073)); +ERROR 42000: Specified key was too long; max key length is 3072 bytes +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073)); +ERROR 42000: Specified key was too long; max key length is 3072 bytes +DROP TABLE worklog5743; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), +REPEAT("o", 4000)); +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); +ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000)); +ERROR 23000: Duplicate entry 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' for key 'PRIMARY' +DROP TABLE worklog5743; +set global innodb_large_prefix=0; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +ERROR 42000: Specified key was too long; max key length is 767 bytes +set global innodb_large_prefix=0; +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(767)) +) engine = innodb; +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000)); +Warnings: +Warning 1071 Specified key was too long; max key length is 767 bytes +Warning 1071 Specified key was too long; max key length is 767 bytes +DROP TABLE worklog5743; +SET GLOBAL innodb_file_format=Antelope; +SET GLOBAL innodb_file_per_table=0; +SET GLOBAL innodb_large_prefix=0; diff --git a/mysql-test/suite/innodb_zip/t/innodb-create-options.test b/mysql-test/suite/innodb_zip/t/innodb-create-options.test new file mode 100644 index 00000000000..d6726683e7e --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb-create-options.test @@ -0,0 +1,573 @@ +# Tests for various combinations of ROW_FORMAT and KEY_BLOCK_SIZE +# Related bugs; +# Bug#54679: ALTER TABLE causes compressed row_format to revert to compact +# Bug#56628: ALTER TABLE .. KEY_BLOCK_SIZE=0 produces untrue warning or unnecessary error +# Bug#56632: ALTER TABLE implicitly changes ROW_FORMAT to COMPRESSED +# Rules for interpreting CREATE_OPTIONS +# 1) Create options on an ALTER are added to the options on the +# previous CREATE or ALTER statements. +# 2) KEY_BLOCK_SIZE=0 is considered a unspecified value. +# If the current ROW_FORMAT has explicitly been set to COMPRESSED, +# InnoDB will use a default value of 8. Otherwise KEY_BLOCK_SIZE +# will not be used. +# 3) ROW_FORMAT=DEFAULT allows InnoDB to choose its own default, COMPACT. +# 4) ROW_FORMAT=DEFAULT and KEY_BLOCK_SIZE=0 can be used at any time to +# unset or erase the values persisted in the MySQL dictionary and +# by SHOW CTREATE TABLE. +# 5) When incompatible values for ROW_FORMAT and KEY_BLOCK_SIZE are +# both explicitly given, the ROW_FORMAT is always used in non-strict +# mode. +# 6) InnoDB will automatically convert a table to COMPRESSED only if a +# valid non-zero KEY_BLOCK_SIZE has been given and ROW_FORMAT=DEFAULT +# or has not been used on a previous CREATE TABLE or ALTER TABLE. +# 7) InnoDB strict mode is designed to prevent incompatible create +# options from being used together. +# 8) The non-strict behavior is intended to permit you to import a +# mysqldump file into a database that does not support compressed +# tables, even if the source database contained compressed tables. +# All invalid values and/or incompatible combinations of ROW_FORMAT +# and KEY_BLOCK_SIZE are automatically corrected +# +# *** innodb_strict_mode=ON *** +# 1) Valid ROW_FORMATs are COMPRESSED, COMPACT, DEFAULT, DYNAMIC +# & REDUNDANT. All others are rejected. +# 2) Valid KEY_BLOCK_SIZEs are 0,1,2,4,8,16. All others are rejected. +# 3) KEY_BLOCK_SIZE=0 can be used to set it to 'unspecified'. +# 4) KEY_BLOCK_SIZE=1,2,4,8 & 16 are incompatible with COMPACT, DYNAMIC & +# REDUNDANT. +# 5) KEY_BLOCK_SIZE=1,2,4,8 & 16 as well as ROW_FORMAT=COMPRESSED and +# ROW_FORMAT=DYNAMIC are incompatible with innodb_file_format=Antelope +# and innodb_file_per_table=OFF +# 6) KEY_BLOCK_SIZE on an ALTER must occur with ROW_FORMAT=COMPRESSED +# or ROW_FORMAT=DEFAULT if the ROW_FORMAT was previously specified +# as COMPACT, DYNAMIC or REDUNDANT. +# 7) KEY_BLOCK_SIZE on an ALTER can occur without a ROW_FORMAT if the +# previous ROW_FORMAT was DEFAULT, COMPRESSED, or unspecified. +# +# *** innodb_strict_mode=OFF *** +# 1. Ignore a bad KEY_BLOCK_SIZE, defaulting it to 8. +# 2. Ignore a bad ROW_FORMAT, defaulting to COMPACT. +# 3. Ignore a valid KEY_BLOCK_SIZE when an incompatible but valid +# ROW_FORMAT is specified. +# 4. If innodb_file_format=Antelope or innodb_file_per_table=OFF +# it will ignore ROW_FORMAT=COMPRESSED or DYNAMIC and it will +# ignore all non-zero KEY_BLOCK_SIZEs. +# +# See InnoDB documentation page "SQL Compression Syntax Warnings and Errors" + +-- source include/have_innodb.inc +SET storage_engine=InnoDB; + +--disable_query_log +# These values can change during the test +LET $innodb_file_format_orig=`select @@innodb_file_format`; +LET $innodb_file_per_table_orig=`select @@innodb_file_per_table`; +LET $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; +--enable_query_log + +SET GLOBAL innodb_file_format=`Barracuda`; +SET GLOBAL innodb_file_per_table=ON; + +# The first half of these tests are with strict mode ON. +SET SESSION innodb_strict_mode = ON; + +--echo # Test 1) StrictMode=ON, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +DROP TABLE IF EXISTS t1; +--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. +--echo # But it is an invalid mode in InnoDB +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + + +--echo # Test 2) StrictMode=ON, CREATE with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +--echo # KEY_BLOCK_SIZE is incompatible with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 3) StrictMode=ON, ALTER with each ROW_FORMAT & a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 4) StrictMode=ON, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid non-zero KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 5) StrictMode=ON, CREATE with a valid KEY_BLOCK_SIZE +--echo # ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=2; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW CREATE TABLE t1; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPACT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 6) StrictMode=ON, CREATE with an invalid KEY_BLOCK_SIZE. +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=9; +SHOW WARNINGS; + +--echo # Test 7) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with Antelope +--echo # and that they can be set to default values during strict mode. +SET GLOBAL innodb_file_format=Antelope; +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=8; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +SET GLOBAL innodb_file_format=Barracuda; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_format=Antelope; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ADD COLUMN f1 INT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SET GLOBAL innodb_file_format=Barracuda; + +--echo # Test 8) StrictMode=ON, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and +--echo # and a valid non-zero KEY_BLOCK_SIZE are rejected with +--echo # innodb_file_per_table=OFF and that they can be set to default +--echo # values during strict mode. +SET GLOBAL innodb_file_per_table=OFF; +DROP TABLE IF EXISTS t1; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +--error ER_CANT_CREATE_TABLE +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 KEY_BLOCK_SIZE=1; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=ON; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4; +SET GLOBAL innodb_file_per_table=OFF; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error ER_CANT_CREATE_TABLE +ALTER TABLE t1 ADD COLUMN f1 INT; +--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/ +SHOW WARNINGS; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SET GLOBAL innodb_file_per_table=ON; + +--echo ################################################## +SET SESSION innodb_strict_mode = OFF; + +--echo # Test 9) StrictMode=OFF, CREATE and ALTER with each ROW_FORMAT & KEY_BLOCK_SIZE=0 +--echo # KEY_BLOCK_SIZE=0 means 'no KEY_BLOCK_SIZE is specified' +--echo # 'FIXED' is sent to InnoDB since it is used by MyISAM. +--echo # It is an invalid mode in InnoDB, use COMPACT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=FIXED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 10) StrictMode=OFF, CREATE with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +--echo # KEY_BLOCK_SIZE is ignored with COMPACT, REDUNDANT, & DYNAMIC +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 11) StrictMode=OFF, ALTER with each ROW_FORMAT & a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=COMPACT KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DYNAMIC KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=REDUNDANT KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ); +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Test 12) StrictMode=OFF, CREATE with ROW_FORMAT=COMPACT, ALTER with a valid KEY_BLOCK_SIZE +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 KEY_BLOCK_SIZE=4; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPACT; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=8; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 13) StrictMode=OFF, CREATE with a valid KEY_BLOCK_SIZE +--echo # ALTER with each ROW_FORMAT +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=16; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SHOW CREATE TABLE t1; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=REDUNDANT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPRESSED; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=DEFAULT KEY_BLOCK_SIZE=0; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +ALTER TABLE t1 ROW_FORMAT=COMPACT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 14) StrictMode=OFF, CREATE with an invalid KEY_BLOCK_SIZE, it defaults to 8 +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) KEY_BLOCK_SIZE=15; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 15) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +--echo valid KEY_BLOCK_SIZE are remembered but not used when ROW_FORMAT +--echo is reverted to Antelope and then used again when ROW_FORMAT=Barracuda. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Antelope; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_format=Barracuda; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + +--echo # Test 16) StrictMode=OFF, Make sure ROW_FORMAT= COMPRESSED & DYNAMIC and a +--echo valid KEY_BLOCK_SIZE are remembered but not used when innodb_file_per_table=OFF +--echo and then used again when innodb_file_per_table=ON. +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( i INT ) ROW_FORMAT=DYNAMIC; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=OFF; +ALTER TABLE t1 ADD COLUMN f1 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; +SET GLOBAL innodb_file_per_table=ON; +ALTER TABLE t1 ADD COLUMN f2 INT; +SHOW WARNINGS; +SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables WHERE TABLE_NAME = 't1'; + + +--echo # Cleanup +DROP TABLE IF EXISTS t1; + +--disable_query_log +EVAL SET GLOBAL innodb_file_format=$innodb_file_format_orig; +EVAL SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; +EVAL SET SESSION innodb_strict_mode=$innodb_strict_mode_orig; +--enable_query_log + diff --git a/mysql-test/suite/innodb_zip/t/innodb-zip.test b/mysql-test/suite/innodb_zip/t/innodb-zip.test new file mode 100644 index 00000000000..39a094d0359 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb-zip.test @@ -0,0 +1,342 @@ +-- source include/have_innodb.inc + +let $per_table=`select @@innodb_file_per_table`; +let $format=`select @@innodb_file_format`; +let $innodb_strict_mode_orig=`select @@session.innodb_strict_mode`; + +set session innodb_strict_mode=0; +set global innodb_file_per_table=off; +set global innodb_file_format=`0`; + +create table t0(a int primary key) engine=innodb row_format=compressed; +create table t00(a int primary key) engine=innodb +key_block_size=4 row_format=compressed; +create table t1(a int primary key) engine=innodb row_format=dynamic; +create table t2(a int primary key) engine=innodb row_format=redundant; +create table t3(a int primary key) engine=innodb row_format=compact; +create table t4(a int primary key) engine=innodb key_block_size=9; +create table t5(a int primary key) engine=innodb +key_block_size=1 row_format=redundant; + +set global innodb_file_per_table=on; +create table t6(a int primary key) engine=innodb +key_block_size=1 row_format=redundant; +set global innodb_file_format=`1`; +create table t7(a int primary key) engine=innodb +key_block_size=1 row_format=redundant; +create table t8(a int primary key) engine=innodb +key_block_size=1 row_format=fixed; +create table t9(a int primary key) engine=innodb +key_block_size=1 row_format=compact; +create table t10(a int primary key) engine=innodb +key_block_size=1 row_format=dynamic; +create table t11(a int primary key) engine=innodb +key_block_size=1 row_format=compressed; +create table t12(a int primary key) engine=innodb +key_block_size=1; +create table t13(a int primary key) engine=innodb +row_format=compressed; +create table t14(a int primary key) engine=innodb key_block_size=9; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; + +drop table t0,t00,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14; +alter table t1 key_block_size=0; +alter table t1 row_format=dynamic; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +alter table t1 row_format=compact; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +alter table t1 row_format=redundant; +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +drop table t1; + +create table t1(a int not null, b text, index(b(10))) engine=innodb +key_block_size=1; + +create table t2(b text)engine=innodb; +insert into t2 values(concat('1abcdefghijklmnopqrstuvwxyz', repeat('A',5000))); + +insert into t1 select 1, b from t2; +commit; + +connect (a,localhost,root,,); +connect (b,localhost,root,,); + +connection a; +begin; +update t1 set b=repeat('B',100); + +connection b; +select a,left(b,40) from t1 natural join t2; + +connection a; +rollback; + +connection b; +select a,left(b,40) from t1 natural join t2; + +connection default; +disconnect a; +disconnect b; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +drop table t1,t2; + +# The following should fail in non-strict mode too. +# (The fix of Bug #50945 only affects REDUNDANT and COMPACT tables.) +SET SESSION innodb_strict_mode = off; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1( + c TEXT NOT NULL, d TEXT NOT NULL, + PRIMARY KEY (c(767),d(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1( + c TEXT NOT NULL, d TEXT NOT NULL, + PRIMARY KEY (c(767),d(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 CHARSET=ASCII; +CREATE TABLE t1( + c TEXT NOT NULL, d TEXT NOT NULL, + PRIMARY KEY (c(767),d(767))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4 CHARSET=ASCII; +drop table t1; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE t1(c TEXT, PRIMARY KEY (c(440))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +CREATE TABLE t1(c TEXT, PRIMARY KEY (c(438))) +ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1 CHARSET=ASCII; +INSERT INTO t1 VALUES(REPEAT('A',512)),(REPEAT('B',512)); +DROP TABLE t1; + +# +# Test blob column inheritance (mantis issue#36) +# + +create table t1( c1 int not null, c2 blob, c3 blob, c4 blob, + primary key(c1, c2(22), c3(22))) + engine = innodb row_format = dynamic; +begin; +insert into t1 values(1, repeat('A', 20000), repeat('B', 20000), + repeat('C', 20000)); + +update t1 set c3 = repeat('D', 20000) where c1 = 1; +commit; + +# one blob column which is unchanged in update and part of PK +# one blob column which is changed and part of of PK +# one blob column which is not part of PK and is unchanged +select count(*) from t1 where c2 = repeat('A', 20000); +select count(*) from t1 where c3 = repeat('D', 20000); +select count(*) from t1 where c4 = repeat('C', 20000); + +update t1 set c3 = repeat('E', 20000) where c1 = 1; +drop table t1; + +# +# +# Test innodb_file_format +# +set global innodb_file_format=`0`; +select @@innodb_file_format; +set global innodb_file_format=`1`; +select @@innodb_file_format; +-- error ER_WRONG_VALUE_FOR_VAR +set global innodb_file_format=`2`; +-- error ER_WRONG_VALUE_FOR_VAR +set global innodb_file_format=`-1`; +set global innodb_file_format=`Antelope`; +set global innodb_file_format=`Barracuda`; +-- error ER_WRONG_VALUE_FOR_VAR +set global innodb_file_format=`Cheetah`; +-- error ER_WRONG_VALUE_FOR_VAR +set global innodb_file_format=`abc`; +-- error ER_WRONG_VALUE_FOR_VAR +set global innodb_file_format=`1a`; +-- error ER_WRONG_VALUE_FOR_VAR +set global innodb_file_format=``; + +#test strict mode. +# this does not work anymore, has been removed from mysqltest +# -- enable_errors +set global innodb_file_per_table = on; +set global innodb_file_format = `1`; + +set innodb_strict_mode = off; +create table t1 (id int primary key) engine = innodb key_block_size = 0; +drop table t1; + +#set strict_mode +set innodb_strict_mode = on; + +#Test different values of KEY_BLOCK_SIZE + +create table t1 (id int primary key) engine = innodb key_block_size = 0; + +--error ER_CANT_CREATE_TABLE +create table t2 (id int primary key) engine = innodb key_block_size = 9; +show warnings; + + +create table t3 (id int primary key) engine = innodb key_block_size = 1; +create table t4 (id int primary key) engine = innodb key_block_size = 2; +create table t5 (id int primary key) engine = innodb key_block_size = 4; +create table t6 (id int primary key) engine = innodb key_block_size = 8; +create table t7 (id int primary key) engine = innodb key_block_size = 16; + +#check various ROW_FORMAT values. +create table t8 (id int primary key) engine = innodb row_format = compressed; +create table t9 (id int primary key) engine = innodb row_format = dynamic; +create table t10(id int primary key) engine = innodb row_format = compact; +create table t11(id int primary key) engine = innodb row_format = redundant; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +drop table t1, t3, t4, t5, t6, t7, t8, t9, t10, t11; + +#test different values of ROW_FORMAT with KEY_BLOCK_SIZE +create table t1 (id int primary key) engine = innodb +key_block_size = 8 row_format = compressed; + +--error ER_CANT_CREATE_TABLE +create table t2 (id int primary key) engine = innodb +key_block_size = 8 row_format = redundant; +show warnings; + +--error ER_CANT_CREATE_TABLE +create table t3 (id int primary key) engine = innodb +key_block_size = 8 row_format = compact; +show warnings; + +--error ER_CANT_CREATE_TABLE +create table t4 (id int primary key) engine = innodb +key_block_size = 8 row_format = dynamic; +show warnings; + +create table t5 (id int primary key) engine = innodb +key_block_size = 8 row_format = default; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +drop table t1, t5; + +#test multiple errors +--error ER_CANT_CREATE_TABLE +create table t1 (id int primary key) engine = innodb +key_block_size = 9 row_format = redundant; +show warnings; + +--error ER_CANT_CREATE_TABLE +create table t2 (id int primary key) engine = innodb +key_block_size = 9 row_format = compact; +show warnings; + +--error ER_CANT_CREATE_TABLE +create table t2 (id int primary key) engine = innodb +key_block_size = 9 row_format = dynamic; +show warnings; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; + +#test valid values with innodb_file_per_table unset +set global innodb_file_per_table = off; + +--error ER_CANT_CREATE_TABLE +create table t1 (id int primary key) engine = innodb key_block_size = 1; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t2 (id int primary key) engine = innodb key_block_size = 2; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t3 (id int primary key) engine = innodb key_block_size = 4; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t4 (id int primary key) engine = innodb key_block_size = 8; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t5 (id int primary key) engine = innodb key_block_size = 16; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t6 (id int primary key) engine = innodb row_format = compressed; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t7 (id int primary key) engine = innodb row_format = dynamic; +show warnings; +create table t8 (id int primary key) engine = innodb row_format = compact; +create table t9 (id int primary key) engine = innodb row_format = redundant; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +drop table t8, t9; + +#test valid values with innodb_file_format unset +set global innodb_file_per_table = on; +set global innodb_file_format = `0`; + +--error ER_CANT_CREATE_TABLE +create table t1 (id int primary key) engine = innodb key_block_size = 1; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t2 (id int primary key) engine = innodb key_block_size = 2; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t3 (id int primary key) engine = innodb key_block_size = 4; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t4 (id int primary key) engine = innodb key_block_size = 8; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t5 (id int primary key) engine = innodb key_block_size = 16; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t6 (id int primary key) engine = innodb row_format = compressed; +show warnings; +--error ER_CANT_CREATE_TABLE +create table t7 (id int primary key) engine = innodb row_format = dynamic; +show warnings; +create table t8 (id int primary key) engine = innodb row_format = compact; +create table t9 (id int primary key) engine = innodb row_format = redundant; + +SELECT table_schema, table_name, row_format, data_length, index_length +FROM information_schema.tables WHERE engine='innodb'; +drop table t8, t9; + +eval set global innodb_file_per_table=$per_table; +eval set global innodb_file_format=$format; +# +# Testing of tablespace tagging +# +-- disable_info +set global innodb_file_per_table=on; +set global innodb_file_format=`Barracuda`; +set global innodb_file_format_max=`Antelope`; +create table normal_table ( + c1 int +) engine = innodb; +select @@innodb_file_format_max; +create table zip_table ( + c1 int +) engine = innodb key_block_size = 8; +select @@innodb_file_format_max; +set global innodb_file_format_max=`Antelope`; +select @@innodb_file_format_max; +-- disable_result_log +show table status; +-- enable_result_log +select @@innodb_file_format_max; +drop table normal_table, zip_table; +-- disable_result_log + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval set global innodb_file_format=$format; +eval set global innodb_file_per_table=$per_table; +eval set session innodb_strict_mode=$innodb_strict_mode_orig; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test new file mode 100644 index 00000000000..5bbbf45d484 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test @@ -0,0 +1,1160 @@ +# +# Bug#36169 create innodb compressed table with too large row size crashed +# http://bugs.mysql.com/36169 +# + +-- source include/have_innodb.inc + +let $file_format=`select @@innodb_file_format`; +let $file_per_table=`select @@innodb_file_per_table`; +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=ON; + +# +# The following is copied from http://bugs.mysql.com/36169 +# (http://bugs.mysql.com/file.php?id=9121) +# Probably it can be simplified but that is not obvious. +# + +# we care only that the following SQL commands do produce errors +# as expected and do not crash the server +-- disable_query_log +-- disable_result_log + +# Generating 10 tables +# Creating a table with 94 columns and 24 indexes +DROP TABLE IF EXISTS `table0`; +set innodb_strict_mode=on; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table0` +(`col0` BOOL, +`col1` BOOL, +`col2` TINYINT, +`col3` DATE, +`col4` TIME, +`col5` SET ('test1','test2','test3'), +`col6` TIME, +`col7` TEXT, +`col8` DECIMAL, +`col9` SET ('test1','test2','test3'), +`col10` FLOAT, +`col11` DOUBLE PRECISION, +`col12` ENUM ('test1','test2','test3'), +`col13` TINYBLOB, +`col14` YEAR, +`col15` SET ('test1','test2','test3'), +`col16` NUMERIC, +`col17` NUMERIC, +`col18` BLOB, +`col19` DATETIME, +`col20` DOUBLE PRECISION, +`col21` DECIMAL, +`col22` DATETIME, +`col23` NUMERIC, +`col24` NUMERIC, +`col25` LONGTEXT, +`col26` TINYBLOB, +`col27` TIME, +`col28` TINYBLOB, +`col29` ENUM ('test1','test2','test3'), +`col30` SMALLINT, +`col31` REAL, +`col32` FLOAT, +`col33` CHAR (175), +`col34` TINYTEXT, +`col35` TINYTEXT, +`col36` TINYBLOB, +`col37` TINYBLOB, +`col38` TINYTEXT, +`col39` MEDIUMBLOB, +`col40` TIMESTAMP, +`col41` DOUBLE, +`col42` SMALLINT, +`col43` LONGBLOB, +`col44` VARCHAR (80), +`col45` MEDIUMTEXT, +`col46` NUMERIC, +`col47` BIGINT, +`col48` DATE, +`col49` TINYBLOB, +`col50` DATE, +`col51` BOOL, +`col52` MEDIUMINT, +`col53` FLOAT, +`col54` TINYBLOB, +`col55` LONGTEXT, +`col56` SMALLINT, +`col57` ENUM ('test1','test2','test3'), +`col58` DATETIME, +`col59` MEDIUMTEXT, +`col60` VARCHAR (232), +`col61` NUMERIC, +`col62` YEAR, +`col63` SMALLINT, +`col64` TIMESTAMP, +`col65` BLOB, +`col66` LONGBLOB, +`col67` INT, +`col68` LONGTEXT, +`col69` ENUM ('test1','test2','test3'), +`col70` INT, +`col71` TIME, +`col72` TIMESTAMP, +`col73` TIMESTAMP, +`col74` VARCHAR (170), +`col75` SET ('test1','test2','test3'), +`col76` TINYBLOB, +`col77` BIGINT, +`col78` NUMERIC, +`col79` DATETIME, +`col80` YEAR, +`col81` NUMERIC, +`col82` LONGBLOB, +`col83` TEXT, +`col84` CHAR (83), +`col85` DECIMAL, +`col86` FLOAT, +`col87` INT, +`col88` VARCHAR (145), +`col89` DATE, +`col90` DECIMAL, +`col91` DECIMAL, +`col92` MEDIUMBLOB, +`col93` TIME, +KEY `idx0` (`col69`,`col90`,`col8`), +KEY `idx1` (`col60`), +KEY `idx2` (`col60`,`col70`,`col74`), +KEY `idx3` (`col22`,`col32`,`col72`,`col30`), +KEY `idx4` (`col29`), +KEY `idx5` (`col19`,`col45`(143)), +KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), +KEY `idx7` (`col48`,`col61`), +KEY `idx8` (`col93`), +KEY `idx9` (`col31`), +KEY `idx10` (`col30`,`col21`), +KEY `idx11` (`col67`), +KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), +KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), +KEY `idx14` (`col78`), +KEY `idx15` (`col63`,`col67`,`col64`), +KEY `idx16` (`col17`,`col86`), +KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), +KEY `idx18` (`col62`), +KEY `idx19` (`col31`,`col57`,`col56`,`col53`), +KEY `idx20` (`col46`), +KEY `idx21` (`col83`(54)), +KEY `idx22` (`col51`,`col7`(120)), +KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +# Creating a table with 10 columns and 32 indexes +DROP TABLE IF EXISTS `table1`; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table1` +(`col0` CHAR (113), +`col1` FLOAT, +`col2` BIGINT, +`col3` DECIMAL, +`col4` BLOB, +`col5` LONGTEXT, +`col6` SET ('test1','test2','test3'), +`col7` BIGINT, +`col8` BIGINT, +`col9` TINYBLOB, +KEY `idx0` (`col5`(101),`col7`,`col8`), +KEY `idx1` (`col8`), +KEY `idx2` (`col4`(177),`col9`(126),`col6`,`col3`), +KEY `idx3` (`col5`(160)), +KEY `idx4` (`col9`(242)), +KEY `idx5` (`col4`(139),`col2`,`col3`), +KEY `idx6` (`col7`), +KEY `idx7` (`col6`,`col2`,`col0`,`col3`), +KEY `idx8` (`col9`(66)), +KEY `idx9` (`col5`(253)), +KEY `idx10` (`col1`,`col7`,`col2`), +KEY `idx11` (`col9`(242),`col0`,`col8`,`col5`(163)), +KEY `idx12` (`col8`), +KEY `idx13` (`col0`,`col9`(37)), +KEY `idx14` (`col0`), +KEY `idx15` (`col5`(111)), +KEY `idx16` (`col8`,`col0`,`col5`(13)), +KEY `idx17` (`col4`(139)), +KEY `idx18` (`col5`(189),`col2`,`col3`,`col9`(136)), +KEY `idx19` (`col0`,`col3`,`col1`,`col8`), +KEY `idx20` (`col8`), +KEY `idx21` (`col0`,`col7`,`col9`(227),`col3`), +KEY `idx22` (`col0`), +KEY `idx23` (`col2`), +KEY `idx24` (`col3`), +KEY `idx25` (`col2`,`col3`), +KEY `idx26` (`col0`), +KEY `idx27` (`col5`(254)), +KEY `idx28` (`col3`), +KEY `idx29` (`col3`), +KEY `idx30` (`col7`,`col3`,`col0`,`col4`(220)), +KEY `idx31` (`col4`(1),`col0`) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +# Creating a table with 141 columns and 18 indexes +DROP TABLE IF EXISTS `table2`; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table2` +(`col0` BOOL, +`col1` MEDIUMINT, +`col2` VARCHAR (209), +`col3` MEDIUMBLOB, +`col4` CHAR (13), +`col5` DOUBLE, +`col6` TINYTEXT, +`col7` REAL, +`col8` SMALLINT, +`col9` BLOB, +`col10` TINYINT, +`col11` DECIMAL, +`col12` BLOB, +`col13` DECIMAL, +`col14` LONGBLOB, +`col15` SMALLINT, +`col16` LONGBLOB, +`col17` TINYTEXT, +`col18` FLOAT, +`col19` CHAR (78), +`col20` MEDIUMTEXT, +`col21` SET ('test1','test2','test3'), +`col22` MEDIUMINT, +`col23` INT, +`col24` MEDIUMBLOB, +`col25` ENUM ('test1','test2','test3'), +`col26` TINYBLOB, +`col27` VARCHAR (116), +`col28` TIMESTAMP, +`col29` BLOB, +`col30` SMALLINT, +`col31` DOUBLE PRECISION, +`col32` DECIMAL, +`col33` DECIMAL, +`col34` TEXT, +`col35` MEDIUMINT, +`col36` MEDIUMINT, +`col37` BIGINT, +`col38` VARCHAR (253), +`col39` TINYBLOB, +`col40` MEDIUMBLOB, +`col41` BIGINT, +`col42` DOUBLE, +`col43` TEXT, +`col44` BLOB, +`col45` TIME, +`col46` MEDIUMINT, +`col47` DOUBLE PRECISION, +`col48` SET ('test1','test2','test3'), +`col49` DOUBLE PRECISION, +`col50` VARCHAR (97), +`col51` TEXT, +`col52` NUMERIC, +`col53` ENUM ('test1','test2','test3'), +`col54` MEDIUMTEXT, +`col55` MEDIUMINT, +`col56` DATETIME, +`col57` DATETIME, +`col58` MEDIUMTEXT, +`col59` CHAR (244), +`col60` LONGBLOB, +`col61` MEDIUMBLOB, +`col62` DOUBLE, +`col63` SMALLINT, +`col64` BOOL, +`col65` SMALLINT, +`col66` VARCHAR (212), +`col67` TIME, +`col68` REAL, +`col69` BOOL, +`col70` BIGINT, +`col71` DATE, +`col72` TINYINT, +`col73` ENUM ('test1','test2','test3'), +`col74` DATE, +`col75` TIME, +`col76` DATETIME, +`col77` BOOL, +`col78` TINYTEXT, +`col79` MEDIUMINT, +`col80` NUMERIC, +`col81` LONGTEXT, +`col82` SET ('test1','test2','test3'), +`col83` DOUBLE PRECISION, +`col84` NUMERIC, +`col85` VARCHAR (184), +`col86` DOUBLE PRECISION, +`col87` MEDIUMTEXT, +`col88` MEDIUMBLOB, +`col89` BOOL, +`col90` SMALLINT, +`col91` TINYINT, +`col92` ENUM ('test1','test2','test3'), +`col93` BOOL, +`col94` TIMESTAMP, +`col95` BOOL, +`col96` MEDIUMTEXT, +`col97` DECIMAL, +`col98` BOOL, +`col99` DECIMAL, +`col100` MEDIUMINT, +`col101` DOUBLE PRECISION, +`col102` TINYINT, +`col103` BOOL, +`col104` MEDIUMINT, +`col105` DECIMAL, +`col106` NUMERIC, +`col107` TIMESTAMP, +`col108` MEDIUMBLOB, +`col109` TINYBLOB, +`col110` SET ('test1','test2','test3'), +`col111` YEAR, +`col112` TIMESTAMP, +`col113` CHAR (201), +`col114` BOOL, +`col115` TINYINT, +`col116` DOUBLE, +`col117` TINYINT, +`col118` TIMESTAMP, +`col119` SET ('test1','test2','test3'), +`col120` SMALLINT, +`col121` TINYBLOB, +`col122` TIMESTAMP, +`col123` BLOB, +`col124` DATE, +`col125` SMALLINT, +`col126` ENUM ('test1','test2','test3'), +`col127` MEDIUMBLOB, +`col128` DOUBLE PRECISION, +`col129` REAL, +`col130` VARCHAR (159), +`col131` MEDIUMBLOB, +`col132` BIGINT, +`col133` INT, +`col134` SET ('test1','test2','test3'), +`col135` CHAR (198), +`col136` SET ('test1','test2','test3'), +`col137` MEDIUMTEXT, +`col138` SMALLINT, +`col139` BLOB, +`col140` LONGBLOB, +KEY `idx0` (`col14`(139),`col24`(208),`col38`,`col35`), +KEY `idx1` (`col48`,`col118`,`col29`(131),`col100`), +KEY `idx2` (`col86`,`col67`,`col43`(175)), +KEY `idx3` (`col19`), +KEY `idx4` (`col40`(220),`col67`), +KEY `idx5` (`col99`,`col56`), +KEY `idx6` (`col68`,`col28`,`col137`(157)), +KEY `idx7` (`col51`(160),`col99`,`col45`,`col39`(9)), +KEY `idx8` (`col15`,`col52`,`col90`,`col94`), +KEY `idx9` (`col24`(3),`col139`(248),`col108`(118),`col41`), +KEY `idx10` (`col36`,`col92`,`col114`), +KEY `idx11` (`col115`,`col9`(116)), +KEY `idx12` (`col130`,`col93`,`col134`), +KEY `idx13` (`col123`(65)), +KEY `idx14` (`col44`(90),`col86`,`col119`), +KEY `idx15` (`col69`), +KEY `idx16` (`col132`,`col81`(118),`col18`), +KEY `idx17` (`col24`(250),`col7`,`col92`,`col45`) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +# Creating a table with 199 columns and 1 indexes +DROP TABLE IF EXISTS `table3`; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table3` +(`col0` SMALLINT, +`col1` SET ('test1','test2','test3'), +`col2` TINYTEXT, +`col3` DOUBLE, +`col4` NUMERIC, +`col5` DATE, +`col6` BIGINT, +`col7` DOUBLE, +`col8` TEXT, +`col9` INT, +`col10` REAL, +`col11` TINYINT, +`col12` NUMERIC, +`col13` NUMERIC, +`col14` TIME, +`col15` DOUBLE, +`col16` REAL, +`col17` MEDIUMBLOB, +`col18` YEAR, +`col19` TINYTEXT, +`col20` YEAR, +`col21` CHAR (250), +`col22` TINYINT, +`col23` TINYINT, +`col24` SMALLINT, +`col25` DATETIME, +`col26` MEDIUMINT, +`col27` LONGBLOB, +`col28` VARCHAR (106), +`col29` FLOAT, +`col30` MEDIUMTEXT, +`col31` TINYBLOB, +`col32` BIGINT, +`col33` YEAR, +`col34` REAL, +`col35` MEDIUMBLOB, +`col36` LONGTEXT, +`col37` LONGBLOB, +`col38` BIGINT, +`col39` FLOAT, +`col40` TIME, +`col41` DATETIME, +`col42` BOOL, +`col43` BIGINT, +`col44` SMALLINT, +`col45` TIME, +`col46` DOUBLE PRECISION, +`col47` TIME, +`col48` TINYTEXT, +`col49` DOUBLE PRECISION, +`col50` BIGINT, +`col51` NUMERIC, +`col52` TINYBLOB, +`col53` DATE, +`col54` DECIMAL, +`col55` SMALLINT, +`col56` TINYTEXT, +`col57` ENUM ('test1','test2','test3'), +`col58` YEAR, +`col59` TIME, +`col60` TINYINT, +`col61` DECIMAL, +`col62` DOUBLE, +`col63` DATE, +`col64` LONGTEXT, +`col65` DOUBLE, +`col66` VARCHAR (88), +`col67` MEDIUMTEXT, +`col68` DATE, +`col69` MEDIUMINT, +`col70` DECIMAL, +`col71` MEDIUMTEXT, +`col72` LONGTEXT, +`col73` REAL, +`col74` DOUBLE, +`col75` TIME, +`col76` DATE, +`col77` DECIMAL, +`col78` MEDIUMBLOB, +`col79` NUMERIC, +`col80` BIGINT, +`col81` YEAR, +`col82` SMALLINT, +`col83` MEDIUMINT, +`col84` TINYINT, +`col85` MEDIUMBLOB, +`col86` TIME, +`col87` MEDIUMBLOB, +`col88` LONGTEXT, +`col89` BOOL, +`col90` BLOB, +`col91` LONGBLOB, +`col92` YEAR, +`col93` BLOB, +`col94` INT, +`col95` TINYTEXT, +`col96` TINYINT, +`col97` DECIMAL, +`col98` ENUM ('test1','test2','test3'), +`col99` MEDIUMINT, +`col100` TINYINT, +`col101` MEDIUMBLOB, +`col102` TINYINT, +`col103` SET ('test1','test2','test3'), +`col104` TIMESTAMP, +`col105` TEXT, +`col106` DATETIME, +`col107` MEDIUMTEXT, +`col108` CHAR (220), +`col109` TIME, +`col110` VARCHAR (131), +`col111` DECIMAL, +`col112` FLOAT, +`col113` SMALLINT, +`col114` BIGINT, +`col115` LONGBLOB, +`col116` SET ('test1','test2','test3'), +`col117` ENUM ('test1','test2','test3'), +`col118` BLOB, +`col119` MEDIUMTEXT, +`col120` SET ('test1','test2','test3'), +`col121` DATETIME, +`col122` FLOAT, +`col123` VARCHAR (242), +`col124` YEAR, +`col125` MEDIUMBLOB, +`col126` TIME, +`col127` BOOL, +`col128` TINYBLOB, +`col129` DOUBLE, +`col130` TINYINT, +`col131` BIGINT, +`col132` SMALLINT, +`col133` INT, +`col134` DOUBLE PRECISION, +`col135` MEDIUMBLOB, +`col136` SET ('test1','test2','test3'), +`col137` TINYTEXT, +`col138` DOUBLE PRECISION, +`col139` NUMERIC, +`col140` BLOB, +`col141` SET ('test1','test2','test3'), +`col142` INT, +`col143` VARCHAR (26), +`col144` BLOB, +`col145` REAL, +`col146` SET ('test1','test2','test3'), +`col147` LONGBLOB, +`col148` TEXT, +`col149` BLOB, +`col150` CHAR (189), +`col151` LONGTEXT, +`col152` INT, +`col153` FLOAT, +`col154` LONGTEXT, +`col155` DATE, +`col156` LONGBLOB, +`col157` TINYBLOB, +`col158` REAL, +`col159` DATE, +`col160` TIME, +`col161` YEAR, +`col162` DOUBLE, +`col163` VARCHAR (90), +`col164` FLOAT, +`col165` NUMERIC, +`col166` ENUM ('test1','test2','test3'), +`col167` DOUBLE PRECISION, +`col168` DOUBLE PRECISION, +`col169` TINYBLOB, +`col170` TIME, +`col171` SMALLINT, +`col172` TINYTEXT, +`col173` SMALLINT, +`col174` DOUBLE, +`col175` VARCHAR (14), +`col176` VARCHAR (90), +`col177` REAL, +`col178` MEDIUMINT, +`col179` TINYBLOB, +`col180` FLOAT, +`col181` TIMESTAMP, +`col182` REAL, +`col183` DOUBLE PRECISION, +`col184` BIGINT, +`col185` INT, +`col186` MEDIUMTEXT, +`col187` TIME, +`col188` FLOAT, +`col189` TIME, +`col190` INT, +`col191` FLOAT, +`col192` MEDIUMINT, +`col193` TINYINT, +`col194` MEDIUMTEXT, +`col195` DATE, +`col196` TIME, +`col197` YEAR, +`col198` CHAR (206), +KEY `idx0` (`col39`,`col23`) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +# Creating a table with 133 columns and 16 indexes +DROP TABLE IF EXISTS `table4`; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table4` +(`col0` VARCHAR (60), +`col1` NUMERIC, +`col2` LONGTEXT, +`col3` MEDIUMTEXT, +`col4` LONGTEXT, +`col5` LONGBLOB, +`col6` LONGBLOB, +`col7` DATETIME, +`col8` TINYTEXT, +`col9` BLOB, +`col10` BOOL, +`col11` BIGINT, +`col12` TEXT, +`col13` VARCHAR (213), +`col14` TINYBLOB, +`col15` BOOL, +`col16` MEDIUMTEXT, +`col17` DOUBLE, +`col18` TEXT, +`col19` BLOB, +`col20` SET ('test1','test2','test3'), +`col21` TINYINT, +`col22` DATETIME, +`col23` TINYINT, +`col24` ENUM ('test1','test2','test3'), +`col25` REAL, +`col26` BOOL, +`col27` FLOAT, +`col28` LONGBLOB, +`col29` DATETIME, +`col30` FLOAT, +`col31` SET ('test1','test2','test3'), +`col32` LONGBLOB, +`col33` NUMERIC, +`col34` YEAR, +`col35` VARCHAR (146), +`col36` BIGINT, +`col37` DATETIME, +`col38` DATE, +`col39` SET ('test1','test2','test3'), +`col40` CHAR (112), +`col41` FLOAT, +`col42` YEAR, +`col43` TIME, +`col44` DOUBLE, +`col45` NUMERIC, +`col46` FLOAT, +`col47` DECIMAL, +`col48` BIGINT, +`col49` DECIMAL, +`col50` YEAR, +`col51` MEDIUMTEXT, +`col52` LONGBLOB, +`col53` SET ('test1','test2','test3'), +`col54` BLOB, +`col55` FLOAT, +`col56` REAL, +`col57` REAL, +`col58` TEXT, +`col59` MEDIUMBLOB, +`col60` INT, +`col61` INT, +`col62` DATE, +`col63` TEXT, +`col64` DATE, +`col65` ENUM ('test1','test2','test3'), +`col66` DOUBLE PRECISION, +`col67` TINYTEXT, +`col68` TINYBLOB, +`col69` FLOAT, +`col70` BLOB, +`col71` DATETIME, +`col72` DOUBLE, +`col73` LONGTEXT, +`col74` TIME, +`col75` DATETIME, +`col76` VARCHAR (122), +`col77` MEDIUMTEXT, +`col78` MEDIUMTEXT, +`col79` BOOL, +`col80` LONGTEXT, +`col81` TINYTEXT, +`col82` NUMERIC, +`col83` DOUBLE PRECISION, +`col84` DATE, +`col85` YEAR, +`col86` BLOB, +`col87` TINYTEXT, +`col88` DOUBLE PRECISION, +`col89` MEDIUMINT, +`col90` MEDIUMTEXT, +`col91` NUMERIC, +`col92` DATETIME, +`col93` NUMERIC, +`col94` SET ('test1','test2','test3'), +`col95` TINYTEXT, +`col96` SET ('test1','test2','test3'), +`col97` YEAR, +`col98` MEDIUMINT, +`col99` TEXT, +`col100` TEXT, +`col101` TIME, +`col102` VARCHAR (225), +`col103` TINYTEXT, +`col104` TEXT, +`col105` MEDIUMTEXT, +`col106` TINYINT, +`col107` TEXT, +`col108` LONGBLOB, +`col109` LONGTEXT, +`col110` TINYTEXT, +`col111` CHAR (56), +`col112` YEAR, +`col113` ENUM ('test1','test2','test3'), +`col114` TINYBLOB, +`col115` DATETIME, +`col116` DATE, +`col117` TIME, +`col118` MEDIUMTEXT, +`col119` DOUBLE PRECISION, +`col120` FLOAT, +`col121` TIMESTAMP, +`col122` MEDIUMINT, +`col123` YEAR, +`col124` DATE, +`col125` TEXT, +`col126` FLOAT, +`col127` TINYTEXT, +`col128` BOOL, +`col129` NUMERIC, +`col130` TIMESTAMP, +`col131` INT, +`col132` MEDIUMBLOB, +KEY `idx0` (`col130`), +KEY `idx1` (`col30`,`col55`,`col19`(31)), +KEY `idx2` (`col104`(186)), +KEY `idx3` (`col131`), +KEY `idx4` (`col64`,`col93`,`col2`(11)), +KEY `idx5` (`col34`,`col121`,`col22`), +KEY `idx6` (`col33`,`col55`,`col83`), +KEY `idx7` (`col17`,`col87`(245),`col99`(17)), +KEY `idx8` (`col65`,`col120`), +KEY `idx9` (`col82`), +KEY `idx10` (`col9`(72)), +KEY `idx11` (`col88`), +KEY `idx12` (`col128`,`col9`(200),`col71`,`col66`), +KEY `idx13` (`col77`(126)), +KEY `idx14` (`col105`(26),`col13`,`col117`), +KEY `idx15` (`col4`(246),`col130`,`col115`,`col3`(141)) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +# Creating a table with 176 columns and 13 indexes +DROP TABLE IF EXISTS `table5`; +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table5` +(`col0` MEDIUMTEXT, +`col1` VARCHAR (90), +`col2` TINYTEXT, +`col3` TIME, +`col4` BOOL, +`col5` TINYTEXT, +`col6` BOOL, +`col7` TIMESTAMP, +`col8` TINYBLOB, +`col9` TINYINT, +`col10` YEAR, +`col11` SET ('test1','test2','test3'), +`col12` TEXT, +`col13` CHAR (248), +`col14` BIGINT, +`col15` TEXT, +`col16` TINYINT, +`col17` NUMERIC, +`col18` SET ('test1','test2','test3'), +`col19` LONGBLOB, +`col20` FLOAT, +`col21` INT, +`col22` TEXT, +`col23` BOOL, +`col24` DECIMAL, +`col25` DOUBLE PRECISION, +`col26` FLOAT, +`col27` TINYBLOB, +`col28` NUMERIC, +`col29` MEDIUMBLOB, +`col30` DATE, +`col31` LONGTEXT, +`col32` DATE, +`col33` FLOAT, +`col34` BIGINT, +`col35` TINYTEXT, +`col36` MEDIUMTEXT, +`col37` TIME, +`col38` INT, +`col39` TINYINT, +`col40` SET ('test1','test2','test3'), +`col41` CHAR (130), +`col42` SMALLINT, +`col43` INT, +`col44` MEDIUMTEXT, +`col45` VARCHAR (126), +`col46` INT, +`col47` DOUBLE PRECISION, +`col48` BIGINT, +`col49` MEDIUMTEXT, +`col50` TINYBLOB, +`col51` MEDIUMINT, +`col52` TEXT, +`col53` VARCHAR (208), +`col54` VARCHAR (207), +`col55` NUMERIC, +`col56` DATETIME, +`col57` ENUM ('test1','test2','test3'), +`col58` NUMERIC, +`col59` TINYBLOB, +`col60` VARCHAR (73), +`col61` MEDIUMTEXT, +`col62` TINYBLOB, +`col63` DATETIME, +`col64` NUMERIC, +`col65` MEDIUMINT, +`col66` DATETIME, +`col67` NUMERIC, +`col68` TINYINT, +`col69` VARCHAR (58), +`col70` DECIMAL, +`col71` MEDIUMTEXT, +`col72` DATE, +`col73` TIME, +`col74` DOUBLE PRECISION, +`col75` DECIMAL, +`col76` MEDIUMBLOB, +`col77` REAL, +`col78` YEAR, +`col79` YEAR, +`col80` LONGBLOB, +`col81` BLOB, +`col82` BIGINT, +`col83` ENUM ('test1','test2','test3'), +`col84` NUMERIC, +`col85` SET ('test1','test2','test3'), +`col86` MEDIUMTEXT, +`col87` LONGBLOB, +`col88` TIME, +`col89` ENUM ('test1','test2','test3'), +`col90` DECIMAL, +`col91` FLOAT, +`col92` DATETIME, +`col93` TINYTEXT, +`col94` TIMESTAMP, +`col95` TIMESTAMP, +`col96` TEXT, +`col97` REAL, +`col98` VARCHAR (198), +`col99` TIME, +`col100` TINYINT, +`col101` BIGINT, +`col102` LONGBLOB, +`col103` LONGBLOB, +`col104` MEDIUMINT, +`col105` MEDIUMTEXT, +`col106` TIMESTAMP, +`col107` SMALLINT, +`col108` NUMERIC, +`col109` DECIMAL, +`col110` FLOAT, +`col111` DECIMAL, +`col112` REAL, +`col113` TINYTEXT, +`col114` FLOAT, +`col115` VARCHAR (7), +`col116` LONGTEXT, +`col117` DATE, +`col118` BIGINT, +`col119` TEXT, +`col120` BIGINT, +`col121` BLOB, +`col122` CHAR (110), +`col123` NUMERIC, +`col124` MEDIUMBLOB, +`col125` NUMERIC, +`col126` NUMERIC, +`col127` BOOL, +`col128` TIME, +`col129` TINYBLOB, +`col130` TINYBLOB, +`col131` DATE, +`col132` INT, +`col133` VARCHAR (123), +`col134` CHAR (238), +`col135` VARCHAR (225), +`col136` LONGTEXT, +`col137` LONGBLOB, +`col138` REAL, +`col139` TINYBLOB, +`col140` DATETIME, +`col141` TINYTEXT, +`col142` LONGBLOB, +`col143` BIGINT, +`col144` VARCHAR (236), +`col145` TEXT, +`col146` YEAR, +`col147` DECIMAL, +`col148` TEXT, +`col149` MEDIUMBLOB, +`col150` TINYINT, +`col151` BOOL, +`col152` VARCHAR (72), +`col153` INT, +`col154` VARCHAR (165), +`col155` TINYINT, +`col156` MEDIUMTEXT, +`col157` DOUBLE PRECISION, +`col158` TIME, +`col159` MEDIUMBLOB, +`col160` LONGBLOB, +`col161` DATETIME, +`col162` DOUBLE PRECISION, +`col163` BLOB, +`col164` ENUM ('test1','test2','test3'), +`col165` TIMESTAMP, +`col166` DATE, +`col167` TINYBLOB, +`col168` TINYBLOB, +`col169` LONGBLOB, +`col170` DATETIME, +`col171` BIGINT, +`col172` VARCHAR (30), +`col173` LONGTEXT, +`col174` TIME, +`col175` FLOAT, +KEY `idx0` (`col16`,`col156`(139),`col97`,`col120`), +KEY `idx1` (`col24`,`col0`(108)), +KEY `idx2` (`col117`,`col173`(34),`col132`,`col82`), +KEY `idx3` (`col2`(86)), +KEY `idx4` (`col2`(43)), +KEY `idx5` (`col83`,`col35`(87),`col111`), +KEY `idx6` (`col6`,`col134`,`col92`), +KEY `idx7` (`col56`), +KEY `idx8` (`col30`,`col53`,`col129`(66)), +KEY `idx9` (`col53`,`col113`(211),`col32`,`col15`(75)), +KEY `idx10` (`col34`), +KEY `idx11` (`col126`), +KEY `idx12` (`col24`) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +# Creating a table with 179 columns and 46 indexes +DROP TABLE IF EXISTS `table6`; +-- error ER_TOO_BIG_ROWSIZE +--error ER_TOO_BIG_ROWSIZE +CREATE TABLE IF NOT EXISTS `table6` +(`col0` ENUM ('test1','test2','test3'), +`col1` MEDIUMBLOB, +`col2` MEDIUMBLOB, +`col3` DATETIME, +`col4` DATE, +`col5` YEAR, +`col6` REAL, +`col7` NUMERIC, +`col8` MEDIUMBLOB, +`col9` TEXT, +`col10` TIMESTAMP, +`col11` DOUBLE, +`col12` DOUBLE, +`col13` SMALLINT, +`col14` TIMESTAMP, +`col15` DECIMAL, +`col16` DATE, +`col17` TEXT, +`col18` LONGBLOB, +`col19` BIGINT, +`col20` FLOAT, +`col21` DATETIME, +`col22` TINYINT, +`col23` MEDIUMBLOB, +`col24` SET ('test1','test2','test3'), +`col25` TIME, +`col26` TEXT, +`col27` LONGTEXT, +`col28` BIGINT, +`col29` REAL, +`col30` YEAR, +`col31` MEDIUMBLOB, +`col32` MEDIUMINT, +`col33` FLOAT, +`col34` TEXT, +`col35` DATE, +`col36` TIMESTAMP, +`col37` REAL, +`col38` BLOB, +`col39` BLOB, +`col40` BLOB, +`col41` TINYBLOB, +`col42` INT, +`col43` TINYINT, +`col44` REAL, +`col45` BIGINT, +`col46` TIMESTAMP, +`col47` BLOB, +`col48` ENUM ('test1','test2','test3'), +`col49` BOOL, +`col50` CHAR (109), +`col51` DOUBLE, +`col52` DOUBLE PRECISION, +`col53` ENUM ('test1','test2','test3'), +`col54` FLOAT, +`col55` DOUBLE PRECISION, +`col56` CHAR (166), +`col57` TEXT, +`col58` TIME, +`col59` DECIMAL, +`col60` TEXT, +`col61` ENUM ('test1','test2','test3'), +`col62` LONGTEXT, +`col63` YEAR, +`col64` DOUBLE, +`col65` CHAR (87), +`col66` DATE, +`col67` BOOL, +`col68` MEDIUMBLOB, +`col69` DATETIME, +`col70` DECIMAL, +`col71` TIME, +`col72` REAL, +`col73` LONGTEXT, +`col74` BLOB, +`col75` REAL, +`col76` INT, +`col77` INT, +`col78` FLOAT, +`col79` DOUBLE, +`col80` MEDIUMINT, +`col81` ENUM ('test1','test2','test3'), +`col82` VARCHAR (221), +`col83` BIGINT, +`col84` TINYINT, +`col85` BIGINT, +`col86` FLOAT, +`col87` MEDIUMBLOB, +`col88` CHAR (126), +`col89` MEDIUMBLOB, +`col90` DATETIME, +`col91` TINYINT, +`col92` DOUBLE, +`col93` NUMERIC, +`col94` DATE, +`col95` BLOB, +`col96` DATETIME, +`col97` TIME, +`col98` LONGBLOB, +`col99` INT, +`col100` SET ('test1','test2','test3'), +`col101` TINYBLOB, +`col102` INT, +`col103` MEDIUMBLOB, +`col104` MEDIUMTEXT, +`col105` FLOAT, +`col106` TINYBLOB, +`col107` VARCHAR (26), +`col108` TINYINT, +`col109` TIME, +`col110` TINYBLOB, +`col111` LONGBLOB, +`col112` TINYTEXT, +`col113` FLOAT, +`col114` TINYINT, +`col115` NUMERIC, +`col116` TIME, +`col117` SET ('test1','test2','test3'), +`col118` DATE, +`col119` SMALLINT, +`col120` BLOB, +`col121` TINYTEXT, +`col122` REAL, +`col123` YEAR, +`col124` REAL, +`col125` BOOL, +`col126` BLOB, +`col127` REAL, +`col128` MEDIUMBLOB, +`col129` TIMESTAMP, +`col130` LONGBLOB, +`col131` MEDIUMBLOB, +`col132` YEAR, +`col133` YEAR, +`col134` INT, +`col135` MEDIUMINT, +`col136` MEDIUMINT, +`col137` TINYTEXT, +`col138` TINYBLOB, +`col139` BLOB, +`col140` SET ('test1','test2','test3'), +`col141` ENUM ('test1','test2','test3'), +`col142` ENUM ('test1','test2','test3'), +`col143` TINYTEXT, +`col144` DATETIME, +`col145` TEXT, +`col146` DOUBLE PRECISION, +`col147` DECIMAL, +`col148` MEDIUMTEXT, +`col149` TINYTEXT, +`col150` SET ('test1','test2','test3'), +`col151` MEDIUMTEXT, +`col152` CHAR (126), +`col153` DOUBLE, +`col154` CHAR (243), +`col155` SET ('test1','test2','test3'), +`col156` SET ('test1','test2','test3'), +`col157` DATETIME, +`col158` DOUBLE, +`col159` NUMERIC, +`col160` DECIMAL, +`col161` FLOAT, +`col162` LONGBLOB, +`col163` LONGTEXT, +`col164` INT, +`col165` TIME, +`col166` CHAR (27), +`col167` VARCHAR (63), +`col168` TEXT, +`col169` TINYBLOB, +`col170` TINYBLOB, +`col171` ENUM ('test1','test2','test3'), +`col172` INT, +`col173` TIME, +`col174` DECIMAL, +`col175` DOUBLE, +`col176` MEDIUMBLOB, +`col177` LONGBLOB, +`col178` CHAR (43), +KEY `idx0` (`col131`(219)), +KEY `idx1` (`col67`,`col122`,`col59`,`col87`(33)), +KEY `idx2` (`col83`,`col42`,`col57`(152)), +KEY `idx3` (`col106`(124)), +KEY `idx4` (`col173`,`col80`,`col165`,`col89`(78)), +KEY `idx5` (`col174`,`col145`(108),`col23`(228),`col141`), +KEY `idx6` (`col157`,`col140`), +KEY `idx7` (`col130`(188),`col15`), +KEY `idx8` (`col52`), +KEY `idx9` (`col144`), +KEY `idx10` (`col155`), +KEY `idx11` (`col62`(230),`col1`(109)), +KEY `idx12` (`col151`(24),`col95`(85)), +KEY `idx13` (`col114`), +KEY `idx14` (`col42`,`col98`(56),`col146`), +KEY `idx15` (`col147`,`col39`(254),`col35`), +KEY `idx16` (`col79`), +KEY `idx17` (`col65`), +KEY `idx18` (`col149`(165),`col168`(119),`col32`,`col117`), +KEY `idx19` (`col64`), +KEY `idx20` (`col93`), +KEY `idx21` (`col64`,`col113`,`col104`(182)), +KEY `idx22` (`col52`,`col111`(189)), +KEY `idx23` (`col45`), +KEY `idx24` (`col154`,`col107`,`col110`(159)), +KEY `idx25` (`col149`(1),`col87`(131)), +KEY `idx26` (`col58`,`col115`,`col63`), +KEY `idx27` (`col95`(9),`col0`,`col87`(113)), +KEY `idx28` (`col92`,`col130`(1)), +KEY `idx29` (`col151`(129),`col137`(254),`col13`), +KEY `idx30` (`col49`), +KEY `idx31` (`col28`), +KEY `idx32` (`col83`,`col146`), +KEY `idx33` (`col155`,`col90`,`col17`(245)), +KEY `idx34` (`col174`,`col169`(44),`col107`), +KEY `idx35` (`col113`), +KEY `idx36` (`col52`), +KEY `idx37` (`col16`,`col120`(190)), +KEY `idx38` (`col28`), +KEY `idx39` (`col131`(165)), +KEY `idx40` (`col135`,`col26`(86)), +KEY `idx41` (`col69`,`col94`), +KEY `idx42` (`col105`,`col151`(38),`col97`), +KEY `idx43` (`col88`), +KEY `idx44` (`col176`(100),`col42`,`col73`(189),`col94`), +KEY `idx45` (`col2`(27),`col27`(116)) +)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +DROP TABLE IF EXISTS table0; +DROP TABLE IF EXISTS table1; +DROP TABLE IF EXISTS table2; +DROP TABLE IF EXISTS table3; +DROP TABLE IF EXISTS table4; +DROP TABLE IF EXISTS table5; +DROP TABLE IF EXISTS table6; + +EVAL SET GLOBAL innodb_file_format=$file_format; +EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test new file mode 100644 index 00000000000..8a143da752d --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test @@ -0,0 +1,30 @@ +# +# Test case for bug 36172 +# + +-- source include/not_embedded.inc +-- source include/have_innodb.inc + +SET storage_engine=InnoDB; + +# we do not really care about what gets printed, we are only +# interested in getting success or failure according to our +# expectations + +-- disable_query_log +-- disable_result_log + +let $file_format=`select @@innodb_file_format`; +let $file_per_table=`select @@innodb_file_per_table`; +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=on; + +DROP TABLE IF EXISTS `table0`; +CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; +insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366'; +CHECK TABLE table0 EXTENDED; +INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278'; +CHECK TABLE table0 EXTENDED; +DROP TABLE table0; +EVAL SET GLOBAL innodb_file_format=$file_format; +EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test new file mode 100644 index 00000000000..3c5d79826f0 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test @@ -0,0 +1,107 @@ +-- source include/have_innodb.inc + +let $file_format=`select @@innodb_file_format`; +let $file_per_table=`select @@innodb_file_per_table`; +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=on; + +CREATE TABLE bug52745 ( + a2 int(10) unsigned DEFAULT NULL, + col37 time DEFAULT NULL, + col38 char(229) CHARACTER SET utf8 DEFAULT NULL, + col39 text, + col40 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + col41 int(10) unsigned DEFAULT NULL, + col42 varchar(248) CHARACTER SET utf8 DEFAULT NULL, + col43 smallint(5) unsigned zerofill DEFAULT NULL, + col44 varchar(150) CHARACTER SET utf8 DEFAULT NULL, + col45 float unsigned zerofill DEFAULT NULL, + col46 binary(1) DEFAULT NULL, + col47 tinyint(4) DEFAULT NULL, + col48 tinyint(1) DEFAULT NULL, + col49 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + col50 binary(1) DEFAULT NULL, + col51 double unsigned zerofill DEFAULT NULL, + col52 int(10) unsigned DEFAULT NULL, + col53 time DEFAULT NULL, + col54 double unsigned DEFAULT NULL, + col55 time DEFAULT NULL, + col56 mediumtext CHARACTER SET latin2, + col57 blob, + col58 decimal(52,16) unsigned zerofill NOT NULL DEFAULT '000000000000000000000000000000000000.0000000000000000', + col59 binary(1) DEFAULT NULL, + col60 longblob, + col61 time DEFAULT NULL, + col62 longtext CHARACTER SET utf8 COLLATE utf8_persian_ci, + col63 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + col64 int(10) unsigned DEFAULT NULL, + col65 date DEFAULT NULL, + col66 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + col67 binary(1) DEFAULT NULL, + col68 tinyblob, + col69 date DEFAULT NULL, + col70 tinyint(3) unsigned zerofill DEFAULT NULL, + col71 varchar(44) CHARACTER SET utf8 DEFAULT NULL, + col72 datetime DEFAULT NULL, + col73 smallint(5) unsigned zerofill DEFAULT NULL, + col74 longblob, + col75 bit(34) DEFAULT NULL, + col76 float unsigned zerofill DEFAULT NULL, + col77 year(2) DEFAULT NULL, + col78 tinyint(3) unsigned DEFAULT NULL, + col79 set('msfheowh','tbpxbgf','by','wahnrjw','myqfasxz','rsokyumrt') CHARACTER SET latin2 DEFAULT NULL, + col80 datetime DEFAULT NULL, + col81 smallint(6) DEFAULT NULL, + col82 enum('xtaurnqfqz','rifrse','kuzwpbvb','niisabk','zxavro','rbvasv','','uulrfaove','','') DEFAULT NULL, + col83 bigint(20) unsigned zerofill DEFAULT NULL, + col84 float unsigned zerofill DEFAULT NULL, + col85 double DEFAULT NULL, + col86 enum('ylannv','','vlkhycqc','snke','cxifustp','xiaxaswzp','oxl') CHARACTER SET latin1 COLLATE latin1_german2_ci DEFAULT NULL, + col87 varbinary(221) DEFAULT NULL, + col88 double unsigned DEFAULT NULL, + col89 float unsigned zerofill DEFAULT NULL, + col90 tinyblob +) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +INSERT INTO bug52745 SET +col40='0000-00-00 00:00:00', +col51=16547, +col53='7711484', +col54=-28604, +col55='7112612', +col56='wakefulness\'', +col57=repeat('absorbefacient\'',106), +col58=11027, +col59='AM09gW7', +col60=repeat('Noelani\'',16), +col61='2520576', +col62='substitutiv', +col63='19950106155112', +col64=-12038, +col65='86238806', +col66='19600719080256', +col68=repeat('Sagittarius\'',54), +col69='38943902', +col70=1232, +col71='Elora\'', +col74=repeat('zipp',11), +col75='0', +col76=23254, +col78=13247, +col79='56219', +col80='20500609035724', +col81=11632, +col82=7, +col84=-23863, +col85=6341, +col87='HZdkf.4 s7t,5Rmq 8so fmr,ruGLUG25TrtI.yQ 2SuHq0ML7rw7.4 b2yf2E5TJxOtBBZImezDnzpj,uPYfznnEUDN1e9aQoO 2DsplB7TFWy oQJ br HLF :F,eQ p4i1oWsr lL3PG,hjCz6hYqN h1QTjLCjrv:QCdSzpYBibJAtZCxLOk3l6Blsh.W', +col88=16894, +col89=6161, +col90=repeat('gale',48); + +SHOW WARNINGS; + +DROP TABLE bug52745; + +EVAL SET GLOBAL innodb_file_format=$file_format; +EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug53591.test b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test new file mode 100644 index 00000000000..5c3f2b2bc83 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_bug53591.test @@ -0,0 +1,20 @@ +-- source include/have_innodb.inc + +let $file_format=`select @@innodb_file_format`; +let $file_per_table=`select @@innodb_file_per_table`; + +SET GLOBAL innodb_file_format='Barracuda'; +SET GLOBAL innodb_file_per_table=on; + +set old_alter_table=0; + +CREATE TABLE bug53591(a text charset utf8 not null) +ENGINE=InnoDB KEY_BLOCK_SIZE=1; +-- error 139 +ALTER TABLE bug53591 ADD PRIMARY KEY(a(220)); +SHOW WARNINGS; + +DROP TABLE bug53591; + +EVAL SET GLOBAL innodb_file_format=$file_format; +EVAL SET GLOBAL innodb_file_per_table=$file_per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug56680.test b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test new file mode 100644 index 00000000000..936191a9b9f --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_bug56680.test @@ -0,0 +1,140 @@ +# +# Bug #56680 InnoDB may return wrong results from a case-insensitive index +# +-- source include/have_innodb.inc + +-- disable_query_log +SET @tx_isolation_orig = @@tx_isolation; +SET @innodb_file_per_table_orig = @@innodb_file_per_table; +SET @innodb_file_format_orig = @@innodb_file_format; +# The flag innodb_change_buffering_debug is only available in debug builds. +# It instructs InnoDB to try to evict pages from the buffer pool when +# change buffering is possible, so that the change buffer will be used +# whenever possible. +-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET @innodb_change_buffering_debug_orig = @@innodb_change_buffering_debug; +-- error 0,ER_UNKNOWN_SYSTEM_VARIABLE +SET GLOBAL innodb_change_buffering_debug = 1; +-- enable_query_log +SET GLOBAL tx_isolation='REPEATABLE-READ'; +SET GLOBAL innodb_file_format=Barracuda; +SET GLOBAL innodb_file_per_table=on; + +CREATE TABLE bug56680( + a INT AUTO_INCREMENT PRIMARY KEY, + b CHAR(1), + c INT, + INDEX(b)) +ENGINE=InnoDB; + +INSERT INTO bug56680 VALUES(0,'x',1); +BEGIN; +SELECT b FROM bug56680; + +connect (con1,localhost,root,,); +connection con1; +BEGIN; +UPDATE bug56680 SET b='X'; + +connection default; +# This should return the last committed value 'x', but would return 'X' +# due to a bug in row_search_for_mysql(). +SELECT b FROM bug56680; +# This would always return the last committed value 'x'. +SELECT * FROM bug56680; + +connection con1; +ROLLBACK; +disconnect con1; + +connection default; + +SELECT b FROM bug56680; + +# For the rest of this test, use the READ UNCOMMITTED isolation level +# to see what exists in the secondary index. +SET GLOBAL tx_isolation='READ-UNCOMMITTED'; + +# Create enough rows for the table, so that the insert buffer will be +# used for modifying the secondary index page. There must be multiple +# index pages, because changes to the root page are never buffered. + +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; +INSERT INTO bug56680 SELECT 0,b,c FROM bug56680; + +BEGIN; +SELECT b FROM bug56680 LIMIT 2; + +connect (con1,localhost,root,,); +connection con1; +BEGIN; +DELETE FROM bug56680 WHERE a=1; +# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. +INSERT INTO bug56680 VALUES(1,'X',1); + +# This should force an insert buffer merge, and return 'X' in the first row. +SELECT b FROM bug56680 LIMIT 3; + +connection default; +SELECT b FROM bug56680 LIMIT 2; +CHECK TABLE bug56680; + +connection con1; +ROLLBACK; +SELECT b FROM bug56680 LIMIT 2; +CHECK TABLE bug56680; + +connection default; +disconnect con1; + +SELECT b FROM bug56680 LIMIT 2; + +CREATE TABLE bug56680_2( + a INT AUTO_INCREMENT PRIMARY KEY, + b VARCHAR(2) CHARSET latin1 COLLATE latin1_german2_ci, + c INT, + INDEX(b)) +ENGINE=InnoDB; + +INSERT INTO bug56680_2 SELECT 0,_latin1 0xdf,c FROM bug56680; + +BEGIN; +SELECT HEX(b) FROM bug56680_2 LIMIT 2; +DELETE FROM bug56680_2 WHERE a=1; +# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. +INSERT INTO bug56680_2 VALUES(1,'SS',1); + +# This should force an insert buffer merge, and return 'SS' in the first row. +SELECT HEX(b) FROM bug56680_2 LIMIT 3; +CHECK TABLE bug56680_2; + +# Test this with compressed tables. +ALTER TABLE bug56680_2 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1; + +SELECT HEX(b) FROM bug56680_2 LIMIT 2; +DELETE FROM bug56680_2 WHERE a=1; +# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. +INSERT INTO bug56680_2 VALUES(1,_latin1 0xdf,1); + +# This should force an insert buffer merge, and return 0xdf in the first row. +SELECT HEX(b) FROM bug56680_2 LIMIT 3; +CHECK TABLE bug56680_2; + +DROP TABLE bug56680_2; +DROP TABLE bug56680; + +-- disable_query_log +SET GLOBAL tx_isolation = @tx_isolation_orig; +SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; +SET GLOBAL innodb_file_format = @innodb_file_format_orig; +-- error 0, ER_UNKNOWN_SYSTEM_VARIABLE +SET GLOBAL innodb_change_buffering_debug = @innodb_change_buffering_debug_orig; diff --git a/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt new file mode 100644 index 00000000000..a9a3d8c3db8 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table-master.opt @@ -0,0 +1 @@ +--innodb-buffer-pool-size=8M diff --git a/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test new file mode 100644 index 00000000000..92f4f715241 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_cmp_drop_table.test @@ -0,0 +1,59 @@ +-- source include/have_innodb.inc + +let $per_table=`select @@innodb_file_per_table`; +let $format=`select @@innodb_file_format`; + +-- let $query_i_s = SELECT page_size FROM information_schema.innodb_cmpmem WHERE pages_used > 0 + +set global innodb_file_per_table=on; +set global innodb_file_format=`1`; + +create table t1(a text) engine=innodb key_block_size=8; + +-- disable_query_log + +# insert some rows so we are using compressed pages +-- let $i = 10 +while ($i) +{ + insert into t1 values(repeat('abcdefghijklmnopqrstuvwxyz',100)); + dec $i; +} +-- enable_query_log + +# we should be using some 8K pages +-- eval $query_i_s + +drop table t1; + +# because of lazy eviction at drop table in 5.5 there should be some +# used 8K pages +-- eval $query_i_s + +# create a non-compressed table and insert enough into it to evict +# compressed pages +create table t2(a text) engine=innodb; + +-- disable_query_log + +-- let $i = 400 +while ($i) +{ + insert into t2 values(repeat('abcdefghijklmnopqrstuvwxyz',1000)); + dec $i; +} + +-- enable_query_log + +# now there should be no 8K pages in the buffer pool +-- eval $query_i_s + +drop table t2; + +# +# restore environment to the state it was before this test execution +# + +-- disable_query_log +eval set global innodb_file_format=$format; +eval set global innodb_file_per_table=$per_table; diff --git a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test new file mode 100644 index 00000000000..54fb5651649 --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test @@ -0,0 +1,269 @@ +# Testcase for worklog #5743: Lift the limit of index key prefixes + +--source include/have_innodb.inc + +let $innodb_file_format_orig=`select @@innodb_file_format`; +let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; +let $innodb_large_prefix_orig=`select @@innodb_large_prefix`; + +set global innodb_file_format="Barracuda"; +set global innodb_file_per_table=1; +set global innodb_large_prefix=1; + +# Create a table of DYNAMIC format, with a primary index of 1000 bytes in +# size +create table worklog5743(a TEXT not null, primary key (a(1000))) +ROW_FORMAT=DYNAMIC, engine = innodb; + +# Do some insertion and update to excercise the external cache +# code path +insert into worklog5743 values(repeat("a", 20000)); + +# default session, update the table +update worklog5743 set a = (repeat("b", 16000)); + +# Create a secondary index +create index idx on worklog5743(a(2000)); + +# Start a few sessions to do selections on table being updated in default +# session, so it would rebuild the previous version from undo log. +# 1) Default session: Initiate an update on the externally stored column +# 2) Session con1: Select from table with repeated read +# 3) Session con2: Select from table with read uncommitted +# 4) Default session: rollback updates + +begin; +update worklog5743 set a = (repeat("x", 17000)); + +# Start a new session to select the column to force it build +# an earlier version of the clustered index through undo log. So it should +# just see the result of repeat("b", 16000) +select @@session.tx_isolation; +--connect (con1,localhost,root,,) +select a = repeat("x", 17000) from worklog5743; +select a = repeat("b", 16000) from worklog5743; + +# Start another session doing "read uncommitted" query, it +# should see the uncommitted update +--connect (con2,localhost,root,,) +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +select a = repeat("x", 17000) from worklog5743; + +# Roll back the transaction +--connection default +rollback; + +drop table worklog5743; + +# Create a table with only a secondary index has large prefix column +create table worklog5743(a1 int, a2 TEXT not null) +ROW_FORMAT=DYNAMIC, engine = innodb; + +create index idx on worklog5743(a1, a2(2000)); + +insert into worklog5743 values(9, repeat("a", 10000)); + +begin; + +update worklog5743 set a1 = 1000; + +# Do a select from another connection that would use the secondary index +--connection con1 +select @@session.tx_isolation; +explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; + +# Do read uncommitted in another session, it would show there is no +# row with a1 = 9 +--connection con2 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; + +--connection default +rollback; + +drop table worklog5743; + +# Create a table with a secondary index has small (50 bytes) prefix column +create table worklog5743(a1 int, a2 TEXT not null) +ROW_FORMAT=DYNAMIC, engine = innodb; + +create index idx on worklog5743(a1, a2(50)); + +insert into worklog5743 values(9, repeat("a", 10000)); + +begin; + +update worklog5743 set a1 = 1000; + +# Do a select from another connection that would use the secondary index +--connection con1 +select @@session.tx_isolation; +explain select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; + +# Do read uncommitted in another session, it would show there is no +# row with a1 = 9 +--connection con2 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +select a1, a2 = repeat("a", 10000) from worklog5743 where a1 = 9; + +--connection default +rollback; + +drop table worklog5743; + +# Create a table of ROW_FORMAT=COMPRESSED format +create table worklog5743_2(a1 int, a2 TEXT not null) +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; + +create table worklog5743_4(a1 int, a2 TEXT not null) +ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; + +# The maximum overall index record (not prefix) length for this table +# is page_zip_empty_size() / 2, which is 960. "Too big row" error ( +# HA_ERR_TO_BIG_ROW) will be printed if this limit is exceeded. +# Considering other fields and their overhead, the maximum length +# for column a2 is 940 or 941 depending on the zlib version used and +# compressBound() value used in page_zip_empty_size() (please refer +# to Bug #47495 for more detail). +-- error 139 +create index idx1 on worklog5743_2(a1, a2(942)); + +create index idx1 on worklog5743_2(a1, a2(940)); + +# similarly, the maximum index record length for the table is +# 1984. Considering other fields and their overhead, the +# maximum length for column a2 is 1964 or 1965 (please refer +# to Bug #47495 for more detail). +-- error 139 +create index idx1 on worklog5743_4(a1, a2(1966)); + +create index idx1 on worklog5743_4(a1, a2(1964)); + +insert into worklog5743_2 values(9, repeat("a", 10000)); +insert into worklog5743_4 values(9, repeat("a", 10000)); + +begin; + +update worklog5743_2 set a1 = 1000; +update worklog5743_4 set a1 = 1000; + +# Do a select from another connection that would use the secondary index +--connection con1 +select @@session.tx_isolation; +explain select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; +select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; +select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; + +# Do read uncommitted in another session, it would show there is no +# row with a1 = 9 +--connection con2 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +select a1, a2 = repeat("a", 10000) from worklog5743_2 where a1 = 9; +select a1, a2 = repeat("a", 10000) from worklog5743_4 where a1 = 9; + +--connection default +rollback; + +drop table worklog5743_2; +drop table worklog5743_4; + +# Create a table with varchar column, and create index directly on this +# large column (without prefix) +create table worklog5743(a1 int, a2 varchar(3000)) +ROW_FORMAT=DYNAMIC, engine = innodb; + +# Create an index with large column without prefix +create index idx on worklog5743(a1, a2); + +insert into worklog5743 values(9, repeat("a", 3000)); + +begin; + +update worklog5743 set a1 = 1000; + +# Do a select from another connection that would use the secondary index +--connection con1 +select @@session.tx_isolation; +explain select a1 from worklog5743 where a1 = 9; +select a1 from worklog5743 where a1 = 9; + +# Do read uncommitted, it would show there is no row with a1 = 9 +--connection con2 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +select a1 from worklog5743 where a1 = 9; + +--connection default +rollback; + +drop table worklog5743; + +# Create a table with old format, and the limit is 768 bytes. +-- error ER_INDEX_COLUMN_TOO_LONG +create table worklog5743(a TEXT not null, primary key (a(1000))) +engine = innodb; + +create table worklog5743(a TEXT) engine = innodb; + +# Excercise the column length check in ha_innobase::add_index() +-- error ER_INDEX_COLUMN_TOO_LONG +create index idx on worklog5743(a(1000)); + +# This should be successful +create index idx on worklog5743(a(725)); + +# Perform some DMLs +insert into worklog5743 values(repeat("a", 20000)); + +begin; +insert into worklog5743 values(repeat("b", 20000)); +update worklog5743 set a = (repeat("x", 25000)); + +# Start a new session to select the table to force it build +# an earlier version of the cluster index through undo log +select @@session.tx_isolation; +--connection con1 +select a = repeat("a", 20000) from worklog5743; + +--connection con2 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +select a = repeat("x", 25000) from worklog5743; + +--connection default +rollback; + +drop table worklog5743; + +# Some border line test on the column length. +# We have a limit of 3072 bytes for Barracuda table +create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC, engine = innodb; + +# Length exceeds maximum supported key length, will auto-truncated to 3072 +create index idx on worklog5743(a(3073)); + +create index idx2 on worklog5743(a(3072)); + +show create table worklog5743; + +drop table worklog5743; + +# We have a limit of 767 bytes for Antelope table +create table worklog5743(a TEXT not null) engine = innodb; + +-- error ER_INDEX_COLUMN_TOO_LONG +create index idx on worklog5743(a(768)); + +create index idx2 on worklog5743(a(767)); + +drop table worklog5743; + +eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; +eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; +eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig; diff --git a/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test new file mode 100644 index 00000000000..6019a2fcaaa --- /dev/null +++ b/mysql-test/suite/innodb_zip/t/innodb_prefix_index_liftedlimit.test @@ -0,0 +1,1338 @@ +######## suite/innodb/t/innodb_prefix_index_liftedlimit.test ########## +# # +# Testcase for worklog WL#5743: Lift the limit of index key prefixes # +# Accorrding to WL#5743 - prefix index limit is increased from 767 # +# to 3072 for innodb. This change is applicable with Barracuda file # +# format. # +# All sub-test in this file focus on prefix index along with other # +# operations # +# # +# # +# Creation: # +# 2011-05-19 Implemented this test as part of WL#5743 # +# # +###################################################################### + + +--source include/have_innodb.inc +# Save innodb variables +let $innodb_file_format_orig=`select @@innodb_file_format`; +let $innodb_file_per_table_orig=`select @@innodb_file_per_table`; +let $innodb_large_prefix_orig=`select @@innodb_large_prefix`; + +# Set Innodb file format as feature works for Barracuda file format +set global innodb_file_format="Barracuda"; +set global innodb_file_per_table=1; +set global innodb_large_prefix=1; + +-- disable_warnings +DROP TABLE IF EXISTS worklog5743; +-- enable_warnings +#------------------------------------------------------------------------------ +# Prefix index with VARCHAR data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +# check IS +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM +INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with TEXT data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); +# check IS +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM +INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with MEDIUMTEXT data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_mediumtext MEDIUMTEXT , col_2_mediumtext MEDIUMTEXT , +PRIMARY KEY (col_1_mediumtext(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_mediumtext (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_mediumtext = REPEAT("a", 4000),col_2_mediumtext = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_mediumtext = REPEAT("c", 4000) +WHERE col_1_mediumtext = REPEAT("a", 4000) +AND col_2_mediumtext = REPEAT("o", 4000); +SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_mediumtext = REPEAT("c", 4000) +AND col_2_mediumtext = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_mediumtext = REPEAT("b", 4000); +SELECT col_1_mediumtext = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with LONGTEXT data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_longtext LONGTEXT , col_2_longtext LONGTEXT , +PRIMARY KEY (col_1_longtext(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_longtext (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_longtext = REPEAT("a", 4000) , col_2_longtext = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_longtext = REPEAT("c", 4000) +WHERE col_1_longtext = REPEAT("a", 4000) +AND col_2_longtext = REPEAT("o", 4000); +SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_longtext = REPEAT("c", 4000) +AND col_2_longtext = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_longtext = REPEAT("b", 4000); +SELECT col_1_longtext = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with BLOB data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_blob (3072)); +# check IS +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE FROM +INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with MEDIUMBLOB data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_mediumblob MEDIUMBLOB , col_2_mediumblob MEDIUMBLOB , +PRIMARY KEY (col_1_mediumblob(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_mediumblob (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_mediumblob = REPEAT("a", 4000),col_2_mediumblob = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_mediumblob = REPEAT("c", 4000) +WHERE col_1_mediumblob = REPEAT("a", 4000) +AND col_2_mediumblob = REPEAT("o", 4000); +SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_mediumblob = REPEAT("c", 4000) +AND col_2_mediumblob = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_mediumblob = REPEAT("b", 4000); +SELECT col_1_mediumblob = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with LONGBLOB data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_longblob LONGBLOB , col_2_longblob LONGBLOB , +PRIMARY KEY (col_1_longblob(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_longblob (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_longblob = REPEAT("a", 4000) , col_2_longblob = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_longblob = REPEAT("c", 4000) +WHERE col_1_longblob = REPEAT("a", 4000) +AND col_2_longblob = REPEAT("o", 4000); +SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_longblob = REPEAT("c", 4000) +AND col_2_longblob = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_longblob = REPEAT("b", 4000); +SELECT col_1_longblob = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with VARBINARY data type , primary/secondary index and DML ops +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , +PRIMARY KEY (col_1_varbinary(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with CHAR data type , composite index and DML ops +CREATE TABLE worklog5743 (col_1_char CHAR (255) , col_2_char CHAR (255), +col_3_char CHAR (255), col_4_char CHAR (255),col_5_char CHAR (255), +col_6_char CHAR (255), col_7_char CHAR (255),col_8_char CHAR (255), +col_9_char CHAR (255), col_10_char CHAR (255),col_11_char CHAR (255), +col_12_char CHAR (255), col_13_char CHAR (255),col_14_char CHAR (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) +); +# Create index with total prefix index length = 3072 +CREATE INDEX prefix_idx ON worklog5743(col_1_char(250),col_2_char(250), +col_3_char(250),col_4_char(250),col_5_char(250),col_6_char(250), +col_7_char(250),col_8_char(250),col_9_char(250),col_10_char(250), +col_11_char(250),col_12_char(250),col_13_char(72) +); +INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) +); +SELECT col_1_char = REPEAT("a", 255) , col_2_char = REPEAT("o", 255) FROM worklog5743; +UPDATE worklog5743 SET col_1_char = REPEAT("c", 255) +WHERE col_1_char = REPEAT("a", 255) AND col_2_char = REPEAT("o", 255); +SELECT col_1_char = REPEAT("c", 255) FROM worklog5743 +WHERE col_1_char = REPEAT("c", 255) AND col_2_char = REPEAT("o", 255); +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255),REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_char = REPEAT("b", 255); +SELECT col_1_char = REPEAT("c", 255) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with BINARY data type , composite index and DML ops +CREATE TABLE worklog5743 (col_1_binary BINARY (255) , col_2_binary BINARY (255), +col_3_binary BINARY(255),col_4_binary BINARY (255),col_5_binary BINARY (255), +col_6_binary BINARY(255),col_7_binary BINARY (255),col_8_binary BINARY (255), +col_9_binary BINARY(255),col_10_binary BINARY (255),col_11_binary BINARY (255), +col_12_binary BINARY(255),col_13_binary BINARY (255),col_14_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) +); +# Create index with total prefix index length = 3072 +CREATE INDEX prefix_idx ON worklog5743(col_1_binary (250),col_2_binary (250), +col_3_binary (250),col_4_binary (250),col_5_binary (250), +col_6_binary (250),col_7_binary (250),col_8_binary (250), +col_9_binary (250),col_10_binary (250),col_11_binary (250), +col_12_binary (250),col_13_binary (72) +); +INSERT INTO worklog5743 VALUES(REPEAT("b", 255) , REPEAT("p", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) +); +SELECT col_1_binary = REPEAT("a", 255) , col_2_binary = REPEAT("o", 255) FROM worklog5743; +UPDATE worklog5743 SET col_1_binary = REPEAT("c", 255) +WHERE col_1_binary = REPEAT("a", 255) +AND col_2_binary = REPEAT("o", 255); +SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743 +WHERE col_1_binary = REPEAT("c", 255) +AND col_2_binary = REPEAT("o", 255); +INSERT INTO worklog5743 VALUES(REPEAT("a", 255) , REPEAT("o", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255), +REPEAT("a", 255) , REPEAT("o", 255), REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_binary = REPEAT("b", 255); +SELECT col_1_binary = REPEAT("c", 255) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with VARCHAR data type , primary/seconday index , DML ops +# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8. + +# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following +CREATE TABLE worklog5743_key2 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_varchar (767)); +INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743_key2; +UPDATE worklog5743_key2 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2 +WHERE col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key2 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key2; +DROP TABLE worklog5743_key2; + +# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following +CREATE TABLE worklog5743_key4 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(1964)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_varchar (767)); +INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743_key4; +UPDATE worklog5743_key4 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) +AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key4 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key4 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key4; +DROP TABLE worklog5743_key4; + +# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following +CREATE TABLE worklog5743_key8 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_varchar (767)); +INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743_key8; +UPDATE worklog5743_key8 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743_key8 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key8 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743_key8; +DROP TABLE worklog5743_key8; + +# Prefix index with TEXT data type , primary/seconday index , DML ops +# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8. + +# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following +CREATE TABLE worklog5743_key2 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_text (767)); +INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743_key2; +UPDATE worklog5743_key2 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key2 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key2 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key2; +DROP TABLE worklog5743_key2; + +# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following +CREATE TABLE worklog5743_key4 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(1964)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_text (767)); +INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743_key4; +UPDATE worklog5743_key4 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key4 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key4 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key4; +DROP TABLE worklog5743_key4; + +# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following +CREATE TABLE worklog5743_key8 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_text (767)); +INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743_key8; +UPDATE worklog5743_key8 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("b", 3500) FROM worklog5743_key8 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key8 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743_key8; +DROP TABLE worklog5743_key8; + +# Prefix index with BLOB data type , primary/seconday index , DML ops +# and COMPRESSED row format. KEY_BLOCK_SIZE is varied as 2 , 4 , 8. + +# With KEY_BLOCK_SIZE = 2,prefix index limit comes around ~948 for following +CREATE TABLE worklog5743_key2 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key2 (col_1_blob (767)); +INSERT INTO worklog5743_key2 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743_key2; +UPDATE worklog5743_key2 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key2 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +INSERT INTO worklog5743_key2 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key2 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key2; +DROP TABLE worklog5743_key2; + +# With KEY_BLOCK_SIZE = 4,prefix index limit comes around ~1964 for following +CREATE TABLE worklog5743_key4 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(1964)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4, engine = innodb; +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key4 (col_1_blob (767)); +INSERT INTO worklog5743_key4 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743_key4; +UPDATE worklog5743_key4 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key4 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +INSERT INTO worklog5743_key4 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key4 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key4; +DROP TABLE worklog5743_key4; + +# With KEY_BLOCK_SIZE = 8,prefix index limit comes around ~3072 for following +CREATE TABLE worklog5743_key8 ( +col_1_blob BLOB (4000) , col_2_blob BLOB (4000) , +PRIMARY KEY (col_1_blob(3072)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8, engine = innodb; +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +#CREATE INDEX prefix_idx ON worklog5743_key8 (col_1_blob (767)); +INSERT INTO worklog5743_key8 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_blob = REPEAT("a", 4000) , col_2_blob = REPEAT("o", 4000) +FROM worklog5743_key8; +UPDATE worklog5743_key8 SET col_1_blob = REPEAT("c", 4000) +WHERE col_1_blob = REPEAT("a", 4000) AND col_2_blob = REPEAT("o", 4000); +SELECT col_1_blob = REPEAT("b", 3500) FROM worklog5743_key8 +WHERE col_1_blob = REPEAT("c", 4000) AND col_2_blob = REPEAT("o", 4000); +INSERT INTO worklog5743_key8 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743_key8 WHERE col_1_blob = REPEAT("b", 4000); +SELECT col_1_blob = REPEAT("c", 4000) FROM worklog5743_key8; +DROP TABLE worklog5743_key8; + + +#------------------------------------------------------------------------------ +# Create mutiple prefix index. We can not create prefix index length > 16K +# as index is written in undo log page which of 16K size. +# So we can create max 5 prefix index of length 3072 on table +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , +col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); + +# Update hangs if we create following 5 indexes. Uncomment them once its fix +# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE +#CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072)); +#CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072)); +#CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); +#CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); +#CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); + +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Create mutiple prefix index. We can not create prefix index length > 16K as +# we write in undo log page which of 16K size. +# so we can create max 5 prefix index of length 3072 on table. +# Similar to above case but with transactions +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varchar VARCHAR (4000) , +col_3_text TEXT (4000), col_4_blob BLOB (4000),col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; + + +# Update hangs if we create following 5 indexes. Uncomment them once its fix +CREATE INDEX prefix_idx1 ON worklog5743(col_1_varbinary (3072)); +CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (3072)); +CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (3072)); +CREATE INDEX prefix_idx4 ON worklog5743(col_4_blob (3072)); +CREATE INDEX prefix_idx5 ON worklog5743(col_5_text (3072)); + +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +ROLLBACK; +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +COMMIT; +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; + +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +ROLLBACK; +# Uncomment Update fater Bug#12547647 is fixed - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE +# Bug#12547647 - UPDATE LOGGING COULD EXCEED LOG PAGE SIZE +#UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +#WHERE col_1_varbinary = REPEAT("a", 4000) +#AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with utf8 charset +# utf8 charcter takes 3 bytes in mysql so prefix index limit is 3072/3 = 1024 +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) CHARACTER SET 'utf8', +col_2_text TEXT (4000) CHARACTER SET 'utf8', +PRIMARY KEY (col_1_text(1024)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +# Prefix index with utf8 charset + varchar. +# For varchar we also log the column itself as oppose of TEXT so it error +# with limit 1024 due to overhead. +--replace_regex /> [0-9]*/> max_row_size/ +-- error 1118 +CREATE TABLE worklog5743 (col_1_varchar VARCHAR (4000) CHARACTER SET 'utf8', +col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8' , +PRIMARY KEY (col_1_varchar(1024)) +) ROW_FORMAT=DYNAMIC, engine = innodb; + +#------------------------------------------------------------------------------ +# prefinx index on utf8 charset with transaction +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , +col_2_varchar VARCHAR (4000) CHARACTER SET 'utf8', +col_3_text TEXT (4000) CHARACTER SET 'utf8', +col_4_blob BLOB (4000),col_5_text TEXT (4000), +col_6_varchar VARCHAR (4000), col_7_binary BINARY (255) +) ROW_FORMAT=DYNAMIC, engine = innodb; + + +CREATE INDEX prefix_idx2 ON worklog5743(col_2_varchar (500)); +CREATE INDEX prefix_idx3 ON worklog5743(col_3_text (500)); + +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +ROLLBACK; +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +COMMIT; +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; + +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +ROLLBACK; +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000), +REPEAT("a", 4000) , REPEAT("o", 4000), REPEAT("a", 4000), +REPEAT("a", 4000) , REPEAT("a", 255) +); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("b", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with utf8 charset on TEXT data type with actual utf8 character +# like "स" and "क" +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) CHARACTER SET 'utf8', +col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(1024)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("स", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_text (1024)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("स", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("क", 4000) +WHERE col_1_text = REPEAT("स", 4000) AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("b", 4000); +SELECT col_1_text = REPEAT("क", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with transaction when 2 client are ruuning there transaction +# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and +# READ UNCOMMITTED. +CREATE TABLE worklog5743 ( +col_1_text TEXT(4000) , col_2_text TEXT(4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; + +--echo "In connection 1" +--connect (con1,localhost,root,,) +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; + + +--echo "In connection 2" +--connect (con2,localhost,root,,) +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); +# Uncomment after Bug#12552164 - TRANSACTION CAN NOT SEE OLD VERSION ROWS THAT +# BEING UPDATED +#UPDATE worklog5743 SET col_1_varchar = REPEAT("d", 200) WHERE col_1_varchar = +#REPEAT("a", 200) AND col_2_varchar = REPEAT("o", 200); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; + + +--echo "In connection 1" +--connection con1 +select @@session.tx_isolation; +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; + +START TRANSACTION; + +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; + +--echo "In connection 2" +--connection con2 +COMMIT; +# Wait for commit +let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist +WHERE info='COMMIT'; +--source include/wait_condition.inc + +--echo "In connection 1" +--connection con1 +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; +COMMIT; + +--connection default +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Prefix index with transaction when 2 client are ruuning there transaction +# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and +# READ UNCOMMITTED. Same as above case but con2 starts tnx before con1 + +CREATE TABLE worklog5743 ( +col_1_text TEXT(4000) , col_2_text TEXT(4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; + +--echo "In connection 1" +--connection con1 +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; +START TRANSACTION; + + +--echo "In connection 2" +--connection con2 +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +COMMIT; +# Wait for commit +let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist +WHERE info='COMMIT'; +--source include/wait_condition.inc + + +--echo "In connection 1" +--connection con1 +SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +select @@session.tx_isolation; +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ; + +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; +COMMIT; + +--connection default +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ + +# Prefix index with transaction when 2 client are ruuning there transaction +# in different sessions.With ISOLATION LEVEL as REPEATABLE READ and +# READ UNCOMMITTED. Same as above cases but with ROLLBACK + +CREATE TABLE worklog5743 ( +col_1_text TEXT(4000) , col_2_text TEXT(4000) , +PRIMARY KEY (col_1_text(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 200) , REPEAT("o", 200)); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; + +--echo "In connection 1" +--connection con1 +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; +START TRANSACTION; + + +--echo "In connection 2" +--connection con2 +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("b", 200) , REPEAT("o", 200)); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("a", 200); +SELECT col_1_text = REPEAT("a", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +ROLLBACK; +# Wait for rollback +let $wait_condition=SELECT COUNT(*)=0 FROM information_schema.processlist +WHERE info='COMMIT'; +--source include/wait_condition.inc + + +--echo "In connection 1" +--connection con1 +SELECT col_1_text = REPEAT("b", 200) , col_2_text = REPEAT("o", 200) FROM +worklog5743; +SELECT COUNT(*) FROM worklog5743; +COMMIT; + +--disconnect con1 +--disconnect con2 + +--connection default +DROP TABLE worklog5743; + + +#------------------------------------------------------------------------------ +# Select queries on prefix index column as index will be used in queries. +# Use few select functions , join condition , subqueries. + +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) +AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) +AND col_2_varchar = REPEAT("o", 4000); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; + +# Select with Join +SELECT tbl1.col_1_varchar = tbl2.col_1_varchar +FROM worklog5743 tbl1 , worklog5743 tbl2 +WHERE tbl1.col_1_varchar = tbl2.col_1_varchar ; + +# Select in subquey +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar NOT IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) ; +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 WHERE +col_1_varchar IN (SELECT tbl2.col_1_varchar FROM worklog5743 tbl2) +AND col_1_varchar = REPEAT("c", 4000); +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar in ( +SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 +WHERE tbl1.col_1_varchar != tbl2.col_1_varchar +) ; +SELECT tbl1.col_1_varchar = REPEAT("c", 4000) FROM worklog5743 tbl1 +WHERE col_1_varchar in ( +SELECT tbl2.col_1_varchar FROM worklog5743 tbl2 +WHERE tbl1.col_1_varchar = tbl2.col_1_varchar +) ; + +# function +SELECT +REVERSE(col_1_varchar) = REPEAT("c", 4000) , +REVERSE(REVERSE(col_1_varchar)) = REPEAT("c", 4000) +FROM worklog5743; +SELECT +UPPER(col_1_varchar) = REPEAT("c", 4000) , +UPPER(col_1_varchar) = REPEAT("C", 4000) , +LOWER(UPPER(col_1_varchar)) = REPEAT("c", 4000) +FROM worklog5743; +SELECT +col_1_varchar = REPEAT("c", 4000) +FROM worklog5743 WHERE col_1_varchar like '%c__%'; +SELECT SUBSTRING(INSERT(col_1_varchar, 1, 4, 'kkkk'),1,10) FROM worklog5743 ; +SELECT CONCAT(SUBSTRING(col_1_varchar,-5,3),'append') FROM worklog5743 ; + + +DROP TABLE worklog5743; + +#------------------------------------------------------------------------------ +# Prefix index with NULL values +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , +col_2_varchar VARCHAR (4000) , +UNIQUE INDEX (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), REPEAT("o", 4000)); +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); +INSERT INTO worklog5743 VALUES(NULL,NULL); +INSERT INTO worklog5743 VALUES(NULL,NULL); +# check IS +SELECT COLUMN_NAME,INDEX_NAME,SUB_PART,INDEX_TYPE +FROM INFORMATION_SCHEMA.STATISTICS WHERE table_name = 'worklog5743' ; +SELECT col_1_varchar FROM worklog5743 WHERE col_1_varchar IS NULL; +SELECT col_1_varchar = concat(REPEAT("a", 2000),REPEAT("b", 2000)) +FROM worklog5743 WHERE col_1_varchar IS NOT NULL ORDER BY 1; + + +DROP TABLE worklog5743; + +# ----------------------------------------------------------------------------- +# Try drop and add secondary prefix index +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +# Create index +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +# Drop index +DROP INDEX prefix_idx ON worklog5743; + +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +# Again add index +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + +# ----------------------------------------------------------------------------- + +# Try drop and add primary prefix index +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +# Create index +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +# Drop index +ALTER TABLE worklog5743 DROP PRIMARY KEY; + +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) +AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) +AND col_2_varchar = REPEAT("o", 4000); +# Again add index +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); + +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +--error 1062 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +# ----------------------------------------------------------------------------- + +# Try drop and add both (primary/secondary) prefix index +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY `prefix_primary` (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +# Create index +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +# Drop primary index +ALTER TABLE worklog5743 DROP PRIMARY KEY; +# Drop secondary index +DROP INDEX prefix_idx ON worklog5743; + +SELECT col_1_varchar = REPEAT("a", 4000) , col_2_varchar = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varchar = REPEAT("c", 4000) +WHERE col_1_varchar = REPEAT("a", 4000) AND col_2_varchar = REPEAT("o", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varchar = REPEAT("c", 4000) AND col_2_varchar = REPEAT("o", 4000); +# Again add index +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar(3072)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); + +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +--error 1062 +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 4000); +SELECT col_1_varchar = REPEAT("c", 4000) FROM worklog5743; +DROP TABLE worklog5743; + + +# ----------------------------------------------------------------------------- +# Drop index from differnt session +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR(4000) , col_2_varchar VARCHAR(4000) , +PRIMARY KEY (col_1_varchar (3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("c", 3500) , REPEAT("o", 3500)); +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (3072)); + +# Start new session +--connect (con1,localhost,root,,) + + +--echo " Switching to con1 connection For select " +--connection con1 +SELECT col_1_varchar = REPEAT("c", 3500) , col_2_varchar = REPEAT("o", 3500) +FROM worklog5743; + +--echo " Switching to default connection For DMLs " +--connection default +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("a", 3500) , REPEAT("o", 3500)); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 +WHERE col_2_varchar = REPEAT("o", 3500); +COMMIT; + +--echo " Switching to con1 connection For Dropping index and some DMLs " +--connection con1 +START TRANSACTION; +INSERT INTO worklog5743 VALUES(REPEAT("k", 3500),REPEAT("p", 3500)); +# Drop primary index +ALTER TABLE worklog5743 DROP PRIMARY KEY; +UPDATE worklog5743 SET col_1_varchar = REPEAT("b", 3500) +WHERE col_1_varchar = REPEAT("a", 3500) +AND col_2_varchar = REPEAT("o", 3500); +SELECT col_1_varchar = REPEAT("b", 3500) FROM worklog5743 +WHERE col_2_varchar = REPEAT("o", 3500); + +--echo " Switching to default connection For DELETE " +--connection default +DELETE FROM worklog5743 WHERE col_1_varchar = REPEAT("b", 3500); +SELECT col_1_varchar = REPEAT("a", 3500) FROM worklog5743 +WHERE col_2_varchar = REPEAT("p", 3500); + +--echo " Switching to con1 connection to commit changes " +--connection con1 +COMMIT; + +--echo " Switching to default connection to drop and end sub-test " +--connection default +DROP TABLE worklog5743; + + + +# ----------------------------------------------------------------------------- +# Create prefix index with length < 3072 , length = 3072 , length > 3072 +# - varbinary data type + secondary index +CREATE TABLE worklog5743 ( +col_1_varbinary VARBINARY (4000) , col_2_varbinary VARBINARY (4000) , +PRIMARY KEY (col_1_varbinary(3072))) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +# Create index of 3072 +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) , col_2_varbinary = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +# Drop index +DROP INDEX prefix_idx ON worklog5743; +SELECT col_1_varbinary = REPEAT("b", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("b", 4000) +AND col_2_varbinary = REPEAT("p", 4000); + + +# Again add index length < 3072 +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (2000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +# Drop index +DROP INDEX prefix_idx ON worklog5743; + +# Again add index length > 3072. +# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072 +# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does +# not support prefix > 767, the create index will be rejected. +CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_varbinary = REPEAT("c", 4000) +WHERE col_1_varbinary = REPEAT("a", 4000) +AND col_2_varbinary = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_varbinary = REPEAT("c", 4000); +SELECT col_1_varbinary = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_varbinary = REPEAT("c", 4000) +AND col_2_varbinary = REPEAT("o", 4000); + + +DROP TABLE worklog5743; + +# ----------------------------------------------------------------------------- +# Create prefix index with length < 3072 , length = 3072 , length > 3072 +# text data type + secondary index +CREATE TABLE worklog5743 (col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(500)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +# Create index of 3072 +CREATE INDEX prefix_idx ON worklog5743(col_1_text (3072)); +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) +FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +# Drop index +DROP INDEX prefix_idx ON worklog5743; +SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("b", 4000) AND col_2_text = REPEAT("p", 4000); + +# Again add index length < 3072 +CREATE INDEX prefix_idx ON worklog5743(col_1_text (1000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); +# Drop index +DROP INDEX prefix_idx ON worklog5743; + +# Again add index length > 3072. Expect error.Length exceeds maximum supported +# key length +# Again add index length > 3072. +# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072 +# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does +# not support prefix > 767, the create index will be rejected. +CREATE INDEX prefix_idx ON worklog5743(col_1_text (4000)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) AND col_2_text = REPEAT("o", 4000); + +DROP TABLE worklog5743; + + +# ----------------------------------------------------------------------------- +# Create prefix index with length < 948 , length = 948 , length > 948 +# For compressed row type + primary key +CREATE TABLE worklog5743 ( +col_1_text TEXT (4000) , col_2_text TEXT (4000) , +PRIMARY KEY (col_1_text(948)) +) ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2, engine = innodb; +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000) , REPEAT("o", 4000)); +# Create index of 767 +INSERT INTO worklog5743 VALUES(REPEAT("b", 4000) , REPEAT("p", 4000)); +SELECT col_1_text = REPEAT("a", 4000) , col_2_text = REPEAT("o", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +# Drop index +#DROP INDEX prefix_idx ON worklog5743; +ALTER TABLE worklog5743 DROP PRIMARY KEY; +SELECT col_1_text = REPEAT("b", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("b", 4000) +AND col_2_text = REPEAT("p", 4000); + +# Again add index length < 767 +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (700)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); +# Drop index +ALTER TABLE worklog5743 DROP PRIMARY KEY; + +# Again add index length > 948. Expect error 'to big row ' due to exceed +# in key length. +-- error 139 +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_text (950)); +INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000)); +SELECT col_1_text = REPEAT("a", 4000) FROM worklog5743; +UPDATE worklog5743 SET col_1_text = REPEAT("c", 4000) +WHERE col_1_text = REPEAT("a", 4000) +AND col_2_text = REPEAT("o", 4000); +DELETE FROM worklog5743 WHERE col_1_text = REPEAT("c", 4000); +SELECT col_1_text = REPEAT("c", 4000) FROM worklog5743 +WHERE col_1_text = REPEAT("c", 4000) +AND col_2_text = REPEAT("o", 4000); + +DROP TABLE worklog5743; + +# ----------------------------------------------------------------------------- +# Create prefix index with length < 3072 , length = 3072 , length > 3072 +# data types VARCHAR +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (900)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +# Again add index length > 3072. Expect error.Length exceeds maximum supported +# key length +# Again add index length > 3072. +# If "innodb_large_prefix" is turned on, than the index prefix larger than 3072 +# will be truncated to 3072. If the table is REDUNDANT and COMPACT, which does +# not support prefix > 767, the create index will be rejected. +# Index length is truncated only for 'create index' , but error if we add +# prefix index with length > 3072 +--error ER_TOO_LONG_KEY +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_varchar (3073)); +DROP TABLE worklog5743; + + +CREATE TABLE worklog5743 ( +col_1_BLOB BLOB (4000) , PRIMARY KEY (col_1_BLOB(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; +ALTER TABLE worklog5743 DROP PRIMARY KEY; +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (500)); +ALTER TABLE worklog5743 DROP PRIMARY KEY; +# Negative case +# Again add index length > 3072. Expect error.Length exceeds maximum supported +# key length +# Index length is truncated only for 'create index' , but error if we add +# prefix index with length > 3072 +--error ER_TOO_LONG_KEY +ALTER TABLE worklog5743 ADD PRIMARY KEY (col_1_BLOB (3073)); + +DROP TABLE worklog5743; + +# ----------------------------------------------------------------------------- +# Error on adding larger prefix if violates unique index. +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) +) ROW_FORMAT=DYNAMIC, engine = innodb; +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 1000),REPEAT("c", 1000)), +REPEAT("o", 4000)); +INSERT INTO worklog5743 +VALUES(concat(REPEAT("a", 2000),REPEAT("b", 2000)), REPEAT("o", 4000)); +--error 1062 +ALTER TABLE worklog5743 ADD PRIMARY KEY `pk_idx` (col_1_varchar(3000)); +DROP TABLE worklog5743; + +# ----------------------------------------------------------------------------- +set global innodb_large_prefix=0; +# Prefix index > 767 is allowed if innodb_large_prefix is set to 1 +--error ER_TOO_LONG_KEY +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(3072)) +) ROW_FORMAT=DYNAMIC, engine = innodb; + + +# ----------------------------------------------------------------------------- +set global innodb_large_prefix=0; +# Backward compatibility test - Index lenghth > 767 is truncated for REDUNDANT +# and COMPACT +CREATE TABLE worklog5743 ( +col_1_varchar VARCHAR (4000) , col_2_varchar VARCHAR (4000) , +PRIMARY KEY (col_1_varchar(767)) +) engine = innodb; +# Prefix index > 767 is truncated with REDUNDANT and COMPACT +CREATE INDEX prefix_idx ON worklog5743(col_1_varchar (1000)); +DROP TABLE worklog5743; +#------------------------------------------------------------------------------ + +eval SET GLOBAL innodb_file_format=$innodb_file_format_orig; +eval SET GLOBAL innodb_file_per_table=$innodb_file_per_table_orig; +eval SET GLOBAL innodb_large_prefix=$innodb_large_prefix_orig; -- cgit v1.2.1 -- cgit v1.2.1 From c90cdf5d494e0caef9d694c75c739c188df1a512 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot Date: Wed, 4 Dec 2013 12:32:42 +0100 Subject: Bug#16539979 - BASIC SELECT COUNT(DISTINCT ID) IS BROKEN Bug#17867117 - ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK Problem: COUNT DISTINCT gives incorrect result when it uses a Unique Tree and its last inserted record has null value. Here is how COUNT DISTINCT is processed, given that this query is not using loose index scan. When a row is produced as a result of joining tables (there is only one table here), we store the SELECTed value in a Unique tree. This allows elimination of any duplicates, and thus implements DISTINCT. When we have processed all rows like this, we walk the Unique tree, counting its elements, in Aggregator_distinct::endup() (tree->walk()); for each element we call Item_sum_count::add(). Such function wants to ignore any NULL value, for that it checks item_sum -> args[0] -> null_value. It is a mistake: when walking the Unique tree, the value to be aggregated is not item_sum ->args[0] but rather table -> field[0]. Solution: instead of item_sum -> args[0] -> null_value, use arg_is_null(), which knows where to look (like in fix for bug 57932). As a consequence of this solution, we have to make arg_is_null() a little more general: 1) Because it was so far only used for AVG() (which always has a single argument), this function was looking at a single argument; now that it has to work with COUNT(DISTINCT expression1,expression2), it must look at all arguments. 2) Because we start using arg_is_null () for COUNT(DISTINCT), i.e. in Item_sum_count::add (), it implies that we are also using it for COUNT(no DISTINCT) (same add ()). For COUNT(no DISTINCT), the nullness to check is that of item_sum -> args[0]. But the null_value of such item is reliable only if val_*() has been called on it. So far arg_is_null() was always used after a call to arg_val*(), so could rely on null_value; but for COUNT, there is no call to arg_val*(), so arg_is_null() has to call is_null() instead. Testcase for 16539979 by Neeraj. Testcase for 17867117 contributed by Xiaobin Lin from Taobao. --- mysql-test/r/distinct.result | 40 ++++++++++++++++++++++++++ mysql-test/t/distinct.test | 37 ++++++++++++++++++++++++ sql/item_sum.cc | 67 +++++++++++++++++++++++++++++--------------- sql/item_sum.h | 43 +++++++++++++++------------- 4 files changed, 146 insertions(+), 41 deletions(-) diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index 74f2c19c8fe..56de7ebfbf4 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -804,4 +804,44 @@ c 11112222 33334444 DROP TABLE t1; +# +# Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN. +# Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK +# +SET @tmp_table_size_save= @@tmp_table_size; +SET @@tmp_table_size= 1024; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 SELECT a+8 FROM t1; +INSERT INTO t1 SELECT a+16 FROM t1; +INSERT INTO t1 SELECT a+32 FROM t1; +INSERT INTO t1 SELECT a+64 FROM t1; +INSERT INTO t1 VALUE(NULL); +SELECT COUNT(DISTINCT a) FROM t1; +COUNT(DISTINCT a) +128 +SELECT COUNT(DISTINCT (a+0)) FROM t1; +COUNT(DISTINCT (a+0)) +128 +DROP TABLE t1; +create table tb( +id int auto_increment primary key, +v varchar(32)) +engine=myisam charset=gbk; +insert into tb(v) values("aaa"); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +update tb set v=concat(v, id); +select count(distinct case when id<=64 then id end) from tb; +count(distinct case when id<=64 then id end) +64 +select count(distinct case when id<=63 then id end) from tb; +count(distinct case when id<=63 then id end) +63 +drop table tb; +SET @@tmp_table_size= @tmp_table_size_save; End of 5.5 tests diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index 84073d15109..8b64adbd0ef 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -625,5 +625,42 @@ INSERT INTO t1 VALUES (1111, 2222), (3333, 4444); SELECT DISTINCT CONCAT(a,b) AS c FROM t1 ORDER BY 1; DROP TABLE t1; +--echo # +--echo # Bug#16539979 BASIC SELECT COUNT(DISTINCT ID) IS BROKEN. +--echo # Bug#17867117 ERROR RESULT WHEN "COUNT + DISTINCT + CASE WHEN" NEED MERGE_WALK +--echo # + +SET @tmp_table_size_save= @@tmp_table_size; +SET @@tmp_table_size= 1024; + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5),(6),(7),(8); +INSERT INTO t1 SELECT a+8 FROM t1; +INSERT INTO t1 SELECT a+16 FROM t1; +INSERT INTO t1 SELECT a+32 FROM t1; +INSERT INTO t1 SELECT a+64 FROM t1; +INSERT INTO t1 VALUE(NULL); +SELECT COUNT(DISTINCT a) FROM t1; +SELECT COUNT(DISTINCT (a+0)) FROM t1; +DROP TABLE t1; + +create table tb( +id int auto_increment primary key, +v varchar(32)) +engine=myisam charset=gbk; +insert into tb(v) values("aaa"); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); +insert into tb(v) (select v from tb); + +update tb set v=concat(v, id); +select count(distinct case when id<=64 then id end) from tb; +select count(distinct case when id<=63 then id end) from tb; +drop table tb; + +SET @@tmp_table_size= @tmp_table_size_save; --echo End of 5.5 tests diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 3fbbc1b811a..3b2a916f30a 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1052,18 +1052,19 @@ void Aggregator_distinct::endup() endup_done= TRUE; } } - else - { - /* - We don't have a tree only if 'setup()' hasn't been called; - this is the case of sql_select.cc:return_zero_rows. - */ - if (tree) - table->field[0]->set_notnull(); - } + /* + We don't have a tree only if 'setup()' hasn't been called; + this is the case of sql_executor.cc:return_zero_rows. + */ if (tree && !endup_done) { + /* + All tree's values are not NULL. + Note that value of field is changed as we walk the tree, in + Aggregator_distinct::unique_walk_function, but it's always not NULL. + */ + table->field[0]->set_notnull(); /* go over the tree of distinct keys and calculate the aggregate value */ use_distinct_values= TRUE; tree->walk(item_sum_distinct_walk, (void*) this); @@ -1334,7 +1335,7 @@ bool Item_sum_sum::add() { my_decimal value; const my_decimal *val= aggr->arg_val_decimal(&value); - if (!aggr->arg_is_null()) + if (!aggr->arg_is_null(true)) { my_decimal_add(E_DEC_FATAL_ERROR, dec_buffs + (curr_dec_buff^1), val, dec_buffs + curr_dec_buff); @@ -1345,7 +1346,7 @@ bool Item_sum_sum::add() else { sum+= aggr->arg_val_real(); - if (!aggr->arg_is_null()) + if (!aggr->arg_is_null(true)) null_value= 0; } DBUG_RETURN(0); @@ -1455,9 +1456,27 @@ double Aggregator_simple::arg_val_real() } -bool Aggregator_simple::arg_is_null() +bool Aggregator_simple::arg_is_null(bool use_null_value) { - return item_sum->args[0]->null_value; + Item **item= item_sum->args; + const uint item_count= item_sum->arg_count; + if (use_null_value) + { + for (uint i= 0; i < item_count; i++) + { + if (item[i]->null_value) + return true; + } + } + else + { + for (uint i= 0; i < item_count; i++) + { + if (item[i]->maybe_null && item[i]->is_null()) + return true; + } + } + return false; } @@ -1475,10 +1494,17 @@ double Aggregator_distinct::arg_val_real() } -bool Aggregator_distinct::arg_is_null() +bool Aggregator_distinct::arg_is_null(bool use_null_value) { - return use_distinct_values ? table->field[0]->is_null() : - item_sum->args[0]->null_value; + if (use_distinct_values) + { + const bool rc= table->field[0]->is_null(); + DBUG_ASSERT(!rc); // NULLs are never stored in 'tree' + return rc; + } + return use_null_value ? + item_sum->args[0]->null_value : + (item_sum->args[0]->maybe_null && item_sum->args[0]->is_null()); } @@ -1496,11 +1522,8 @@ void Item_sum_count::clear() bool Item_sum_count::add() { - for (uint i=0; imaybe_null && args[i]->is_null()) - return 0; - } + if (aggr->arg_is_null(false)) + return 0; count++; return 0; } @@ -1591,7 +1614,7 @@ bool Item_sum_avg::add() { if (Item_sum_sum::add()) return TRUE; - if (!aggr->arg_is_null()) + if (!aggr->arg_is_null(true)) count++; return FALSE; } diff --git a/sql/item_sum.h b/sql/item_sum.h index edcdb5a4d1e..3a670cccee5 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -58,19 +58,8 @@ protected: /* the aggregate function class to act on */ Item_sum *item_sum; - /** - When feeding back the data in endup() from Unique/temp table back to - Item_sum::add() methods we must read the data from Unique (and not - recalculate the functions that are given as arguments to the aggregate - function. - This flag is to tell the add() methods to take the data from the Unique - instead by calling the relevant val_..() method - */ - - bool use_distinct_values; - public: - Aggregator (Item_sum *arg): item_sum(arg), use_distinct_values(FALSE) {} + Aggregator (Item_sum *arg): item_sum(arg) {} virtual ~Aggregator () {} /* Keep gcc happy */ enum Aggregator_type { SIMPLE_AGGREGATOR, DISTINCT_AGGREGATOR }; @@ -107,10 +96,16 @@ public: /** Floating point value of being-aggregated argument */ virtual double arg_val_real() = 0; /** - NULLness of being-aggregated argument; can be called only after - arg_val_decimal() or arg_val_real(). + NULLness of being-aggregated argument. + + @param use_null_value Optimization: to determine if the argument is NULL + we must, in the general case, call is_null() on it, which itself might + call val_*() on it, which might be costly. If you just have called + arg_val*(), you can pass use_null_value=true; this way, arg_is_null() + might avoid is_null() and instead do a cheap read of the Item's null_value + (updated by arg_val*()). */ - virtual bool arg_is_null() = 0; + virtual bool arg_is_null(bool use_null_value) = 0; }; @@ -480,7 +475,7 @@ public: Item *get_arg(uint i) { return args[i]; } Item *set_arg(uint i, THD *thd, Item *new_val); - uint get_arg_count() { return arg_count; } + uint get_arg_count() const { return arg_count; } /* Initialization of distinct related members */ void init_aggregator() @@ -607,10 +602,20 @@ class Aggregator_distinct : public Aggregator */ bool always_null; + /** + When feeding back the data in endup() from Unique/temp table back to + Item_sum::add() methods we must read the data from Unique (and not + recalculate the functions that are given as arguments to the aggregate + function. + This flag is to tell the arg_*() methods to take the data from the Unique + instead of calling the relevant val_..() method. + */ + bool use_distinct_values; + public: Aggregator_distinct (Item_sum *sum) : Aggregator(sum), table(NULL), tmp_table_param(NULL), tree(NULL), - always_null(FALSE) {} + always_null(false), use_distinct_values(false) {} virtual ~Aggregator_distinct (); Aggregator_type Aggrtype() { return DISTINCT_AGGREGATOR; } @@ -620,7 +625,7 @@ public: void endup(); virtual my_decimal *arg_val_decimal(my_decimal * value); virtual double arg_val_real(); - virtual bool arg_is_null(); + virtual bool arg_is_null(bool use_null_value); bool unique_walk_function(void *element); static int composite_key_cmp(void* arg, uchar* key1, uchar* key2); @@ -646,7 +651,7 @@ public: void endup() {}; virtual my_decimal *arg_val_decimal(my_decimal * value); virtual double arg_val_real(); - virtual bool arg_is_null(); + virtual bool arg_is_null(bool use_null_value); }; -- cgit v1.2.1 From 82eed657a6b8812e688e93cfe25c1e6f71662fa1 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Wed, 11 Dec 2013 11:15:23 +0100 Subject: Bug#17928281 'CHECK_PERFORMANCE_SCHEMA()' LEAVES 'CURRENT_THD' REFERRING DESTRUCTED THD OBJ Prior to fix, function check_performance_schema() could leave behind stale pointers in thread local storage, for the following keys: - THR_THD (used by _current_thd) - THR_MALLOC (used for memory allocation) This is an unsafe practice, which can potentially cause crashes, and that can cause other bugs when code is modified during maintenance. With this fix, thread local storage keys used temporarily within function check_performance_schema() are cleaned up after use. --- storage/perfschema/pfs_check.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/perfschema/pfs_check.cc b/storage/perfschema/pfs_check.cc index c52be6f0da2..97b23c38065 100644 --- a/storage/perfschema/pfs_check.cc +++ b/storage/perfschema/pfs_check.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -55,6 +55,7 @@ void check_performance_schema() PFS_engine_table_share::check_all_tables(thd); + thd->restore_globals(); delete thd; DBUG_VOID_RETURN; } -- cgit v1.2.1 From 2dc95d5940b724167029edec9267d8e60e3a1b6d Mon Sep 17 00:00:00 2001 From: sayantan dutta Date: Thu, 12 Dec 2013 12:20:57 +0530 Subject: Bug #17827378 - MTR DOES NOT REPORT IF A TEST FAILS TO DROP CREATED EVENTS --- mysql-test/include/mtr_check.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index 9c51b333ec6..8714e358372 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -74,6 +74,13 @@ BEGIN show status like 'slave_open_temp_tables'; + -- Dump all events, there should be none + SELECT * FROM INFORMATION_SCHEMA.EVENTS; + -- Dump all triggers, there should be none + SELECT * FROM INFORMATION_SCHEMA.TRIGGERS; + -- Dump all created procedures, there should be none + SELECT * FROM INFORMATION_SCHEMA.ROUTINES; + END|| -- -- cgit v1.2.1 From afd24eb63d0ad230f62f041fa6123f2ad9c7b5c5 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Sat, 14 Dec 2013 13:05:36 +0100 Subject: Bug#29716 : Bug#11746921 : MYSQL_INSTALL_DB REFERS TO THE (OBSOLETE) MYSQLBUG SCRIPT DURING INSTALLATION Bug#68742 : Bug#16530527 : OBSOLETE BUGREPORT ADDRESSES --- mysql-test/README | 5 ++--- scripts/mysql_install_db.pl.in | 7 ++++--- scripts/mysql_install_db.sh | 6 +++--- scripts/mysqlaccess.sh | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mysql-test/README b/mysql-test/README index 77b398ebf39..63765fcb8f9 100644 --- a/mysql-test/README +++ b/mysql-test/README @@ -68,6 +68,5 @@ extension. For example: that the bug is corrected in future releases. To submit your test case, put your .test file and .result file(s) into -a tar.gz archive, add a README that explains the problem, ftp the -archive to ftp://support.mysql.com/pub/mysql/secret/ and send a mail -to bugs@lists.mysql.com +a tar.gz or zip archive, create a bug report at http://bugs.mysql.com/ +and attach the archive to the bug report. diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in index 12cd6a21ad1..50c7a3f3de8 100644 --- a/scripts/mysql_install_db.pl.in +++ b/scripts/mysql_install_db.pl.in @@ -537,7 +537,7 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") ) " cd mysql-test ; perl mysql-test-run.pl"); } report($opt, - "Please report any problems with the " . '@scriptdir@' . "/mysqlbug script!", + "Please report any problems at http://bugs.mysql.com/", "", "The latest information about MySQL is available on the web at", "", @@ -570,8 +570,9 @@ else "Please consult the MySQL manual section: 'Problems running mysql_install_db',", "and the manual section that describes problems on your OS.", "Another information source is the MySQL email archive.", - "Please check all of the above before mailing us!", - "And if you do mail us, you MUST use the " . '@scriptdir@' . "/mysqlbug script!") + "", + "Please check all of the above before submitting a bug report", + "at http://bugs.mysql.com/") } ############################################################################## diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 96f82198d3a..d937e3c84bb 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -426,8 +426,8 @@ else echo "describes problems on your OS. Another information source are the" echo "MySQL email archives available at http://lists.mysql.com/." echo - echo "Please check all of the above before mailing us! And remember, if" - echo "you do mail us, you MUST use the $scriptdir/mysqlbug script!" + echo "Please check all of the above before submitting a bug report" + echo "at http://bugs.mysql.com/" echo exit 1 fi @@ -478,7 +478,7 @@ then fi echo - echo "Please report any problems with the $scriptdir/mysqlbug script!" + echo "Please report any problems at http://bugs.mysql.com/" echo fi diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh index bab0dbf5b87..3d6dc90e596 100644 --- a/scripts/mysqlaccess.sh +++ b/scripts/mysqlaccess.sh @@ -2423,7 +2423,7 @@ sub Print_Header { sub Print_Footer { if ($MySQLaccess::CMD) { #command-line mode print "\n" - ."BUGs can be reported by email to bugs\@mysql.com\n"; + ."BUGs can be reported at http://bugs.mysql.com/\n"; } if ($MySQLaccess::CGI) { #CGI-BIN mode if ($MySQLaccess::Param{'brief'}) { @@ -2431,7 +2431,7 @@ sub Print_Footer { } print "
\n" ."
\n" - ."BUGs can be reported by email to bugs\@mysql.com
\n" + ."BUGs can be reported at http://bugs.mysql.com/
\n" # ."Don't forget to mention the version $VERSION!
\n" ."
\n" ."\n" -- cgit v1.2.1 From 5fa9664b07f9b45f883abb138966c6e49239eb3e Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Tue, 17 Dec 2013 22:11:22 +0530 Subject: Bug#17632978 SLAVE CRASHES IF ROW EVENT IS CORRUPTED (MYSQLBINLOG -V CRASHES WITH THAT BINLOG) Problem: If slave receives a corrupted row event, slave server is crashing. Analysis: When slave is unpacking the row event, it is not validating the data before applying the event. If the data is corrupted for eg: the length of a field is wrong, it could end up reading wrong data leading to a crash. A similar problem happens when mysqlbinlog tool is used against a corrupted binlog using '-v' option. Due to -v option, the tool tries to print the values of all the fields. Corrupted field length could lead to a crash. Fix: Before unpacking the field, a verification will be made on the length. If it falls into the event range, only then it will be unpacked. Otherwise, "ER_SLAVE_CORRUPT_EVENT" error will be thrown. Incase mysqlbinlog -v case, the field value will not be printed and the processing of the file will be stopped. sql/field.h: Removed a function which is not required anymore sql/log_event.cc: Adding a validation on the field length before the tool tries to print the value. sql/log_event.h: Changing unpack_row call according to the new arguments sql/log_event_old.h: Changing unpack_row call according to the new arguments sql/rpl_record.cc: Adding a new argument 'row_end' which tells the end position of the complete data in the row event. It will be used to do validation before doing 'unpack' field. sql/rpl_record.h: Adding a new argument 'row_end' which tells the end position of the complete data in the row event. It will be used to do validation before doing 'unpack' field. sql/rpl_utility.cc: Now calc_field_size() is required for client too. --- sql/field.h | 14 +------------- sql/log_event.cc | 9 +++++++++ sql/log_event.h | 8 ++------ sql/log_event_old.h | 6 ++---- sql/rpl_record.cc | 27 ++++++++++++++++++++++----- sql/rpl_record.h | 5 +++-- sql/rpl_utility.cc | 17 ++--------------- 7 files changed, 41 insertions(+), 45 deletions(-) diff --git a/sql/field.h b/sql/field.h index d9f0b892adb..6a181b7ae91 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1,7 +1,7 @@ #ifndef FIELD_INCLUDED #define FIELD_INCLUDED -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1802,18 +1802,6 @@ public: { store_length(ptr, packlength, number); } - - /** - Return the packed length plus the length of the data. - - This is used to determine the size of the data plus the - packed length portion in the row data. - - @returns The length in the row plus the size of the data. - */ - uint32 get_packed_size(const uchar *ptr_arg, bool low_byte_first) - {return packlength + get_length(ptr_arg, packlength, low_byte_first);} - inline uint32 get_length(uint row_offset= 0) { return get_length(ptr+row_offset, this->packlength, table->s->db_low_byte_first); } uint32 get_length(const uchar *ptr, uint packlength, bool low_byte_first); diff --git a/sql/log_event.cc b/sql/log_event.cc index 7d18b447084..122953b48ec 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -18,6 +18,7 @@ #ifdef MYSQL_CLIENT #include "sql_priv.h" +#include "mysqld_error.h" #else @@ -1945,6 +1946,14 @@ Rows_log_event::print_verbose_one_row(IO_CACHE *file, table_def *td, else { my_b_printf(file, "### @%d=", i + 1); + size_t fsize= td->calc_field_size((uint)i, (uchar*) value); + if (value + fsize > m_rows_end) + { + my_b_printf(file, "***Corrupted replication event was detected." + " Not printing the value***\n"); + value+= fsize; + return 0; + } size_t size= log_event_print_value(file, value, td->type(i), td->field_metadata(i), typestr, sizeof(typestr)); diff --git a/sql/log_event.h b/sql/log_event.h index fa17b32bef2..460d7244d07 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -3732,12 +3732,8 @@ protected: DBUG_ASSERT(m_table); ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); - int const result= ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols, - &m_curr_row_end, &m_master_reclength); - if (m_curr_row_end > m_rows_end) - my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0)); - ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT); - return result; + return ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols, + &m_curr_row_end, &m_master_reclength, m_rows_end); } #endif diff --git a/sql/log_event_old.h b/sql/log_event_old.h index ab8196c0979..04678ffff84 100644 --- a/sql/log_event_old.h +++ b/sql/log_event_old.h @@ -203,10 +203,8 @@ protected: { DBUG_ASSERT(m_table); ASSERT_OR_RETURN_ERROR(m_curr_row < m_rows_end, HA_ERR_CORRUPT_EVENT); - int const result= ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols, - &m_curr_row_end, &m_master_reclength); - ASSERT_OR_RETURN_ERROR(m_curr_row_end <= m_rows_end, HA_ERR_CORRUPT_EVENT); - return result; + return ::unpack_row(rli, m_table, m_width, m_curr_row, &m_cols, + &m_curr_row_end, &m_master_reclength, m_rows_end); } #endif diff --git a/sql/rpl_record.cc b/sql/rpl_record.cc index fc123acb104..347915405d9 100644 --- a/sql/rpl_record.cc +++ b/sql/rpl_record.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -169,11 +169,15 @@ pack_row(TABLE *table, MY_BITMAP const* cols, @param row_data Packed row data @param cols Pointer to bitset describing columns to fill in - @param row_end Pointer to variable that will hold the value of the - one-after-end position for the row + @param curr_row_end + Pointer to variable that will hold the value of the + one-after-end position for the current row @param master_reclength Pointer to variable that will be set to the length of the record on the master side + @param row_end + Pointer to variable that will hold the value of the + end position for the data in the row event @retval 0 No error @@ -185,7 +189,8 @@ int unpack_row(Relay_log_info const *rli, TABLE *table, uint const colcnt, uchar const *const row_data, MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength) + uchar const **const current_row_end, ulong *const master_reclength, + uchar const *const row_end) { DBUG_ENTER("unpack_row"); DBUG_ASSERT(row_data); @@ -303,6 +308,13 @@ unpack_row(Relay_log_info const *rli, #ifndef DBUG_OFF uchar const *const old_pack_ptr= pack_ptr; #endif + uint32 len= tabledef->calc_field_size(i, (uchar *) pack_ptr); + if ( pack_ptr + len > row_end ) + { + pack_ptr+= len; + my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0)); + DBUG_RETURN(ER_SLAVE_CORRUPT_EVENT); + } pack_ptr= f->unpack(f->ptr, pack_ptr, metadata, TRUE); DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;" " pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d", @@ -369,6 +381,11 @@ unpack_row(Relay_log_info const *rli, uint32 len= tabledef->calc_field_size(i, (uchar *) pack_ptr); DBUG_DUMP("field_data", pack_ptr, len); pack_ptr+= len; + if ( pack_ptr > row_end ) + { + my_error(ER_SLAVE_CORRUPT_EVENT, MYF(0)); + DBUG_RETURN(ER_SLAVE_CORRUPT_EVENT); + } } null_mask <<= 1; } @@ -382,7 +399,7 @@ unpack_row(Relay_log_info const *rli, DBUG_DUMP("row_data", row_data, pack_ptr - row_data); - *row_end = pack_ptr; + *current_row_end = pack_ptr; if (master_reclength) { if (*field_ptr) diff --git a/sql/rpl_record.h b/sql/rpl_record.h index e7d80960fe4..df3e6873af2 100644 --- a/sql/rpl_record.h +++ b/sql/rpl_record.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -32,7 +32,8 @@ size_t pack_row(TABLE* table, MY_BITMAP const* cols, int unpack_row(Relay_log_info const *rli, TABLE *table, uint const colcnt, uchar const *const row_data, MY_BITMAP const *cols, - uchar const **const row_end, ulong *const master_reclength); + uchar const **const curr_row_end, ulong *const master_reclength, + uchar const *const row_end); // Fill table's record[0] with default values. int prepare_record(TABLE *const table, const uint skip, const bool check); diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index 1527676ee58..16db07af4c2 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -186,7 +186,7 @@ int compare_lengths(Field *field, enum_field_types source_type, uint16 metadata) DBUG_PRINT("result", ("%d", result)); DBUG_RETURN(result); } - +#endif //MYSQL_CLIENT /********************************************************************* * table_def member definitions * *********************************************************************/ @@ -285,7 +285,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const case MYSQL_TYPE_VARCHAR: { length= m_field_metadata[col] > 255 ? 2 : 1; // c&p of Field_varstring::data_length() - DBUG_ASSERT(uint2korr(master_data) > 0); length+= length == 1 ? (uint32) *master_data : uint2korr(master_data); break; } @@ -295,17 +294,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const case MYSQL_TYPE_BLOB: case MYSQL_TYPE_GEOMETRY: { -#if 1 - /* - BUG#29549: - This is currently broken for NDB, which is using big-endian - order when packing length of BLOB. Once they have decided how to - fix the issue, we can enable the code below to make sure to - always read the length in little-endian order. - */ - Field_blob fb(m_field_metadata[col]); - length= fb.get_packed_size(master_data, TRUE); -#else /* Compute the length of the data. We cannot use get_length() here since it is dependent on the specific table (and also checks the @@ -331,7 +319,6 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const } length+= m_field_metadata[col]; -#endif break; } default: @@ -340,7 +327,7 @@ uint32 table_def::calc_field_size(uint col, uchar *master_data) const return length; } - +#ifndef MYSQL_CLIENT /** */ void show_sql_type(enum_field_types type, uint16 metadata, String *str, CHARSET_INFO *field_cs) -- cgit v1.2.1 From 11c0805e1d4ab1ba3e3b83aa5c041d69a6efa831 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Wed, 18 Dec 2013 13:52:49 +0530 Subject: Bug17632978 SLAVE CRASHES IF ROW EVENT IS CORRUPTED (MYSQLBINLOG -V CRASHES WITH THAT BINLOG) Post Push: Fixing Werror compiler issue --- sql/rpl_utility.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index 16db07af4c2..3bd423fa8c9 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -197,7 +197,7 @@ int compare_lengths(Field *field, enum_field_types source_type, uint16 metadata) */ uint32 table_def::calc_field_size(uint col, uchar *master_data) const { - uint32 length; + uint32 length= 0; switch (type(col)) { case MYSQL_TYPE_NEWDECIMAL: -- cgit v1.2.1 From ba22c3f29a1b3277ac9b1094f13b9efcf39b05fb Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 18 Dec 2013 11:05:18 +0100 Subject: Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTION Bug#68338 RFE: make tmpdir a build-time configurable option Background: Some distributions use tmpfs for mounting /tmp by default, which has some advantages, but brings also new issues. Fedora started using tmpfs on /tmp in version 18 for example. If not configured otherwise in my.cnf, MySQL uses system's constant P_tmpdir expanded to /tmp on Linux. This can introduce some problems with limited space in /tmp and also some data loss in case of replication slave [1]. In case distributions would like to use /var/tmp, which should be better for MySQL purposes, then we have to patch the source or change tmpdir option in my.cnf, which is however not updated in case it has already existed. Thus, it would be useful to be able to specify default tmpdir path using a configure option, while using P_tmpdir in case it is not defined explicitly. Based on a contribution from Honza Horak --- CMakeLists.txt | 9 +++++++++ config.h.cmake | 3 ++- libmysqld/lib_sql.cc | 2 +- mysys/mf_tempdir.c | 4 ++-- mysys/mf_tempfile.c | 4 ++-- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9c0da97525..d47e04c61b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -329,6 +329,15 @@ IF(SYSCONFDIR) SET(DEFAULT_SYSCONFDIR "${SYSCONFDIR}") ENDIF() +OPTION(TMPDIR +"PATH to MySQL TMP dir. If unspecified, defaults to P_tmpdir in " OFF) +IF(TMPDIR) + # Quote it, to make it a const char string. + SET(DEFAULT_TMPDIR "\"${TMPDIR}\"") +ELSE() + # Do not quote it, to refer to the P_tmpdir macro in . + SET(DEFAULT_TMPDIR "P_tmpdir") +ENDIF() # Run platform tests INCLUDE(configure.cmake) diff --git a/config.h.cmake b/config.h.cmake index 8c146011c7b..8c93da072fb 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -1,4 +1,4 @@ -/* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -600,6 +600,7 @@ #cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@" #cmakedefine PLUGINDIR "@PLUGINDIR@" #cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@" +#cmakedefine DEFAULT_TMPDIR @DEFAULT_TMPDIR@ #cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@" diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 70cbe6080d7..0e77ddc923c 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -558,7 +558,7 @@ int init_embedded_server(int argc, char **argv, char **groups) opt_mysql_tmpdir=getenv("TMP"); #endif if (!opt_mysql_tmpdir || !opt_mysql_tmpdir[0]) - opt_mysql_tmpdir=(char*) P_tmpdir; /* purecov: inspected */ + opt_mysql_tmpdir= const_cast(DEFAULT_TMPDIR); /* purecov: inspected*/ init_ssl(); umask(((~my_umask) & 0666)); diff --git a/mysys/mf_tempdir.c b/mysys/mf_tempdir.c index eceb90bb619..34b469b4066 100644 --- a/mysys/mf_tempdir.c +++ b/mysys/mf_tempdir.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist) pathlist=getenv("TMP"); #endif if (!pathlist || !pathlist[0]) - pathlist=(char*) P_tmpdir; + pathlist= DEFAULT_TMPDIR; } do { diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 15482075c39..62b3e09747f 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -111,7 +111,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, sizeof(prefix_buff)-7),"XXXXXX") - prefix_buff); if (!dir && ! (dir =getenv("TMPDIR"))) - dir=P_tmpdir; + dir= DEFAULT_TMPDIR; if (strlen(dir)+ pfx_len > FN_REFLEN-2) { errno=my_errno= ENAMETOOLONG; -- cgit v1.2.1 From 48bec2a931d3ba69eb266f5f372a6b858d66973a Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 18 Dec 2013 11:08:21 +0100 Subject: MTR's internal check of the test case 'main.events_trans' failed. fix: DROP EVENT e1; --- mysql-test/r/events_trans.result | 1 + mysql-test/t/events_trans.test | 1 + 2 files changed, 2 insertions(+) diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result index 37951c30787..084587079ba 100644 --- a/mysql-test/r/events_trans.result +++ b/mysql-test/r/events_trans.result @@ -135,3 +135,4 @@ SELECT * FROM t2; a ROLLBACK WORK TO SAVEPOINT A; DROP TABLE t1, t2; +DROP EVENT e1; diff --git a/mysql-test/t/events_trans.test b/mysql-test/t/events_trans.test index 4cf2583ac96..6d829379fea 100644 --- a/mysql-test/t/events_trans.test +++ b/mysql-test/t/events_trans.test @@ -146,3 +146,4 @@ SELECT * FROM t2; ROLLBACK WORK TO SAVEPOINT A; DROP TABLE t1, t2; +DROP EVENT e1; -- cgit v1.2.1 From b430aabae3eef2a3fb6b0ca73761ae3ca328ae8e Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Wed, 18 Dec 2013 14:01:15 +0100 Subject: Followup fix for Bug 17827378 MTR DOES NOT REPORT IF A TEST FAILS TO DROP CREATED EVENTS: - Check for triggers should exclude mtr's own - Move the code to before checksum table as it might affect result of some autdit_log tests (does in 5.6) - Replace SHOW STATUS LIKE 'slave_open_temp_tables' to be like in 5.6 --- mysql-test/include/mtr_check.sql | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index 8714e358372..dea503a2951 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -52,6 +52,16 @@ BEGIN WHERE table_schema='mysql' AND table_name != 'ndb_apply_status' ORDER BY columns_in_mysql; + -- Dump all events, there should be none + SELECT * FROM INFORMATION_SCHEMA.EVENTS; + -- Dump all triggers except mtr internals, there should be none + SELECT * FROM INFORMATION_SCHEMA.TRIGGERS + WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); + -- Dump all created procedures, there should be none + SELECT * FROM INFORMATION_SCHEMA.ROUTINES; + + SHOW STATUS LIKE 'slave_open_temp_tables'; + -- Checksum system tables to make sure they have been properly -- restored after test checksum table @@ -72,15 +82,6 @@ BEGIN mysql.time_zone_transition_type, mysql.user; - show status like 'slave_open_temp_tables'; - - -- Dump all events, there should be none - SELECT * FROM INFORMATION_SCHEMA.EVENTS; - -- Dump all triggers, there should be none - SELECT * FROM INFORMATION_SCHEMA.TRIGGERS; - -- Dump all created procedures, there should be none - SELECT * FROM INFORMATION_SCHEMA.ROUTINES; - END|| -- -- cgit v1.2.1 From 5a90f24cae4f0b3a696508911903c48fdee41daa Mon Sep 17 00:00:00 2001 From: Venkata Sidagam Date: Thu, 19 Dec 2013 16:08:38 +0530 Subject: Bug #17780290 PUBLISH THE GIS TEST FOR BUG#16451878 Adding the test cases for the BUG#16451878. --- mysql-test/r/gis.result | 21 +++++++++++++++++++++ mysql-test/t/gis.test | 18 ++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index 46a36ad8276..89b9d97b85b 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -1113,4 +1113,25 @@ SELECT 1 FROM g1 WHERE a >= ANY (SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ; 1 DROP TABLE g1; +# +# Bug#16451878 GEOMETRY QUERY CRASHES SERVER +# +# should not crash +SELECT ASTEXT(0x0100000000030000000100000000000010); +ASTEXT(0x0100000000030000000100000000000010) +NULL +#should not crash +SELECT ENVELOPE(0x0100000000030000000100000000000010); +ENVELOPE(0x0100000000030000000100000000000010) +NULL +#should not crash +SELECT +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1); +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1) +NULL +#should not crash +SELECT +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1); +GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1) +NULL End of 5.5 tests diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index d10192aa3c5..b16de7d323b 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -868,4 +868,22 @@ SELECT 1 FROM g1 WHERE a >= ANY DROP TABLE g1; +--echo # +--echo # Bug#16451878 GEOMETRY QUERY CRASHES SERVER +--echo # + +--echo # should not crash +SELECT ASTEXT(0x0100000000030000000100000000000010); + +--echo #should not crash +SELECT ENVELOPE(0x0100000000030000000100000000000010); + +--echo #should not crash +SELECT + GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffff0000, 1); + +--echo #should not crash +SELECT + GEOMETRYN(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1); + --echo End of 5.5 tests -- cgit v1.2.1 From e8232b1d95aa4806be54c519ea2dbb2fd03fd8a2 Mon Sep 17 00:00:00 2001 From: Satya Bodapati Date: Thu, 26 Dec 2013 14:33:52 +0530 Subject: BUG#16752251 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE OPERATION IF IT IS DONE IN-PLACE Add testcase as innodb-change-buffer-recovery.test --- .../innodb/r/innodb-change-buffer-recovery.result | 39 ++++++++++++ .../t/innodb-change-buffer-recovery-master.opt | 1 + .../innodb/t/innodb-change-buffer-recovery.test | 70 ++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result create mode 100644 mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt create mode 100644 mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test diff --git a/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result new file mode 100644 index 00000000000..c88445f5429 --- /dev/null +++ b/mysql-test/suite/innodb/r/innodb-change-buffer-recovery.result @@ -0,0 +1,39 @@ +# +# Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE +# OPERATION IF IT IS DONE IN-PLACE +# +SET GLOBAL innodb_change_buffering_debug = 1; +CREATE TABLE t1( +a INT AUTO_INCREMENT PRIMARY KEY, +b CHAR(1), +c INT, +INDEX(b)) +ENGINE=InnoDB; +INSERT INTO t1 VALUES(0,'x',1); +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +BEGIN; +SELECT b FROM t1 LIMIT 3; +b +x +x +x +BEGIN; +DELETE FROM t1 WHERE a=1; +INSERT INTO t1 VALUES(1,'X',1); +SET DEBUG='+d,crash_after_log_ibuf_upd_inplace'; +SELECT b FROM t1 LIMIT 3; +ERROR HY000: Lost connection to MySQL server during query +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt new file mode 100644 index 00000000000..33e2b863684 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery-master.opt @@ -0,0 +1 @@ +--log-error=$MYSQLTEST_VARDIR/tmp/my_restart.err diff --git a/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test new file mode 100644 index 00000000000..502ccc6c1b2 --- /dev/null +++ b/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test @@ -0,0 +1,70 @@ +--echo # +--echo # Bug#69122 - INNODB DOESN'T REDO-LOG INSERT BUFFER MERGE +--echo # OPERATION IF IT IS DONE IN-PLACE +--echo # +--source include/have_innodb.inc +# innodb_change_buffering_debug option is debug only +--source include/have_debug.inc +# Embedded server does not support crashing +--source include/not_embedded.inc +# DBUG_SUICIDE() hangs under valgrind +--source include/not_valgrind.inc + +# The flag innodb_change_buffering_debug is only available in debug builds. +# It instructs InnoDB to try to evict pages from the buffer pool when +# change buffering is possible, so that the change buffer will be used +# whenever possible. +SET GLOBAL innodb_change_buffering_debug = 1; +let SEARCH_FILE = $MYSQLTEST_VARDIR/tmp/my_restart.err; + +CREATE TABLE t1( + a INT AUTO_INCREMENT PRIMARY KEY, + b CHAR(1), + c INT, + INDEX(b)) +ENGINE=InnoDB; + +# Create enough rows for the table, so that the change buffer will be +# used for modifying the secondary index page. There must be multiple +# index pages, because changes to the root page are never buffered. +INSERT INTO t1 VALUES(0,'x',1); +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; +INSERT INTO t1 SELECT 0,b,c FROM t1; + +BEGIN; +SELECT b FROM t1 LIMIT 3; + +connect (con1,localhost,root,,); +connection con1; +BEGIN; +DELETE FROM t1 WHERE a=1; +# This should be buffered, if innodb_change_buffering_debug = 1 is in effect. +INSERT INTO t1 VALUES(1,'X',1); + +SET DEBUG='+d,crash_after_log_ibuf_upd_inplace'; +--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--error 2013 +# This should force a change buffer merge +SELECT b FROM t1 LIMIT 3; + +let SEARCH_PATTERN=Wrote log record for ibuf update in place operation; +--source include/search_pattern_in_file.inc + +# Write file to make mysql-test-run.pl start up the server again +--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +--enable_reconnect +--source include/wait_until_connected_again.inc + +CHECK TABLE t1; + +# Cleanup +DROP TABLE t1; -- cgit v1.2.1 From 64b697ca999d678692ca8db93ed7e42761cc56d6 Mon Sep 17 00:00:00 2001 From: Aditya A Date: Sun, 29 Dec 2013 16:55:24 +0530 Subject: Bug#12762390 SHOW INNODB STATUS REPORTS NON-FK ERRORS IN THE FK SECTION ANALYSIS -------- Any error during the renaming of the table was incorrectly logged in the dict_foreign_err_file and it showed up in foreign key section when we give the query "show engine innodb status". FIX --- Prevent renaming error from being logged in dict_foreign_err_file section. [Aprooved by marko #rb 2501 ] --- storage/innobase/handler/ha_innodb.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 546b0b8905b..5652bca5db7 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7652,16 +7652,6 @@ innobase_rename_table( error = row_rename_table_for_mysql( norm_from, norm_to, trx, lock_and_commit); - if (error != DB_SUCCESS) { - FILE* ef = dict_foreign_err_file; - - fputs("InnoDB: Renaming table ", ef); - ut_print_name(ef, trx, TRUE, norm_from); - fputs(" to ", ef); - ut_print_name(ef, trx, TRUE, norm_to); - fputs(" failed!\n", ef); - } - if (lock_and_commit) { row_mysql_unlock_data_dictionary(trx); -- cgit v1.2.1 From 1f8d86b42ede6264ed258973c69bb9bb1a39338a Mon Sep 17 00:00:00 2001 From: Arun Kuruvila Date: Mon, 30 Dec 2013 11:39:55 +0530 Subject: Bug #16324629 : SERVER CRASHES ON UPDATE/JOIN FEDERATED + LOCAL TABLE WHEN ONLY 1 LOCAL ROW Description: When updating a federated table with UPDATE... JOIN, the server consistently crashes with Signal 11 when only 1 row exists in the local table involved in the join and that 1 row can be joined with a row in the federated table. Analysis: Interaction between the federated engine and the optimizer results in the crash. In our scenario, ie, local table having only one row, the program is following a different path because the table is treated as a constant table by the join optimizer. So in this scenario "index_read()" is happening in the prepare phase, since optimizer plan is different for constant table joins. In this case, "index_read_idx_map()" (inside handler.cc) is calling "index_read()" and inside "index_read()", matching rows are fetched and "stored_result" gets populated by calling "store_result()". And just after "index_read()", "index_end()" function is called. And in the "index_end()", its freeing the "stored_result" by calling "free_result()". So when it reaches the execution phase, in "position()" function, we are getting assertion at "DBUG_ASSERT(stored_result);". In all other scenarios (ie, table with more than 1 row), optimizer plan is different and "index_read()" is happening in the execution phase. Fix: So my fix is to have a separate ha_federated member function for "index_read_idx_map()" which will handle federated engine separately. So that position() will be called before index_end() call in constant table scenario. --- storage/federated/ha_federated.cc | 18 +++++++++++++++++- storage/federated/ha_federated.h | 5 ++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index db2f749b6d4..409b4c40804 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2349,6 +2349,22 @@ int ha_federated::delete_row(const uchar *buf) DBUG_RETURN(0); } +int ha_federated::index_read_idx_map(uchar *buf, uint index, const uchar *key, + key_part_map keypart_map, + enum ha_rkey_function find_flag) +{ + int error= index_init(index, 0); + if (error) + return error; + error= index_read_map(buf, key, keypart_map, find_flag); + if(!error && stored_result) + { + uchar *dummy_arg=NULL; + position(dummy_arg); + } + int error1= index_end(); + return error ? error : error1; +} /* Positions an index cursor to the index specified in the handle. Fetches the diff --git a/storage/federated/ha_federated.h b/storage/federated/ha_federated.h index da20bf1e5d5..237b7777067 100644 --- a/storage/federated/ha_federated.h +++ b/storage/federated/ha_federated.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -217,6 +217,9 @@ public: int delete_row(const uchar *buf); int index_init(uint keynr, bool sorted); ha_rows estimate_rows_upper_bound(); + int index_read_idx_map(uchar *buf, uint index, const uchar *key, + key_part_map keypart_map, + enum ha_rkey_function find_flag); int index_read(uchar *buf, const uchar *key, uint key_len, enum ha_rkey_function find_flag); int index_read_idx(uchar *buf, uint idx, const uchar *key, -- cgit v1.2.1 From c92223e19860bdef8ed9d8958b31a17fdb6173aa Mon Sep 17 00:00:00 2001 From: Murthy Narkedimilli Date: Mon, 6 Jan 2014 10:52:35 +0530 Subject: Updated/added copyright headers --- README | 2 +- client/mysql_plugin.c | 2 +- client/mysqlcheck.c | 2 +- cmake/zlib.cmake | 3 +-- extra/yassl/CMakeLists.txt | 2 +- extra/yassl/include/yassl_error.hpp | 2 +- extra/yassl/include/yassl_types.hpp | 2 +- extra/yassl/src/handshake.cpp | 2 +- extra/yassl/src/yassl_error.cpp | 2 +- extra/yassl/src/yassl_imp.cpp | 2 +- extra/yassl/taocrypt/CMakeLists.txt | 2 +- include/my_getopt.h | 2 +- include/my_net.h | 2 +- include/myisam.h | 2 +- include/mysql/plugin.h | 2 +- include/mysql/plugin_audit.h | 2 +- libmysql/CMakeLists.txt | 2 +- libmysql/authentication_win/CMakeLists.txt | 2 +- libmysql/conf_to_src.c | 2 +- libmysql/libmysql.c | 2 +- mysql-test/CMakeLists.txt | 2 +- mysql-test/include/mtr_check.sql | 2 +- mysql-test/lib/My/SafeProcess/safe_process.cc | 2 +- mysql-test/lib/My/SysInfo.pm | 3 +-- mysys/md5.c | 2 +- mysys/mf_keycache.c | 2 +- mysys/mf_qsort.c | 3 ++- mysys/mf_radix.c | 3 ++- mysys/mf_same.c | 3 ++- mysys/mf_soundex.c | 3 ++- mysys/mf_wcomp.c | 3 ++- mysys/mulalloc.c | 3 ++- mysys/my_access.c | 2 +- mysys/my_aes.c | 3 ++- mysys/my_conio.c | 3 ++- mysys/my_crc32.c | 3 ++- mysys/my_div.c | 3 ++- mysys/my_error.c | 2 +- mysys/my_fopen.c | 2 +- mysys/my_getpagesize.c | 3 ++- mysys/my_libwrap.c | 2 +- mysys/my_lockmem.c | 2 +- mysys/my_malloc.c | 2 +- mysys/my_memmem.c | 3 ++- mysys/my_mkdir.c | 3 ++- mysys/my_once.c | 2 +- mysys/my_symlink2.c | 3 ++- mysys/my_winthread.c | 2 +- mysys/test_dir.c | 3 ++- mysys/test_xml.c | 3 ++- mysys/thr_alarm.c | 2 +- packaging/WiX/CPackWixConfig.cmake | 2 +- packaging/WiX/custom_ui.wxs | 2 +- packaging/WiX/mysql_server.wxs.in | 2 +- scripts/CMakeLists.txt | 2 +- scripts/comp_sql.c | 2 +- scripts/mysql_install_db.pl.in | 2 +- scripts/mysql_install_db.sh | 2 +- scripts/mysql_system_tables.sql | 2 +- scripts/mysql_system_tables_fix.sql | 2 +- scripts/mysqlaccess.sh | 3 +-- sql-common/pack.c | 3 ++- sql/CMakeLists.txt | 2 +- sql/custom_conf.h | 3 ++- sql/event_scheduler.cc | 2 +- sql/event_scheduler.h | 2 +- sql/events.cc | 2 +- sql/events.h | 2 +- sql/ha_ndbcluster_cond.cc | 2 +- sql/ha_ndbcluster_cond.h | 2 +- sql/ha_ndbcluster_tables.h | 3 ++- sql/hostname.cc | 2 +- sql/item_cmpfunc.h | 2 +- sql/item_func.h | 2 +- sql/item_sum.cc | 2 +- sql/item_sum.h | 2 +- sql/item_xmlfunc.cc | 2 +- sql/key.cc | 2 +- sql/key.h | 2 +- sql/lex_symbol.h | 3 ++- sql/log.cc | 2 +- sql/log_event_old.h | 2 +- sql/mem_root_array.h | 2 +- sql/my_decimal.h | 2 +- sql/mysqld.cc | 2 +- sql/mysqld.h | 2 +- sql/partition_element.h | 2 +- sql/partition_info.h | 2 +- sql/rpl_filter.cc | 2 +- sql/set_var.cc | 2 +- sql/set_var.h | 2 +- sql/share/charsets/Index.xml | 2 +- sql/share/charsets/armscii8.xml | 3 ++- sql/share/charsets/ascii.xml | 2 +- sql/share/charsets/cp1250.xml | 2 +- sql/share/charsets/cp852.xml | 3 ++- sql/share/charsets/hebrew.xml | 2 +- sql/share/charsets/latin1.xml | 2 +- sql/share/charsets/latin2.xml | 2 +- sql/share/charsets/latin5.xml | 2 +- sql/signal_handler.cc | 2 +- sql/slave.cc | 2 +- sql/sql_acl.cc | 2 +- sql/sql_admin.h | 2 +- sql/sql_analyse.cc | 2 +- sql/sql_audit.cc | 2 +- sql/sql_audit.h | 2 +- sql/sql_binlog.cc | 2 +- sql/sql_bitmap.h | 2 +- sql/sql_connect.cc | 2 +- sql/sql_help.cc | 2 +- sql/sql_lex.h | 2 +- sql/sql_manager.cc | 2 +- sql/sql_partition_admin.cc | 2 +- sql/sql_plugin.cc | 2 +- sql/sql_string.cc | 2 +- sql/sql_trigger.cc | 2 +- sql/sql_view.cc | 2 +- sql/strfunc.cc | 2 +- sql/table.cc | 2 +- sql/table.h | 2 +- sql/transaction.h | 3 +-- storage/example/ha_example.cc | 2 +- storage/heap/_check.c | 3 ++- storage/heap/_rectest.c | 3 ++- storage/heap/hp_delete.c | 2 +- storage/heap/hp_extra.c | 3 ++- storage/heap/hp_rfirst.c | 3 ++- storage/heap/hp_rlast.c | 3 ++- storage/heap/hp_rnext.c | 3 ++- storage/heap/hp_rprev.c | 3 ++- storage/heap/hp_rrnd.c | 3 ++- storage/heap/hp_rsame.c | 3 ++- storage/heap/hp_scan.c | 3 ++- storage/heap/hp_update.c | 3 ++- storage/myisam/ft_stopwords.c | 2 +- storage/myisam/ftbench/Ecompare.pl | 2 +- storage/myisam/ftbench/Ecreate.pl | 2 +- storage/myisam/ftbench/Ereport.pl | 2 +- storage/myisam/ftbench/ft-test-run.sh | 5 +++-- storage/myisam/mi_check.c | 2 +- storage/myisam/mi_checksum.c | 2 +- storage/myisam/mi_rfirst.c | 3 ++- storage/myisam/mi_rlast.c | 3 ++- storage/myisam/mi_rrnd.c | 3 ++- storage/myisam/mi_rsamepos.c | 3 ++- storage/myisam/mi_scan.c | 3 ++- storage/myisam/mi_write.c | 2 +- storage/myisam/myisampack.c | 2 +- storage/myisam/rt_index.h | 3 ++- storage/myisam/rt_key.c | 3 ++- storage/myisam/rt_key.h | 3 ++- storage/myisam/rt_mbr.c | 3 ++- storage/myisam/rt_mbr.h | 3 ++- storage/myisam/sp_defs.h | 3 ++- storage/myisammrg/myrg_delete.c | 3 ++- storage/myisammrg/myrg_locking.c | 3 ++- storage/myisammrg/myrg_panic.c | 3 ++- storage/myisammrg/myrg_range.c | 3 ++- storage/myisammrg/myrg_rfirst.c | 3 ++- storage/myisammrg/myrg_rlast.c | 3 ++- storage/myisammrg/myrg_rnext.c | 3 ++- storage/myisammrg/myrg_rnext_same.c | 3 ++- storage/myisammrg/myrg_rprev.c | 3 ++- storage/myisammrg/myrg_rrnd.c | 3 ++- storage/myisammrg/myrg_rsame.c | 3 ++- storage/myisammrg/myrg_update.c | 3 ++- storage/myisammrg/myrg_write.c | 3 ++- storage/ndb/config/win-includes | 2 +- storage/ndb/config/win-libraries | 2 +- storage/ndb/config/win-name | 2 +- storage/ndb/config/win-sources | 2 +- storage/ndb/include/debugger/DebuggerNames.hpp | 2 +- storage/ndb/include/debugger/EventLogger.hpp | 2 +- storage/ndb/include/debugger/GrepError.hpp | 2 +- storage/ndb/include/debugger/SignalLoggerManager.hpp | 2 +- storage/ndb/include/editline/editline.h | 2 +- storage/ndb/include/kernel/AttributeDescriptor.hpp | 2 +- storage/ndb/include/kernel/AttributeHeader.hpp | 2 +- storage/ndb/include/kernel/AttributeList.hpp | 2 +- storage/ndb/include/kernel/BlockNumbers.h | 2 +- storage/ndb/include/kernel/GlobalSignalNumbers.h | 2 +- storage/ndb/include/kernel/GrepEvent.hpp | 2 +- storage/ndb/include/kernel/Interpreter.hpp | 2 +- storage/ndb/include/kernel/LogLevel.hpp | 2 +- storage/ndb/include/kernel/NodeBitmask.hpp | 2 +- storage/ndb/include/kernel/NodeInfo.hpp | 2 +- storage/ndb/include/kernel/NodeState.hpp | 2 +- storage/ndb/include/kernel/RefConvert.hpp | 2 +- storage/ndb/include/kernel/kernel_types.h | 2 +- storage/ndb/include/kernel/ndb_limits.h | 2 +- storage/ndb/include/kernel/signaldata/AbortAll.hpp | 2 +- storage/ndb/include/kernel/signaldata/AccFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/AccLock.hpp | 3 ++- storage/ndb/include/kernel/signaldata/AccScan.hpp | 2 +- storage/ndb/include/kernel/signaldata/AccSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/AllocNodeId.hpp | 2 +- storage/ndb/include/kernel/signaldata/AlterIndx.hpp | 2 +- storage/ndb/include/kernel/signaldata/AlterTab.hpp | 4 ++-- storage/ndb/include/kernel/signaldata/AlterTable.hpp | 2 +- storage/ndb/include/kernel/signaldata/AlterTrig.hpp | 2 +- storage/ndb/include/kernel/signaldata/ApiBroadcast.hpp | 2 +- storage/ndb/include/kernel/signaldata/ApiRegSignalData.hpp | 2 +- storage/ndb/include/kernel/signaldata/ApiVersion.hpp | 2 +- storage/ndb/include/kernel/signaldata/ArbitSignalData.hpp | 2 +- storage/ndb/include/kernel/signaldata/AttrInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/BackupContinueB.hpp | 4 ++-- storage/ndb/include/kernel/signaldata/BackupImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/BackupSignalData.hpp | 2 +- storage/ndb/include/kernel/signaldata/BlockCommitOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/BuildIndx.hpp | 2 +- storage/ndb/include/kernel/signaldata/CheckNodeGroups.hpp | 2 +- storage/ndb/include/kernel/signaldata/CloseComReqConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/CmInit.hpp | 2 +- storage/ndb/include/kernel/signaldata/CmRegSignalData.hpp | 3 ++- storage/ndb/include/kernel/signaldata/CmvmiCfgConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/CntrMasterConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/CntrMasterReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/ConfigParamId.hpp | 2 +- storage/ndb/include/kernel/signaldata/ContinueFragmented.hpp | 2 +- storage/ndb/include/kernel/signaldata/CopyActive.hpp | 2 +- storage/ndb/include/kernel/signaldata/CopyFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/CopyGCIReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateEvnt.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateFilegroup.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateFragmentation.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateIndx.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateObj.hpp | 3 ++- storage/ndb/include/kernel/signaldata/CreateTab.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateTable.hpp | 2 +- storage/ndb/include/kernel/signaldata/CreateTrig.hpp | 2 +- storage/ndb/include/kernel/signaldata/DiAddTab.hpp | 2 +- storage/ndb/include/kernel/signaldata/DiGetNodes.hpp | 2 +- storage/ndb/include/kernel/signaldata/DictLock.hpp | 2 +- storage/ndb/include/kernel/signaldata/DictObjOp.hpp | 2 +- storage/ndb/include/kernel/signaldata/DictSchemaInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/DictSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/DictStart.hpp | 2 +- storage/ndb/include/kernel/signaldata/DictTabInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/DihAddFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/DihContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/DihSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/DihStartTab.hpp | 2 +- storage/ndb/include/kernel/signaldata/DihSwitchReplica.hpp | 2 +- storage/ndb/include/kernel/signaldata/DisconnectRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropFilegroup.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropFilegroupImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropIndx.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropObj.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropTab.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropTabFile.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropTable.hpp | 2 +- storage/ndb/include/kernel/signaldata/DropTrig.hpp | 2 +- storage/ndb/include/kernel/signaldata/DumpStateOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/EmptyLcp.hpp | 2 +- storage/ndb/include/kernel/signaldata/EndTo.hpp | 2 +- storage/ndb/include/kernel/signaldata/EventReport.hpp | 2 +- storage/ndb/include/kernel/signaldata/EventSubscribeReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/ExecFragReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/Extent.hpp | 2 +- storage/ndb/include/kernel/signaldata/FailRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/FireTrigOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsAppendReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsCloseReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsOpenReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsReadWriteReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsRef.hpp | 2 +- storage/ndb/include/kernel/signaldata/FsRemoveReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/GCPSave.hpp | 2 +- storage/ndb/include/kernel/signaldata/GetTabInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/GetTableId.hpp | 2 +- storage/ndb/include/kernel/signaldata/GrepImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/HotSpareRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/IndxAttrInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/IndxKeyInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/InvalidateNodeLCPConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/InvalidateNodeLCPReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/KeyInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/LCP.hpp | 2 +- storage/ndb/include/kernel/signaldata/LgmanContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/ListTables.hpp | 2 +- storage/ndb/include/kernel/signaldata/LqhFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/LqhKey.hpp | 2 +- storage/ndb/include/kernel/signaldata/LqhSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/LqhTransConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/ManagementServer.hpp | 2 +- storage/ndb/include/kernel/signaldata/MasterGCP.hpp | 2 +- storage/ndb/include/kernel/signaldata/MasterLCP.hpp | 2 +- storage/ndb/include/kernel/signaldata/NFCompleteRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/NdbSttor.hpp | 2 +- storage/ndb/include/kernel/signaldata/NdbfsContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/NextScan.hpp | 2 +- storage/ndb/include/kernel/signaldata/NodeFailRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/NodeStateSignalData.hpp | 2 +- storage/ndb/include/kernel/signaldata/PackedSignal.hpp | 2 +- storage/ndb/include/kernel/signaldata/PgmanContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/PrepDropTab.hpp | 2 +- storage/ndb/include/kernel/signaldata/PrepFailReqRef.hpp | 2 +- storage/ndb/include/kernel/signaldata/ReadNodesConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/RelTabMem.hpp | 2 +- storage/ndb/include/kernel/signaldata/RepImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/RestoreContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/RestoreImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/ResumeReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/RouteOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/ScanFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/ScanTab.hpp | 2 +- storage/ndb/include/kernel/signaldata/SetLogLevelOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/SetVarReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/SignalData.hpp | 2 +- storage/ndb/include/kernel/signaldata/SignalDataPrint.hpp | 2 +- storage/ndb/include/kernel/signaldata/SignalDroppedRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/SrFragidConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartFragReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartMe.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartPerm.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartRec.hpp | 2 +- storage/ndb/include/kernel/signaldata/StartTo.hpp | 2 +- storage/ndb/include/kernel/signaldata/StopMe.hpp | 2 +- storage/ndb/include/kernel/signaldata/StopPerm.hpp | 2 +- storage/ndb/include/kernel/signaldata/StopReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/SumaImpl.hpp | 2 +- storage/ndb/include/kernel/signaldata/SystemError.hpp | 2 +- storage/ndb/include/kernel/signaldata/TamperOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcCommit.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcHbRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcIndx.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcKeyConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcKeyFailConf.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcKeyRef.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcKeyReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcRollbackRep.hpp | 2 +- storage/ndb/include/kernel/signaldata/TcSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/TestOrd.hpp | 2 +- storage/ndb/include/kernel/signaldata/TransIdAI.hpp | 2 +- storage/ndb/include/kernel/signaldata/TrigAttrInfo.hpp | 2 +- storage/ndb/include/kernel/signaldata/TsmanContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/TupCommit.hpp | 2 +- storage/ndb/include/kernel/signaldata/TupFrag.hpp | 2 +- storage/ndb/include/kernel/signaldata/TupKey.hpp | 2 +- storage/ndb/include/kernel/signaldata/TupSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/TuxBound.hpp | 2 +- storage/ndb/include/kernel/signaldata/TuxContinueB.hpp | 2 +- storage/ndb/include/kernel/signaldata/TuxMaint.hpp | 2 +- storage/ndb/include/kernel/signaldata/TuxSizeAltReq.hpp | 2 +- storage/ndb/include/kernel/signaldata/UpdateTo.hpp | 2 +- storage/ndb/include/kernel/signaldata/UtilDelete.hpp | 2 +- storage/ndb/include/kernel/signaldata/UtilExecute.hpp | 2 +- storage/ndb/include/kernel/signaldata/UtilLock.hpp | 2 +- storage/ndb/include/kernel/signaldata/UtilPrepare.hpp | 2 +- storage/ndb/include/kernel/signaldata/UtilRelease.hpp | 2 +- storage/ndb/include/kernel/signaldata/UtilSequence.hpp | 2 +- storage/ndb/include/kernel/signaldata/WaitGCP.hpp | 2 +- storage/ndb/include/kernel/trigger_definitions.h | 2 +- storage/ndb/include/logger/ConsoleLogHandler.hpp | 2 +- storage/ndb/include/logger/FileLogHandler.hpp | 2 +- storage/ndb/include/logger/LogHandler.hpp | 2 +- storage/ndb/include/logger/Logger.hpp | 2 +- storage/ndb/include/logger/SysLogHandler.hpp | 2 +- storage/ndb/include/mgmapi/mgmapi.h | 2 +- storage/ndb/include/mgmapi/mgmapi_debug.h | 2 +- storage/ndb/include/mgmapi/mgmapi_error.h | 2 +- storage/ndb/include/mgmapi/ndb_logevent.h | 2 +- storage/ndb/include/mgmapi/ndbd_exit_codes.h | 2 +- storage/ndb/include/mgmcommon/ConfigRetriever.hpp | 2 +- storage/ndb/include/mgmcommon/IPCConfig.hpp | 2 +- storage/ndb/include/mgmcommon/MgmtErrorReporter.hpp | 2 +- storage/ndb/include/ndb_constants.h | 2 +- storage/ndb/include/ndb_global.h.in | 2 +- storage/ndb/include/ndb_init.h | 2 +- storage/ndb/include/ndb_types.h.in | 2 +- storage/ndb/include/ndb_version.h.in | 2 +- storage/ndb/include/ndbapi/Ndb.hpp | 2 +- storage/ndb/include/ndbapi/NdbApi.hpp | 2 +- storage/ndb/include/ndbapi/NdbBlob.hpp | 2 +- storage/ndb/include/ndbapi/NdbDictionary.hpp | 2 +- storage/ndb/include/ndbapi/NdbError.hpp | 2 +- storage/ndb/include/ndbapi/NdbEventOperation.hpp | 2 +- storage/ndb/include/ndbapi/NdbIndexOperation.hpp | 2 +- storage/ndb/include/ndbapi/NdbIndexScanOperation.hpp | 2 +- storage/ndb/include/ndbapi/NdbIndexStat.hpp | 2 +- storage/ndb/include/ndbapi/NdbOperation.hpp | 2 +- storage/ndb/include/ndbapi/NdbPool.hpp | 2 +- storage/ndb/include/ndbapi/NdbRecAttr.hpp | 2 +- storage/ndb/include/ndbapi/NdbReceiver.hpp | 2 +- storage/ndb/include/ndbapi/NdbScanFilter.hpp | 2 +- storage/ndb/include/ndbapi/NdbScanOperation.hpp | 2 +- storage/ndb/include/ndbapi/NdbTransaction.hpp | 2 +- storage/ndb/include/ndbapi/ndb_cluster_connection.hpp | 2 +- storage/ndb/include/ndbapi/ndb_opt_defaults.h | 2 +- storage/ndb/include/ndbapi/ndbapi_limits.h | 2 +- storage/ndb/include/ndbapi/ndberror.h | 2 +- storage/ndb/include/newtonapi/dba.h | 2 +- storage/ndb/include/newtonapi/defs/pcn_types.h | 2 +- storage/ndb/include/portlib/NdbCondition.h | 2 +- storage/ndb/include/portlib/NdbConfig.h | 2 +- storage/ndb/include/portlib/NdbDaemon.h | 2 +- storage/ndb/include/portlib/NdbEnv.h | 2 +- storage/ndb/include/portlib/NdbHost.h | 2 +- storage/ndb/include/portlib/NdbMain.h | 2 +- storage/ndb/include/portlib/NdbMem.h | 2 +- storage/ndb/include/portlib/NdbMutex.h | 2 +- storage/ndb/include/portlib/NdbSleep.h | 2 +- storage/ndb/include/portlib/NdbTCP.h | 2 +- storage/ndb/include/portlib/NdbThread.h | 2 +- storage/ndb/include/portlib/NdbTick.h | 2 +- storage/ndb/include/portlib/PortDefs.h | 2 +- storage/ndb/include/portlib/prefetch.h | 2 +- storage/ndb/include/transporter/TransporterCallback.hpp | 2 +- storage/ndb/include/transporter/TransporterDefinitions.hpp | 2 +- storage/ndb/include/transporter/TransporterRegistry.hpp | 2 +- storage/ndb/include/util/BaseString.hpp | 2 +- storage/ndb/include/util/Bitmask.hpp | 2 +- storage/ndb/include/util/File.hpp | 2 +- storage/ndb/include/util/InputStream.hpp | 2 +- storage/ndb/include/util/NdbAutoPtr.hpp | 2 +- storage/ndb/include/util/NdbOut.hpp | 2 +- storage/ndb/include/util/NdbSqlUtil.hpp | 2 +- storage/ndb/include/util/OutputStream.hpp | 2 +- storage/ndb/include/util/Parser.hpp | 2 +- storage/ndb/include/util/Properties.hpp | 2 +- storage/ndb/include/util/SimpleProperties.hpp | 2 +- storage/ndb/include/util/SocketAuthenticator.hpp | 2 +- storage/ndb/include/util/SocketClient.hpp | 2 +- storage/ndb/include/util/SocketServer.hpp | 2 +- storage/ndb/include/util/UtilBuffer.hpp | 2 +- storage/ndb/include/util/Vector.hpp | 2 +- storage/ndb/include/util/basestring_vsnprintf.h | 2 +- storage/ndb/include/util/md5_hash.hpp | 2 +- storage/ndb/include/util/ndb_opts.h | 2 +- storage/ndb/include/util/ndb_rand.h | 2 +- storage/ndb/include/util/random.h | 2 +- storage/ndb/include/util/socket_io.h | 2 +- storage/ndb/include/util/uucode.h | 2 +- storage/ndb/include/util/version.h | 2 +- storage/ndb/ndbapi-examples/mgmapi_logevent/main.cpp | 2 +- storage/ndb/ndbapi-examples/mgmapi_logevent2/main.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_async/ndbapi_async.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_async1/ndbapi_async1.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_event/ndbapi_event.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_retries/ndbapi_retries.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_scan/ndbapi_scan.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_simple/ndbapi_simple.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp | 2 +- storage/ndb/ndbapi-examples/ndbapi_simple_index/main.cpp | 2 +- storage/ndb/src/common/debugger/BlockNames.cpp | 2 +- storage/ndb/src/common/debugger/DebuggerNames.cpp | 2 +- storage/ndb/src/common/debugger/EventLogger.cpp | 2 +- storage/ndb/src/common/debugger/GrepError.cpp | 2 +- storage/ndb/src/common/debugger/SignalLoggerManager.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/AccLock.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/AlterIndx.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/AlterTab.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/AlterTable.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/AlterTrig.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/BackupImpl.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/CloseComReqConf.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/ContinueB.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/CopyGCI.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/CreateEvnt.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/CreateFragmentation.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/CreateIndx.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/CreateTrig.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DictTabInfo.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DihContinueB.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DihSwitchReplicaReq.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DisconnectRep.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DropIndx.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DropTab.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/DropTrig.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FailRep.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FireTrigOrd.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FsAppendReq.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FsCloseReq.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FsConf.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FsOpenReq.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FsReadWriteReq.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/FsRef.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/GCPSave.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/IndxAttrInfo.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/IndxKeyInfo.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/LCP.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/LqhFrag.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/LqhKey.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/LqhTrans.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/MasterLCP.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/NFCompleteRep.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/NdbSttor.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/NdbfsContinueB.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/PrepDropTab.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/PrepFailReqRef.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/ScanFrag.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/ScanTab.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/SignalDataPrint.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/SignalDroppedRep.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/SignalNames.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/StartRec.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/SumaImpl.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/SystemError.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TcIndx.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TcKeyConf.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TcKeyRef.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TcKeyReq.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TcRollbackRep.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TrigAttrInfo.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TupCommit.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TupKey.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/TuxMaint.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/UtilDelete.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/UtilExecute.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/UtilLock.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/UtilPrepare.cpp | 2 +- storage/ndb/src/common/debugger/signaldata/UtilSequence.cpp | 2 +- storage/ndb/src/common/logger/ConsoleLogHandler.cpp | 2 +- storage/ndb/src/common/logger/FileLogHandler.cpp | 2 +- storage/ndb/src/common/logger/LogHandler.cpp | 2 +- storage/ndb/src/common/logger/LogHandlerList.cpp | 2 +- storage/ndb/src/common/logger/LogHandlerList.hpp | 2 +- storage/ndb/src/common/logger/Logger.cpp | 2 +- storage/ndb/src/common/logger/SysLogHandler.cpp | 2 +- storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.cpp | 2 +- storage/ndb/src/common/logger/listtest/LogHandlerListUnitTest.hpp | 2 +- storage/ndb/src/common/logger/loggertest/LoggerUnitTest.cpp | 2 +- storage/ndb/src/common/logger/loggertest/LoggerUnitTest.hpp | 2 +- storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp | 2 +- storage/ndb/src/common/mgmcommon/IPCConfig.cpp | 2 +- storage/ndb/src/common/mgmcommon/printConfig/printConfig.cpp | 2 +- storage/ndb/src/common/portlib/NdbCondition.c | 2 +- storage/ndb/src/common/portlib/NdbConfig.c | 2 +- storage/ndb/src/common/portlib/NdbDaemon.c | 2 +- storage/ndb/src/common/portlib/NdbEnv.c | 2 +- storage/ndb/src/common/portlib/NdbHost.c | 2 +- storage/ndb/src/common/portlib/NdbMem.c | 2 +- storage/ndb/src/common/portlib/NdbMutex.c | 2 +- storage/ndb/src/common/portlib/NdbPortLibTest.cpp | 2 +- storage/ndb/src/common/portlib/NdbSleep.c | 2 +- storage/ndb/src/common/portlib/NdbTCP.cpp | 2 +- storage/ndb/src/common/portlib/NdbThread.c | 2 +- storage/ndb/src/common/portlib/NdbTick.c | 2 +- storage/ndb/src/common/portlib/memtest.c | 2 +- storage/ndb/src/common/portlib/mmstest.cpp | 2 +- storage/ndb/src/common/portlib/munmaptest.cpp | 2 +- storage/ndb/src/common/portlib/win32/NdbCondition.c | 2 +- storage/ndb/src/common/portlib/win32/NdbDaemon.c | 2 +- storage/ndb/src/common/portlib/win32/NdbEnv.c | 2 +- storage/ndb/src/common/portlib/win32/NdbHost.c | 2 +- storage/ndb/src/common/portlib/win32/NdbMem.c | 2 +- storage/ndb/src/common/portlib/win32/NdbMutex.c | 2 +- storage/ndb/src/common/portlib/win32/NdbSleep.c | 2 +- storage/ndb/src/common/portlib/win32/NdbTCP.c | 2 +- storage/ndb/src/common/portlib/win32/NdbThread.c | 2 +- storage/ndb/src/common/portlib/win32/NdbTick.c | 2 +- storage/ndb/src/common/transporter/Packer.cpp | 2 +- storage/ndb/src/common/transporter/Packer.hpp | 2 +- storage/ndb/src/common/transporter/SCI_Transporter.cpp | 2 +- storage/ndb/src/common/transporter/SCI_Transporter.hpp | 2 +- storage/ndb/src/common/transporter/SHM_Buffer.hpp | 2 +- storage/ndb/src/common/transporter/SHM_Transporter.cpp | 2 +- storage/ndb/src/common/transporter/SHM_Transporter.hpp | 2 +- storage/ndb/src/common/transporter/SHM_Transporter.unix.cpp | 2 +- storage/ndb/src/common/transporter/SHM_Transporter.win32.cpp | 2 +- storage/ndb/src/common/transporter/SendBuffer.cpp | 2 +- storage/ndb/src/common/transporter/SendBuffer.hpp | 2 +- storage/ndb/src/common/transporter/TCP_Transporter.cpp | 2 +- storage/ndb/src/common/transporter/TCP_Transporter.hpp | 2 +- storage/ndb/src/common/transporter/Transporter.cpp | 2 +- storage/ndb/src/common/transporter/Transporter.hpp | 2 +- .../ndb/src/common/transporter/TransporterInternalDefinitions.hpp | 2 +- storage/ndb/src/common/transporter/TransporterRegistry.cpp | 2 +- .../ndb/src/common/transporter/basictest/basicTransporterTest.cpp | 2 +- storage/ndb/src/common/transporter/buddy.cpp | 2 +- storage/ndb/src/common/transporter/buddy.hpp | 2 +- storage/ndb/src/common/transporter/failoverSCI/failoverSCI.cpp | 2 +- storage/ndb/src/common/transporter/perftest/perfTransporterTest.cpp | 2 +- storage/ndb/src/common/transporter/priotest/prioSCI/prioSCI.cpp | 2 +- storage/ndb/src/common/transporter/priotest/prioSHM/prioSHM.cpp | 2 +- storage/ndb/src/common/transporter/priotest/prioTCP/prioTCP.cpp | 2 +- storage/ndb/src/common/transporter/priotest/prioTransporterTest.cpp | 2 +- storage/ndb/src/common/transporter/priotest/prioTransporterTest.hpp | 2 +- storage/ndb/src/common/util/BaseString.cpp | 2 +- storage/ndb/src/common/util/File.cpp | 2 +- storage/ndb/src/common/util/InputStream.cpp | 2 +- storage/ndb/src/common/util/NdbOut.cpp | 2 +- storage/ndb/src/common/util/NdbSqlUtil.cpp | 2 +- storage/ndb/src/common/util/OutputStream.cpp | 2 +- storage/ndb/src/common/util/Parser.cpp | 2 +- storage/ndb/src/common/util/Properties.cpp | 2 +- storage/ndb/src/common/util/SimpleProperties.cpp | 2 +- storage/ndb/src/common/util/SocketAuthenticator.cpp | 2 +- storage/ndb/src/common/util/SocketClient.cpp | 2 +- storage/ndb/src/common/util/SocketServer.cpp | 2 +- storage/ndb/src/common/util/basestring_vsnprintf.c | 2 +- storage/ndb/src/common/util/filetest/FileUnitTest.cpp | 2 +- storage/ndb/src/common/util/filetest/FileUnitTest.hpp | 2 +- storage/ndb/src/common/util/md5_hash.cpp | 2 +- storage/ndb/src/common/util/ndb_init.c | 2 +- storage/ndb/src/common/util/ndb_rand.c | 2 +- storage/ndb/src/common/util/random.c | 2 +- storage/ndb/src/common/util/socket_io.cpp | 2 +- storage/ndb/src/common/util/strdup.c | 2 +- storage/ndb/src/common/util/testProperties/testProperties.cpp | 2 +- storage/ndb/src/common/util/testSimpleProperties/sp_test.cpp | 2 +- storage/ndb/src/common/util/uucode.c | 2 +- storage/ndb/src/common/util/version.c | 2 +- storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.cpp | 2 +- storage/ndb/src/cw/cpcc-win32/C++/CPC_GUI.h | 2 +- storage/ndb/src/cw/cpcc-win32/C++/NdbControls.cpp | 2 +- storage/ndb/src/cw/cpcc-win32/C++/StdAfx.cpp | 2 +- storage/ndb/src/cw/cpcc-win32/C++/StdAfx.h | 2 +- storage/ndb/src/cw/cpcc-win32/C++/TreeView.cpp | 2 +- storage/ndb/src/cw/cpcc-win32/C++/TreeView.h | 2 +- storage/ndb/src/cw/cpcc-win32/C++/resource.h | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/CPC_Form.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/Computer.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/ComputerAddDialog.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/ComputerRemoveDialog.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/Database.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/Process.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/ProcessDefineDialog.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/fileaccess/FileMgmt.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/simpleparser/SimpleCPCParser.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/SocketComm.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/socketcomm/myTcpClient.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/startDatabaseDlg.cs | 2 +- storage/ndb/src/cw/cpcc-win32/csharp/telnetclient/telnetClient.cs | 2 +- storage/ndb/src/cw/cpcd/APIService.cpp | 2 +- storage/ndb/src/cw/cpcd/APIService.hpp | 2 +- storage/ndb/src/cw/cpcd/CPCD.cpp | 2 +- storage/ndb/src/cw/cpcd/CPCD.hpp | 2 +- storage/ndb/src/cw/cpcd/Monitor.cpp | 2 +- storage/ndb/src/cw/cpcd/Process.cpp | 2 +- storage/ndb/src/cw/cpcd/common.cpp | 2 +- storage/ndb/src/cw/cpcd/common.hpp | 2 +- storage/ndb/src/cw/cpcd/main.cpp | 2 +- storage/ndb/src/cw/test/socketclient/socketClientTest.cpp | 2 +- storage/ndb/src/cw/util/ClientInterface.cpp | 2 +- storage/ndb/src/cw/util/ClientInterface.hpp | 2 +- storage/ndb/src/cw/util/SocketRegistry.cpp | 2 +- storage/ndb/src/cw/util/SocketRegistry.hpp | 2 +- storage/ndb/src/cw/util/SocketService.cpp | 2 +- storage/ndb/src/cw/util/SocketService.hpp | 2 +- storage/ndb/src/kernel/SimBlockList.cpp | 2 +- storage/ndb/src/kernel/blocks/backup/Backup.cpp | 2 +- storage/ndb/src/kernel/blocks/backup/Backup.hpp | 2 +- storage/ndb/src/kernel/blocks/backup/BackupFormat.hpp | 2 +- storage/ndb/src/kernel/blocks/backup/BackupInit.cpp | 2 +- storage/ndb/src/kernel/blocks/backup/FsBuffer.hpp | 2 +- storage/ndb/src/kernel/blocks/backup/read.cpp | 2 +- storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp | 2 +- storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.hpp | 2 +- storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp | 2 +- storage/ndb/src/kernel/blocks/dbacc/DbaccInit.cpp | 2 +- storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp | 2 +- storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 2 +- storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp | 2 +- storage/ndb/src/kernel/blocks/dbdict/SchemaFile.hpp | 2 +- storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp | 2 +- storage/ndb/src/kernel/blocks/dbdih/Dbdih.hpp | 2 +- storage/ndb/src/kernel/blocks/dbdih/DbdihInit.cpp | 2 +- storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 2 +- storage/ndb/src/kernel/blocks/dbdih/Sysfile.hpp | 2 +- storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp | 2 +- storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp | 2 +- storage/ndb/src/kernel/blocks/dblqh/Dblqh.hpp | 2 +- storage/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp | 2 +- storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp | 2 +- storage/ndb/src/kernel/blocks/dblqh/redoLogReader/reader.cpp | 2 +- storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.cpp | 2 +- storage/ndb/src/kernel/blocks/dblqh/redoLogReader/records.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtc/Dbtc.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtc/DbtcInit.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/AttributeOffset.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupAbort.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupBuffer.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupDebug.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupGen.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupPagMan.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/Undo_buffer.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/Dbtux.hpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxCmp.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp | 2 +- storage/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp | 2 +- storage/ndb/src/kernel/blocks/dbutil/DbUtil.cpp | 2 +- storage/ndb/src/kernel/blocks/dbutil/DbUtil.hpp | 2 +- storage/ndb/src/kernel/blocks/diskpage.hpp | 2 +- storage/ndb/src/kernel/blocks/lgman.hpp | 2 +- storage/ndb/src/kernel/blocks/mutexes.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbcntr/Ndbcntr.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrInit.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrSysTable.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/AsyncFileTest/AsyncFileTest.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/CircularIndex.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/Filename.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/Filename.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/MemoryChannel.hpp | 2 +- .../src/kernel/blocks/ndbfs/MemoryChannelTest/MemoryChannelTest.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/OpenFiles.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/Pool.hpp | 2 +- storage/ndb/src/kernel/blocks/ndbfs/VoidFs.cpp | 2 +- storage/ndb/src/kernel/blocks/pgman.cpp | 2 +- storage/ndb/src/kernel/blocks/pgman.hpp | 2 +- storage/ndb/src/kernel/blocks/print_file.cpp | 2 +- storage/ndb/src/kernel/blocks/qmgr/Qmgr.hpp | 2 +- storage/ndb/src/kernel/blocks/qmgr/QmgrInit.cpp | 2 +- storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp | 2 +- storage/ndb/src/kernel/blocks/qmgr/timer.hpp | 2 +- storage/ndb/src/kernel/blocks/record_types.hpp | 2 +- storage/ndb/src/kernel/blocks/restore.cpp | 2 +- storage/ndb/src/kernel/blocks/restore.hpp | 2 +- storage/ndb/src/kernel/blocks/suma/Suma.cpp | 2 +- storage/ndb/src/kernel/blocks/suma/Suma.hpp | 2 +- storage/ndb/src/kernel/blocks/suma/SumaInit.cpp | 2 +- storage/ndb/src/kernel/blocks/trix/Trix.cpp | 2 +- storage/ndb/src/kernel/blocks/trix/Trix.hpp | 2 +- storage/ndb/src/kernel/blocks/tsman.cpp | 2 +- storage/ndb/src/kernel/blocks/tsman.hpp | 2 +- storage/ndb/src/kernel/error/ErrorHandlingMacros.hpp | 2 +- storage/ndb/src/kernel/error/ErrorReporter.cpp | 2 +- storage/ndb/src/kernel/error/ErrorReporter.hpp | 2 +- storage/ndb/src/kernel/error/TimeModule.cpp | 2 +- storage/ndb/src/kernel/error/TimeModule.hpp | 2 +- storage/ndb/src/kernel/error/ndbd_exit_codes.c | 2 +- storage/ndb/src/kernel/main.cpp | 2 +- storage/ndb/src/kernel/vm/Array.hpp | 2 +- storage/ndb/src/kernel/vm/ArrayPool.hpp | 2 +- storage/ndb/src/kernel/vm/CArray.hpp | 2 +- storage/ndb/src/kernel/vm/Callback.hpp | 2 +- storage/ndb/src/kernel/vm/ClusterConfiguration.cpp | 2 +- storage/ndb/src/kernel/vm/ClusterConfiguration.hpp | 2 +- storage/ndb/src/kernel/vm/Configuration.cpp | 2 +- storage/ndb/src/kernel/vm/Configuration.hpp | 2 +- storage/ndb/src/kernel/vm/DLCFifoList.hpp | 2 +- storage/ndb/src/kernel/vm/DLCHashTable.hpp | 2 +- storage/ndb/src/kernel/vm/DLFifoList.hpp | 2 +- storage/ndb/src/kernel/vm/DLHashTable.hpp | 2 +- storage/ndb/src/kernel/vm/DLHashTable2.hpp | 2 +- storage/ndb/src/kernel/vm/DLList.hpp | 2 +- storage/ndb/src/kernel/vm/DataBuffer.hpp | 2 +- storage/ndb/src/kernel/vm/DynArr256.cpp | 2 +- storage/ndb/src/kernel/vm/DynArr256.hpp | 2 +- storage/ndb/src/kernel/vm/Emulator.cpp | 2 +- storage/ndb/src/kernel/vm/Emulator.hpp | 2 +- storage/ndb/src/kernel/vm/FastScheduler.cpp | 2 +- storage/ndb/src/kernel/vm/FastScheduler.hpp | 2 +- storage/ndb/src/kernel/vm/GlobalData.hpp | 2 +- storage/ndb/src/kernel/vm/KeyDescriptor.hpp | 2 +- storage/ndb/src/kernel/vm/KeyTable.hpp | 2 +- storage/ndb/src/kernel/vm/KeyTable2.hpp | 2 +- storage/ndb/src/kernel/vm/KeyTable2Ref.hpp | 2 +- storage/ndb/src/kernel/vm/LinearPool.hpp | 2 +- storage/ndb/src/kernel/vm/LongSignal.hpp | 2 +- storage/ndb/src/kernel/vm/Mutex.cpp | 2 +- storage/ndb/src/kernel/vm/Mutex.hpp | 2 +- storage/ndb/src/kernel/vm/NdbdSuperPool.cpp | 2 +- storage/ndb/src/kernel/vm/NdbdSuperPool.hpp | 2 +- storage/ndb/src/kernel/vm/Pool.cpp | 2 +- storage/ndb/src/kernel/vm/Pool.hpp | 2 +- storage/ndb/src/kernel/vm/Prio.hpp | 2 +- storage/ndb/src/kernel/vm/RWPool.cpp | 2 +- storage/ndb/src/kernel/vm/RWPool.hpp | 2 +- storage/ndb/src/kernel/vm/RequestTracker.hpp | 2 +- storage/ndb/src/kernel/vm/Rope.hpp | 2 +- storage/ndb/src/kernel/vm/SLFifoList.hpp | 2 +- storage/ndb/src/kernel/vm/SLList.hpp | 2 +- storage/ndb/src/kernel/vm/SafeCounter.cpp | 2 +- storage/ndb/src/kernel/vm/SafeCounter.hpp | 2 +- storage/ndb/src/kernel/vm/SectionReader.cpp | 2 +- storage/ndb/src/kernel/vm/SectionReader.hpp | 2 +- storage/ndb/src/kernel/vm/SignalCounter.hpp | 2 +- storage/ndb/src/kernel/vm/SimBlockList.hpp | 2 +- storage/ndb/src/kernel/vm/SimplePropertiesSection.cpp | 2 +- storage/ndb/src/kernel/vm/SimulatedBlock.cpp | 2 +- storage/ndb/src/kernel/vm/SimulatedBlock.hpp | 2 +- storage/ndb/src/kernel/vm/SuperPool.cpp | 2 +- storage/ndb/src/kernel/vm/SuperPool.hpp | 2 +- storage/ndb/src/kernel/vm/ThreadConfig.cpp | 2 +- storage/ndb/src/kernel/vm/ThreadConfig.hpp | 2 +- storage/ndb/src/kernel/vm/TimeQueue.cpp | 2 +- storage/ndb/src/kernel/vm/TimeQueue.hpp | 2 +- storage/ndb/src/kernel/vm/TransporterCallback.cpp | 2 +- storage/ndb/src/kernel/vm/VMSignal.cpp | 2 +- storage/ndb/src/kernel/vm/VMSignal.hpp | 2 +- storage/ndb/src/kernel/vm/WOPool.cpp | 2 +- storage/ndb/src/kernel/vm/WOPool.hpp | 2 +- storage/ndb/src/kernel/vm/WaitQueue.hpp | 2 +- storage/ndb/src/kernel/vm/WatchDog.cpp | 2 +- storage/ndb/src/kernel/vm/WatchDog.hpp | 2 +- storage/ndb/src/kernel/vm/al_test/arrayListTest.cpp | 2 +- storage/ndb/src/kernel/vm/al_test/arrayPoolTest.cpp | 2 +- storage/ndb/src/kernel/vm/al_test/main.cpp | 2 +- storage/ndb/src/kernel/vm/bench_pool.cpp | 2 +- storage/ndb/src/kernel/vm/ndbd_malloc.cpp | 2 +- storage/ndb/src/kernel/vm/ndbd_malloc.hpp | 2 +- storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp | 2 +- storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp | 2 +- storage/ndb/src/kernel/vm/pc.hpp | 2 +- storage/ndb/src/kernel/vm/testCopy/rr.cpp | 2 +- storage/ndb/src/kernel/vm/testCopy/testCopy.cpp | 2 +- storage/ndb/src/kernel/vm/testDataBuffer/testDataBuffer.cpp | 2 +- storage/ndb/src/kernel/vm/testLongSig/testLongSig.cpp | 2 +- storage/ndb/src/kernel/vm/testSimplePropertiesSection/test.cpp | 2 +- storage/ndb/src/kernel/vm/testSuperPool.cpp | 2 +- storage/ndb/src/mgmapi/LocalConfig.cpp | 2 +- storage/ndb/src/mgmapi/LocalConfig.hpp | 2 +- storage/ndb/src/mgmapi/mgmapi.cpp | 2 +- storage/ndb/src/mgmapi/mgmapi_configuration.hpp | 2 +- storage/ndb/src/mgmapi/mgmapi_internal.h | 2 +- storage/ndb/src/mgmapi/ndb_logevent.cpp | 2 +- storage/ndb/src/mgmapi/ndb_logevent.hpp | 2 +- storage/ndb/src/mgmapi/test/keso.c | 2 +- storage/ndb/src/mgmapi/test/mgmSrvApi.cpp | 2 +- storage/ndb/src/mgmclient/CommandInterpreter.cpp | 2 +- storage/ndb/src/mgmclient/main.cpp | 2 +- storage/ndb/src/mgmclient/ndb_mgmclient.h | 2 +- storage/ndb/src/mgmclient/ndb_mgmclient.hpp | 2 +- storage/ndb/src/mgmclient/test_cpcd/test_cpcd.cpp | 2 +- storage/ndb/src/mgmsrv/Config.cpp | 2 +- storage/ndb/src/mgmsrv/Config.hpp | 2 +- storage/ndb/src/mgmsrv/ConfigInfo.cpp | 2 +- storage/ndb/src/mgmsrv/ConfigInfo.hpp | 2 +- storage/ndb/src/mgmsrv/InitConfigFileParser.cpp | 2 +- storage/ndb/src/mgmsrv/InitConfigFileParser.hpp | 2 +- storage/ndb/src/mgmsrv/MgmtSrvr.cpp | 2 +- storage/ndb/src/mgmsrv/MgmtSrvr.hpp | 2 +- storage/ndb/src/mgmsrv/MgmtSrvrConfig.cpp | 2 +- storage/ndb/src/mgmsrv/MgmtSrvrGeneralSignalHandling.cpp | 2 +- storage/ndb/src/mgmsrv/Services.cpp | 2 +- storage/ndb/src/mgmsrv/Services.hpp | 2 +- storage/ndb/src/mgmsrv/SignalQueue.cpp | 2 +- storage/ndb/src/mgmsrv/SignalQueue.hpp | 2 +- storage/ndb/src/mgmsrv/convertStrToInt.cpp | 2 +- storage/ndb/src/mgmsrv/convertStrToInt.hpp | 2 +- storage/ndb/src/mgmsrv/main.cpp | 2 +- storage/ndb/src/mgmsrv/mkconfig/mkconfig.cpp | 2 +- storage/ndb/src/ndbapi/API.hpp | 2 +- storage/ndb/src/ndbapi/ClusterMgr.cpp | 2 +- storage/ndb/src/ndbapi/ClusterMgr.hpp | 2 +- storage/ndb/src/ndbapi/DictCache.cpp | 2 +- storage/ndb/src/ndbapi/DictCache.hpp | 2 +- storage/ndb/src/ndbapi/Ndb.cpp | 2 +- storage/ndb/src/ndbapi/NdbApiSignal.cpp | 2 +- storage/ndb/src/ndbapi/NdbApiSignal.hpp | 2 +- storage/ndb/src/ndbapi/NdbBlob.cpp | 2 +- storage/ndb/src/ndbapi/NdbBlobImpl.hpp | 2 +- storage/ndb/src/ndbapi/NdbDictionary.cpp | 2 +- storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp | 2 +- storage/ndb/src/ndbapi/NdbDictionaryImpl.hpp | 2 +- storage/ndb/src/ndbapi/NdbErrorOut.cpp | 2 +- storage/ndb/src/ndbapi/NdbEventOperation.cpp | 2 +- storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp | 2 +- storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp | 2 +- storage/ndb/src/ndbapi/NdbImpl.hpp | 2 +- storage/ndb/src/ndbapi/NdbIndexOperation.cpp | 2 +- storage/ndb/src/ndbapi/NdbIndexStat.cpp | 2 +- storage/ndb/src/ndbapi/NdbLinHash.hpp | 2 +- storage/ndb/src/ndbapi/NdbOperation.cpp | 2 +- storage/ndb/src/ndbapi/NdbOperationDefine.cpp | 2 +- storage/ndb/src/ndbapi/NdbOperationExec.cpp | 2 +- storage/ndb/src/ndbapi/NdbOperationInt.cpp | 2 +- storage/ndb/src/ndbapi/NdbOperationScan.cpp | 2 +- storage/ndb/src/ndbapi/NdbOperationSearch.cpp | 2 +- storage/ndb/src/ndbapi/NdbPool.cpp | 2 +- storage/ndb/src/ndbapi/NdbPoolImpl.cpp | 2 +- storage/ndb/src/ndbapi/NdbPoolImpl.hpp | 2 +- storage/ndb/src/ndbapi/NdbRecAttr.cpp | 2 +- storage/ndb/src/ndbapi/NdbReceiver.cpp | 2 +- storage/ndb/src/ndbapi/NdbScanFilter.cpp | 2 +- storage/ndb/src/ndbapi/NdbScanOperation.cpp | 2 +- storage/ndb/src/ndbapi/NdbTransaction.cpp | 2 +- storage/ndb/src/ndbapi/NdbTransactionScan.cpp | 2 +- storage/ndb/src/ndbapi/NdbUtil.cpp | 2 +- storage/ndb/src/ndbapi/NdbUtil.hpp | 2 +- storage/ndb/src/ndbapi/NdbWaiter.hpp | 2 +- storage/ndb/src/ndbapi/Ndberr.cpp | 2 +- storage/ndb/src/ndbapi/Ndbif.cpp | 2 +- storage/ndb/src/ndbapi/Ndbinit.cpp | 2 +- storage/ndb/src/ndbapi/Ndblist.cpp | 2 +- storage/ndb/src/ndbapi/ObjectMap.cpp | 2 +- storage/ndb/src/ndbapi/ObjectMap.hpp | 2 +- storage/ndb/src/ndbapi/SignalSender.cpp | 2 +- storage/ndb/src/ndbapi/SignalSender.hpp | 2 +- storage/ndb/src/ndbapi/TransporterFacade.cpp | 2 +- storage/ndb/src/ndbapi/TransporterFacade.hpp | 2 +- storage/ndb/src/ndbapi/ndb_cluster_connection.cpp | 2 +- storage/ndb/src/ndbapi/ndb_cluster_connection_impl.hpp | 2 +- storage/ndb/src/ndbapi/ndberror.c | 2 +- storage/ndb/src/ndbapi/signal-sender/SignalSender.cpp | 2 +- storage/ndb/src/ndbapi/signal-sender/SignalSender.hpp | 2 +- storage/ndb/test/include/AtrtClient.hpp | 2 +- storage/ndb/test/include/CpcClient.hpp | 2 +- storage/ndb/test/include/DbUtil.hpp | 2 +- storage/ndb/test/include/HugoAsynchTransactions.hpp | 2 +- storage/ndb/test/include/HugoCalculator.hpp | 2 +- storage/ndb/test/include/HugoOperations.hpp | 2 +- storage/ndb/test/include/HugoTransactions.hpp | 2 +- storage/ndb/test/include/NDBT.hpp | 2 +- storage/ndb/test/include/NDBT_DataSet.hpp | 2 +- storage/ndb/test/include/NDBT_DataSetTransaction.hpp | 2 +- storage/ndb/test/include/NDBT_Error.hpp | 2 +- storage/ndb/test/include/NDBT_Output.hpp | 2 +- storage/ndb/test/include/NDBT_ResultRow.hpp | 2 +- storage/ndb/test/include/NDBT_ReturnCodes.h | 2 +- storage/ndb/test/include/NDBT_Stats.hpp | 2 +- storage/ndb/test/include/NDBT_Table.hpp | 2 +- storage/ndb/test/include/NDBT_Tables.hpp | 2 +- storage/ndb/test/include/NDBT_Test.hpp | 2 +- storage/ndb/test/include/NDBT_Thread.hpp | 2 +- storage/ndb/test/include/NdbBackup.hpp | 2 +- storage/ndb/test/include/NdbConfig.hpp | 2 +- storage/ndb/test/include/NdbGrep.hpp | 2 +- storage/ndb/test/include/NdbMixRestarter.hpp | 2 +- storage/ndb/test/include/NdbRestarter.hpp | 2 +- storage/ndb/test/include/NdbRestarts.hpp | 2 +- storage/ndb/test/include/NdbSchemaCon.hpp | 2 +- storage/ndb/test/include/NdbSchemaOp.hpp | 2 +- storage/ndb/test/include/NdbTest.hpp | 2 +- storage/ndb/test/include/NdbTimer.hpp | 2 +- storage/ndb/test/include/TestNdbEventOperation.hpp | 2 +- storage/ndb/test/include/UtilTransactions.hpp | 2 +- storage/ndb/test/include/getarg.h | 2 +- storage/ndb/test/ndbapi/InsertRecs.cpp | 2 +- storage/ndb/test/ndbapi/ScanFilter.hpp | 2 +- storage/ndb/test/ndbapi/ScanFunctions.hpp | 2 +- storage/ndb/test/ndbapi/ScanInterpretTest.hpp | 2 +- storage/ndb/test/ndbapi/TraceNdbApi.cpp | 2 +- storage/ndb/test/ndbapi/VerifyNdbApi.cpp | 2 +- storage/ndb/test/ndbapi/acid.cpp | 2 +- storage/ndb/test/ndbapi/acid2.cpp | 2 +- storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp | 2 +- storage/ndb/test/ndbapi/adoInsertRecs.cpp | 2 +- storage/ndb/test/ndbapi/asyncGenerator.cpp | 2 +- storage/ndb/test/ndbapi/bank/Bank.cpp | 2 +- storage/ndb/test/ndbapi/bank/Bank.hpp | 2 +- storage/ndb/test/ndbapi/bank/BankLoad.cpp | 2 +- storage/ndb/test/ndbapi/bank/bankCreator.cpp | 2 +- storage/ndb/test/ndbapi/bank/bankMakeGL.cpp | 2 +- storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp | 2 +- storage/ndb/test/ndbapi/bank/bankTimer.cpp | 2 +- storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp | 2 +- storage/ndb/test/ndbapi/bank/bankValidateAllGLs.cpp | 2 +- storage/ndb/test/ndbapi/bank/testBank.cpp | 2 +- storage/ndb/test/ndbapi/bench/asyncGenerator.cpp | 2 +- storage/ndb/test/ndbapi/bench/dbGenerator.h | 2 +- storage/ndb/test/ndbapi/bench/dbPopulate.cpp | 2 +- storage/ndb/test/ndbapi/bench/dbPopulate.h | 2 +- storage/ndb/test/ndbapi/bench/macros.h | 2 +- storage/ndb/test/ndbapi/bench/mainAsyncGenerator.cpp | 2 +- storage/ndb/test/ndbapi/bench/mainPopulate.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_async1.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_async2.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_error.hpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_schema.hpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_user_transaction.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_user_transaction2.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_user_transaction3.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_user_transaction4.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_user_transaction5.cpp | 2 +- storage/ndb/test/ndbapi/bench/ndb_user_transaction6.cpp | 2 +- storage/ndb/test/ndbapi/bench/testData.h | 2 +- storage/ndb/test/ndbapi/bench/testDefinitions.h | 2 +- storage/ndb/test/ndbapi/bench/userInterface.cpp | 2 +- storage/ndb/test/ndbapi/bench/userInterface.h | 2 +- storage/ndb/test/ndbapi/benchronja.cpp | 2 +- storage/ndb/test/ndbapi/bulk_copy.cpp | 2 +- storage/ndb/test/ndbapi/cdrserver.cpp | 2 +- storage/ndb/test/ndbapi/celloDb.cpp | 2 +- storage/ndb/test/ndbapi/create_all_tabs.cpp | 2 +- storage/ndb/test/ndbapi/create_tab.cpp | 2 +- storage/ndb/test/ndbapi/drop_all_tabs.cpp | 2 +- storage/ndb/test/ndbapi/flexAsynch.cpp | 2 +- storage/ndb/test/ndbapi/flexBench.cpp | 2 +- storage/ndb/test/ndbapi/flexHammer.cpp | 2 +- storage/ndb/test/ndbapi/flexScan.cpp | 2 +- storage/ndb/test/ndbapi/flexTT.cpp | 2 +- storage/ndb/test/ndbapi/flexTimedAsynch.cpp | 2 +- storage/ndb/test/ndbapi/flex_bench_mysql.cpp | 2 +- storage/ndb/test/ndbapi/index.cpp | 2 +- storage/ndb/test/ndbapi/index2.cpp | 2 +- storage/ndb/test/ndbapi/initronja.cpp | 2 +- storage/ndb/test/ndbapi/interpreterInTup.cpp | 2 +- storage/ndb/test/ndbapi/mainAsyncGenerator.cpp | 2 +- storage/ndb/test/ndbapi/msa.cpp | 2 +- storage/ndb/test/ndbapi/ndb_async1.cpp | 2 +- storage/ndb/test/ndbapi/ndb_async2.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_populate.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_transaction.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_transaction2.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_transaction3.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_transaction4.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_transaction5.cpp | 2 +- storage/ndb/test/ndbapi/ndb_user_transaction6.cpp | 2 +- storage/ndb/test/ndbapi/restarter.cpp | 2 +- storage/ndb/test/ndbapi/restarter2.cpp | 2 +- storage/ndb/test/ndbapi/restarts.cpp | 2 +- storage/ndb/test/ndbapi/size.cpp | 2 +- storage/ndb/test/ndbapi/testBackup.cpp | 2 +- storage/ndb/test/ndbapi/testBasic.cpp | 2 +- storage/ndb/test/ndbapi/testBasicAsynch.cpp | 2 +- storage/ndb/test/ndbapi/testBlobs.cpp | 2 +- storage/ndb/test/ndbapi/testDataBuffers.cpp | 2 +- storage/ndb/test/ndbapi/testDeadlock.cpp | 2 +- storage/ndb/test/ndbapi/testDict.cpp | 2 +- storage/ndb/test/ndbapi/testGrepVerify.cpp | 2 +- storage/ndb/test/ndbapi/testIndex.cpp | 2 +- storage/ndb/test/ndbapi/testIndexStat.cpp | 2 +- storage/ndb/test/ndbapi/testInterpreter.cpp | 2 +- storage/ndb/test/ndbapi/testMgm.cpp | 2 +- storage/ndb/test/ndbapi/testNDBT.cpp | 2 +- storage/ndb/test/ndbapi/testNdbApi.cpp | 2 +- storage/ndb/test/ndbapi/testNodeRestart.cpp | 2 +- storage/ndb/test/ndbapi/testOIBasic.cpp | 2 +- storage/ndb/test/ndbapi/testOperations.cpp | 2 +- storage/ndb/test/ndbapi/testOrderedIndex.cpp | 2 +- storage/ndb/test/ndbapi/testPartitioning.cpp | 2 +- storage/ndb/test/ndbapi/testReadPerf.cpp | 2 +- storage/ndb/test/ndbapi/testRestartGci.cpp | 2 +- storage/ndb/test/ndbapi/testSRBank.cpp | 2 +- storage/ndb/test/ndbapi/testScan.cpp | 2 +- storage/ndb/test/ndbapi/testScanInterpreter.cpp | 2 +- storage/ndb/test/ndbapi/testScanPerf.cpp | 2 +- storage/ndb/test/ndbapi/testSystemRestart.cpp | 2 +- storage/ndb/test/ndbapi/testTimeout.cpp | 2 +- storage/ndb/test/ndbapi/testTransactions.cpp | 2 +- storage/ndb/test/ndbapi/test_event.cpp | 2 +- storage/ndb/test/ndbapi/test_event_merge.cpp | 2 +- storage/ndb/test/ndbapi/test_event_multi_table.cpp | 2 +- storage/ndb/test/ndbapi/userInterface.cpp | 2 +- storage/ndb/test/ndbnet/test.run | 2 +- storage/ndb/test/ndbnet/testError.run | 2 +- storage/ndb/test/ndbnet/testMNF.run | 2 +- storage/ndb/test/ndbnet/testNR.run | 2 +- storage/ndb/test/ndbnet/testNR1.run | 2 +- storage/ndb/test/ndbnet/testNR4.run | 2 +- storage/ndb/test/ndbnet/testSRhang.run | 2 +- storage/ndb/test/ndbnet/testTR295.run | 2 +- storage/ndb/test/newtonapi/basic_test/basic/basic.cpp | 2 +- storage/ndb/test/newtonapi/basic_test/bulk_read/br_test.cpp | 2 +- storage/ndb/test/newtonapi/basic_test/common.cpp | 2 +- storage/ndb/test/newtonapi/basic_test/common.hpp | 2 +- .../ndb/test/newtonapi/basic_test/ptr_binding/ptr_binding_test.cpp | 2 +- storage/ndb/test/newtonapi/basic_test/too_basic.cpp | 2 +- storage/ndb/test/newtonapi/perf_test/perf.cpp | 2 +- storage/ndb/test/odbc/SQL99_test/SQL99_test.cpp | 2 +- storage/ndb/test/odbc/SQL99_test/SQL99_test.h | 2 +- storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE.cpp | 2 +- storage/ndb/test/odbc/client/NDBT_ALLOCHANDLE_HDBC.cpp | 2 +- storage/ndb/test/odbc/client/NDBT_SQLConnect.cpp | 2 +- storage/ndb/test/odbc/client/NDBT_SQLPrepare.cpp | 2 +- storage/ndb/test/odbc/client/SQLAllocEnvTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLAllocHandleTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLAllocHandleTest_bf.cpp | 2 +- storage/ndb/test/odbc/client/SQLBindColTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLBindParameterTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLCancelTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLCloseCursorTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLColAttributeTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLColAttributeTest1.cpp | 2 +- storage/ndb/test/odbc/client/SQLColAttributeTest2.cpp | 2 +- storage/ndb/test/odbc/client/SQLColAttributeTest3.cpp | 2 +- storage/ndb/test/odbc/client/SQLConnectTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLCopyDescTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLDescribeColTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLDisconnectTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLDriverConnectTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLEndTranTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLErrorTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLExecDirectTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLExecuteTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLFetchScrollTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLFetchTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLFreeHandleTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLFreeStmtTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetConnectAttrTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetCursorNameTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetDataTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetDescFieldTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetDescRecTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetDiagFieldTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetDiagRecSimpleTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetDiagRecTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetEnvAttrTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetFunctionsTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetInfoTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetStmtAttrTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLGetTypeInfoTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLMoreResultsTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLNumResultColsTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLParamDataTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLPrepareTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLPutDataTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLRowCountTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLSetConnectAttrTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLSetCursorNameTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLSetDescFieldTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLSetDescRecTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLSetEnvAttrTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLSetStmtAttrTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLTablesTest.cpp | 2 +- storage/ndb/test/odbc/client/SQLTransactTest.cpp | 2 +- storage/ndb/test/odbc/client/common.hpp | 2 +- storage/ndb/test/odbc/client/main.cpp | 2 +- storage/ndb/test/odbc/driver/testOdbcDriver.cpp | 2 +- storage/ndb/test/odbc/test_compiler/test_compiler.cpp | 2 +- storage/ndb/test/run-test/atrt-analyze-result.sh | 2 +- storage/ndb/test/run-test/atrt-clear-result.sh | 2 +- storage/ndb/test/run-test/atrt-gather-result.sh | 2 +- storage/ndb/test/run-test/atrt-setup.sh | 2 +- storage/ndb/test/run-test/atrt-testBackup | 2 +- storage/ndb/test/run-test/atrt.hpp | 2 +- storage/ndb/test/run-test/main.cpp | 2 +- storage/ndb/test/run-test/make-index.sh | 2 +- storage/ndb/test/src/CpcClient.cpp | 2 +- storage/ndb/test/src/DbUtil.cpp | 2 +- storage/ndb/test/src/HugoAsynchTransactions.cpp | 2 +- storage/ndb/test/src/HugoCalculator.cpp | 2 +- storage/ndb/test/src/HugoOperations.cpp | 2 +- storage/ndb/test/src/HugoTransactions.cpp | 2 +- storage/ndb/test/src/NDBT_Error.cpp | 2 +- storage/ndb/test/src/NDBT_Output.cpp | 2 +- storage/ndb/test/src/NDBT_ResultRow.cpp | 2 +- storage/ndb/test/src/NDBT_ReturnCodes.cpp | 2 +- storage/ndb/test/src/NDBT_Table.cpp | 2 +- storage/ndb/test/src/NDBT_Tables.cpp | 2 +- storage/ndb/test/src/NDBT_Test.cpp | 2 +- storage/ndb/test/src/NDBT_Thread.cpp | 2 +- storage/ndb/test/src/NdbBackup.cpp | 2 +- storage/ndb/test/src/NdbConfig.cpp | 2 +- storage/ndb/test/src/NdbGrep.cpp | 2 +- storage/ndb/test/src/NdbMixRestarter.cpp | 2 +- storage/ndb/test/src/NdbRestarter.cpp | 2 +- storage/ndb/test/src/NdbRestarts.cpp | 2 +- storage/ndb/test/src/NdbSchemaCon.cpp | 2 +- storage/ndb/test/src/NdbSchemaOp.cpp | 2 +- storage/ndb/test/src/UtilTransactions.cpp | 2 +- storage/ndb/test/tools/connect.cpp | 2 +- storage/ndb/test/tools/copy_tab.cpp | 2 +- storage/ndb/test/tools/cpcc.cpp | 2 +- storage/ndb/test/tools/create_index.cpp | 2 +- storage/ndb/test/tools/hugoCalculator.cpp | 2 +- storage/ndb/test/tools/hugoFill.cpp | 2 +- storage/ndb/test/tools/hugoLoad.cpp | 2 +- storage/ndb/test/tools/hugoLockRecords.cpp | 2 +- storage/ndb/test/tools/hugoPkDelete.cpp | 2 +- storage/ndb/test/tools/hugoPkRead.cpp | 2 +- storage/ndb/test/tools/hugoPkReadRecord.cpp | 2 +- storage/ndb/test/tools/hugoPkUpdate.cpp | 2 +- storage/ndb/test/tools/hugoScanRead.cpp | 2 +- storage/ndb/test/tools/hugoScanUpdate.cpp | 2 +- storage/ndb/test/tools/listen.cpp | 2 +- storage/ndb/test/tools/rep_latency.cpp | 2 +- storage/ndb/test/tools/restart.cpp | 2 +- storage/ndb/test/tools/transproxy.cpp | 2 +- storage/ndb/test/tools/verify_index.cpp | 2 +- storage/ndb/tools/clean-links.sh | 2 +- storage/ndb/tools/delete_all.cpp | 2 +- storage/ndb/tools/desc.cpp | 2 +- storage/ndb/tools/drop_index.cpp | 2 +- storage/ndb/tools/drop_tab.cpp | 2 +- storage/ndb/tools/listTables.cpp | 2 +- storage/ndb/tools/make-errors.pl | 2 +- storage/ndb/tools/make-links.sh | 2 +- storage/ndb/tools/ndb_config.cpp | 2 +- storage/ndb/tools/ndb_error_reporter | 2 +- storage/ndb/tools/ndb_test_platform.cpp | 2 +- storage/ndb/tools/ndbsql.cpp | 2 +- storage/ndb/tools/restore/Restore.cpp | 2 +- storage/ndb/tools/restore/Restore.hpp | 2 +- storage/ndb/tools/restore/consumer.cpp | 2 +- storage/ndb/tools/restore/consumer.hpp | 2 +- storage/ndb/tools/restore/consumer_printer.cpp | 2 +- storage/ndb/tools/restore/consumer_printer.hpp | 2 +- storage/ndb/tools/restore/consumer_restore.cpp | 2 +- storage/ndb/tools/restore/consumer_restore.hpp | 2 +- storage/ndb/tools/restore/consumer_restorem.cpp | 2 +- storage/ndb/tools/restore/ndb_nodegroup_map.h | 2 +- storage/ndb/tools/restore/restore_main.cpp | 2 +- storage/ndb/tools/rgrep | 2 +- storage/ndb/tools/select_all.cpp | 2 +- storage/ndb/tools/select_count.cpp | 2 +- storage/ndb/tools/waiter.cpp | 2 +- storage/perfschema/pfs_events_waits.cc | 2 +- strings/CMakeLists.txt | 2 +- strings/ctype-mb.c | 2 +- strings/ctype-simple.c | 2 +- strings/ctype-uca.c | 2 +- strings/ctype-ucs2.c | 2 +- strings/ctype-win1250ch.c | 2 +- strings/ctype.c | 3 +-- strings/my_strtoll10.c | 2 +- strings/t_ctype.h | 3 ++- support-files/MySQL-shared-compat.spec.sh | 2 +- tests/connect_test.c | 3 ++- tests/fork_big.pl | 5 +++-- tests/fork_big2.pl | 5 +++-- tests/insert_test.c | 3 ++- tests/list_test.c | 3 ++- tests/select_test.c | 3 ++- tests/showdb_test.c | 3 ++- tests/ssl_test.c | 3 ++- vio/CMakeLists.txt | 2 +- vio/viossl.c | 2 +- vio/viosslfactories.c | 2 +- zlib/CMakeLists.txt | 2 +- 1244 files changed, 1319 insertions(+), 1254 deletions(-) diff --git a/README b/README index da9f3c56168..99a9efea4d3 100644 --- a/README +++ b/README @@ -5,7 +5,7 @@ For the avoidance of doubt, this particular copy of the software is released under the version 2 of the GNU General Public License. MySQL is brought to you by Oracle. -Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. License information can be found in the COPYING file. diff --git a/client/mysql_plugin.c b/client/mysql_plugin.c index 7fbfeb9e9a6..cf212b16f24 100644 --- a/client/mysql_plugin.c +++ b/client/mysql_plugin.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index e84cbdefbbc..ca06a85bec0 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake index 83597357aba..c70d0e29ecf 100644 --- a/cmake/zlib.cmake +++ b/cmake/zlib.cmake @@ -1,5 +1,4 @@ -# Copyright (c) 2009 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index 94a336c53dc..a5d5898e192 100644 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/include/yassl_error.hpp b/extra/yassl/include/yassl_error.hpp index a4b29ae2e8c..beba7b0b5dd 100644 --- a/extra/yassl/include/yassl_error.hpp +++ b/extra/yassl/include/yassl_error.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/include/yassl_types.hpp b/extra/yassl/include/yassl_types.hpp index 6a8c3f6c075..129661c58ed 100644 --- a/extra/yassl/include/yassl_types.hpp +++ b/extra/yassl/include/yassl_types.hpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index d0f6827e862..d99adf88ce9 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/src/yassl_error.cpp b/extra/yassl/src/yassl_error.cpp index 62fec6b3b23..e5d69367339 100644 --- a/extra/yassl/src/yassl_error.cpp +++ b/extra/yassl/src/yassl_error.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index 692190d3a75..e7dab13cc64 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/extra/yassl/taocrypt/CMakeLists.txt b/extra/yassl/taocrypt/CMakeLists.txt index 9f1f2a102da..749193f1935 100644 --- a/extra/yassl/taocrypt/CMakeLists.txt +++ b/extra/yassl/taocrypt/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/include/my_getopt.h b/include/my_getopt.h index 2b84267a237..1c4264e2aa2 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/my_net.h b/include/my_net.h index 5469942bb08..d2b8c9a4414 100644 --- a/include/my_net.h +++ b/include/my_net.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/myisam.h b/include/myisam.h index bf94fd7d8cd..85d37a81bc6 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 0dced1b5a53..5cbfa61f4cc 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/include/mysql/plugin_audit.h b/include/mysql/plugin_audit.h index 0d3f9b8d180..40a4b5dead2 100644 --- a/include/mysql/plugin_audit.h +++ b/include/mysql/plugin_audit.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 83386d8073a..962ab529de1 100644 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libmysql/authentication_win/CMakeLists.txt b/libmysql/authentication_win/CMakeLists.txt index cd790975b34..8cf8862e46f 100644 --- a/libmysql/authentication_win/CMakeLists.txt +++ b/libmysql/authentication_win/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libmysql/conf_to_src.c b/libmysql/conf_to_src.c index 04a6a727029..a5a7d23db0b 100644 --- a/libmysql/conf_to_src.c +++ b/libmysql/conf_to_src.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2004 MySQL AB +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index a6bb617132f..d6bdea3df1f 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysql-test/CMakeLists.txt b/mysql-test/CMakeLists.txt index 9c6db7082dc..d12e594a1ff 100644 --- a/mysql-test/CMakeLists.txt +++ b/mysql-test/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mysql-test/include/mtr_check.sql b/mysql-test/include/mtr_check.sql index dea503a2951..ba7a7b63cb6 100644 --- a/mysql-test/include/mtr_check.sql +++ b/mysql-test/include/mtr_check.sql @@ -1,4 +1,4 @@ --- Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +-- Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by diff --git a/mysql-test/lib/My/SafeProcess/safe_process.cc b/mysql-test/lib/My/SafeProcess/safe_process.cc index fd903d52216..b911376f153 100644 --- a/mysql-test/lib/My/SafeProcess/safe_process.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysql-test/lib/My/SysInfo.pm b/mysql-test/lib/My/SysInfo.pm index 36c50ab91d1..4cca116620e 100644 --- a/mysql-test/lib/My/SysInfo.pm +++ b/mysql-test/lib/My/SysInfo.pm @@ -1,6 +1,5 @@ # -*- cperl -*- -# Copyright (c) 2013 MySQL AB, 2008 Sun Microsystems, Inc. -# Use is subject to license terms. +# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mysys/md5.c b/mysys/md5.c index 655befa546a..aefc23c1b7a 100644 --- a/mysys/md5.c +++ b/mysys/md5.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index 5829ab819f7..620fe1f5795 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mf_qsort.c b/mysys/mf_qsort.c index 39ab5490ec8..45a948feab8 100644 --- a/mysys/mf_qsort.c +++ b/mysys/mf_qsort.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000-2002, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mf_radix.c b/mysys/mf_radix.c index ecaeee69d75..b0ed419e6c1 100644 --- a/mysys/mf_radix.c +++ b/mysys/mf_radix.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mf_same.c b/mysys/mf_same.c index b4af4cbf1b6..244dc650d8b 100644 --- a/mysys/mf_same.c +++ b/mysys/mf_same.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mf_soundex.c b/mysys/mf_soundex.c index 85bb280bd55..3452d52018d 100644 --- a/mysys/mf_soundex.c +++ b/mysys/mf_soundex.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002, 2004, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mf_wcomp.c b/mysys/mf_wcomp.c index 74e6fccb5a1..fe64d06f2db 100644 --- a/mysys/mf_wcomp.c +++ b/mysys/mf_wcomp.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2003, 2004 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/mulalloc.c b/mysys/mulalloc.c index 2caac6997ee..9384ed744ad 100644 --- a/mysys/mulalloc.c +++ b/mysys/mulalloc.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002, 2003, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_access.c b/mysys/my_access.c index bad18d6d483..c5d4006a26c 100644 --- a/mysys/my_access.c +++ b/mysys/my_access.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_aes.c b/mysys/my_aes.c index 5c52a0b1ab5..7074f700413 100644 --- a/mysys/my_aes.c +++ b/mysys/my_aes.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2002 MySQL AB +/* Copyright (c) 2002, 2006 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_conio.c b/mysys/my_conio.c index dc87b83f6b4..2480c37d039 100644 --- a/mysys/my_conio.c +++ b/mysys/my_conio.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2005, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_crc32.c b/mysys/my_crc32.c index 27800098f12..0981c75755d 100644 --- a/mysys/my_crc32.c +++ b/mysys/my_crc32.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2004 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_div.c b/mysys/my_div.c index 29f04a7a01b..660b87e5ab4 100644 --- a/mysys/my_div.c +++ b/mysys/my_div.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002, 2004, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_error.c b/mysys/my_error.c index 84198eb7d25..5c1e1b5e92a 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_fopen.c b/mysys/my_fopen.c index 3c707474b56..12db47f9539 100644 --- a/mysys/my_fopen.c +++ b/mysys/my_fopen.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_getpagesize.c b/mysys/my_getpagesize.c index 2c2804dfab8..e1c1fcb168d 100644 --- a/mysys/my_getpagesize.c +++ b/mysys/my_getpagesize.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (c) 2000-2003, 2006 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_libwrap.c b/mysys/my_libwrap.c index dea4bca114e..1cbfa83030b 100644 --- a/mysys/my_libwrap.c +++ b/mysys/my_libwrap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 2006 MySQL AB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_lockmem.c b/mysys/my_lockmem.c index 2e036936c70..3e27564f100 100644 --- a/mysys/my_lockmem.c +++ b/mysys/my_lockmem.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 93eb547888f..43dcb4d663e 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_memmem.c b/mysys/my_memmem.c index 5184037ed39..5806c502b2b 100644 --- a/mysys/my_memmem.c +++ b/mysys/my_memmem.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2006, 2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_mkdir.c b/mysys/my_mkdir.c index 0e77180cd75..5e9691f5b91 100644 --- a/mysys/my_mkdir.c +++ b/mysys/my_mkdir.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2006 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_once.c b/mysys/my_once.c index b9232db9b2e..dfd5de81ac7 100644 --- a/mysys/my_once.c +++ b/mysys/my_once.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c index 1df619857bc..dd94b32b53e 100644 --- a/mysys/my_symlink2.c +++ b/mysys/my_symlink2.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2001, 2003, 2005-2007 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/my_winthread.c b/mysys/my_winthread.c index ae7c0926034..fcb6e57ee53 100644 --- a/mysys/my_winthread.c +++ b/mysys/my_winthread.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/test_dir.c b/mysys/test_dir.c index 0ac559568b1..364562a6972 100644 --- a/mysys/test_dir.c +++ b/mysys/test_dir.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2006 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/test_xml.c b/mysys/test_xml.c index e5ff42ab2f5..56b50611498 100644 --- a/mysys/test_xml.c +++ b/mysys/test_xml.c @@ -1,4 +1,5 @@ -/* Copyright (C) 2000 MySQL AB +/* Copyright (c) 2000, 2002 MySQL AB + Use is subject to license terms This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index e51e97edf86..5fb4e544411 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/packaging/WiX/CPackWixConfig.cmake b/packaging/WiX/CPackWixConfig.cmake index e8edd8a835f..c782b7cd17a 100644 --- a/packaging/WiX/CPackWixConfig.cmake +++ b/packaging/WiX/CPackWixConfig.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/packaging/WiX/custom_ui.wxs b/packaging/WiX/custom_ui.wxs index 6e243832e12..f8f8af5aeb9 100644 --- a/packaging/WiX/custom_ui.wxs +++ b/packaging/WiX/custom_ui.wxs @@ -2,7 +2,7 @@ xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">