From 159d5b71b13ffddca796bac1e1f3c86a16a70b15 Mon Sep 17 00:00:00 2001 From: "tsmith@ramayana.hindu.god" <> Date: Fri, 24 Aug 2007 19:14:52 -0600 Subject: [PATCH 1/5] Apply InnoDB snapshot innodb-5.1-ss1726. Bug #16979: AUTO_INC lock in InnoDB works a table level lock - this is a major change in InnoDB auto-inc handling. Bug #27950: Duplicate entry error in auto-inc after mysqld restart - Init AUTOINC from delete_row(). Bug #28781: InnoDB increments auto-increment value incorrectly with ON DUPLICATE KEY UPDATE - Use value specified by MySQL, in update_row(). --- mysql-test/r/innodb.result | 2 +- storage/innobase/dict/dict0dict.c | 163 +++--- storage/innobase/dict/dict0mem.c | 76 +-- storage/innobase/handler/ha_innodb.cc | 720 ++++++++++++++++---------- storage/innobase/handler/ha_innodb.h | 8 + storage/innobase/ibuf/ibuf0ibuf.c | 20 +- storage/innobase/include/dict0dict.h | 50 +- storage/innobase/include/dict0mem.h | 8 +- storage/innobase/include/lock0lock.h | 2 +- storage/innobase/include/row0mysql.h | 1 + storage/innobase/include/row0sel.h | 10 + storage/innobase/include/trx0trx.h | 3 + storage/innobase/include/ut0mem.h | 2 +- storage/innobase/log/log0recv.c | 7 +- storage/innobase/row/row0mysql.c | 4 + storage/innobase/row/row0sel.c | 166 ++++++ storage/innobase/trx/trx0trx.c | 2 + 17 files changed, 788 insertions(+), 456 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 804c4b81c17..a883b434c0b 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -501,7 +501,7 @@ ERROR 23000: Duplicate entry 'test2' for key 'ggid' select * from t1; id ggid email passwd 1 this will work -3 test2 this will work +4 test2 this will work select * from t1 where id=1; id ggid email passwd 1 this will work diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index e2a9535dc8b..595dfb06ee5 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -410,14 +410,27 @@ dict_table_get_col_name( ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); s = table->col_names; - - for (i = 0; i < col_nr; i++) { - s += strlen(s) + 1; + if (s) { + for (i = 0; i < col_nr; i++) { + s += strlen(s) + 1; + } } return(s); } + +/************************************************************************ +Acquire the autoinc lock.*/ + +void +dict_table_autoinc_lock( +/*====================*/ + dict_table_t* table) +{ + mutex_enter(&table->autoinc_mutex); +} + /************************************************************************ Initializes the autoinc counter. It is not an error to initialize an already initialized counter. */ @@ -428,54 +441,8 @@ dict_table_autoinc_initialize( dict_table_t* table, /* in: table */ ib_longlong value) /* in: next value to assign to a row */ { - mutex_enter(&(table->autoinc_mutex)); - table->autoinc_inited = TRUE; table->autoinc = value; - - mutex_exit(&(table->autoinc_mutex)); -} - -/************************************************************************ -Gets the next autoinc value (== autoinc counter value), 0 if not yet -initialized. If initialized, increments the counter by 1. */ - -ib_longlong -dict_table_autoinc_get( -/*===================*/ - /* out: value for a new row, or 0 */ - dict_table_t* table) /* in: table */ -{ - ib_longlong value; - - mutex_enter(&(table->autoinc_mutex)); - - if (!table->autoinc_inited) { - - value = 0; - } else { - value = table->autoinc; - table->autoinc = table->autoinc + 1; - } - - mutex_exit(&(table->autoinc_mutex)); - - return(value); -} - -/************************************************************************ -Decrements the autoinc counter value by 1. */ - -void -dict_table_autoinc_decrement( -/*=========================*/ - dict_table_t* table) /* in: table */ -{ - mutex_enter(&(table->autoinc_mutex)); - - table->autoinc = table->autoinc - 1; - - mutex_exit(&(table->autoinc_mutex)); } /************************************************************************ @@ -490,32 +457,6 @@ dict_table_autoinc_read( { ib_longlong value; - mutex_enter(&(table->autoinc_mutex)); - - if (!table->autoinc_inited) { - - value = 0; - } else { - value = table->autoinc; - } - - mutex_exit(&(table->autoinc_mutex)); - - return(value); -} - -/************************************************************************ -Peeks the autoinc counter value, 0 if not yet initialized. Does not -increment the counter. The read not protected by any mutex! */ - -ib_longlong -dict_table_autoinc_peek( -/*====================*/ - /* out: value of the counter */ - dict_table_t* table) /* in: table */ -{ - ib_longlong value; - if (!table->autoinc_inited) { value = 0; @@ -527,7 +468,7 @@ dict_table_autoinc_peek( } /************************************************************************ -Updates the autoinc counter if the value supplied is equal or bigger than the +Updates the autoinc counter if the value supplied is greater than the current value. If not inited, does nothing. */ void @@ -537,15 +478,21 @@ dict_table_autoinc_update( dict_table_t* table, /* in: table */ ib_longlong value) /* in: value which was assigned to a row */ { - mutex_enter(&(table->autoinc_mutex)); + if (table->autoinc_inited && value > table->autoinc) { - if (table->autoinc_inited) { - if (value >= table->autoinc) { - table->autoinc = value + 1; - } + table->autoinc = value; } +} - mutex_exit(&(table->autoinc_mutex)); +/************************************************************************ +Release the autoinc lock.*/ + +void +dict_table_autoinc_unlock( +/*======================*/ + dict_table_t* table) /* in: release autoinc lock for this table */ +{ + mutex_exit(&table->autoinc_mutex); } /************************************************************************ @@ -842,28 +789,18 @@ dict_table_get( } /************************************************************************** -Adds a table object to the dictionary cache. */ +Adds system columns to a table object. */ void -dict_table_add_to_cache( -/*====================*/ - dict_table_t* table) /* in: table */ +dict_table_add_system_columns( +/*==========================*/ + dict_table_t* table, /* in/out: table */ + mem_heap_t* heap) /* in: temporary heap */ { - ulint fold; - ulint id_fold; - ulint i; - ulint row_len; - ut_ad(table); - ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(table->n_def == table->n_cols - DATA_N_SYS_COLS); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); - ut_ad(table->cached == FALSE); - - fold = ut_fold_string(table->name); - id_fold = ut_fold_dulint(table->id); - - table->cached = TRUE; + ut_ad(!table->cached); /* NOTE: the system columns MUST be added in the following order (so that they can be indexed by the numerical value of DATA_ROW_ID, @@ -871,19 +808,19 @@ dict_table_add_to_cache( The clustered index will not always physically contain all system columns. */ - dict_mem_table_add_col(table, "DB_ROW_ID", DATA_SYS, + dict_mem_table_add_col(table, heap, "DB_ROW_ID", DATA_SYS, DATA_ROW_ID | DATA_NOT_NULL, DATA_ROW_ID_LEN); #if DATA_ROW_ID != 0 #error "DATA_ROW_ID != 0" #endif - dict_mem_table_add_col(table, "DB_TRX_ID", DATA_SYS, + dict_mem_table_add_col(table, heap, "DB_TRX_ID", DATA_SYS, DATA_TRX_ID | DATA_NOT_NULL, DATA_TRX_ID_LEN); #if DATA_TRX_ID != 1 #error "DATA_TRX_ID != 1" #endif - dict_mem_table_add_col(table, "DB_ROLL_PTR", DATA_SYS, + dict_mem_table_add_col(table, heap, "DB_ROLL_PTR", DATA_SYS, DATA_ROLL_PTR | DATA_NOT_NULL, DATA_ROLL_PTR_LEN); #if DATA_ROLL_PTR != 2 @@ -895,10 +832,34 @@ dict_table_add_to_cache( #if DATA_N_SYS_COLS != 3 #error "DATA_N_SYS_COLS != 3" #endif +} + +/************************************************************************** +Adds a table object to the dictionary cache. */ + +void +dict_table_add_to_cache( +/*====================*/ + dict_table_t* table, /* in: table */ + mem_heap_t* heap) /* in: temporary heap */ +{ + ulint fold; + ulint id_fold; + ulint i; + ulint row_len; /* The lower limit for what we consider a "big" row */ #define BIG_ROW_SIZE 1024 + ut_ad(mutex_own(&(dict_sys->mutex))); + + dict_table_add_system_columns(table, heap); + + table->cached = TRUE; + + fold = ut_fold_string(table->name); + id_fold = ut_fold_dulint(table->id); + row_len = 0; for (i = 0; i < table->n_def; i++) { ulint col_len = dict_col_get_max_size( diff --git a/storage/innobase/dict/dict0mem.c b/storage/innobase/dict/dict0mem.c index 9aa49dee745..e0b8bf15dd7 100644 --- a/storage/innobase/dict/dict0mem.c +++ b/storage/innobase/dict/dict0mem.c @@ -90,6 +90,11 @@ dict_mem_table_create( mutex_create(&table->autoinc_mutex, SYNC_DICT_AUTOINC_MUTEX); table->autoinc_inited = FALSE; + + /* The actual increment value will be set by MySQL, we simply + default to 1 here.*/ + table->autoinc_increment = 1; + #ifdef UNIV_DEBUG table->magic_n = DICT_TABLE_MAGIC_N; #endif /* UNIV_DEBUG */ @@ -108,18 +113,11 @@ dict_mem_table_free( ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); mutex_free(&(table->autoinc_mutex)); - - if (table->col_names && (table->n_def < table->n_cols)) { - ut_free((void*)table->col_names); - } - mem_heap_free(table->heap); } /******************************************************************** -Add 'name' to end of the col_names array (see dict_table_t::col_names). Call -ut_free on col_names (if not NULL), allocate new array (if heap, from it, -otherwise with ut_malloc), and copy col_names + name to it. */ +Append 'name' to 'col_names' (@see dict_table_t::col_names). */ static const char* dict_add_col_name( @@ -129,21 +127,19 @@ dict_add_col_name( NULL */ ulint cols, /* in: number of existing columns */ const char* name, /* in: new column name */ - mem_heap_t* heap) /* in: heap, or NULL */ + mem_heap_t* heap) /* in: heap */ { - ulint i; - ulint old_len; - ulint new_len; - ulint total_len; - const char* s; - char* res; + ulint old_len; + ulint new_len; + ulint total_len; + char* res; - ut_a(((cols == 0) && !col_names) || ((cols > 0) && col_names)); - ut_a(*name); + ut_ad(!cols == !col_names); /* Find out length of existing array. */ if (col_names) { - s = col_names; + const char* s = col_names; + ulint i; for (i = 0; i < cols; i++) { s += strlen(s) + 1; @@ -157,11 +153,7 @@ dict_add_col_name( new_len = strlen(name) + 1; total_len = old_len + new_len; - if (heap) { - res = mem_heap_alloc(heap, total_len); - } else { - res = ut_malloc(total_len); - } + res = mem_heap_alloc(heap, total_len); if (old_len > 0) { memcpy(res, col_names, old_len); @@ -169,10 +161,6 @@ dict_add_col_name( memcpy(res + old_len, name, new_len); - if (col_names) { - ut_free((char*)col_names); - } - return(res); } @@ -183,7 +171,8 @@ void dict_mem_table_add_col( /*===================*/ dict_table_t* table, /* in: table */ - const char* name, /* in: column name */ + mem_heap_t* heap, /* in: temporary memory heap, or NULL */ + const char* name, /* in: column name, or NULL */ ulint mtype, /* in: main datatype */ ulint prtype, /* in: precise type */ ulint len) /* in: precision */ @@ -191,21 +180,32 @@ dict_mem_table_add_col( dict_col_t* col; ulint mbminlen; ulint mbmaxlen; - mem_heap_t* heap; + ulint i; - ut_ad(table && name); + ut_ad(table); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); + ut_ad(!heap == !name); - table->n_def++; + i = table->n_def++; - heap = table->n_def < table->n_cols ? NULL : table->heap; - table->col_names = dict_add_col_name(table->col_names, - table->n_def - 1, - name, heap); + if (name) { + if (UNIV_UNLIKELY(table->n_def == table->n_cols)) { + heap = table->heap; + } + if (UNIV_LIKELY(i) && UNIV_UNLIKELY(!table->col_names)) { + /* All preceding column names are empty. */ + char* s = mem_heap_alloc(heap, table->n_def); + memset(s, 0, table->n_def); + table->col_names = s; + } - col = (dict_col_t*) dict_table_get_nth_col(table, table->n_def - 1); + table->col_names = dict_add_col_name(table->col_names, + i, name, heap); + } - col->ind = table->n_def - 1; + col = (dict_col_t*) dict_table_get_nth_col(table, i); + + col->ind = i; col->ord_part = 0; col->mtype = (unsigned int) mtype; @@ -318,7 +318,7 @@ dict_mem_index_add_field( { dict_field_t* field; - ut_ad(index && name); + ut_ad(index); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); index->n_def++; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index f606134578a..339a417a696 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -62,12 +62,6 @@ static bool innodb_inited = 0; */ static handlerton *innodb_hton_ptr; -/* Store MySQL definition of 'byte': in Linux it is char while InnoDB -uses unsigned char; the header univ.i which we include next defines -'byte' as a macro which expands to 'unsigned char' */ - -typedef uchar mysql_byte; - #define INSIDE_HA_INNOBASE_CC /* Include necessary InnoDB headers */ @@ -148,7 +142,7 @@ static HASH innobase_open_tables; bool nw_panic = FALSE; #endif -static mysql_byte* innobase_get_key(INNOBASE_SHARE *share, size_t *length, +static uchar* innobase_get_key(INNOBASE_SHARE *share, size_t *length, my_bool not_used __attribute__((unused))); static INNOBASE_SHARE *get_share(const char *table_name); static void free_share(INNOBASE_SHARE *share); @@ -1919,6 +1913,8 @@ retry: trx_mark_sql_stat_end(trx); } + trx->n_autoinc_rows = 0; /* Reset the number AUTO-INC rows required */ + if (trx->declared_to_be_inside_innodb) { /* Release our possible ticket in the FIFO */ @@ -2415,7 +2411,7 @@ ha_innobase::open( upd_and_key_val_buff_len = table->s->reclength + table->s->max_key_length + MAX_REF_PARTS * 3; - if (!(mysql_byte*) my_multi_malloc(MYF(MY_WME), + if (!(uchar*) my_multi_malloc(MYF(MY_WME), &upd_buff, upd_and_key_val_buff_len, &key_val_buff, upd_and_key_val_buff_len, NullS)) { @@ -2849,8 +2845,8 @@ inline uint innobase_read_from_2_little_endian( /*===============================*/ - /* out: value */ - const mysql_byte* buf) /* in: from where to read */ + /* out: value */ + const uchar* buf) /* in: from where to read */ { return (uint) ((ulint)(buf[0]) + 256 * ((ulint)(buf[1]))); } @@ -2866,7 +2862,7 @@ ha_innobase::store_key_val_for_row( char* buff, /* in/out: buffer for the key value (in MySQL format) */ uint buff_len,/* in: buffer length */ - const mysql_byte* record)/* in: row in MySQL format */ + const uchar* record)/* in: row in MySQL format */ { KEY* key_info = table->key_info + keynr; KEY_PART_INFO* key_part = key_info->key_part; @@ -3063,7 +3059,7 @@ ha_innobase::store_key_val_for_row( CHARSET_INFO* cs; ulint true_len; ulint key_len; - const mysql_byte* src_start; + const uchar* src_start; int error=0; enum_field_types real_type; @@ -3342,6 +3338,93 @@ skip_field: } } +/************************************************************************ +This special handling is really to overcome the limitations of MySQL's +binlogging. We need to eliminate the non-determinism that will arise in +INSERT ... SELECT type of statements, since MySQL binlog only stores the +min value of the autoinc interval. Once that is fixed we can get rid of +the special lock handling.*/ + +ulong +ha_innobase::innobase_autoinc_lock(void) +/*====================================*/ + /* out: DB_SUCCESS if all OK else + error code */ +{ + ulint error = DB_SUCCESS; + + if (thd_sql_command(user_thd) == SQLCOM_INSERT) { + dict_table_autoinc_lock(prebuilt->table); + + /* We peek at the dict_table_t::auto_inc_lock to check if + another statement has locked it */ + if (prebuilt->trx->auto_inc_lock != NULL) { + /* Release the mutex to avoid deadlocks */ + dict_table_autoinc_unlock(prebuilt->table); + + goto acquire_auto_inc_lock; + } + } else { +acquire_auto_inc_lock: + error = row_lock_table_autoinc_for_mysql(prebuilt); + + if (error == DB_SUCCESS) { + dict_table_autoinc_lock(prebuilt->table); + } + } + + return(ulong(error)); +} + +/************************************************************************ +Reset the autoinc value in the table.*/ + +ulong +ha_innobase::innobase_reset_autoinc( +/*================================*/ + /* out: DB_SUCCESS if all went well + else error code */ + ulonglong autoinc) /* in: value to store */ +{ + ulint error; + + error = innobase_autoinc_lock(); + + if (error == DB_SUCCESS) { + + dict_table_autoinc_initialize(prebuilt->table, autoinc); + + dict_table_autoinc_unlock(prebuilt->table); + } + + return(ulong(error)); +} + +/************************************************************************ +Store the autoinc value in the table. The autoinc value is only set if +it's greater than the existing autoinc value in the table.*/ + +ulong +ha_innobase::innobase_set_max_autoinc( +/*==================================*/ + /* out: DB_SUCCES if all went well + else error code */ + ulonglong auto_inc) /* in: value to store */ +{ + ulint error; + + error = innobase_autoinc_lock(); + + if (error == DB_SUCCESS) { + + dict_table_autoinc_update(prebuilt->table, auto_inc); + + dict_table_autoinc_unlock(prebuilt->table); + } + + return(ulong(error)); +} + /************************************************************************ Stores a row in an InnoDB database, to the table specified in this handle. */ @@ -3349,12 +3432,10 @@ handle. */ int ha_innobase::write_row( /*===================*/ - /* out: error code */ - mysql_byte* record) /* in: a row in MySQL format */ + /* out: error code */ + uchar* record) /* in: a row in MySQL format */ { - int error; - longlong auto_inc; - longlong dummy; + int error = 0; ibool auto_inc_used= FALSE; ulint sql_command; trx_t* trx = thd_to_trx(user_thd); @@ -3453,62 +3534,20 @@ no_commit: num_write_row++; + /* This is the case where the table has an auto-increment column */ if (table->next_number_field && record == table->record[0]) { - /* This is the case where the table has an - auto-increment column */ - /* Initialize the auto-inc counter if it has not been - initialized yet */ - - if (0 == dict_table_autoinc_peek(prebuilt->table)) { - - /* This call initializes the counter */ - error = innobase_read_and_init_auto_inc(&dummy); - - if (error) { - /* Deadlock or lock wait timeout */ - - goto func_exit; - } - - /* We have to set sql_stat_start to TRUE because - the above call probably has called a select, and - has reset that flag; row_insert_for_mysql has to - know to set the IX intention lock on the table, - something it only does at the start of each - statement */ - - prebuilt->sql_stat_start = TRUE; - } - - /* We have to use the transactional lock mechanism on the - auto-inc counter of the table to ensure that replication and - roll-forward of the binlog exactly imitates also the given - auto-inc values. The lock is released at each SQL statement's - end. This lock also prevents a race where two threads would - call ::get_auto_increment() simultaneously. */ - - error = row_lock_table_autoinc_for_mysql(prebuilt); - - if (error != DB_SUCCESS) { - /* Deadlock or lock wait timeout */ - - error = convert_error_code_to_mysql(error, user_thd); + if ((error = update_auto_increment())) { goto func_exit; } - /* We must use the handler code to update the auto-increment - value to be sure that we increment it correctly. */ - - if ((error= update_auto_increment())) - goto func_exit; - auto_inc_used = 1; - + auto_inc_used = TRUE; } if (prebuilt->mysql_template == NULL - || prebuilt->template_type != ROW_MYSQL_WHOLE_ROW) { + || prebuilt->template_type != ROW_MYSQL_WHOLE_ROW) { + /* Build the template used in converting quickly between the two database formats */ @@ -3519,40 +3558,63 @@ no_commit: error = row_insert_for_mysql((byte*) record, prebuilt); - if (error == DB_SUCCESS && auto_inc_used) { + /* Handle duplicate key errors */ + if (auto_inc_used) { + ulonglong auto_inc; - /* Fetch the value that was set in the autoincrement field */ - - auto_inc = table->next_number_field->val_int(); - - if (auto_inc != 0) { - /* This call will update the counter according to the - value that was inserted in the table */ - - dict_table_autoinc_update(prebuilt->table, auto_inc); + /* Note the number of rows processed for this statement, used + by get_auto_increment() to determine the number of AUTO-INC + values to reserve. This is only useful for a mult-value INSERT + and is a statement level counter.*/ + if (trx->n_autoinc_rows > 0) { + --trx->n_autoinc_rows; } - } - - /* A REPLACE command and LOAD DATA INFILE REPLACE handle a duplicate - key error themselves, and we must update the autoinc counter if we are - performing those statements. */ - - if (error == DB_DUPLICATE_KEY && auto_inc_used - && (sql_command == SQLCOM_REPLACE - || sql_command == SQLCOM_REPLACE_SELECT - || (sql_command == SQLCOM_INSERT - && ((trx->duplicates - & (TRX_DUP_IGNORE | TRX_DUP_REPLACE)) - == TRX_DUP_IGNORE)) - || (sql_command == SQLCOM_LOAD - && ((trx->duplicates - & (TRX_DUP_IGNORE | TRX_DUP_REPLACE)) - == (TRX_DUP_IGNORE | TRX_DUP_REPLACE))))) { + /* Get the value that MySQL attempted to store in the table.*/ auto_inc = table->next_number_field->val_int(); - if (auto_inc != 0) { - dict_table_autoinc_update(prebuilt->table, auto_inc); + switch (error) { + case DB_DUPLICATE_KEY: + + /* A REPLACE command and LOAD DATA INFILE REPLACE + handle a duplicate key error themselves, but we + must update the autoinc counter if we are performing + those statements. */ + + switch (sql_command) { + case SQLCOM_LOAD: + if ((trx->duplicates + & (TRX_DUP_IGNORE | TRX_DUP_REPLACE))) { + + goto set_max_autoinc; + } + break; + + case SQLCOM_REPLACE: + case SQLCOM_INSERT_SELECT: + case SQLCOM_REPLACE_SELECT: + goto set_max_autoinc; + break; + + default: + break; + } + + break; + + case DB_SUCCESS: + /* If the actual value inserted is greater than + the upper limit of the interval, then we try and + update the table upper limit. Note: last_value + will be 0 if get_auto_increment() was not called.*/ + + if (auto_inc > prebuilt->last_value) { +set_max_autoinc: + auto_inc += prebuilt->table->autoinc_increment; + + innobase_set_max_autoinc(auto_inc); + } + break; } } @@ -3560,8 +3622,6 @@ no_commit: error = convert_error_code_to_mysql(error, user_thd); - /* Tell InnoDB server that there might be work for - utility threads: */ func_exit: innobase_active_small(); @@ -3577,16 +3637,16 @@ calc_row_difference( /*================*/ /* out: error number or 0 */ upd_t* uvect, /* in/out: update vector */ - mysql_byte* old_row, /* in: old row in MySQL format */ - mysql_byte* new_row, /* in: new row in MySQL format */ + uchar* old_row, /* in: old row in MySQL format */ + uchar* new_row, /* in: new row in MySQL format */ struct st_table* table, /* in: table in MySQL data dictionary */ - mysql_byte* upd_buff, /* in: buffer to use */ + uchar* upd_buff, /* in: buffer to use */ ulint buff_len, /* in: buffer length */ row_prebuilt_t* prebuilt, /* in: InnoDB prebuilt struct */ THD* thd) /* in: user thread */ { - mysql_byte* original_upd_buff = upd_buff; + uchar* original_upd_buff = upd_buff; Field* field; enum_field_types field_mysql_type; uint n_fields; @@ -3730,8 +3790,8 @@ int ha_innobase::update_row( /*====================*/ /* out: error number or 0 */ - const mysql_byte* old_row,/* in: old row in MySQL format */ - mysql_byte* new_row)/* in: new row in MySQL format */ + const uchar* old_row, /* in: old row in MySQL format */ + uchar* new_row) /* in: new row in MySQL format */ { upd_t* uvect; int error = 0; @@ -3753,7 +3813,7 @@ ha_innobase::update_row( /* Build an update vector from the modified fields in the rows (uses upd_buff of the handle) */ - calc_row_difference(uvect, (mysql_byte*) old_row, new_row, table, + calc_row_difference(uvect, (uchar*) old_row, new_row, table, upd_buff, (ulint)upd_and_key_val_buff_len, prebuilt, user_thd); @@ -3766,6 +3826,32 @@ ha_innobase::update_row( error = row_update_for_mysql((byte*) old_row, prebuilt); + /* We need to do some special AUTOINC handling for the following case: + + INSERT INTO t (c1,c2) VALUES(x,y) ON DUPLICATE KEY UPDATE ... + + We need to use the AUTOINC counter that was actually used by + MySQL in the UPDATE statement, which can be different from the + value used in the INSERT statement.*/ + + if (error == DB_SUCCESS + && table->next_number_field + && new_row == table->record[0] + && thd_sql_command(user_thd) == SQLCOM_INSERT + && (trx->duplicates & (TRX_DUP_IGNORE | TRX_DUP_REPLACE)) + == TRX_DUP_IGNORE) { + + longlong auto_inc; + + auto_inc = table->next_number_field->val_int(); + + if (auto_inc != 0) { + auto_inc += prebuilt->table->autoinc_increment; + + innobase_set_max_autoinc(auto_inc); + } + } + innodb_srv_conc_exit_innodb(trx); error = convert_error_code_to_mysql(error, user_thd); @@ -3784,8 +3870,8 @@ Deletes a row given as the parameter. */ int ha_innobase::delete_row( /*====================*/ - /* out: error number or 0 */ - const mysql_byte* record) /* in: a row in MySQL format */ + /* out: error number or 0 */ + const uchar* record) /* in: a row in MySQL format */ { int error = 0; trx_t* trx = thd_to_trx(user_thd); @@ -3794,6 +3880,19 @@ ha_innobase::delete_row( ut_a(prebuilt->trx == trx); + /* Only if the table has an AUTOINC column */ + if (table->found_next_number_field && record == table->record[0]) { + ulonglong dummy = 0; + + error = innobase_get_auto_increment(&dummy); + + if (error == DB_SUCCESS) { + dict_table_autoinc_unlock(prebuilt->table); + } else { + goto error_exit; + } + } + if (!prebuilt->upd_node) { row_get_prebuilt_update_vector(prebuilt); } @@ -3808,6 +3907,7 @@ ha_innobase::delete_row( innodb_srv_conc_exit_innodb(trx); +error_exit: error = convert_error_code_to_mysql(error, user_thd); /* Tell the InnoDB server that there might be work for @@ -4011,9 +4111,9 @@ ha_innobase::index_read( /*====================*/ /* out: 0, HA_ERR_KEY_NOT_FOUND, or error number */ - mysql_byte* buf, /* in/out: buffer for the returned + uchar* buf, /* in/out: buffer for the returned row */ - const mysql_byte* key_ptr,/* in: key value; if this is NULL + const uchar* key_ptr, /* in: key value; if this is NULL we position the cursor at the start or end of index; this can also contain an InnoDB row id, in @@ -4110,17 +4210,57 @@ row with the current key value or prefix. */ int ha_innobase::index_read_last( /*=========================*/ - /* out: 0, HA_ERR_KEY_NOT_FOUND, or an - error code */ - mysql_byte* buf, /* out: fetched row */ - const mysql_byte* key_ptr, /* in: key value, or a prefix of a full - key value */ - uint key_len) /* in: length of the key val or prefix - in bytes */ + /* out: 0, HA_ERR_KEY_NOT_FOUND, or an + error code */ + uchar* buf, /* out: fetched row */ + const uchar* key_ptr,/* in: key value, or a prefix of a full + key value */ + uint key_len)/* in: length of the key val or prefix + in bytes */ { return(index_read(buf, key_ptr, key_len, HA_READ_PREFIX_LAST)); } +/************************************************************************ +Get the index for a handle. Does not change active index.*/ + +dict_index_t* +ha_innobase::innobase_get_index( +/*============================*/ + /* out: NULL or index instance. */ + uint keynr) /* in: use this index; MAX_KEY means always + clustered index, even if it was internally + generated by InnoDB */ +{ + KEY* key = 0; + dict_index_t* index = 0; + + DBUG_ENTER("innobase_get_index"); + ha_statistic_increment(&SSV::ha_read_key_count); + + ut_ad(user_thd == ha_thd()); + ut_a(prebuilt->trx == thd_to_trx(user_thd)); + + if (keynr != MAX_KEY && table->s->keys > 0) { + key = table->key_info + keynr; + + index = dict_table_get_index_noninline( + prebuilt->table, key->name); + } else { + index = dict_table_get_first_index_noninline(prebuilt->table); + } + + if (!index) { + sql_print_error( + "Innodb could not find key n:o %u with name %s " + "from dict cache for table %s", + keynr, key ? key->name : "NULL", + prebuilt->table->name); + } + + DBUG_RETURN(index); +} + /************************************************************************ Changes the active index of a handle. */ @@ -4132,32 +4272,16 @@ ha_innobase::change_active_index( index, even if it was internally generated by InnoDB */ { - KEY* key=0; DBUG_ENTER("change_active_index"); - ha_statistic_increment(&SSV::ha_read_key_count); ut_ad(user_thd == ha_thd()); ut_a(prebuilt->trx == thd_to_trx(user_thd)); active_index = keynr; - if (keynr != MAX_KEY && table->s->keys > 0) { - key = table->key_info + active_index; - - prebuilt->index = dict_table_get_index_noninline( - prebuilt->table, key->name); - } else { - prebuilt->index = dict_table_get_first_index_noninline( - prebuilt->table); - } + prebuilt->index = innobase_get_index(keynr); if (!prebuilt->index) { - sql_print_error( - "Innodb could not find key n:o %u with name %s " - "from dict cache for table %s", - keynr, key ? key->name : "NULL", - prebuilt->table->name); - DBUG_RETURN(1); } @@ -4188,10 +4312,10 @@ int ha_innobase::index_read_idx( /*========================*/ /* out: error number or 0 */ - mysql_byte* buf, /* in/out: buffer for the returned + uchar* buf, /* in/out: buffer for the returned row */ uint keynr, /* in: use this index */ - const mysql_byte* key, /* in: key value; if this is NULL + const uchar* key, /* in: key value; if this is NULL we position the cursor at the start or end of index */ uint key_len, /* in: key value length */ @@ -4214,7 +4338,7 @@ ha_innobase::general_fetch( /*=======================*/ /* out: 0, HA_ERR_END_OF_FILE, or error number */ - mysql_byte* buf, /* in/out: buffer for next row in MySQL + uchar* buf, /* in/out: buffer for next row in MySQL format */ uint direction, /* in: ROW_SEL_NEXT or ROW_SEL_PREV */ uint match_mode) /* in: 0, ROW_SEL_EXACT, or @@ -4261,7 +4385,7 @@ ha_innobase::index_next( /*====================*/ /* out: 0, HA_ERR_END_OF_FILE, or error number */ - mysql_byte* buf) /* in/out: buffer for next row in MySQL + uchar* buf) /* in/out: buffer for next row in MySQL format */ { ha_statistic_increment(&SSV::ha_read_next_count); @@ -4277,8 +4401,8 @@ ha_innobase::index_next_same( /*=========================*/ /* out: 0, HA_ERR_END_OF_FILE, or error number */ - mysql_byte* buf, /* in/out: buffer for the row */ - const mysql_byte* key, /* in: key value */ + uchar* buf, /* in/out: buffer for the row */ + const uchar* key, /* in: key value */ uint keylen) /* in: key value length */ { ha_statistic_increment(&SSV::ha_read_next_count); @@ -4293,10 +4417,8 @@ positioned using index_read. */ int ha_innobase::index_prev( /*====================*/ - /* out: 0, HA_ERR_END_OF_FILE, or error - number */ - mysql_byte* buf) /* in/out: buffer for previous row in MySQL - format */ + /* out: 0, HA_ERR_END_OF_FILE, or error number */ + uchar* buf) /* in/out: buffer for previous row in MySQL format */ { ha_statistic_increment(&SSV::ha_read_prev_count); @@ -4310,9 +4432,8 @@ corresponding row to buf. */ int ha_innobase::index_first( /*=====================*/ - /* out: 0, HA_ERR_END_OF_FILE, - or error code */ - mysql_byte* buf) /* in/out: buffer for the row */ + /* out: 0, HA_ERR_END_OF_FILE, or error code */ + uchar* buf) /* in/out: buffer for the row */ { int error; @@ -4337,8 +4458,8 @@ corresponding row to buf. */ int ha_innobase::index_last( /*====================*/ - /* out: 0, HA_ERR_END_OF_FILE, or error code */ - mysql_byte* buf) /* in/out: buffer for the row */ + /* out: 0, HA_ERR_END_OF_FILE, or error code */ + uchar* buf) /* in/out: buffer for the row */ { int error; @@ -4407,7 +4528,7 @@ int ha_innobase::rnd_next( /*==================*/ /* out: 0, HA_ERR_END_OF_FILE, or error number */ - mysql_byte* buf)/* in/out: returns the row in this buffer, + uchar* buf) /* in/out: returns the row in this buffer, in MySQL format */ { int error; @@ -4434,14 +4555,12 @@ Fetches a row from the table based on a row reference. */ int ha_innobase::rnd_pos( /*=================*/ - /* out: 0, HA_ERR_KEY_NOT_FOUND, - or error code */ - mysql_byte* buf, /* in/out: buffer for the row */ - mysql_byte* pos) /* in: primary key value of the row in the - MySQL format, or the row id if the clustered - index was internally generated by InnoDB; - the length of data in pos has to be - ref_length */ + /* out: 0, HA_ERR_KEY_NOT_FOUND, or error code */ + uchar* buf, /* in/out: buffer for the row */ + uchar* pos) /* in: primary key value of the row in the + MySQL format, or the row id if the clustered + index was internally generated by InnoDB; the + length of data in pos has to be ref_length */ { int error; uint keynr = active_index; @@ -4494,7 +4613,7 @@ was positioned the last time. */ void ha_innobase::position( /*==================*/ - const mysql_byte* record) /* in: row in MySQL format */ + const uchar* record) /* in: row in MySQL format */ { uint len; @@ -4636,7 +4755,7 @@ create_table_def( } } - dict_mem_table_add_col(table, + dict_mem_table_add_col(table, table->heap, (char*) field->field_name, col_type, dtype_form_prtype( @@ -5000,7 +5119,10 @@ ha_innobase::create( maximum value in the column. */ auto_inc_value = create_info->auto_increment_value; + + dict_table_autoinc_lock(innobase_table); dict_table_autoinc_initialize(innobase_table, auto_inc_value); + dict_table_autoinc_unlock(innobase_table); } /* Tell the InnoDB server that there might be work for @@ -5351,7 +5473,7 @@ ha_innobase::records_in_range( { KEY* key; dict_index_t* index; - mysql_byte* key_val_buff2 = (mysql_byte*) my_malloc( + uchar* key_val_buff2 = (uchar*) my_malloc( table->s->reclength + table->s->max_key_length + 100, MYF(MY_FAE)); @@ -5393,7 +5515,7 @@ ha_innobase::records_in_range( (ulint)upd_and_key_val_buff_len, index, (byte*) (min_key ? min_key->key : - (const mysql_byte*) 0), + (const uchar*) 0), (ulint) (min_key ? min_key->length : 0), prebuilt->trx); @@ -5401,7 +5523,7 @@ ha_innobase::records_in_range( range_end, (byte*) key_val_buff2, buff2_len, index, (byte*) (max_key ? max_key->key : - (const mysql_byte*) 0), + (const uchar*) 0), (ulint) (max_key ? max_key->length : 0), prebuilt->trx); @@ -6801,12 +6923,12 @@ bool innobase_show_status(handlerton *hton, THD* thd, locking. ****************************************************************************/ -static mysql_byte* innobase_get_key(INNOBASE_SHARE* share, size_t *length, +static uchar* innobase_get_key(INNOBASE_SHARE* share, size_t *length, my_bool not_used __attribute__((unused))) { *length=share->table_name_length; - return (mysql_byte*) share->table_name; + return (uchar*) share->table_name; } static INNOBASE_SHARE* get_share(const char* table_name) @@ -6816,7 +6938,7 @@ static INNOBASE_SHARE* get_share(const char* table_name) uint length=(uint) strlen(table_name); if (!(share=(INNOBASE_SHARE*) hash_search(&innobase_open_tables, - (mysql_byte*) table_name, + (uchar*) table_name, length))) { share = (INNOBASE_SHARE *) my_malloc(sizeof(*share)+length+1, @@ -6827,7 +6949,7 @@ static INNOBASE_SHARE* get_share(const char* table_name) strmov(share->table_name,table_name); if (my_hash_insert(&innobase_open_tables, - (mysql_byte*) share)) { + (uchar*) share)) { pthread_mutex_unlock(&innobase_share_mutex); my_free(share,0); @@ -6849,7 +6971,7 @@ static void free_share(INNOBASE_SHARE* share) pthread_mutex_lock(&innobase_share_mutex); if (!--share->use_count) { - hash_delete(&innobase_open_tables, (mysql_byte*) share); + hash_delete(&innobase_open_tables, (uchar*) share); thr_lock_delete(&share->lock); pthread_mutex_destroy(&share->mutex); my_free(share, MYF(0)); @@ -7070,15 +7192,15 @@ the value of the auto-inc counter. */ int ha_innobase::innobase_read_and_init_auto_inc( /*=========================================*/ - /* out: 0 or error code: deadlock or lock wait - timeout */ - longlong* ret) /* out: auto-inc value */ + /* out: 0 or error code: + deadlock or lock wait timeout */ + longlong* value) /* out: the autoinc value */ { longlong auto_inc; - ulint old_select_lock_type; - ibool trx_was_not_started = FALSE; ibool stmt_start; - int error; + int mysql_error = 0; + dict_table_t* innodb_table = prebuilt->table; + ibool trx_was_not_started = FALSE; ut_a(prebuilt); ut_a(prebuilt->table); @@ -7099,103 +7221,47 @@ ha_innobase::innobase_read_and_init_auto_inc( trx_search_latch_release_if_reserved(prebuilt->trx); + dict_table_autoinc_lock(prebuilt->table); + auto_inc = dict_table_autoinc_read(prebuilt->table); - if (auto_inc != 0) { - /* Already initialized */ - *ret = auto_inc; - - error = 0; - - goto func_exit_early; + /* Was the AUTOINC counter reset during normal processing, if + so then we simply start count from 1. No need to go to the index.*/ + if (auto_inc == 0 && innodb_table->autoinc_inited) { + ++auto_inc; + dict_table_autoinc_initialize(innodb_table, auto_inc); } - error = row_lock_table_autoinc_for_mysql(prebuilt); + if (auto_inc == 0) { + dict_index_t* index; + ulint error = DB_SUCCESS; + const char* autoinc_col_name; - if (error != DB_SUCCESS) { - error = convert_error_code_to_mysql(error, user_thd); + ut_a(!innodb_table->autoinc_inited); - goto func_exit_early; - } + index = innobase_get_index(table->s->next_number_index); - /* Check again if someone has initialized the counter meanwhile */ - auto_inc = dict_table_autoinc_read(prebuilt->table); + autoinc_col_name = table->found_next_number_field->field_name; - if (auto_inc != 0) { - *ret = auto_inc; + error = row_search_max_autoinc( + index, autoinc_col_name, &auto_inc); - error = 0; - - goto func_exit_early; - } - - (void) extra(HA_EXTRA_KEYREAD); - index_init(table->s->next_number_index, 1); - - /* Starting from 5.0.9, we use a consistent read to read the auto-inc - column maximum value. This eliminates the spurious deadlocks caused - by the row X-lock that we previously used. Note the following flaw - in our algorithm: if some other user meanwhile UPDATEs the auto-inc - column, our consistent read will not return the largest value. We - accept this flaw, since the deadlocks were a bigger trouble. */ - - /* Fetch all the columns in the key */ - - prebuilt->hint_need_to_fetch_extra_cols = ROW_RETRIEVE_ALL_COLS; - - old_select_lock_type = prebuilt->select_lock_type; - prebuilt->select_lock_type = LOCK_NONE; - - /* Eliminate an InnoDB error print that happens when we try to SELECT - from a table when no table has been locked in ::external_lock(). */ - prebuilt->trx->n_mysql_tables_in_use++; - - error = index_last(table->record[1]); - - prebuilt->trx->n_mysql_tables_in_use--; - prebuilt->select_lock_type = old_select_lock_type; - - if (error) { - if (error == HA_ERR_END_OF_FILE) { - /* The table was empty, initialize to 1 */ - auto_inc = 1; - - error = 0; + if (error == DB_SUCCESS) { + ++auto_inc; + dict_table_autoinc_initialize(innodb_table, auto_inc); } else { - /* This should not happen in a consistent read */ - sql_print_error("Consistent read of auto-inc column " - "returned %lu", (ulong) error); - auto_inc = -1; + fprintf(stderr, " InnoDB error: Couldn't read the " + "max AUTOINC value from index (%s).\n", + index->name); - goto func_exit; + mysql_error = 1; } - } else { - /* Initialize to max(col) + 1; we use - 'found_next_number_field' below because MySQL in SHOW TABLE - STATUS does not seem to set 'next_number_field'. The comment - in table.h says that 'next_number_field' is set when it is - 'active'. - Since 5.1 MySQL enforces that we announce fields which we will - read; as we only do a val_*() call, dbug_tmp_use_all_columns() - with read_set is sufficient. */ - - my_bitmap_map *old_map; - old_map= dbug_tmp_use_all_columns(table, table->read_set); - auto_inc = (longlong) table->found_next_number_field-> - val_int_offset(table->s->rec_buff_length) + 1; - dbug_tmp_restore_column_map(table->read_set, old_map); } - dict_table_autoinc_initialize(prebuilt->table, auto_inc); + *value = auto_inc; -func_exit: - (void) extra(HA_EXTRA_NO_KEYREAD); + dict_table_autoinc_unlock(prebuilt->table); - index_end(); - - *ret = auto_inc; - -func_exit_early: /* Since MySQL does not seem to call autocommit after SHOW TABLE STATUS (even if we would register the trx here), we commit our transaction here if it was started here. This is to eliminate a @@ -7210,6 +7276,63 @@ func_exit_early: prebuilt->sql_stat_start = stmt_start; + return(mysql_error); +} + +/******************************************************************************* +Read the next autoinc value, initialize the table if it's not initialized. +On return if there is no error then the tables AUTOINC lock is locked.*/ + +ulong +ha_innobase::innobase_get_auto_increment( + ulonglong* value) /* out: autoinc value */ +{ + ulint error; + + do { + error = innobase_autoinc_lock(); + + if (error == DB_SUCCESS) { + ib_longlong autoinc; + + /* Determine the first value of the interval */ + autoinc = dict_table_autoinc_read(prebuilt->table); + + /* We need to initialize the AUTO-INC value, for + that we release all locks.*/ + if (autoinc <= 0) { + trx_t* trx; + + trx = prebuilt->trx; + dict_table_autoinc_unlock(prebuilt->table); + + if (trx->auto_inc_lock) { + /* If we had reserved the AUTO-INC + lock in this SQL statement we release + it before retrying.*/ + row_unlock_table_autoinc_for_mysql(trx); + } + + /* Just to make sure */ + ut_a(!trx->auto_inc_lock); + + int mysql_error; + + mysql_error = innobase_read_and_init_auto_inc( + &autoinc); + + if (!mysql_error) { + /* Should have read the proper value */ + ut_a(autoinc > 0); + } else { + error = DB_ERROR; + } + } else { + *value = (ulonglong) autoinc; + } + } + } while (*value == 0 && error == DB_SUCCESS); + return(error); } @@ -7221,37 +7344,87 @@ auto-inc counter in *first_value, and ULONGLONG_MAX in *nb_reserved_values (as we have a table-level lock). offset, increment, nb_desired_values are ignored. *first_value is set to -1 if error (deadlock or lock wait timeout) */ -void ha_innobase::get_auto_increment( +void +ha_innobase::get_auto_increment( /*=================================*/ - ulonglong offset, /* in */ - ulonglong increment, /* in */ - ulonglong nb_desired_values, /* in */ - ulonglong *first_value, /* out */ - ulonglong *nb_reserved_values) /* out */ + ulonglong offset, /* in: */ + ulonglong increment, /* in: table autoinc increment */ + ulonglong nb_desired_values, /* in: number of values reqd */ + ulonglong *first_value, /* out: the autoinc value */ + ulonglong *nb_reserved_values) /* out: count of reserved values */ { - longlong nr; - int error; + ulint error; + ulonglong autoinc = 0; /* Prepare prebuilt->trx in the table handle */ update_thd(ha_thd()); - error = innobase_read_and_init_auto_inc(&nr); + error = innobase_get_auto_increment(&autoinc); - if (error) { - /* This should never happen in the current (5.0.6) code, since - we call this function only after the counter has been - initialized. */ + if (error != DB_SUCCESS) { + /* This should never happen in the code > ver 5.0.6, + since we call this function only after the counter + has been initialized. */ ut_print_timestamp(stderr); - sql_print_error("Error %lu in ::get_auto_increment()", - (ulong) error); - *first_value= (~(ulonglong) 0); + sql_print_error("Error %lu in ::get_auto_increment()", error); + + *first_value = (~(ulonglong) 0); return; } - *first_value= (ulonglong) nr; - /* table-level autoinc lock reserves up to +inf */ - *nb_reserved_values= ULONGLONG_MAX; + /* This is a hack, since nb_desired_values seems to be accurate only + for the first call to get_auto_increment() for multi-row INSERT and + meaningless for other statements e.g, LOAD etc. Subsequent calls to + this method for the same statement results in different values which + don't make sense. Therefore we store the value the first time we are + called and count down from that as rows are written (see write_row()). + + We make one exception, if the *first_value is precomputed by MySQL + we use that value. And set the number of reserved values to 1 if + this is the first time we were called for the SQL statement, this + will force MySQL to call us for the next value. If we are in the + middle of a multi-row insert we preserve the existing counter.*/ + if (*first_value == 0) { + + /* Called for the first time ? */ + if (prebuilt->trx->n_autoinc_rows == 0) { + + prebuilt->trx->n_autoinc_rows = nb_desired_values; + + /* It's possible for nb_desired_values to be 0: + e.g., INSERT INTO T1(C) SELECT C FROM T2; */ + if (nb_desired_values == 0) { + + ++prebuilt->trx->n_autoinc_rows; + } + } + + *first_value = autoinc; + + } else if (prebuilt->trx->n_autoinc_rows == 0) { + + prebuilt->trx->n_autoinc_rows = 1; + } + + ut_a(prebuilt->trx->n_autoinc_rows > 0); + + *nb_reserved_values = prebuilt->trx->n_autoinc_rows; + + /* Compute the last value in the interval */ + prebuilt->last_value = *first_value + (*nb_reserved_values * increment); + + ut_a(prebuilt->last_value >= *first_value); + + /* Update the table autoinc variable */ + dict_table_autoinc_update(prebuilt->table, prebuilt->last_value); + + /* The increment to be used to increase the AUTOINC value, we use + this in write_row() and update_row() to increase the autoinc counter + for columns that are filled by the user.*/ + prebuilt->table->autoinc_increment = increment; + + dict_table_autoinc_unlock(prebuilt->table); } /* See comment in handler.h */ @@ -7272,7 +7445,7 @@ ha_innobase::reset_auto_increment(ulonglong value) DBUG_RETURN(error); } - dict_table_autoinc_initialize(prebuilt->table, value); + innobase_reset_autoinc(value); DBUG_RETURN(0); } @@ -7299,9 +7472,9 @@ ha_innobase::cmp_ref( /*=================*/ /* out: < 0 if ref1 < ref2, 0 if equal, else > 0 */ - const mysql_byte* ref1, /* in: an (internal) primary key value in the + const uchar* ref1, /* in: an (internal) primary key value in the MySQL key value format */ - const mysql_byte* ref2) /* in: an (internal) primary key value in the + const uchar* ref2) /* in: an (internal) primary key value in the MySQL key value format */ { enum_field_types mysql_type; @@ -7558,6 +7731,7 @@ innobase_xa_prepare( row_unlock_table_autoinc_for_mysql(trx); } + /* Store the current undo_no of the transaction so that we know where to roll back if we have to roll back the next SQL statement */ diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 270b000dfc4..fe5ebd57990 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -32,7 +32,10 @@ typedef struct st_innobase_share { } INNOBASE_SHARE; +struct dict_index_struct; struct row_prebuilt_struct; + +typedef struct dict_index_struct dict_index_t; typedef struct row_prebuilt_struct row_prebuilt_t; /* The class defining a handle to an Innodb table */ @@ -70,6 +73,11 @@ class ha_innobase: public handler int change_active_index(uint keynr); int general_fetch(uchar* buf, uint direction, uint match_mode); int innobase_read_and_init_auto_inc(longlong* ret); + ulong innobase_autoinc_lock(); + ulong innobase_set_max_autoinc(ulonglong auto_inc); + ulong innobase_reset_autoinc(ulonglong auto_inc); + ulong innobase_get_auto_increment(ulonglong* value); + dict_index_t* innobase_get_index(uint keynr); /* Init values for the class: */ public: diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index 4e291924e0e..44972356304 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -462,7 +462,8 @@ ibuf_data_init_for_space( page_t* root; page_t* header_page; mtr_t mtr; - char buf[50]; + char* buf; + mem_heap_t* heap; dict_table_t* table; dict_index_t* index; ulint n_used; @@ -516,16 +517,20 @@ ibuf_data_init_for_space( ibuf_exit(); + heap = mem_heap_create(450); + buf = mem_heap_alloc(heap, 50); + sprintf(buf, "SYS_IBUF_TABLE_%lu", (ulong) space); /* use old-style record format for the insert buffer */ table = dict_mem_table_create(buf, space, 2, 0); - dict_mem_table_add_col(table, "PAGE_NO", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "TYPES", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "PAGE_NO", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "TYPES", DATA_BINARY, 0, 0); table->id = ut_dulint_add(DICT_IBUF_ID_MIN, space); - dict_table_add_to_cache(table); + dict_table_add_to_cache(table, heap); + mem_heap_free(heap); index = dict_mem_index_create( buf, "CLUST_IND", space, @@ -1139,7 +1144,7 @@ ibuf_dummy_index_add_col( ulint len) /* in: length of the column */ { ulint i = index->table->n_def; - dict_mem_table_add_col(index->table, "DUMMY", + dict_mem_table_add_col(index->table, NULL, NULL, dtype_get_mtype(type), dtype_get_prtype(type), dtype_get_len(type)); @@ -1161,11 +1166,6 @@ ibuf_dummy_index_free( dict_mem_table_free(table); } -void -dict_index_print_low( -/*=================*/ - dict_index_t* index); /* in: index */ - /************************************************************************* Builds the entry to insert into a non-clustered index when we have the corresponding record in an ibuf index. */ diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index eb31043ecc3..2f038b21e8e 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -171,6 +171,13 @@ dict_col_name_is_reserved( /* out: TRUE if name is reserved */ const char* name); /* in: column name */ /************************************************************************ +Acquire the autoinc lock.*/ + +void +dict_table_autoinc_lock( +/*====================*/ + dict_table_t* table); /* in: table */ +/************************************************************************ Initializes the autoinc counter. It is not an error to initialize an already initialized counter. */ @@ -180,22 +187,6 @@ dict_table_autoinc_initialize( dict_table_t* table, /* in: table */ ib_longlong value); /* in: next value to assign to a row */ /************************************************************************ -Gets the next autoinc value (== autoinc counter value), 0 if not yet -initialized. If initialized, increments the counter by 1. */ - -ib_longlong -dict_table_autoinc_get( -/*===================*/ - /* out: value for a new row, or 0 */ - dict_table_t* table); /* in: table */ -/************************************************************************ -Decrements the autoinc counter value by 1. */ - -void -dict_table_autoinc_decrement( -/*=========================*/ - dict_table_t* table); /* in: table */ -/************************************************************************ Reads the next autoinc value (== autoinc counter value), 0 if not yet initialized. */ @@ -205,15 +196,6 @@ dict_table_autoinc_read( /* out: value for a new row, or 0 */ dict_table_t* table); /* in: table */ /************************************************************************ -Peeks the autoinc counter value, 0 if not yet initialized. Does not -increment the counter. The read not protected by any mutex! */ - -ib_longlong -dict_table_autoinc_peek( -/*====================*/ - /* out: value of the counter */ - dict_table_t* table); /* in: table */ -/************************************************************************ Updates the autoinc counter if the value supplied is equal or bigger than the current value. If not inited, does nothing. */ @@ -223,13 +205,29 @@ dict_table_autoinc_update( dict_table_t* table, /* in: table */ ib_longlong value); /* in: value which was assigned to a row */ +/************************************************************************ +Release the autoinc lock.*/ + +void +dict_table_autoinc_unlock( +/*======================*/ + dict_table_t* table); /* in: table */ +/************************************************************************** +Adds system columns to a table object. */ + +void +dict_table_add_system_columns( +/*==========================*/ + dict_table_t* table, /* in/out: table */ + mem_heap_t* heap); /* in: temporary heap */ /************************************************************************** Adds a table object to the dictionary cache. */ void dict_table_add_to_cache( /*====================*/ - dict_table_t* table); /* in: table */ + dict_table_t* table, /* in: table */ + mem_heap_t* heap); /* in: temporary heap */ /************************************************************************** Removes a table object from the dictionary cache. */ diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index 647035c2fff..de6ee1227bf 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -72,7 +72,8 @@ void dict_mem_table_add_col( /*===================*/ dict_table_t* table, /* in: table */ - const char* name, /* in: column name */ + mem_heap_t* heap, /* in: temporary memory heap, or NULL */ + const char* name, /* in: column name, or NULL */ ulint mtype, /* in: main datatype */ ulint prtype, /* in: precise type */ ulint len); /* in: precision */ @@ -410,6 +411,11 @@ struct dict_table_struct{ SELECT MAX(auto inc column) */ ib_longlong autoinc;/* autoinc counter value to give to the next inserted row */ + + ib_longlong autoinc_increment; + /* The increment step of the auto increment + column. Value must be greater than or equal + to 1 */ #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ # define DICT_TABLE_MAGIC_N 76333786 diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 059c459c374..8b08b6284f6 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -609,7 +609,7 @@ lock_validate(void); /* out: TRUE if ok */ /************************************************************************* Return approximate number or record locks (bits set in the bitmap) for -this transaction. Since delete-marked records maybe removed, the +this transaction. Since delete-marked records may be removed, the record count will not be precise. */ ulint diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index 1448efe94fe..aabb7f5f047 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -670,6 +670,7 @@ struct row_prebuilt_struct { to this heap */ mem_heap_t* old_vers_heap; /* memory heap where a previous version is built in consistent read */ + ulonglong last_value; /* last value of AUTO-INC interval */ ulint magic_n2; /* this should be the same as magic_n */ }; diff --git a/storage/innobase/include/row0sel.h b/storage/innobase/include/row0sel.h index 96273a18cd5..4bde648f18e 100644 --- a/storage/innobase/include/row0sel.h +++ b/storage/innobase/include/row0sel.h @@ -171,7 +171,17 @@ row_search_check_if_query_cache_permitted( trx_t* trx, /* in: transaction object */ const char* norm_name); /* in: concatenation of database name, '/' char, table name */ +/*********************************************************************** +Read the max AUTOINC value from an index. */ +ulint +row_search_max_autoinc( +/*===================*/ + /* out: DB_SUCCESS if all OK else + error code */ + dict_index_t* index, /* in: index to search */ + const char* col_name, /* in: autoinc column name */ + ib_longlong* value); /* out: AUTOINC value read */ /* A structure for caching column values for prefetched rows */ struct sel_buf_struct{ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 2459e76c4c1..0455e9ea17a 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -681,6 +681,9 @@ struct trx_struct{ trx_undo_arr_t* undo_no_arr; /* array of undo numbers of undo log records which are currently processed by a rollback operation */ + ulint n_autoinc_rows; /* no. of AUTO-INC rows required for + an SQL statement. This is useful for + multi-row INSERTs */ /*------------------------------*/ char detailed_error[256]; /* detailed error message for last error, or empty. */ diff --git a/storage/innobase/include/ut0mem.h b/storage/innobase/include/ut0mem.h index 90c16f4fad5..e56895bc142 100644 --- a/storage/innobase/include/ut0mem.h +++ b/storage/innobase/include/ut0mem.h @@ -63,7 +63,7 @@ ut_test_malloc( /* out: TRUE if succeeded */ ulint n); /* in: try to allocate this many bytes */ /************************************************************************** -Frees a memory bloock allocated with ut_malloc. */ +Frees a memory block allocated with ut_malloc. */ void ut_free( diff --git a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c index ce2fc3ed535..aef58b7b576 100644 --- a/storage/innobase/log/log0recv.c +++ b/storage/innobase/log/log0recv.c @@ -115,7 +115,7 @@ dulint recv_max_page_lsn; Initialize crash recovery environment. Can be called iff recv_needed_recovery == FALSE. */ static -void +void recv_init_crash_recovery(void); /*===========================*/ @@ -2450,7 +2450,7 @@ void recv_init_crash_recovery(void) /*==========================*/ { - ut_a(!recv_needed_recovery); + ut_a(!recv_needed_recovery); recv_needed_recovery = TRUE; @@ -2481,7 +2481,6 @@ recv_init_crash_recovery(void) "InnoDB: buffer...\n"); trx_sys_doublewrite_init_or_restore_pages(TRUE); } - } /************************************************************ @@ -2805,7 +2804,7 @@ recv_recovery_from_checkpoint_start( recv_synchronize_groups(up_to_date_group); if (!recv_needed_recovery) { - ut_a(ut_dulint_cmp(checkpoint_lsn, + ut_a(ut_dulint_cmp(checkpoint_lsn, recv_sys->recovered_lsn) == 0); } else { diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index d51b7e1e0b5..b8d201e3da2 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -655,6 +655,8 @@ row_create_prebuilt( prebuilt->old_vers_heap = NULL; + prebuilt->last_value = 0; + return(prebuilt); } @@ -2894,6 +2896,8 @@ next_rec: dict_table_change_id_in_cache(table, new_id); } + /* MySQL calls ha_innobase::reset_auto_increment() which does + the same thing. */ dict_table_autoinc_initialize(table, 0); dict_update_statistics(table); diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index e70b3b8671f..ee79bc94906 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -4519,3 +4519,169 @@ row_search_check_if_query_cache_permitted( return(ret); } + +/*********************************************************************** +Read the AUTOINC column from the current row. */ +static +ib_longlong +row_search_autoinc_read_column( +/*===========================*/ + /* out: value read from the column */ + dict_index_t* index, /* in: index to read from */ + const rec_t* rec, /* in: current rec */ + ulint col_no, /* in: column number */ + ibool unsigned_type) /* in: signed or unsigned flag */ +{ + ulint len; + byte* ptr; + const byte* data; + ib_longlong value; + mem_heap_t* heap = NULL; + byte dest[sizeof(value)]; + ulint offsets_[REC_OFFS_NORMAL_SIZE]; + ulint* offsets = offsets_; + + *offsets_ = sizeof offsets_ / sizeof *offsets_; + + /* TODO: We have to cast away the const of rec for now. This needs + to be fixed later.*/ + offsets = rec_get_offsets( + (rec_t*) rec, index, offsets, ULINT_UNDEFINED, &heap); + + /* TODO: We have to cast away the const of rec for now. This needs + to be fixed later.*/ + data = rec_get_nth_field((rec_t*)rec, offsets, col_no, &len); + + ut_a(len != UNIV_SQL_NULL); + ut_a(len <= sizeof value); + + /* Convert integer data from Innobase to a little-endian format, + sign bit restored to normal */ + + for (ptr = dest + len; ptr != dest; ++data) { + --ptr; + *ptr = *data; + } + + if (!unsigned_type) { + dest[len - 1] ^= 128; + } + + /* The assumption here is that the AUTOINC value can't be negative.*/ + switch (len) { + case 8: + value = *(ib_longlong*) ptr; + break; + + case 4: + value = *(ib_uint32_t*) ptr; + break; + + case 2: + value = *(uint16 *) ptr; + break; + + case 1: + value = *ptr; + break; + + default: + ut_error; + } + + if (UNIV_LIKELY_NULL(heap)) { + mem_heap_free(heap); + } + + ut_a(value >= 0); + + return(value); +} + +/*********************************************************************** +Get the last row. */ +static +const rec_t* +row_search_autoinc_get_rec( +/*=======================*/ + /* out: current rec or NULL */ + btr_pcur_t* pcur, /* in: the current cursor */ + mtr_t* mtr) /* in: mini transaction */ +{ + do { + const rec_t* rec = btr_pcur_get_rec(pcur); + + if (page_rec_is_user_rec(rec)) { + return(rec); + } + } while (btr_pcur_move_to_prev(pcur, mtr)); + + return(NULL); +} + +/*********************************************************************** +Read the max AUTOINC value from an index. */ + +ulint +row_search_max_autoinc( +/*===================*/ + /* out: DB_SUCCESS if all OK else + error code, DB_RECORD_NOT_FOUND if + column name can't be found in index */ + dict_index_t* index, /* in: index to search */ + const char* col_name, /* in: name of autoinc column */ + ib_longlong* value) /* out: AUTOINC value read */ +{ + ulint i; + ulint n_cols; + dict_field_t* dfield = NULL; + ulint error = DB_SUCCESS; + + n_cols = dict_index_get_n_ordering_defined_by_user(index); + + /* Search the index for the AUTOINC column name */ + for (i = 0; i < n_cols; ++i) { + dfield = dict_index_get_nth_field(index, i); + + if (strcmp(col_name, dfield->name) == 0) { + break; + } + } + + *value = 0; + + /* Must find the AUTOINC column name */ + if (i < n_cols && dfield) { + mtr_t mtr; + btr_pcur_t pcur; + + mtr_start(&mtr); + + /* Open at the high/right end (FALSE), and INIT + cursor (TRUE) */ + btr_pcur_open_at_index_side( + FALSE, index, BTR_SEARCH_LEAF, &pcur, TRUE, &mtr); + + if (page_get_n_recs(btr_pcur_get_page(&pcur)) > 0) { + const rec_t* rec; + + rec = row_search_autoinc_get_rec(&pcur, &mtr); + + if (rec != NULL) { + ibool unsigned_type = ( + dfield->col->prtype & DATA_UNSIGNED); + + *value = row_search_autoinc_read_column( + index, rec, i, unsigned_type); + } + } + + btr_pcur_close(&pcur); + + mtr_commit(&mtr); + } else { + error = DB_RECORD_NOT_FOUND; + } + + return(error); +} diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index b312e008cd2..ca9195599d9 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -195,6 +195,8 @@ trx_create( memset(&trx->xid, 0, sizeof(trx->xid)); trx->xid.formatID = -1; + trx->n_autoinc_rows = 0; + trx_reset_new_rec_lock_info(trx); return(trx); From f01f1993ddf30bb1cfce8eb71b7d20a6124207ea Mon Sep 17 00:00:00 2001 From: "tsmith@ramayana.hindu.god" <> Date: Sat, 25 Aug 2007 03:55:38 -0600 Subject: [PATCH 2/5] Apply InnoDB snapshot innodb-5.1-ss1751. Bug #16979: AUTO_INC lock in InnoDB works a table level lock Add a table level counter that tracks the number of AUTOINC locks that are pending and/or granted on a table. We peek at this value to determine whether a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to acquire the AUTOINC lock or not. This change is related to Bug# 16979. Bug #27950: Duplicate entry error in auto-inc after mysqld restart We check whether the AUTOINC sub-system has been initialized (first) by holding the AUTOINC mutex and if initialization is required then we initialize using our normal procedure. --- storage/innobase/dict/dict0boot.c | 65 +++++---- storage/innobase/dict/dict0crea.c | 2 +- storage/innobase/dict/dict0load.c | 9 +- storage/innobase/dict/dict0mem.c | 4 + storage/innobase/handler/ha_innodb.cc | 203 ++++++++++---------------- storage/innobase/include/dict0mem.h | 20 ++- storage/innobase/include/mem0mem.ic | 12 +- storage/innobase/include/sync0rw.ic | 2 +- storage/innobase/include/trx0trx.h | 25 ---- storage/innobase/lock/lock0lock.c | 7 + storage/innobase/mtr/mtr0log.c | 28 +++- storage/innobase/pars/pars0pars.c | 3 +- storage/innobase/srv/srv0srv.c | 4 +- storage/innobase/trx/trx0sys.c | 2 + storage/innobase/trx/trx0trx.c | 18 --- 15 files changed, 186 insertions(+), 218 deletions(-) diff --git a/storage/innobase/dict/dict0boot.c b/storage/innobase/dict/dict0boot.c index f8849008854..5f9aaf71e18 100644 --- a/storage/innobase/dict/dict0boot.c +++ b/storage/innobase/dict/dict0boot.c @@ -211,6 +211,7 @@ dict_boot(void) dict_table_t* table; dict_index_t* index; dict_hdr_t* dict_hdr; + mem_heap_t* heap; mtr_t mtr; mtr_start(&mtr); @@ -218,6 +219,8 @@ dict_boot(void) /* Create the hash tables etc. */ dict_init(); + heap = mem_heap_create(450); + mutex_enter(&(dict_sys->mutex)); /* Get the dictionary header */ @@ -244,19 +247,20 @@ dict_boot(void) /*-------------------------*/ table = dict_mem_table_create("SYS_TABLES", DICT_HDR_SPACE, 8, 0); - dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "N_COLS", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "TYPE", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "MIX_ID", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "MIX_LEN", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "CLUSTER_NAME", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "SPACE", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "NAME", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "ID", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "N_COLS", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "TYPE", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "MIX_ID", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "MIX_LEN", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "CLUSTER_NAME", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "SPACE", DATA_INT, 0, 4); table->id = DICT_TABLES_ID; - dict_table_add_to_cache(table); + dict_table_add_to_cache(table, heap); dict_sys->sys_tables = table; + mem_heap_empty(heap); index = dict_mem_index_create("SYS_TABLES", "CLUST_IND", DICT_HDR_SPACE, @@ -283,18 +287,19 @@ dict_boot(void) /*-------------------------*/ table = dict_mem_table_create("SYS_COLUMNS", DICT_HDR_SPACE, 7, 0); - dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "MTYPE", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "PRTYPE", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "LEN", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "PREC", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "TABLE_ID", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "POS", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "NAME", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "MTYPE", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "PRTYPE", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "LEN", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "PREC", DATA_INT, 0, 4); table->id = DICT_COLUMNS_ID; - dict_table_add_to_cache(table); + dict_table_add_to_cache(table, heap); dict_sys->sys_columns = table; + mem_heap_empty(heap); index = dict_mem_index_create("SYS_COLUMNS", "CLUST_IND", DICT_HDR_SPACE, @@ -311,13 +316,13 @@ dict_boot(void) /*-------------------------*/ table = dict_mem_table_create("SYS_INDEXES", DICT_HDR_SPACE, 7, 0); - dict_mem_table_add_col(table, "TABLE_ID", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "ID", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "NAME", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "N_FIELDS", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "TYPE", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "SPACE", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "PAGE_NO", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "TABLE_ID", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "ID", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "NAME", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "N_FIELDS", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "TYPE", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "SPACE", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "PAGE_NO", DATA_INT, 0, 4); /* The '+ 2' below comes from the 2 system fields */ #if DICT_SYS_INDEXES_PAGE_NO_FIELD != 6 + 2 @@ -331,8 +336,9 @@ dict_boot(void) #endif table->id = DICT_INDEXES_ID; - dict_table_add_to_cache(table); + dict_table_add_to_cache(table, heap); dict_sys->sys_indexes = table; + mem_heap_empty(heap); index = dict_mem_index_create("SYS_INDEXES", "CLUST_IND", DICT_HDR_SPACE, @@ -349,13 +355,14 @@ dict_boot(void) /*-------------------------*/ table = dict_mem_table_create("SYS_FIELDS", DICT_HDR_SPACE, 3, 0); - dict_mem_table_add_col(table, "INDEX_ID", DATA_BINARY, 0, 0); - dict_mem_table_add_col(table, "POS", DATA_INT, 0, 4); - dict_mem_table_add_col(table, "COL_NAME", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "INDEX_ID", DATA_BINARY, 0, 0); + dict_mem_table_add_col(table, heap, "POS", DATA_INT, 0, 4); + dict_mem_table_add_col(table, heap, "COL_NAME", DATA_BINARY, 0, 0); table->id = DICT_FIELDS_ID; - dict_table_add_to_cache(table); + dict_table_add_to_cache(table, heap); dict_sys->sys_fields = table; + mem_heap_free(heap); index = dict_mem_index_create("SYS_FIELDS", "CLUST_IND", DICT_HDR_SPACE, diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c index 51146c3c24c..4116230347d 100644 --- a/storage/innobase/dict/dict0crea.c +++ b/storage/innobase/dict/dict0crea.c @@ -960,7 +960,7 @@ dict_create_table_step( if (node->state == TABLE_ADD_TO_CACHE) { - dict_table_add_to_cache(node->table); + dict_table_add_to_cache(node->table, node->heap); err = DB_SUCCESS; } diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c index ba2e25cf031..1ff1fd54cec 100644 --- a/storage/innobase/dict/dict0load.c +++ b/storage/innobase/dict/dict0load.c @@ -423,7 +423,8 @@ dict_load_columns( ut_a(name_of_col_is(sys_columns, sys_index, 8, "PREC")); - dict_mem_table_add_col(table, name, mtype, prtype, col_len); + dict_mem_table_add_col(table, heap, name, + mtype, prtype, col_len); btr_pcur_move_to_next_user_rec(&pcur, &mtr); } @@ -746,7 +747,7 @@ dict_load_table( ut_ad(mutex_own(&(dict_sys->mutex))); - heap = mem_heap_create(1000); + heap = mem_heap_create(32000); mtr_start(&mtr); @@ -852,7 +853,9 @@ err_exit: dict_load_columns(table, heap); - dict_table_add_to_cache(table); + dict_table_add_to_cache(table, heap); + + mem_heap_empty(heap); dict_load_indexes(table, heap); diff --git a/storage/innobase/dict/dict0mem.c b/storage/innobase/dict/dict0mem.c index e0b8bf15dd7..f4012c11973 100644 --- a/storage/innobase/dict/dict0mem.c +++ b/storage/innobase/dict/dict0mem.c @@ -95,6 +95,10 @@ dict_mem_table_create( default to 1 here.*/ table->autoinc_increment = 1; + /* The number of transactions that are either waiting on the + AUTOINC lock or have been granted the lock. */ + table->n_waiting_or_granted_auto_inc_locks = 0; + #ifdef UNIV_DEBUG table->magic_n = DICT_TABLE_MAGIC_N; #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 339a417a696..909b19e6ae7 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -92,11 +92,15 @@ extern "C" { #include "../storage/innobase/include/ha_prototypes.h" } +static const long AUTOINC_OLD_STYLE_LOCKING = 0; +static const long AUTOINC_NEW_STYLE_LOCKING = 1; +static const long AUTOINC_NO_LOCKING = 2; + static long innobase_mirrored_log_groups, innobase_log_files_in_group, innobase_log_buffer_size, innobase_buffer_pool_awe_mem_mb, innobase_additional_mem_pool_size, innobase_file_io_threads, innobase_lock_wait_timeout, innobase_force_recovery, - innobase_open_files; + innobase_open_files, innobase_autoinc_lock_mode; static long long innobase_buffer_pool_size, innobase_log_file_size; @@ -1928,110 +1932,6 @@ retry: DBUG_RETURN(0); } -#if 0 -/* TODO: put the -MySQL-4.1 functionality back to 5.0. This is needed to get InnoDB Hot Backup -to work. */ - -/********************************************************************* -This is called when MySQL writes the binlog entry for the current -transaction. Writes to the InnoDB tablespace info which tells where the -MySQL binlog entry for the current transaction ended. Also commits the -transaction inside InnoDB but does NOT flush InnoDB log files to disk. -To flush you have to call innobase_commit_complete(). We have separated -flushing to eliminate the bottleneck of LOCK_log in log.cc which disabled -InnoDB's group commit capability. */ -static -int -innobase_report_binlog_offset_and_commit( -/*=====================================*/ - /* out: 0 */ - handlerton *hton, /* in: Innodb handlerton */ - THD* thd, /* in: user thread */ - void* trx_handle, /* in: InnoDB trx handle */ - char* log_file_name, /* in: latest binlog file name */ - my_off_t end_offset) /* in: the offset in the binlog file - up to which we wrote */ -{ - trx_t* trx; - - trx = (trx_t*)trx_handle; - - ut_a(trx != NULL); - - trx->mysql_log_file_name = log_file_name; - trx->mysql_log_offset = (ib_longlong)end_offset; - - trx->flush_log_later = TRUE; - - innobase_commit(hton, thd, TRUE); - - trx->flush_log_later = FALSE; - - return(0); -} - -/*********************************************************************** -This function stores the binlog offset and flushes logs. */ -static -void -innobase_store_binlog_offset_and_flush_log( -/*=======================================*/ - char* binlog_name, /* in: binlog name */ - longlong offset) /* in: binlog offset */ -{ - mtr_t mtr; - - assert(binlog_name != NULL); - - /* Start a mini-transaction */ - mtr_start_noninline(&mtr); - - /* Update the latest MySQL binlog name and offset info - in trx sys header */ - - trx_sys_update_mysql_binlog_offset( - binlog_name, - offset, - TRX_SYS_MYSQL_LOG_INFO, &mtr); - - /* Commits the mini-transaction */ - mtr_commit(&mtr); - - /* Synchronous flush of the log buffer to disk */ - log_buffer_flush_to_disk(); -} - -/********************************************************************* -This is called after MySQL has written the binlog entry for the current -transaction. Flushes the InnoDB log files to disk if required. */ -static -int -innobase_commit_complete( -/*=====================*/ - /* out: 0 */ - THD* thd) /* in: user thread */ -{ - trx_t* trx; - - trx = thd_to_trx(thd); - - if (trx && trx->active_trans) { - - trx->active_trans = 0; - - if (UNIV_UNLIKELY(srv_flush_log_at_trx_commit == 0)) { - - return(0); - } - - trx_commit_complete_for_mysql(trx); - } - - return(0); -} -#endif - /********************************************************************* Rolls back a transaction or the latest SQL statement. */ static @@ -3353,24 +3253,46 @@ ha_innobase::innobase_autoinc_lock(void) { ulint error = DB_SUCCESS; - if (thd_sql_command(user_thd) == SQLCOM_INSERT) { + switch (innobase_autoinc_lock_mode) { + case AUTOINC_NO_LOCKING: + /* Acquire only the AUTOINC mutex. */ dict_table_autoinc_lock(prebuilt->table); + break; - /* We peek at the dict_table_t::auto_inc_lock to check if - another statement has locked it */ - if (prebuilt->trx->auto_inc_lock != NULL) { - /* Release the mutex to avoid deadlocks */ - dict_table_autoinc_unlock(prebuilt->table); + case AUTOINC_NEW_STYLE_LOCKING: + /* For simple (single/multi) row INSERTs, we fallback to the + old style only if another transaction has already acquired + the AUTOINC lock on behalf of a LOAD FILE or INSERT ... SELECT + etc. type of statement. */ + if (thd_sql_command(user_thd) == SQLCOM_INSERT) { + dict_table_t* table = prebuilt->table; - goto acquire_auto_inc_lock; + /* Acquire the AUTOINC mutex. */ + dict_table_autoinc_lock(table); + + /* We need to check that another transaction isn't + already holding the AUTOINC lock on the table. */ + if (table->n_waiting_or_granted_auto_inc_locks) { + /* Release the mutex to avoid deadlocks. */ + dict_table_autoinc_unlock(table); + } else { + break; + } } - } else { -acquire_auto_inc_lock: + /* Fall through to old style locking. */ + + case AUTOINC_OLD_STYLE_LOCKING: error = row_lock_table_autoinc_for_mysql(prebuilt); if (error == DB_SUCCESS) { + + /* Acquire the AUTOINC mutex. */ dict_table_autoinc_lock(prebuilt->table); } + break; + + default: + ut_error; } return(ulong(error)); @@ -3610,6 +3532,7 @@ no_commit: if (auto_inc > prebuilt->last_value) { set_max_autoinc: + ut_a(prebuilt->table->autoinc_increment > 0); auto_inc += prebuilt->table->autoinc_increment; innobase_set_max_autoinc(auto_inc); @@ -3884,12 +3807,23 @@ ha_innobase::delete_row( if (table->found_next_number_field && record == table->record[0]) { ulonglong dummy = 0; - error = innobase_get_auto_increment(&dummy); + /* First check whether the AUTOINC sub-system has been + initialized using the AUTOINC mutex. If not then we + do it the "proper" way, by acquiring the heavier locks. */ + dict_table_autoinc_lock(prebuilt->table); - if (error == DB_SUCCESS) { + if (!prebuilt->table->autoinc_inited) { + dict_table_autoinc_unlock(prebuilt->table); + + error = innobase_get_auto_increment(&dummy); + + if (error == DB_SUCCESS) { + dict_table_autoinc_unlock(prebuilt->table); + } else { + goto error_exit; + } + } else { dict_table_autoinc_unlock(prebuilt->table); - } else { - goto error_exit; } } @@ -7411,13 +7345,24 @@ ha_innobase::get_auto_increment( *nb_reserved_values = prebuilt->trx->n_autoinc_rows; - /* Compute the last value in the interval */ - prebuilt->last_value = *first_value + (*nb_reserved_values * increment); + /* With old style AUTOINC locking we only update the table's + AUTOINC counter after attempting to insert the row. */ + if (innobase_autoinc_lock_mode != AUTOINC_OLD_STYLE_LOCKING) { - ut_a(prebuilt->last_value >= *first_value); + /* Compute the last value in the interval */ + prebuilt->last_value = *first_value + + (*nb_reserved_values * increment); - /* Update the table autoinc variable */ - dict_table_autoinc_update(prebuilt->table, prebuilt->last_value); + ut_a(prebuilt->last_value >= *first_value); + + /* Update the table autoinc variable */ + dict_table_autoinc_update( + prebuilt->table, prebuilt->last_value); + } else { + /* This will force write_row() into attempting an update + of the table's AUTOINC counter. */ + prebuilt->last_value = 0; + } /* The increment to be used to increase the AUTOINC value, we use this in write_row() and update_row() to increase the autoinc counter @@ -8080,6 +8025,17 @@ static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path, "Path to individual files and their sizes.", NULL, NULL, NULL); +static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, + PLUGIN_VAR_RQCMDARG, + "The AUTOINC lock modes supported by InnoDB:\n" + " 0 => Old style AUTOINC locking (for backward compatibility)\n" + " 1 => New style AUTOINC locking\n" + " 2 => No AUTOINC locking (unsafe for SBR)", + NULL, NULL, + AUTOINC_NEW_STYLE_LOCKING, /* Default setting */ + AUTOINC_OLD_STYLE_LOCKING, /* Minimum value */ + AUTOINC_NO_LOCKING, 0); /* Maximum value */ + static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(additional_mem_pool_size), MYSQL_SYSVAR(autoextend_increment), @@ -8118,6 +8074,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(table_locks), MYSQL_SYSVAR(thread_concurrency), MYSQL_SYSVAR(thread_sleep_delay), + MYSQL_SYSVAR(autoinc_lock_mode), NULL }; diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index de6ee1227bf..a05bc513efd 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -315,11 +315,11 @@ struct dict_table_struct{ unsigned n_cols:10;/* number of columns */ dict_col_t* cols; /* array of column descriptions */ const char* col_names; - /* n_def column names packed in an - "name1\0name2\0...nameN\0" array. until - n_def reaches n_cols, this is allocated with - ut_malloc, and the final size array is - allocated through the table's heap. */ + /* Column names packed in a character string + "name1\0name2\0...nameN\0". Until + the string contains n_cols, it will be + allocated from a temporary heap. The final + string will be allocated from table->heap. */ hash_node_t name_hash; /* hash chain node */ hash_node_t id_hash; /* hash chain node */ UT_LIST_BASE_NODE_T(dict_index_t) @@ -416,6 +416,16 @@ struct dict_table_struct{ /* The increment step of the auto increment column. Value must be greater than or equal to 1 */ + ulong n_waiting_or_granted_auto_inc_locks; + /* This counter is used to track the number + of granted and pending autoinc locks on this + table. This value is set after acquiring the + kernel mutex but we peek the contents to + determine whether other transactions have + acquired the AUTOINC lock or not. Of course + only one transaction can be granted the + lock but there can be multiple waiters. */ + #ifdef UNIV_DEBUG ulint magic_n;/* magic number */ # define DICT_TABLE_MAGIC_N 76333786 diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic index e59443da73d..adae9ad8a33 100644 --- a/storage/innobase/include/mem0mem.ic +++ b/storage/innobase/include/mem0mem.ic @@ -271,15 +271,19 @@ mem_heap_free_heap_top( ut_ad(mem_block_get_start(block) <= mem_block_get_free(block)); /* In the debug version erase block from top up */ - - mem_erase_buf(old_top, (byte*)block + block->len - old_top); + { + ulint len = (byte*)block + block->len - old_top; + mem_erase_buf(old_top, len); + UNIV_MEM_FREE(old_top, len); + } /* Update allocated memory count */ mutex_enter(&mem_hash_mutex); mem_current_allocated_memory -= (total_size - size); mutex_exit(&mem_hash_mutex); - -#endif +#else /* UNIV_MEM_DEBUG */ + UNIV_MEM_FREE(old_top, (byte*)block + block->len - old_top); +#endif /* UNIV_MEM_DEBUG */ /* If free == start, we may free the block if it is not the first one */ diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic index f8b5367739a..b41593d0a96 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.ic @@ -231,7 +231,7 @@ rw_lock_s_lock_func( owns an s-lock here, it may end up in a deadlock with another thread which requests an x-lock here. Therefore, we will forbid recursive s-locking of a latch: the following assert will warn the programmer - of the possibility of a tjis kind of deadlock. If we want to implement + of the possibility of this kind of a deadlock. If we want to implement safe recursive s-locking, we should keep in a list the thread ids of the threads which have s-locked a latch. This would use some CPU time. */ diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 0455e9ea17a..5017c15aaf0 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -482,31 +482,6 @@ struct trx_struct{ ib_longlong mysql_log_offset;/* if MySQL binlog is used, this field contains the end offset of the binlog entry */ - const char* mysql_master_log_file_name; - /* if the database server is a MySQL - replication slave, we have here the - master binlog name up to which - replication has processed; otherwise - this is a pointer to a null - character */ - ib_longlong mysql_master_log_pos; - /* if the database server is a MySQL - replication slave, this is the - position in the log file up to which - replication has processed */ - /* A MySQL variable mysql_thd->synchronous_repl tells if we have - to use synchronous replication. See ha_innodb.cc. */ - char* repl_wait_binlog_name;/* NULL, or if synchronous MySQL - replication is used, the binlog name - up to which we must communicate the - binlog to the slave, before returning - from a commit; this is the same as - mysql_log_file_name, but we allocate - and copy the name to a separate buffer - here */ - ib_longlong repl_wait_binlog_pos;/* see above at - repl_wait_binlog_name */ - os_thread_id_t mysql_thread_id;/* id of the MySQL thread associated with this transaction object */ ulint mysql_process_no;/* since in Linux, 'top' reports diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index f43752fb5fc..39cbf83e58e 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -3386,6 +3386,10 @@ lock_table_create( ut_ad(table && trx); ut_ad(mutex_own(&kernel_mutex)); + if ((type_mode & LOCK_MODE_MASK) == LOCK_AUTO_INC) { + ++table->n_waiting_or_granted_auto_inc_locks; + } + if (type_mode == LOCK_AUTO_INC) { /* Only one trx can have the lock on the table at a time: we may use the memory preallocated @@ -3436,6 +3440,9 @@ lock_table_remove_low( if (lock == trx->auto_inc_lock) { trx->auto_inc_lock = NULL; + + ut_a(table->n_waiting_or_granted_auto_inc_locks > 0); + --table->n_waiting_or_granted_auto_inc_locks; } UT_LIST_REMOVE(trx_locks, trx->trx_locks, lock); diff --git a/storage/innobase/mtr/mtr0log.c b/storage/innobase/mtr/mtr0log.c index f9704dc2d20..e5d572bbfa7 100644 --- a/storage/innobase/mtr/mtr0log.c +++ b/storage/innobase/mtr/mtr0log.c @@ -517,8 +517,9 @@ mlog_parse_index( n = mach_read_from_2(ptr); ptr += 2; n_uniq = mach_read_from_2(ptr); + ptr += 2; ut_ad(n_uniq <= n); - if (end_ptr < ptr + (n + 1) * 2) { + if (end_ptr < ptr + n * 2) { return(NULL); } } else { @@ -531,18 +532,18 @@ mlog_parse_index( ind->table = table; ind->n_uniq = (unsigned int) n_uniq; if (n_uniq != n) { + ut_a(n_uniq + DATA_ROLL_PTR <= n); ind->type = DICT_CLUSTERED; } - /* avoid ut_ad(index->cached) in dict_index_get_n_unique_in_tree */ - ind->cached = TRUE; if (comp) { for (i = 0; i < n; i++) { - ulint len = mach_read_from_2(ptr += 2); + ulint len = mach_read_from_2(ptr); + ptr += 2; /* The high-order bit of len is the NOT NULL flag; the rest is 0 or 0x7fff for variable-length fields, and 1..0x7ffe for fixed-length fields. */ dict_mem_table_add_col( - table, "DUMMY", + table, NULL, NULL, ((len + 1) & 0x7fff) <= 1 ? DATA_BINARY : DATA_FIXBINARY, len & 0x8000 ? DATA_NOT_NULL : 0, @@ -552,8 +553,23 @@ mlog_parse_index( dict_table_get_nth_col(table, i), 0); } - ptr += 2; + dict_table_add_system_columns(table, table->heap); + if (n_uniq != n) { + /* Identify DB_TRX_ID and DB_ROLL_PTR in the index. */ + ut_a(DATA_TRX_ID_LEN + == dict_index_get_nth_col(ind, DATA_TRX_ID - 1 + + n_uniq)->len); + ut_a(DATA_ROLL_PTR_LEN + == dict_index_get_nth_col(ind, DATA_ROLL_PTR - 1 + + n_uniq)->len); + ind->fields[DATA_TRX_ID - 1 + n_uniq].col + = &table->cols[n + DATA_TRX_ID]; + ind->fields[DATA_ROLL_PTR - 1 + n_uniq].col + = &table->cols[n + DATA_ROLL_PTR]; + } } + /* avoid ut_ad(index->cached) in dict_index_get_n_unique_in_tree */ + ind->cached = TRUE; *index = ind; return(ptr); } diff --git a/storage/innobase/pars/pars0pars.c b/storage/innobase/pars/pars0pars.c index 16530494a96..89f6f862995 100644 --- a/storage/innobase/pars/pars0pars.c +++ b/storage/innobase/pars/pars0pars.c @@ -1640,7 +1640,8 @@ pars_create_table( while (column) { dtype = dfield_get_type(que_node_get_val(column)); - dict_mem_table_add_col(table, column->name, dtype->mtype, + dict_mem_table_add_col(table, table->heap, + column->name, dtype->mtype, dtype->prtype, dtype->len); column->resolved = TRUE; column->token_type = SYM_COLUMN; diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 8f8c9386f41..82b55789be2 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -907,7 +907,7 @@ srv_init(void) /* create dummy table and index for old-style infimum and supremum */ table = dict_mem_table_create("SYS_DUMMY1", DICT_HDR_SPACE, 1, 0); - dict_mem_table_add_col(table, "DUMMY", DATA_CHAR, + dict_mem_table_add_col(table, NULL, NULL, DATA_CHAR, DATA_ENGLISH | DATA_NOT_NULL, 8); srv_sys->dummy_ind1 = dict_mem_index_create( @@ -918,7 +918,7 @@ srv_init(void) /* create dummy table and index for new-style infimum and supremum */ table = dict_mem_table_create("SYS_DUMMY2", DICT_HDR_SPACE, 1, DICT_TF_COMPACT); - dict_mem_table_add_col(table, "DUMMY", DATA_CHAR, + dict_mem_table_add_col(table, NULL, NULL, DATA_CHAR, DATA_ENGLISH | DATA_NOT_NULL, 8); srv_sys->dummy_ind2 = dict_mem_index_create( "SYS_DUMMY2", "SYS_DUMMY2", DICT_HDR_SPACE, 0, 1); diff --git a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c index 144721150b6..40348dd4199 100644 --- a/storage/innobase/trx/trx0sys.c +++ b/storage/innobase/trx/trx0sys.c @@ -646,6 +646,7 @@ trx_sys_update_mysql_binlog_offset( MLOG_4BYTES, mtr); } +#ifdef UNIV_HOTBACKUP /********************************************************************* Prints to stderr the MySQL binlog info in the system header if the magic number shows it valid. */ @@ -677,6 +678,7 @@ trx_sys_print_mysql_binlog_offset_from_page( + TRX_SYS_MYSQL_LOG_NAME); } } +#endif /* UNIV_HOTBACKUP */ /********************************************************************* Stores the MySQL binlog offset info in the trx system header if diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index ca9195599d9..a278ad51984 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -139,11 +139,6 @@ trx_create( trx->mysql_log_file_name = NULL; trx->mysql_log_offset = 0; - trx->mysql_master_log_file_name = ""; - trx->mysql_master_log_pos = 0; - - trx->repl_wait_binlog_name = NULL; - trx->repl_wait_binlog_pos = 0; mutex_create(&trx->undo_mutex, SYNC_TRX_UNDO); @@ -325,11 +320,6 @@ trx_free( trx_undo_arr_free(trx->undo_no_arr); } - if (trx->repl_wait_binlog_name != NULL) { - - mem_free(trx->repl_wait_binlog_name); - } - ut_a(UT_LIST_GET_LEN(trx->signals) == 0); ut_a(UT_LIST_GET_LEN(trx->reply_signals) == 0); @@ -809,14 +799,6 @@ trx_commit_off_kernel( trx->mysql_log_file_name = NULL; } - if (trx->mysql_master_log_file_name[0] != '\0') { - /* This database server is a MySQL replication slave */ - trx_sys_update_mysql_binlog_offset( - trx->mysql_master_log_file_name, - trx->mysql_master_log_pos, - TRX_SYS_MYSQL_MASTER_LOG_INFO, &mtr); - } - /* The following call commits the mini-transaction, making the whole transaction committed in the file-based world, at this log sequence number. The transaction becomes 'durable' when From 549ed88635c4282acb563708395e83177a1514d4 Mon Sep 17 00:00:00 2001 From: "tsmith@ramayana.hindu.god" <> Date: Mon, 27 Aug 2007 11:46:34 -0600 Subject: [PATCH 3/5] Bug #30648: Partition handler may not initialize variable used w/ autoincrement A local variable may be used uninitialized in ha_partition::get_auto_increment(). Initialize it properly. --- sql/ha_partition.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 6521be1cb9a..ff28b6bfd77 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5445,6 +5445,7 @@ void ha_partition::get_auto_increment(ulonglong offset, ulonglong increment, for (pos=m_file, end= m_file+ m_tot_parts; pos != end ; pos++) { + first_value_part= *first_value; (*pos)->get_auto_increment(offset, increment, nb_desired_values, &first_value_part, &nb_reserved_values_part); if (first_value_part == ~(ulonglong)(0)) // error in one partition From 220cd12f0b3c095a572e541c9fbaffb21cf310bf Mon Sep 17 00:00:00 2001 From: "tsmith@ramayana.hindu.god" <> Date: Mon, 27 Aug 2007 14:08:32 -0600 Subject: [PATCH 4/5] Fixes for the following bugs: Bug #30316: Some "parts" tests fail because the server uses "--secure-file-priv" Bug #30341: Test suite "parts" needs to be adapted to the new rules disallowing many functio Bug #30408: Suite "parts" needs bug numbers updated Bug #30411: Suite "parts" needs bug numbers updated: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF Bug #30576: part_supported_sql_func_innodb.test tries to LOAD DATA outside of var dir Bug #30581: partition_value tests use disallowed CAST() function Included are some general fixes to allow the "parts" test suite to be run successfully. This includes disabling a few tests or parts of tests, cleaning up the test cases and their results, etc. Basically, these tests have not been run for some time, and had suffered some bit rot. The bugs were fixed as a single changeset, because in some ways they depend on each other. I couldn't be sure I'd updated all the error codes (for bugs 30408 and 30411) without also adapting to the new allowed functions rules (bug 30341), and vice versa. --- mysql-test/include/partition_layout.inc | 1 + .../part_supported_sql_funcs_int_ch1.inc | 0 .../part_supported_sql_funcs_int_date.inc | 0 .../part_supported_sql_funcs_int_float.inc | 0 .../part_supported_sql_funcs_int_int.inc | 0 .../part_supported_sql_funcs_int_time.inc | 0 .../parts/inc/part_blocked_sql_funcs_main.inc | 24 +- .../inc/part_supported_sql_funcs_main.inc | 68 +- .../suite/parts/inc/partition_alter3.inc | 6 +- .../suite/parts/inc/partition_alter_1.inc | 9 +- .../parts/inc/partition_blocked_sql_funcs.inc | 34 +- .../suite/parts/inc/partition_check.inc | 18 +- mysql-test/suite/parts/inc/partition_date.inc | 4 +- .../suite/parts/inc/partition_datetime.inc | 4 +- .../suite/parts/inc/partition_decimal.inc | 14 +- .../suite/parts/inc/partition_directory.inc | 27 +- .../suite/parts/inc/partition_double.inc | 14 +- mysql-test/suite/parts/inc/partition_enum.inc | 27 +- .../suite/parts/inc/partition_float.inc | 14 +- .../parts/inc/partition_layout_check1.inc | 1 + .../parts/inc/partition_layout_check2.inc | 1 + .../suite/parts/inc/partition_methods1.inc | 32 +- mysql-test/suite/parts/inc/partition_set.inc | 38 - .../inc/partition_supported_sql_funcs.inc | 11 +- .../suite/parts/inc/partition_syntax.inc | 10 +- .../suite/parts/inc/partition_syntax_1.inc | 24 +- mysql-test/suite/parts/inc/partition_time.inc | 4 +- .../suite/parts/inc/partition_timestamp.inc | 4 +- .../suite/parts/inc/partition_value.inc | 12 + .../r/part_blocked_sql_func_innodb.result | 996 +++- .../r/part_blocked_sql_func_myisam.result | 996 +++- .../r/part_supported_sql_func_innodb.result | 4736 +++++++---------- .../r/part_supported_sql_func_myisam.result | 4736 +++++++---------- .../parts/r/partition_alter3_innodb.result | 157 +- .../parts/r/partition_alter3_myisam.result | 533 +- .../parts/r/partition_basic_innodb.result | 1343 +---- .../parts/r/partition_basic_myisam.result | 1049 +--- .../parts/r/partition_datetime_innodb.result | 32 +- .../parts/r/partition_datetime_myisam.result | 32 +- .../parts/r/partition_decimal_innodb.result | 92 - .../parts/r/partition_decimal_myisam.result | 92 - .../parts/r/partition_float_myisam.result | 292 - .../parts/r/partition_syntax_innodb.result | 10 +- .../parts/r/partition_syntax_myisam.result | 10 +- mysql-test/suite/parts/t/disabled.def | 5 + 45 files changed, 6349 insertions(+), 9163 deletions(-) rename mysql-test/{suite/parts/inc => std_data/parts}/part_supported_sql_funcs_int_ch1.inc (100%) rename mysql-test/{suite/parts/inc => std_data/parts}/part_supported_sql_funcs_int_date.inc (100%) rename mysql-test/{suite/parts/inc => std_data/parts}/part_supported_sql_funcs_int_float.inc (100%) rename mysql-test/{suite/parts/inc => std_data/parts}/part_supported_sql_funcs_int_int.inc (100%) rename mysql-test/{suite/parts/inc => std_data/parts}/part_supported_sql_funcs_int_time.inc (100%) diff --git a/mysql-test/include/partition_layout.inc b/mysql-test/include/partition_layout.inc index 95f6cac37d7..e8d2b0f9123 100644 --- a/mysql-test/include/partition_layout.inc +++ b/mysql-test/include/partition_layout.inc @@ -9,5 +9,6 @@ eval SHOW CREATE TABLE t1; # listing of files belonging to the table t1 if ($ls) { + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* } diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc b/mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc similarity index 100% rename from mysql-test/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc rename to mysql-test/std_data/parts/part_supported_sql_funcs_int_ch1.inc diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc b/mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc similarity index 100% rename from mysql-test/suite/parts/inc/part_supported_sql_funcs_int_date.inc rename to mysql-test/std_data/parts/part_supported_sql_funcs_int_date.inc diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc b/mysql-test/std_data/parts/part_supported_sql_funcs_int_float.inc similarity index 100% rename from mysql-test/suite/parts/inc/part_supported_sql_funcs_int_float.inc rename to mysql-test/std_data/parts/part_supported_sql_funcs_int_float.inc diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc b/mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc similarity index 100% rename from mysql-test/suite/parts/inc/part_supported_sql_funcs_int_int.inc rename to mysql-test/std_data/parts/part_supported_sql_funcs_int_int.inc diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc b/mysql-test/std_data/parts/part_supported_sql_funcs_int_time.inc similarity index 100% rename from mysql-test/suite/parts/inc/part_supported_sql_funcs_int_time.inc rename to mysql-test/std_data/parts/part_supported_sql_funcs_int_time.inc diff --git a/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc index ec258b5387b..cba5c47f01b 100644 --- a/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc +++ b/mysql-test/suite/parts/inc/part_blocked_sql_funcs_main.inc @@ -17,6 +17,18 @@ --echo --- All SQL functions should be rejected, otherwise BUG (see 18198) --echo ------------------------------------------------------------------------- +let $sqlfunc = ascii(col1); +let $valsqlfunc = ascii('a'); +let $coltype = char(30); +--source suite/parts/inc/partition_blocked_sql_funcs.inc +# --source include/partition_blocked_sql_funcs.inc + +let $sqlfunc = ord(col1); +let $valsqlfunc = ord('a'); +let $coltype = char(30); +--source suite/parts/inc/partition_blocked_sql_funcs.inc +# --source include/partition_blocked_sql_funcs.inc + let $sqlfunc = greatest(col1,15); let $valsqlfunc = greatest(1,15); let $coltype = int; @@ -151,12 +163,6 @@ let $coltype = int; --source suite/parts/inc/partition_blocked_sql_funcs.inc # --source include/partition_blocked_sql_funcs.inc -let $sqlfunc = datediff(col1,col1); -let $valsqlfunc = datediff('1997-11-30 23:59:59','1997-12-31'); -let $coltype = datetime; ---source suite/parts/inc/partition_blocked_sql_funcs.inc -# --source include/partition_blocked_sql_funcs.inc - let $sqlfunc = period_add(col1,5); let $valsqlfunc = period_add(9804,5); let $coltype = datetime; @@ -190,6 +196,12 @@ let $coltype = datetime; --source suite/parts/inc/partition_blocked_sql_funcs.inc # --source include/partition_blocked_sql_funcs.inc +let $sqlfunc = weekofyear(col1); +let $valsqlfunc = weekofyear('2002-05-01'); +let $coltype = datetime; +--source suite/parts/inc/partition_blocked_sql_funcs.inc +# --source include/partition_blocked_sql_funcs.inc + let $sqlfunc = cast(col1 as signed); let $valsqlfunc = cast(123 as signed); let $coltype = varchar(30); diff --git a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc index 4dc0e7bdad3..4761d15c6d3 100644 --- a/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc +++ b/mysql-test/suite/parts/inc/part_supported_sql_funcs_main.inc @@ -40,61 +40,42 @@ let $val4 = 15 ; --source suite/parts/inc/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc -let $sqlfunc = ascii(col1); -let $valsqlfunc = ascii('5'); -let $coltype = char(1); -let $infile = part_supported_sql_funcs_int_ch1.inc; -let $val1 = '1'; -let $val2 = '9'; -let $val3 = '3'; -let $val4 = '8'; ---source suite/parts/inc/partition_supported_sql_funcs.inc -# --source include/partition_supported_sql_funcs.inc -let $sqlfunc = cast(ceiling(col1) as signed integer); -let $valsqlfunc = cast(ceiling(15) as signed integer); +let $sqlfunc = ceiling(col1); +let $valsqlfunc = ceiling(15); let $coltype = float(7,4); let $infile = part_supported_sql_funcs_int_float.inc; let $val1 = 5.1230; let $val2 = 13.345; let $val3 = 17.987; let $val4 = 15.654 ; ---source suite/parts/inc/partition_supported_sql_funcs.inc +# DISABLED due to bug 30577 +#--source suite/parts/inc/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc -let $sqlfunc = cast(floor(col1) as signed); -let $valsqlfunc = cast(floor(15.123) as signed); +let $sqlfunc = floor(col1); +let $valsqlfunc = floor(15.123); let $coltype = float(7,4); let $infile = part_supported_sql_funcs_int_float.inc; let $val1 = 5.1230; let $val2 = 13.345; let $val3 = 17.987; let $val4 = 15.654 ; ---source suite/parts/inc/partition_supported_sql_funcs.inc +# DISABLED due to bug 30577 +#--source suite/parts/inc/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc -let $sqlfunc = cast(mod(col1,10) as signed); -let $valsqlfunc = cast(mod(15,10) as signed); -let $coltype = float(7,4); -let $infile = part_supported_sql_funcs_int_float.inc; -let $val1 = 5.0000; +let $sqlfunc = mod(col1,10); +let $valsqlfunc = mod(15,10); +let $coltype = int; +let $infile = part_supported_sql_funcs_int_int.inc; +let $val1 = 5; let $val2 = 19; let $val3 = 17; let $val4 = 15 ; --source suite/parts/inc/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc -let $sqlfunc = ord(col1); -let $valsqlfunc = ord('a'); -let $coltype = char(3); -let $infile = part_supported_sql_funcs_int_ch1.inc; -let $val1 = '1'; -let $val2 = '9'; -let $val3 = '3'; -let $val4 = '8'; ---source suite/parts/inc/partition_supported_sql_funcs.inc -# --source include/partition_supported_sql_funcs.inc - let $sqlfunc = day(col1); let $valsqlfunc = day('2006-12-21'); let $coltype = date; @@ -243,6 +224,18 @@ let $val4 = '2006-02-06'; --source suite/parts/inc/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc +# DATEDIFF() is implemented as (TO_DAYS(d1) - TO_DAYS(d2)) +let $sqlfunc = datediff(col1, '2006-01-01'); +let $valsqlfunc = datediff('2006-02-02', '2006-01-01'); +let $coltype = date; +let $infile = part_supported_sql_funcs_int_date.inc; +let $val1 = '2006-02-03'; +let $val2 = '2006-01-17'; +let $val3 = '2006-01-25'; +let $val4 = '2006-02-06'; +--source suite/parts/inc/partition_supported_sql_funcs.inc +# --source include/partition_supported_sql_funcs.inc + let $sqlfunc = weekday(col1); let $valsqlfunc = weekday('2006-10-14'); let $coltype = date; @@ -254,17 +247,6 @@ let $val4 = '2006-02-06'; --source suite/parts/inc/partition_supported_sql_funcs.inc # --source include/partition_supported_sql_funcs.inc -let $sqlfunc = weekofyear(col1); -let $valsqlfunc = weekofyear('2006-02-14'); -let $coltype = date; -let $infile = part_supported_sql_funcs_int_date.inc; -let $val1 = '2006-01-03'; -let $val2 = '2006-03-17'; -let $val3 = '2006-05-25'; -let $val4 = '2006-09-06'; ---source suite/parts/inc/partition_supported_sql_funcs.inc -# --source include/partition_supported_sql_funcs.inc - let $sqlfunc = year(col1)-1990; let $valsqlfunc = year('2005-10-14')-1990; let $coltype = date; diff --git a/mysql-test/suite/parts/inc/partition_alter3.inc b/mysql-test/suite/parts/inc/partition_alter3.inc index 48ad61ebe08..4b1539f4260 100644 --- a/mysql-test/suite/parts/inc/partition_alter3.inc +++ b/mysql-test/suite/parts/inc/partition_alter3.inc @@ -43,16 +43,16 @@ SELECT IF(9999 - 1000 + 1 > @max_row, @max_row , 9999 - 1000 + 1) ALTER TABLE t1 ADD PARTITION (PARTITION part2); # --echo # 1.1.2 Assign HASH partitioning -ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); --source include/partition_layout.inc --source suite/parts/inc/partition_check_read1.inc # --echo # 1.1.3 Assign other HASH partitioning to already partitioned table --echo # + test and switch back + test -ALTER TABLE t1 PARTITION BY HASH(CAST(f_varchar AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date)); --source include/partition_layout.inc --source suite/parts/inc/partition_check_read1.inc -ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); --source include/partition_layout.inc --source suite/parts/inc/partition_check_read1.inc # diff --git a/mysql-test/suite/parts/inc/partition_alter_1.inc b/mysql-test/suite/parts/inc/partition_alter_1.inc index 542a67ccbef..1498970547a 100644 --- a/mysql-test/suite/parts/inc/partition_alter_1.inc +++ b/mysql-test/suite/parts/inc/partition_alter_1.inc @@ -36,8 +36,9 @@ eval $insert_first_half; # Possible/Expected return codes for ALTER TABLE ... # 0 -# 1491: A PRIMARY KEY need to include all fields in the partition function -# A UNIQUE INDEX need to include all fields in the partition function +# 1030: ER_GET_ERRNO +# 1500: ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF +# 1504: ER_DROP_PARTITION_NON_EXISTENT --disable_abort_on_error eval $alter; --enable_abort_on_error @@ -47,11 +48,11 @@ if ($no_debug) } eval SET @my_errno = $mysql_errno; let $run_test= `SELECT @my_errno = 0`; -let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1491,1495)`; +let $unexpected_error= `SELECT @my_errno NOT IN (0,1030,1500,1504)`; if ($unexpected_error) { --echo # The last command got an unexepected error response. - --echo # Expected/handled SQL codes are 0,1030,1491,1495 + --echo # Expected/handled SQL codes are 0,1030,1500,1504 SELECT '# SQL code we got was: ' AS "", @my_errno AS ""; --echo # Sorry, have to abort. exit; diff --git a/mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc b/mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc index 7843a44134c..3e6876662fe 100644 --- a/mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc +++ b/mysql-test/suite/parts/inc/partition_blocked_sql_funcs.inc @@ -15,8 +15,7 @@ --echo ------------------------------------------------------------------------- --echo --- $sqlfunc in partition with coltype $coltype --echo ------------------------------------------------------------------------- ---echo must all fail! (delete 0 and comment char, if bug fixed) ---disable_abort_on_error +--echo must all fail! --disable_warnings drop table if exists t1 ; drop table if exists t2 ; @@ -26,32 +25,31 @@ drop table if exists t5 ; drop table if exists t6 ; --enable_warnings -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t1 (col1 $coltype) engine=$engine partition by range($sqlfunc) (partition p0 values less than (15), partition p1 values less than (31)); -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t2 (col1 $coltype) engine=$engine partition by list($sqlfunc) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t3 (col1 $coltype) engine=$engine partition by hash($sqlfunc); ---enable_abort_on_error ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t4 (colint int, col1 $coltype) engine=$engine partition by range(colint) subpartition by hash($sqlfunc) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t5 (colint int, col1 $coltype) engine=$engine partition by list(colint) subpartition by hash($sqlfunc) subpartitions 2 @@ -59,7 +57,7 @@ subpartition by hash($sqlfunc) subpartitions 2 partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t6 (colint int, col1 $coltype) engine=$engine partition by range(colint) (partition p0 values less than ($valsqlfunc), @@ -75,50 +73,44 @@ drop table if exists t55 ; drop table if exists t66 ; --enable_warnings -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t11 (col1 $coltype) engine=$engine ; -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t22 (col1 $coltype) engine=$engine ; -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t33 (col1 $coltype) engine=$engine ; ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t44 (colint int, col1 $coltype) engine=$engine ; ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t55 (colint int, col1 $coltype) engine=$engine ; ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval create table t66 (colint int, col1 $coltype) engine=$engine ; -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t11 partition by range($sqlfunc) (partition p0 values less than (15), partition p1 values less than (31)); -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t22 partition by list($sqlfunc) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -#--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t33 partition by hash($sqlfunc); --enable_abort_on_error ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t44 partition by range(colint) subpartition by hash($sqlfunc) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t55 partition by list(colint) subpartition by hash($sqlfunc) subpartitions 2 @@ -126,7 +118,7 @@ subpartition by hash($sqlfunc) subpartitions 2 partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); ---error 0,ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED,ER_PARSE_ERROR eval alter table t66 partition by range(colint) (partition p0 values less than ($valsqlfunc), diff --git a/mysql-test/suite/parts/inc/partition_check.inc b/mysql-test/suite/parts/inc/partition_check.inc index 698e9611af1..6f03ed58241 100644 --- a/mysql-test/suite/parts/inc/partition_check.inc +++ b/mysql-test/suite/parts/inc/partition_check.inc @@ -156,8 +156,8 @@ if ($run) # partitioning mechanism. # Sideeffect: Attempt to INSERT one record # DUPLICATE KEY will appear if we have UNIQUE columns -# 1022: Can't write; duplicate key in table 't1' UIDX/PK(f_int1) -# 1062: Duplicate entry '2' for key 1 UIDX/PK(f_int2) +# 1022: ER_DUP_KEY +# 1062: ER_DUP_ENTRY --disable_abort_on_error INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) SELECT f_int1, f_int1, CAST(f_int1 AS CHAR), @@ -200,7 +200,8 @@ if ($any_unique) ## 1.3.1 Check, if f_int1 is UNIQUE # Sideeffect: Attempt to INSERT one record # DUPLICATE KEY will appear if we have UNIQUE columns - # 1022: Can't write; duplicate key in table 't1' UIDX/PK + # 1022: ER_DUP_KEY + # 1062: ER_DUP_ENTRY --disable_abort_on_error INSERT INTO t1 (f_int1, f_int2, f_char1, f_char2, f_charbig) SELECT f_int1, 2 * @max_row + f_int1, CAST((2 * @max_row + f_int1) AS CHAR), @@ -494,8 +495,9 @@ WHERE f_charbig = '#SINGLE#' AND f_int1 IN (-1,@cur_value); # 4.7 Insert one record with such a big value for f_int1, so that in case # - f_int1 is used within the partitioning algorithm # - we use range partitioning -# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE (1514) +# we get error ER_NO_PARTITION_FOR_GIVEN_VALUE (1523) # "Table has no partition for value ...." +# or ER_SAME_NAME_PARTITION (1514) --disable_abort_on_error eval INSERT INTO t1 SET f_int1 = @max_int_4 , f_int2 = @max_int_4, f_charbig = '#$max_int_4##'; --enable_abort_on_error @@ -504,11 +506,11 @@ if ($no_debug) --disable_query_log } eval SET @my_errno = $mysql_errno; -let $unexpected_error= `SELECT @my_errno NOT IN (0,1505,1514)`; +let $unexpected_error= `SELECT @my_errno NOT IN (0,1514,1523)`; if ($unexpected_error) { --echo # The last command got an unexepected error response. - --echo # Expected/handled SQL codes are 0,1514 + --echo # Expected/handled SQL codes are 0,1514,1523 SELECT '# SQL code we got was: ' AS "", @my_errno AS ""; --echo # Sorry, have to abort. exit; @@ -555,8 +557,8 @@ INSERT t1 SET f_int1 = 0 , f_int2 = 0, # f1 "=" NULL is a delicate value which might stress the partitioning # mechanism if the result of the expression in the partitioning algorithm # becomes NULL. -# Not: This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX -# 1048: Column 'f_int1' cannot be null +# This INSERT will fail, if f_int1 is PRIMARY KEY or UNIQUE INDEX +# 1048: ER_BAD_NULL_ERROR --disable_abort_on_error INSERT INTO t1 diff --git a/mysql-test/suite/parts/inc/partition_date.inc b/mysql-test/suite/parts/inc/partition_date.inc index b58a7598236..45f9012604c 100644 --- a/mysql-test/suite/parts/inc/partition_date.inc +++ b/mysql-test/suite/parts/inc/partition_date.inc @@ -49,7 +49,7 @@ select * from t2; drop table t2; eval create table t3 (a date not null, primary key(a)) engine=$engine -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -69,7 +69,7 @@ select * from t3; drop table t3; eval create table t4 (a date not null, primary key(a)) engine=$engine -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3), partition quarter2 values in (4,5,6), diff --git a/mysql-test/suite/parts/inc/partition_datetime.inc b/mysql-test/suite/parts/inc/partition_datetime.inc index 94c9d3d75da..e948e827b4e 100644 --- a/mysql-test/suite/parts/inc/partition_datetime.inc +++ b/mysql-test/suite/parts/inc/partition_datetime.inc @@ -46,7 +46,7 @@ select * from t2; drop table t2; eval create table t3 (a datetime not null, primary key(a)) engine=$engine -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -66,7 +66,7 @@ select * from t3; drop table t3; eval create table t4 (a datetime not null, primary key(a)) engine=$engine -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3), partition quarter2 values in (4,5,6), diff --git a/mysql-test/suite/parts/inc/partition_decimal.inc b/mysql-test/suite/parts/inc/partition_decimal.inc index eb35416f395..09eb9b10831 100644 --- a/mysql-test/suite/parts/inc/partition_decimal.inc +++ b/mysql-test/suite/parts/inc/partition_decimal.inc @@ -47,8 +47,15 @@ dec $count; select count(*) from t2; drop table t2; +# Bug 30577: FLOOR() and CEILING() not usable as partition functions +# Partition functions are required to return INT_RESULT; FLOOR() and +# CEILING() do not, unless they have an INT argument. Disable this +# portion of the test until bug 30577 is fixed. + +--disable_parsing + eval create table t3 (a decimal(18,9) not null, primary key(a)) engine=$engine -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 ( +partition by range (floor(a)) subpartition by key (a) subpartitions 2 ( partition pa2 values less than (2), partition pa4 values less than (4), partition pa6 values less than (6), @@ -70,7 +77,7 @@ select count(*) from t3; drop table t3; eval create table t4 (a decimal(18,9) not null, primary key(a)) engine=$engine -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 ( +partition by list (floor(a)) subpartition by key (a) subpartitions 2 ( partition pa2 values in (1,2), partition pa4 values in (3,4), partition pa6 values in (5,6), @@ -90,3 +97,6 @@ dec $count; --enable_query_log select count(*) from t4; drop table t4; + +# Disabled due to Bug 30577 +--enable_parsing diff --git a/mysql-test/suite/parts/inc/partition_directory.inc b/mysql-test/suite/parts/inc/partition_directory.inc index 2c765e1f5ab..17748df4f4d 100644 --- a/mysql-test/suite/parts/inc/partition_directory.inc +++ b/mysql-test/suite/parts/inc/partition_directory.inc @@ -29,9 +29,9 @@ let $partitioning= ; if ($with_partitioning) { let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; +--disable_query_log if ($with_directories) { ---disable_query_log eval SET @aux = 'PARTITION BY HASH(f_int1) PARTITIONS 2 (PARTITION p1 @@ -39,7 +39,6 @@ $index_directory, PARTITION p2 $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } } eval CREATE TABLE t1 ( @@ -47,6 +46,7 @@ $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -54,9 +54,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY KEY +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY KEY(f_int1) PARTITIONS 5'; let $partitioning= `SELECT @aux`; @@ -76,7 +76,6 @@ PARTITION p4, PARTITION p5 $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } } eval CREATE TABLE t1 ( @@ -84,6 +83,7 @@ $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -91,9 +91,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY LIST(MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) @@ -119,6 +119,7 @@ $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -126,9 +127,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE +--disable_query_log if ($with_partitioning) { -#--disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) (PARTITION parta VALUES LESS THAN (0) $index_directory, @@ -143,13 +144,13 @@ $data_directory, PARTITION partf VALUES LESS THAN $MAX_VALUE $index_directory)'; let $partitioning= `SELECT @aux`; -#--enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -157,9 +158,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) @@ -171,13 +172,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE $data_directory $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -185,9 +186,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) (PARTITION part1 VALUES LESS THAN (0) $data_directory @@ -202,13 +203,13 @@ $index_directory PARTITION part4 VALUES LESS THAN $MAX_VALUE (SUBPARTITION subpart41, SUBPARTITION subpart42))'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -216,9 +217,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST -- SUBPARTITION BY HASH +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) (PARTITION part1 VALUES IN (0) @@ -246,13 +247,13 @@ eval SET @aux = $data_directory $index_directory))'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc diff --git a/mysql-test/suite/parts/inc/partition_double.inc b/mysql-test/suite/parts/inc/partition_double.inc index 96cf7fd4871..57be826bac7 100644 --- a/mysql-test/suite/parts/inc/partition_double.inc +++ b/mysql-test/suite/parts/inc/partition_double.inc @@ -48,8 +48,15 @@ select count(*) from t2; drop table t2; +# Bug 30577: FLOOR() and CEILING() not usable as partition functions +# Partition functions are required to return INT_RESULT; FLOOR() and +# CEILING() do not, unless they have an INT argument. Disable this +# portion of the test until bug 30577 is fixed. + +--disable_parsing + eval create table t3 (a double not null, primary key(a)) engine=$engine -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( +partition by range (floor(a)) subpartition by key (a) subpartitions 3 ( partition pa1 values less than (3), partition pa3 values less than (6), partition pa10 values less than (10) @@ -69,7 +76,7 @@ select * from t3; drop table t3; eval create table t4 (a double not null, primary key(a)) engine=$engine -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( +partition by list (floor(a)) subpartition by key (a) subpartitions 3 ( partition pa1 values in (1,2,3), partition pa3 values in (4,5,6), partition pa10 values in (7,8,9,10) @@ -87,3 +94,6 @@ dec $count; select count(*) from t4; select * from t4; drop table t4; + +# Disabled due to Bug 30577 +--enable_parsing diff --git a/mysql-test/suite/parts/inc/partition_enum.inc b/mysql-test/suite/parts/inc/partition_enum.inc index f8fcb1110ae..67e790743f0 100644 --- a/mysql-test/suite/parts/inc/partition_enum.inc +++ b/mysql-test/suite/parts/inc/partition_enum.inc @@ -53,7 +53,7 @@ eval create table t3 (a enum ( 'M','N','O','P','Q','R','S','T','U','V','W','X', 'Y','Z' ) not null, primary key(a)) engine=$engine -partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 ( +partition by range (a) subpartition by key (a) subpartitions 3 ( partition pa9 values less than (10), partition pa18 values less than (19), partition pa27 values less than (28), @@ -72,28 +72,3 @@ select count(*) from t3; select * from t3; drop table t3; -eval create table t4 (a enum ( -'1','2','3','4','5','6','7','8','9','0', -'A','B','C','D','E','F','G','H','I','J','K','L', -'M','N','O','P','Q','R','S','T','U','V','W','X', -'Y','Z' -) not null, primary key(a)) engine=$engine -partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 ( -partition pa9 values in (1,2,3,4,5,6,7,8,9), -partition pa18 values in (10,11,12,13,14,15,16,17,18), -partition pa27 values in (19,20,21,22,23,24,25,26,27), -partition pa36 values in (28,29,30,31,32,33,34,35,36) -); -show create table t4; -let $letter=36; ---echo $count inserts; -#--disable_query_log -while ($letter) -{ -#eval insert into t4 values ($letter); -dec $letter; -} -select count(*) from t4; -select * from t4; -drop table t4; - diff --git a/mysql-test/suite/parts/inc/partition_float.inc b/mysql-test/suite/parts/inc/partition_float.inc index 25c59a10153..45c2f16ac98 100644 --- a/mysql-test/suite/parts/inc/partition_float.inc +++ b/mysql-test/suite/parts/inc/partition_float.inc @@ -51,8 +51,15 @@ dec $count; select count(*) from t2; drop table t2; +# Bug 30577: FLOOR() and CEILING() not usable as partition functions +# Partition functions are required to return INT_RESULT; FLOOR() and +# CEILING() do not, unless they have an INT argument. Disable this +# portion of the test until bug 30577 is fixed. + +--disable_parsing + eval create table t3 (a float not null, primary key(a)) engine=$engine -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( +partition by range (floor(a)) subpartition by key (a) subpartitions 3 ( partition pa1 values less than (3), partition pa3 values less than (6), partition pa10 values less than (10) @@ -72,7 +79,7 @@ select * from t3; drop table t3; eval create table t4 (a float not null, primary key(a)) engine=$engine -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( +partition by list (floor(a)) subpartition by key (a) subpartitions 3 ( partition pa1 values in (1,2,3), partition pa3 values in (4,5,6), partition pa10 values in (7,8,9,10) @@ -90,3 +97,6 @@ dec $count; select count(*) from t4; select * from t4; drop table t4; + +# Disabled due to Bug 30577 +--enable_parsing diff --git a/mysql-test/suite/parts/inc/partition_layout_check1.inc b/mysql-test/suite/parts/inc/partition_layout_check1.inc index fe0d9d138a0..d3441b3d886 100644 --- a/mysql-test/suite/parts/inc/partition_layout_check1.inc +++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc @@ -56,6 +56,7 @@ eval INSERT INTO t0_definition SET state = 'old', file_list = $file_list; # Print the create table statement into the protocol +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR SELECT create_command FROM t0_definition WHERE state = 'old'; if ($do_file_tests) { diff --git a/mysql-test/suite/parts/inc/partition_layout_check2.inc b/mysql-test/suite/parts/inc/partition_layout_check2.inc index c28387cccd0..8a45613559d 100644 --- a/mysql-test/suite/parts/inc/partition_layout_check2.inc +++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc @@ -55,6 +55,7 @@ let $run= `SELECT @aux`; if ($run) { --vertical_results + --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR SELECT state, REPLACE(create_command,'\n',' ') AS "Table definition", REPLACE(file_list ,'\n',' ') AS "File list" diff --git a/mysql-test/suite/parts/inc/partition_methods1.inc b/mysql-test/suite/parts/inc/partition_methods1.inc index bec0c747f28..6e49c51cc3d 100644 --- a/mysql-test/suite/parts/inc/partition_methods1.inc +++ b/mysql-test/suite/parts/inc/partition_methods1.inc @@ -44,9 +44,9 @@ let $partitioning= ; if ($with_partitioning) { let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; +--disable_query_log if ($with_directories) { ---disable_query_log eval SET @aux = 'PARTITION BY HASH(f_int1) PARTITIONS 2 (PARTITION p1 @@ -56,7 +56,6 @@ PARTITION p2 $data_directory $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } } eval CREATE TABLE t1 ( @@ -64,6 +63,7 @@ $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -71,15 +71,14 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY KEY +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY KEY(f_int1) PARTITIONS 5'; let $partitioning= `SELECT @aux`; if ($with_directories) { ---disable_query_log eval SET @aux = 'PARTITION BY HASH(f_int1) PARTITIONS 5 (PARTITION p1 @@ -98,7 +97,6 @@ PARTITION p5 $data_directory $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } } eval CREATE TABLE t1 ( @@ -106,6 +104,7 @@ $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -113,9 +112,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY LIST(MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) @@ -141,6 +140,7 @@ $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -148,9 +148,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE +--disable_query_log if ($with_partitioning) { -#--disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) (PARTITION parta VALUES LESS THAN (0) $data_directory @@ -171,13 +171,13 @@ PARTITION partf VALUES LESS THAN $MAX_VALUE $data_directory $index_directory)'; let $partitioning= `SELECT @aux`; -#--enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -185,9 +185,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) @@ -203,13 +203,13 @@ PARTITION partd VALUES LESS THAN $MAX_VALUE $data_directory $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -217,9 +217,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) (PARTITION part1 VALUES LESS THAN (0) $data_directory @@ -238,13 +238,13 @@ $data_directory $index_directory (SUBPARTITION subpart41, SUBPARTITION subpart42))'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -252,9 +252,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST -- SUBPARTITION BY HASH +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) (PARTITION part1 VALUES IN (0) @@ -290,13 +290,13 @@ eval SET @aux = $data_directory $index_directory))'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc @@ -304,9 +304,9 @@ DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST -- SUBPARTITION BY KEY +--disable_query_log if ($with_partitioning) { ---disable_query_log eval SET @aux = 'PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no @@ -320,13 +320,13 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no $data_directory $index_directory)'; let $partitioning= `SELECT @aux`; ---enable_query_log } eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; +--enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc # --source include/partition_check.inc diff --git a/mysql-test/suite/parts/inc/partition_set.inc b/mysql-test/suite/parts/inc/partition_set.inc index 76fc1aea4ba..292a28e7e1a 100644 --- a/mysql-test/suite/parts/inc/partition_set.inc +++ b/mysql-test/suite/parts/inc/partition_set.inc @@ -43,41 +43,3 @@ insert into t2 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8' select count(*) from t2; select * from t2 order by a; drop table t2; - -eval create table t3 (a set ( -'1','2','3','4','5','6','7','8','9','0' -) not null, primary key(a)) engine=$engine -partition by range (cast(a as unsigned)) subpartition by key (a) subpartitions 3 ( -partition pa9 values less than (10), -partition pa18 values less than (19), -partition pa27 values less than (28), -partition pa36 values less than (37), -partition pa64 values less than (65), -partition pa128 values less than (129), -partition pa256 values less than (257), -partition pa512 values less than (513), -partition pa768 values less than (769), -partition pa1024 values less than (1025) -); -show create table t3; -#insert into t3 values ('1'),('2'),('3'),('4'),('5'),('6'),('7'),('8'),('9'),('0'); -#insert into t3 values ('1,2'),('2,3'),('3,4'),('4,5'),('5,6'),('6,7'),('7,8'),('8,9'),('9,0'),('0,1'); -#insert into t3 values ('1,2,3'),('2,3,4'),('3,4,5'),('4,5,6'),('5,6,7'),('6,7,8'),('7,8,9'),('8,9,0'),('9,0,1'),('0,1,2'); -select count(*) from t3; -select * from t3 order by a; -drop table t3; - -eval create table t4 (a set ( -'1','2','3') not null, primary key(a)) engine=$engine -partition by list (cast(a as unsigned)) subpartition by key (a) subpartitions 3 ( -partition pa9 values in (1,2,3,4,5,6,7,8,9), -partition pa18 values in (10,11,12,13,14,15,16,17,18), -partition pa27 values in (19,20,21,22,23,24,25,26,27) -); -show create table t4; -#insert into t4 values ('1'),('2'),('3'); -#insert into t4 values ('1,2'),('2,3'),('3,1'); -#insert into t4 values ('1,2,3'); -select count(*) from t4; -select * from t4 order by a; -drop table t4; diff --git a/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc b/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc index a26e6650893..0f30fd199f8 100644 --- a/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc +++ b/mysql-test/suite/parts/inc/partition_supported_sql_funcs.inc @@ -83,14 +83,9 @@ eval insert into t3 values ($val1); eval insert into t3 values ($val2); eval insert into t3 values ($val3); ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$infile' into table t4; - ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$infile' into table t5; - ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval load data infile '$MYSQL_TEST_DIR/suite/parts/inc/$infile' into table t6; +eval load data infile '../std_data_ln/parts/$infile' into table t4; +eval load data infile '../std_data_ln/parts/$infile' into table t5; +eval load data infile '../std_data_ln/parts/$infile' into table t6; eval select $sqlfunc from t1 order by col1; diff --git a/mysql-test/suite/parts/inc/partition_syntax.inc b/mysql-test/suite/parts/inc/partition_syntax.inc index 3c53861b95b..a2a29d25e48 100644 --- a/mysql-test/suite/parts/inc/partition_syntax.inc +++ b/mysql-test/suite/parts/inc/partition_syntax.inc @@ -331,13 +331,13 @@ $column_list PARTITION BY RANGE(f_int1) ( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); ---echo # 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed +--echo # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed --error 1064 eval CREATE TABLE t1 ( $column_list ) PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); --echo # 3.5.2 NULL in LIST partitioning clause --echo # 3.5.2.1 VALUE IN (NULL) @@ -349,14 +349,14 @@ PARTITION BY LIST(MOD(f_int1,2)) PARTITION part2 VALUES IN (0), PARTITION part3 VALUES IN (1)); DROP TABLE t1; ---echo # 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) +--echo # 3.5.2.2 VALUE IN (NULL) # Attention: It is intended that there is no partition with # VALUES IN (0), because there was a time where NULL was treated as zero eval CREATE TABLE t1 ( $column_list ) PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES IN (NULL), PARTITION part3 VALUES IN (1)); --source suite/parts/inc/partition_layout_check1.inc # --source include/partition_layout_check1.inc @@ -368,7 +368,7 @@ eval CREATE TABLE t1 ( $column_list ) PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES IN (NULL), PARTITION part2 VALUES IN (0), PARTITION part3 VALUES IN (1)); --source suite/parts/inc/partition_layout_check1.inc diff --git a/mysql-test/suite/parts/inc/partition_syntax_1.inc b/mysql-test/suite/parts/inc/partition_syntax_1.inc index ac88b5ee668..e3e1b3ccbb7 100644 --- a/mysql-test/suite/parts/inc/partition_syntax_1.inc +++ b/mysql-test/suite/parts/inc/partition_syntax_1.inc @@ -28,15 +28,15 @@ eval SET @my_errno= $mysql_errno ; let $run= `SELECT @my_errno = 0`; # Expected error codes are # 0 -# 1064 ERROR 42000: You have an error in your SQL syntax -# Reason: assign -1 partitions -# 1486 ERROR HY000: Too many partitions (including subpartitions) were defined -# 1491 ERROR HY000: Number of partitions = 0 is not an allowed value -let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1487,1492)`; +# 1064 ER_PARSE_ERROR +# Reason: assign -1 partitions +# 1496 ER_TOO_MANY_PARTITIONS_ERROR +# 1501 ER_NO_PARTS_ERROR +let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`; if ($unexpected_error) { --echo # The last command got an unexepected error response. - --echo # Expected/handled SQL codes are 0,1064,1487,1492 + --echo # Expected/handled SQL codes are 0,1064,1496,1501 SELECT '# SQL code we got was: ' AS "", @my_errno AS ""; --echo # Sorry, have to abort. exit; @@ -66,15 +66,15 @@ eval SET @my_errno= $mysql_errno ; let $run= `SELECT @my_errno = 0`; # Expected error codes are # 0 -# 1064 ERROR 42000: You have an error in your SQL syntax -# Reason: assign -1 subpartitions -# 1487 ERROR HY000: Too many partitions (including subpartitions) were defined -# 1492 ERROR HY000: Number of partitions = 0 is not an allowed value -let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1487,1492)`; +# 1064 ER_PARSE_ERROR +# Reason: assign -1 partitions +# 1496 ER_TOO_MANY_PARTITIONS_ERROR +# 1501 ER_NO_PARTS_ERROR +let $unexpected_error= `SELECT @my_errno NOT IN (0,1064,1496,1501)`; if ($unexpected_error) { --echo # The last command got an unexepected error response. - --echo # Expected/handled SQL codes are 0,1064,1487,1492 + --echo # Expected/handled SQL codes are 0,1064,1496,1501 SELECT '# SQL code we got was: ' AS "", @my_errno AS ""; --echo # Sorry, have to abort. exit; diff --git a/mysql-test/suite/parts/inc/partition_time.inc b/mysql-test/suite/parts/inc/partition_time.inc index a3388bdc902..a3f49a156fe 100644 --- a/mysql-test/suite/parts/inc/partition_time.inc +++ b/mysql-test/suite/parts/inc/partition_time.inc @@ -46,7 +46,7 @@ select * from t2; drop table t2; eval create table t3 (a time not null, primary key(a)) engine=$engine -partition by range (cast(second(a) as unsigned)) subpartition by key (a) +partition by range (second(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (16), partition quarter2 values less than (31), @@ -66,7 +66,7 @@ select * from t3; drop table t3; eval create table t4 (a time not null, primary key(a)) engine=$engine -partition by list (cast(second(a) as unsigned)) subpartition by key (a) +partition by list (second(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), partition quarter2 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), diff --git a/mysql-test/suite/parts/inc/partition_timestamp.inc b/mysql-test/suite/parts/inc/partition_timestamp.inc index 44eb3b5bd55..d4b1699d6c5 100644 --- a/mysql-test/suite/parts/inc/partition_timestamp.inc +++ b/mysql-test/suite/parts/inc/partition_timestamp.inc @@ -46,7 +46,7 @@ select * from t2; drop table t2; eval create table t3 (a timestamp not null, primary key(a)) engine=$engine -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -66,7 +66,7 @@ select * from t3; drop table t3; eval create table t4 (a timestamp not null, primary key(a)) engine=$engine -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (0,1,2,3), partition quarter2 values in (4,5,6), diff --git a/mysql-test/suite/parts/inc/partition_value.inc b/mysql-test/suite/parts/inc/partition_value.inc index 75e9afd53d3..58691752bdf 100644 --- a/mysql-test/suite/parts/inc/partition_value.inc +++ b/mysql-test/suite/parts/inc/partition_value.inc @@ -12,6 +12,16 @@ # Change: # ################################################################################ + +--echo +--echo This test relies on the CAST() function for partitioning, which +--echo is not allowed. Not deleting it yet, as it may have some useful +--echo bits in it. See Bug #30581, "partition_value tests use disallowed +--echo CAST() function" +--echo + +--disable_parsing + --echo --echo #======================================================================== --echo # Calculation of "exotic" results within the partition function @@ -155,3 +165,5 @@ VALUES(NULL,NULL,NULL,NULL,NULL); eval SELECT COUNT(*) = 1 FROM t1 WHERE f_char2 IS NULL; DROP TABLE t1; # + +--enable_parsing diff --git a/mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result b/mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result index 675cebaa7e3..57a7b2189ba 100644 --- a/mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result +++ b/mysql-test/suite/parts/r/part_blocked_sql_func_innodb.result @@ -2,9 +2,205 @@ --- All SQL functions should be rejected, otherwise BUG (see 18198) ------------------------------------------------------------------------- ------------------------------------------------------------------------- +--- ascii(col1) in partition with coltype char(30) +------------------------------------------------------------------------- +must all fail! +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +create table t1 (col1 char(30)) engine='INNODB' +partition by range(ascii(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t2 (col1 char(30)) engine='INNODB' +partition by list(ascii(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t3 (col1 char(30)) engine='INNODB' +partition by hash(ascii(col1)); +Got one of the listed errors +create table t4 (colint int, col1 char(30)) engine='INNODB' +partition by range(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t5 (colint int, col1 char(30)) engine='INNODB' +partition by list(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t6 (colint int, col1 char(30)) engine='INNODB' +partition by range(colint) +(partition p0 values less than (ascii('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 (col1 char(30)) engine='INNODB' ; +create table t22 (col1 char(30)) engine='INNODB' ; +create table t33 (col1 char(30)) engine='INNODB' ; +create table t44 (colint int, col1 char(30)) engine='INNODB' ; +create table t55 (colint int, col1 char(30)) engine='INNODB' ; +create table t66 (colint int, col1 char(30)) engine='INNODB' ; +alter table t11 +partition by range(ascii(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t22 +partition by list(ascii(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t33 +partition by hash(ascii(col1)); +Got one of the listed errors +alter table t44 +partition by range(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t55 +partition by list(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t66 +partition by range(colint) +(partition p0 values less than (ascii('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- +--- ord(col1) in partition with coltype char(30) +------------------------------------------------------------------------- +must all fail! +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +create table t1 (col1 char(30)) engine='INNODB' +partition by range(ord(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t2 (col1 char(30)) engine='INNODB' +partition by list(ord(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t3 (col1 char(30)) engine='INNODB' +partition by hash(ord(col1)); +Got one of the listed errors +create table t4 (colint int, col1 char(30)) engine='INNODB' +partition by range(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t5 (colint int, col1 char(30)) engine='INNODB' +partition by list(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t6 (colint int, col1 char(30)) engine='INNODB' +partition by range(colint) +(partition p0 values less than (ord('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 (col1 char(30)) engine='INNODB' ; +create table t22 (col1 char(30)) engine='INNODB' ; +create table t33 (col1 char(30)) engine='INNODB' ; +create table t44 (colint int, col1 char(30)) engine='INNODB' ; +create table t55 (colint int, col1 char(30)) engine='INNODB' ; +create table t66 (colint int, col1 char(30)) engine='INNODB' ; +alter table t11 +partition by range(ord(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t22 +partition by list(ord(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t33 +partition by hash(ord(col1)); +Got one of the listed errors +alter table t44 +partition by range(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t55 +partition by list(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t66 +partition by range(colint) +(partition p0 values less than (ord('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- --- greatest(col1,15) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -15,28 +211,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(greatest(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(greatest(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(greatest(col1,15)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (greatest(1,15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -53,28 +255,34 @@ alter table t11 partition by range(greatest(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(greatest(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(greatest(col1,15)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (greatest(1,15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -90,7 +298,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- isnull(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -101,28 +309,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(isnull(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(isnull(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(isnull(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (isnull(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -139,28 +353,34 @@ alter table t11 partition by range(isnull(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(isnull(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(isnull(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (isnull(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -176,7 +396,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- least(col1,15) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -187,28 +407,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(least(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(least(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(least(col1,15)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (least(15,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -225,28 +451,34 @@ alter table t11 partition by range(least(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(least(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(least(col1,15)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (least(15,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -262,7 +494,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- case when col1>15 then 20 else 10 end in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -273,28 +505,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(case when col1>15 then 20 else 10 end) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(case when col1>15 then 20 else 10 end) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(case when col1>15 then 20 else 10 end); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (case when 1>30 then 20 else 15 end), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -311,28 +549,34 @@ alter table t11 partition by range(case when col1>15 then 20 else 10 end) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(case when col1>15 then 20 else 10 end) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(case when col1>15 then 20 else 10 end); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (case when 1>30 then 20 else 15 end), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -348,7 +592,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- ifnull(col1,30) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -359,28 +603,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(ifnull(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(ifnull(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(ifnull(col1,30)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (ifnull(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -397,28 +647,34 @@ alter table t11 partition by range(ifnull(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(ifnull(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(ifnull(col1,30)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (ifnull(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -434,7 +690,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- nullif(col1,30) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -445,28 +701,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(nullif(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(nullif(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(nullif(col1,30)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (nullif(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -483,28 +745,34 @@ alter table t11 partition by range(nullif(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(nullif(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(nullif(col1,30)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (nullif(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -520,7 +788,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- bit_length(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -531,28 +799,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(bit_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -569,28 +843,34 @@ alter table t11 partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(bit_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -606,7 +886,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- bit_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -617,28 +897,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(bit_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -655,28 +941,34 @@ alter table t11 partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(bit_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -692,7 +984,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- char_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -703,28 +995,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(char_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(char_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(char_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (char_length('a')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -741,28 +1039,34 @@ alter table t11 partition by range(char_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(char_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(char_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (char_length('a')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -778,7 +1082,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- character_length(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -789,28 +1093,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(character_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -827,28 +1137,34 @@ alter table t11 partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(character_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -864,7 +1180,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- character_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -875,28 +1191,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(character_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -913,28 +1235,34 @@ alter table t11 partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(character_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -950,7 +1278,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- instr(col1,'acb') in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -961,28 +1289,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(instr(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -999,28 +1333,34 @@ alter table t11 partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(instr(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1036,7 +1376,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- instr(col1,'acb') in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1047,28 +1387,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(instr(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1085,28 +1431,34 @@ alter table t11 partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(instr(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1122,7 +1474,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- length(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1133,28 +1485,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(length(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1171,28 +1529,34 @@ alter table t11 partition by range(length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1208,7 +1572,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- locate('a',col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1219,28 +1583,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(locate('a',col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1257,28 +1627,34 @@ alter table t11 partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(locate('a',col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1294,7 +1670,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- locate('a',col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1305,28 +1681,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(locate('a',col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1343,28 +1725,34 @@ alter table t11 partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(locate('a',col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1380,7 +1768,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- octet_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1391,28 +1779,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(octet_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(octet_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(octet_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (octet_length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1429,28 +1823,34 @@ alter table t11 partition by range(octet_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(octet_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(octet_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (octet_length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1466,7 +1866,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- position('a' in col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1477,28 +1877,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(position('a' in col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1515,28 +1921,34 @@ alter table t11 partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(position('a' in col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1552,7 +1964,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- position('a' in col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1563,28 +1975,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(position('a' in col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1601,28 +2019,34 @@ alter table t11 partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(position('a' in col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1638,7 +2062,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- strcmp(col1,'acb') in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1649,28 +2073,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(strcmp(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1687,28 +2117,34 @@ alter table t11 partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(strcmp(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1724,7 +2160,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- strcmp(col1,'acb') in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1735,28 +2171,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(strcmp(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1773,28 +2215,34 @@ alter table t11 partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(strcmp(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1810,7 +2258,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- crc32(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1821,28 +2269,34 @@ create table t1 (col1 char(30)) engine='INNODB' partition by range(crc32(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='INNODB' partition by list(crc32(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='INNODB' partition by hash(crc32(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='INNODB' partition by list(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (crc32('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1859,28 +2313,34 @@ alter table t11 partition by range(crc32(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(crc32(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(crc32(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (crc32('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1896,7 +2356,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- round(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1907,28 +2367,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(round(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(round(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(round(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (round(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1945,28 +2411,34 @@ alter table t11 partition by range(round(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(round(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(round(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (round(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1982,7 +2454,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- sign(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1993,28 +2465,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(sign(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(sign(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(sign(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (sign(123)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2031,114 +2509,34 @@ alter table t11 partition by range(sign(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(sign(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(sign(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (sign(123)), partition p1 values less than maxvalue); -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- datediff(col1,col1) in partition with coltype datetime -------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -create table t1 (col1 datetime) engine='INNODB' -partition by range(datediff(col1,col1)) -(partition p0 values less than (15), -partition p1 values less than (31)); -create table t2 (col1 datetime) engine='INNODB' -partition by list(datediff(col1,col1)) -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -create table t3 (col1 datetime) engine='INNODB' -partition by hash(datediff(col1,col1)); -create table t4 (colint int, col1 datetime) engine='INNODB' -partition by range(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than (31)); -create table t5 (colint int, col1 datetime) engine='INNODB' -partition by list(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -create table t6 (colint int, col1 datetime) engine='INNODB' -partition by range(colint) -(partition p0 values less than (datediff('1997-11-30 23:59:59','1997-12-31')), -partition p1 values less than maxvalue); -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 (col1 datetime) engine='INNODB' ; -create table t22 (col1 datetime) engine='INNODB' ; -create table t33 (col1 datetime) engine='INNODB' ; -create table t44 (colint int, col1 datetime) engine='INNODB' ; -create table t55 (colint int, col1 datetime) engine='INNODB' ; -create table t66 (colint int, col1 datetime) engine='INNODB' ; -alter table t11 -partition by range(datediff(col1,col1)) -(partition p0 values less than (15), -partition p1 values less than (31)); -alter table t22 -partition by list(datediff(col1,col1)) -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -alter table t33 -partition by hash(datediff(col1,col1)); -alter table t44 -partition by range(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than (31)); -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -alter table t66 -partition by range(colint) -(partition p0 values less than (datediff('1997-11-30 23:59:59','1997-12-31')), -partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2154,7 +2552,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- period_add(col1,5) in partition with coltype datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2165,28 +2563,34 @@ create table t1 (col1 datetime) engine='INNODB' partition by range(period_add(col1,5)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime) engine='INNODB' partition by list(period_add(col1,5)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime) engine='INNODB' partition by hash(period_add(col1,5)); +Got one of the listed errors create table t4 (colint int, col1 datetime) engine='INNODB' partition by range(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime) engine='INNODB' partition by list(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime) engine='INNODB' partition by range(colint) (partition p0 values less than (period_add(9804,5)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2203,28 +2607,34 @@ alter table t11 partition by range(period_add(col1,5)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(period_add(col1,5)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(period_add(col1,5)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (period_add(9804,5)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2240,7 +2650,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- period_diff(col1,col2) in partition with coltype datetime,col2 datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2251,28 +2661,34 @@ create table t1 (col1 datetime,col2 datetime) engine='INNODB' partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime,col2 datetime) engine='INNODB' partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime,col2 datetime) engine='INNODB' partition by hash(period_diff(col1,col2)); +Got one of the listed errors create table t4 (colint int, col1 datetime,col2 datetime) engine='INNODB' partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime,col2 datetime) engine='INNODB' partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime,col2 datetime) engine='INNODB' partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2289,28 +2705,34 @@ alter table t11 partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(period_diff(col1,col2)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2326,7 +2748,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- period_diff(col1,col2) in partition with coltype int,col2 int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2337,28 +2759,34 @@ create table t1 (col1 int,col2 int) engine='INNODB' partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int,col2 int) engine='INNODB' partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int,col2 int) engine='INNODB' partition by hash(period_diff(col1,col2)); +Got one of the listed errors create table t4 (colint int, col1 int,col2 int) engine='INNODB' partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int,col2 int) engine='INNODB' partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int,col2 int) engine='INNODB' partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2375,28 +2803,34 @@ alter table t11 partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(period_diff(col1,col2)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2412,7 +2846,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- timestampdiff(day,5,col1) in partition with coltype datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2423,28 +2857,34 @@ create table t1 (col1 datetime) engine='INNODB' partition by range(timestampdiff(day,5,col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime) engine='INNODB' partition by list(timestampdiff(day,5,col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime) engine='INNODB' partition by hash(timestampdiff(day,5,col1)); +Got one of the listed errors create table t4 (colint int, col1 datetime) engine='INNODB' partition by range(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime) engine='INNODB' partition by list(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime) engine='INNODB' partition by range(colint) (partition p0 values less than (timestampdiff(YEAR,'2002-05-01','2001-01-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2461,28 +2901,34 @@ alter table t11 partition by range(timestampdiff(day,5,col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(timestampdiff(day,5,col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(timestampdiff(day,5,col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (timestampdiff(YEAR,'2002-05-01','2001-01-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2498,7 +2944,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- unix_timestamp(col1) in partition with coltype date ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2509,28 +2955,34 @@ create table t1 (col1 date) engine='INNODB' partition by range(unix_timestamp(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 date) engine='INNODB' partition by list(unix_timestamp(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 date) engine='INNODB' partition by hash(unix_timestamp(col1)); +Got one of the listed errors create table t4 (colint int, col1 date) engine='INNODB' partition by range(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 date) engine='INNODB' partition by list(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 date) engine='INNODB' partition by range(colint) (partition p0 values less than (unix_timestamp ('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2547,28 +2999,34 @@ alter table t11 partition by range(unix_timestamp(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(unix_timestamp(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(unix_timestamp(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (unix_timestamp ('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2584,7 +3042,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- week(col1) in partition with coltype datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2595,28 +3053,34 @@ create table t1 (col1 datetime) engine='INNODB' partition by range(week(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime) engine='INNODB' partition by list(week(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime) engine='INNODB' partition by hash(week(col1)); +Got one of the listed errors create table t4 (colint int, col1 datetime) engine='INNODB' partition by range(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime) engine='INNODB' partition by list(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime) engine='INNODB' partition by range(colint) (partition p0 values less than (week('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2633,28 +3097,132 @@ alter table t11 partition by range(week(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(week(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(week(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (week('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- +--- weekofyear(col1) in partition with coltype datetime +------------------------------------------------------------------------- +must all fail! +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +create table t1 (col1 datetime) engine='INNODB' +partition by range(weekofyear(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t2 (col1 datetime) engine='INNODB' +partition by list(weekofyear(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t3 (col1 datetime) engine='INNODB' +partition by hash(weekofyear(col1)); +Got one of the listed errors +create table t4 (colint int, col1 datetime) engine='INNODB' +partition by range(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t5 (colint int, col1 datetime) engine='INNODB' +partition by list(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t6 (colint int, col1 datetime) engine='INNODB' +partition by range(colint) +(partition p0 values less than (weekofyear('2002-05-01')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 (col1 datetime) engine='INNODB' ; +create table t22 (col1 datetime) engine='INNODB' ; +create table t33 (col1 datetime) engine='INNODB' ; +create table t44 (colint int, col1 datetime) engine='INNODB' ; +create table t55 (colint int, col1 datetime) engine='INNODB' ; +create table t66 (colint int, col1 datetime) engine='INNODB' ; +alter table t11 +partition by range(weekofyear(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t22 +partition by list(weekofyear(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t33 +partition by hash(weekofyear(col1)); +Got one of the listed errors +alter table t44 +partition by range(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t55 +partition by list(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t66 +partition by range(colint) +(partition p0 values less than (weekofyear('2002-05-01')), +partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2670,7 +3238,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- cast(col1 as signed) in partition with coltype varchar(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2681,28 +3249,34 @@ create table t1 (col1 varchar(30)) engine='INNODB' partition by range(cast(col1 as signed)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 varchar(30)) engine='INNODB' partition by list(cast(col1 as signed)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 varchar(30)) engine='INNODB' partition by hash(cast(col1 as signed)); +Got one of the listed errors create table t4 (colint int, col1 varchar(30)) engine='INNODB' partition by range(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 varchar(30)) engine='INNODB' partition by list(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 varchar(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (cast(123 as signed)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2719,28 +3293,34 @@ alter table t11 partition by range(cast(col1 as signed)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(cast(col1 as signed)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(cast(col1 as signed)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (cast(123 as signed)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2756,7 +3336,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- convert(col1,unsigned) in partition with coltype varchar(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2767,28 +3347,34 @@ create table t1 (col1 varchar(30)) engine='INNODB' partition by range(convert(col1,unsigned)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 varchar(30)) engine='INNODB' partition by list(convert(col1,unsigned)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 varchar(30)) engine='INNODB' partition by hash(convert(col1,unsigned)); +Got one of the listed errors create table t4 (colint int, col1 varchar(30)) engine='INNODB' partition by range(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 varchar(30)) engine='INNODB' partition by list(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 varchar(30)) engine='INNODB' partition by range(colint) (partition p0 values less than (convert(123,unsigned)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2805,28 +3391,34 @@ alter table t11 partition by range(convert(col1,unsigned)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(convert(col1,unsigned)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(convert(col1,unsigned)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (convert(123,unsigned)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2842,7 +3434,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 | 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2853,28 +3445,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(col1 | 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(col1 | 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(col1 | 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (10 | 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2891,28 +3489,34 @@ alter table t11 partition by range(col1 | 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 | 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 | 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 | 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2928,7 +3532,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 & 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2939,28 +3543,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(col1 & 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(col1 & 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(col1 & 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (10 & 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2977,28 +3587,34 @@ alter table t11 partition by range(col1 & 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 & 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 & 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 & 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3014,7 +3630,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 ^ 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3025,28 +3641,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(col1 ^ 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(col1 ^ 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(col1 ^ 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (10 ^ 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3063,28 +3685,34 @@ alter table t11 partition by range(col1 ^ 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 ^ 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 ^ 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 ^ 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3100,7 +3728,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 << 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3111,28 +3739,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(col1 << 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(col1 << 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(col1 << 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (10 << 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3149,28 +3783,34 @@ alter table t11 partition by range(col1 << 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 << 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 << 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 << 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3186,7 +3826,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 >> 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3197,28 +3837,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(col1 >> 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(col1 >> 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(col1 >> 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (10 >> 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3235,28 +3881,34 @@ alter table t11 partition by range(col1 >> 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 >> 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 >> 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 >> 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3272,7 +3924,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- ~col1 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3283,28 +3935,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(~col1) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(~col1) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(~col1); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (~20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3321,28 +3979,34 @@ alter table t11 partition by range(~col1) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(~col1) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(~col1); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (~20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3358,7 +4022,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- bit_count(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3369,28 +4033,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(bit_count(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(bit_count(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(bit_count(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (bit_count(20)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3407,28 +4077,34 @@ alter table t11 partition by range(bit_count(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(bit_count(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(bit_count(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_count(20)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3444,7 +4120,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- inet_aton(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3455,28 +4131,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(inet_aton(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(inet_aton(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(inet_aton(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (inet_aton('192.168.1.1')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3493,28 +4175,34 @@ alter table t11 partition by range(inet_aton(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(inet_aton(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(inet_aton(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (inet_aton('192.168.1.1')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3531,7 +4219,7 @@ set @var =20; ------------------------------------------------------------------------- --- bit_length(col1)+@var-@var in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3542,35 +4230,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(bit_length(col1)+@var-@var) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(bit_length(col1)+@var-@var) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(bit_length(col1)+@var-@var); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (bit_length(20)+@var-@var), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3587,35 +4274,34 @@ alter table t11 partition by range(bit_length(col1)+@var-@var) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors alter table t22 partition by list(bit_length(col1)+@var-@var) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors alter table t33 partition by hash(bit_length(col1)+@var-@var); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_length(20)+@var-@var), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3652,7 +4338,7 @@ end// ------------------------------------------------------------------------- --- getmaxsigned_t1(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3663,35 +4349,34 @@ create table t1 (col1 int) engine='INNODB' partition by range(getmaxsigned_t1(col1)) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors create table t2 (col1 int) engine='INNODB' partition by list(getmaxsigned_t1(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors create table t3 (col1 int) engine='INNODB' partition by hash(getmaxsigned_t1(col1)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) (partition p0 values less than (getmaxsigned(10)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3708,35 +4393,34 @@ alter table t11 partition by range(getmaxsigned_t1(col1)) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors alter table t22 partition by list(getmaxsigned_t1(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors alter table t33 partition by hash(getmaxsigned_t1(col1)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (getmaxsigned(10)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; diff --git a/mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result b/mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result index 8b0ea1d3d49..4a67054e82a 100644 --- a/mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result +++ b/mysql-test/suite/parts/r/part_blocked_sql_func_myisam.result @@ -2,9 +2,205 @@ --- All SQL functions should be rejected, otherwise BUG (see 18198) ------------------------------------------------------------------------- ------------------------------------------------------------------------- +--- ascii(col1) in partition with coltype char(30) +------------------------------------------------------------------------- +must all fail! +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +create table t1 (col1 char(30)) engine='MYISAM' +partition by range(ascii(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t2 (col1 char(30)) engine='MYISAM' +partition by list(ascii(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t3 (col1 char(30)) engine='MYISAM' +partition by hash(ascii(col1)); +Got one of the listed errors +create table t4 (colint int, col1 char(30)) engine='MYISAM' +partition by range(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t5 (colint int, col1 char(30)) engine='MYISAM' +partition by list(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t6 (colint int, col1 char(30)) engine='MYISAM' +partition by range(colint) +(partition p0 values less than (ascii('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 (col1 char(30)) engine='MYISAM' ; +create table t22 (col1 char(30)) engine='MYISAM' ; +create table t33 (col1 char(30)) engine='MYISAM' ; +create table t44 (colint int, col1 char(30)) engine='MYISAM' ; +create table t55 (colint int, col1 char(30)) engine='MYISAM' ; +create table t66 (colint int, col1 char(30)) engine='MYISAM' ; +alter table t11 +partition by range(ascii(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t22 +partition by list(ascii(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t33 +partition by hash(ascii(col1)); +Got one of the listed errors +alter table t44 +partition by range(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t55 +partition by list(colint) +subpartition by hash(ascii(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t66 +partition by range(colint) +(partition p0 values less than (ascii('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- +--- ord(col1) in partition with coltype char(30) +------------------------------------------------------------------------- +must all fail! +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +create table t1 (col1 char(30)) engine='MYISAM' +partition by range(ord(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t2 (col1 char(30)) engine='MYISAM' +partition by list(ord(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t3 (col1 char(30)) engine='MYISAM' +partition by hash(ord(col1)); +Got one of the listed errors +create table t4 (colint int, col1 char(30)) engine='MYISAM' +partition by range(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t5 (colint int, col1 char(30)) engine='MYISAM' +partition by list(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t6 (colint int, col1 char(30)) engine='MYISAM' +partition by range(colint) +(partition p0 values less than (ord('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 (col1 char(30)) engine='MYISAM' ; +create table t22 (col1 char(30)) engine='MYISAM' ; +create table t33 (col1 char(30)) engine='MYISAM' ; +create table t44 (colint int, col1 char(30)) engine='MYISAM' ; +create table t55 (colint int, col1 char(30)) engine='MYISAM' ; +create table t66 (colint int, col1 char(30)) engine='MYISAM' ; +alter table t11 +partition by range(ord(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t22 +partition by list(ord(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t33 +partition by hash(ord(col1)); +Got one of the listed errors +alter table t44 +partition by range(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t55 +partition by list(colint) +subpartition by hash(ord(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t66 +partition by range(colint) +(partition p0 values less than (ord('a')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- --- greatest(col1,15) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -15,28 +211,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(greatest(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(greatest(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(greatest(col1,15)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (greatest(1,15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -53,28 +255,34 @@ alter table t11 partition by range(greatest(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(greatest(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(greatest(col1,15)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(greatest(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (greatest(1,15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -90,7 +298,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- isnull(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -101,28 +309,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(isnull(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(isnull(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(isnull(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (isnull(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -139,28 +353,34 @@ alter table t11 partition by range(isnull(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(isnull(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(isnull(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(isnull(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (isnull(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -176,7 +396,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- least(col1,15) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -187,28 +407,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(least(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(least(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(least(col1,15)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (least(15,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -225,28 +451,34 @@ alter table t11 partition by range(least(col1,15)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(least(col1,15)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(least(col1,15)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(least(col1,15)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (least(15,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -262,7 +494,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- case when col1>15 then 20 else 10 end in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -273,28 +505,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(case when col1>15 then 20 else 10 end) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(case when col1>15 then 20 else 10 end) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(case when col1>15 then 20 else 10 end); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (case when 1>30 then 20 else 15 end), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -311,28 +549,34 @@ alter table t11 partition by range(case when col1>15 then 20 else 10 end) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(case when col1>15 then 20 else 10 end) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(case when col1>15 then 20 else 10 end); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(case when col1>15 then 20 else 10 end) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (case when 1>30 then 20 else 15 end), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -348,7 +592,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- ifnull(col1,30) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -359,28 +603,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(ifnull(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(ifnull(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(ifnull(col1,30)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (ifnull(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -397,28 +647,34 @@ alter table t11 partition by range(ifnull(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(ifnull(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(ifnull(col1,30)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(ifnull(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (ifnull(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -434,7 +690,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- nullif(col1,30) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -445,28 +701,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(nullif(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(nullif(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(nullif(col1,30)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (nullif(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -483,28 +745,34 @@ alter table t11 partition by range(nullif(col1,30)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(nullif(col1,30)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(nullif(col1,30)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(nullif(col1,30)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (nullif(1,30)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -520,7 +788,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- bit_length(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -531,28 +799,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(bit_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -569,28 +843,34 @@ alter table t11 partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(bit_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -606,7 +886,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- bit_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -617,28 +897,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(bit_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -655,28 +941,34 @@ alter table t11 partition by range(bit_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(bit_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(bit_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_length(255)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -692,7 +984,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- char_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -703,28 +995,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(char_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(char_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(char_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (char_length('a')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -741,28 +1039,34 @@ alter table t11 partition by range(char_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(char_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(char_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(char_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (char_length('a')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -778,7 +1082,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- character_length(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -789,28 +1093,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(character_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -827,28 +1137,34 @@ alter table t11 partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(character_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -864,7 +1180,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- character_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -875,28 +1191,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(character_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -913,28 +1235,34 @@ alter table t11 partition by range(character_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(character_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(character_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(character_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (find_in_set('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -950,7 +1278,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- instr(col1,'acb') in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -961,28 +1289,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(instr(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -999,28 +1333,34 @@ alter table t11 partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(instr(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1036,7 +1376,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- instr(col1,'acb') in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1047,28 +1387,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(instr(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1085,28 +1431,34 @@ alter table t11 partition by range(instr(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(instr(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(instr(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(instr(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (instr('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1122,7 +1474,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- length(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1133,28 +1485,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(length(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1171,28 +1529,34 @@ alter table t11 partition by range(length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1208,7 +1572,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- locate('a',col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1219,28 +1583,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(locate('a',col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1257,28 +1627,34 @@ alter table t11 partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(locate('a',col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1294,7 +1670,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- locate('a',col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1305,28 +1681,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(locate('a',col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1343,28 +1725,34 @@ alter table t11 partition by range(locate('a',col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(locate('a',col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(locate('a',col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(locate('a',col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (locate('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1380,7 +1768,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- octet_length(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1391,28 +1779,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(octet_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(octet_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(octet_length(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (octet_length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1429,28 +1823,34 @@ alter table t11 partition by range(octet_length(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(octet_length(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(octet_length(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(octet_length(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (octet_length('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1466,7 +1866,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- position('a' in col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1477,28 +1877,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(position('a' in col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1515,28 +1921,34 @@ alter table t11 partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(position('a' in col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1552,7 +1964,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- position('a' in col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1563,28 +1975,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(position('a' in col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1601,28 +2019,34 @@ alter table t11 partition by range(position('a' in col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(position('a' in col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(position('a' in col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(position('a' in col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (position('i' in 'a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1638,7 +2062,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- strcmp(col1,'acb') in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1649,28 +2073,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(strcmp(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1687,28 +2117,34 @@ alter table t11 partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(strcmp(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1724,7 +2160,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- strcmp(col1,'acb') in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1735,28 +2171,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(strcmp(col1,'acb')); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1773,28 +2215,34 @@ alter table t11 partition by range(strcmp(col1,'acb')) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(strcmp(col1,'acb')) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(strcmp(col1,'acb')); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(strcmp(col1,'acb')) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (strcmp('i','a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1810,7 +2258,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- crc32(col1) in partition with coltype char(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1821,28 +2269,34 @@ create table t1 (col1 char(30)) engine='MYISAM' partition by range(crc32(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 char(30)) engine='MYISAM' partition by list(crc32(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 char(30)) engine='MYISAM' partition by hash(crc32(col1)); +Got one of the listed errors create table t4 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 char(30)) engine='MYISAM' partition by list(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 char(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (crc32('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1859,28 +2313,34 @@ alter table t11 partition by range(crc32(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(crc32(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(crc32(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(crc32(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (crc32('a,b,c,d,e,f,g,h,i')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1896,7 +2356,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- round(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1907,28 +2367,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(round(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(round(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(round(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (round(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -1945,28 +2411,34 @@ alter table t11 partition by range(round(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(round(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(round(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(round(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (round(15)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1982,7 +2454,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- sign(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -1993,28 +2465,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(sign(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(sign(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(sign(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (sign(123)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2031,114 +2509,34 @@ alter table t11 partition by range(sign(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(sign(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(sign(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(sign(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (sign(123)), partition p1 values less than maxvalue); -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- datediff(col1,col1) in partition with coltype datetime -------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -create table t1 (col1 datetime) engine='MYISAM' -partition by range(datediff(col1,col1)) -(partition p0 values less than (15), -partition p1 values less than (31)); -create table t2 (col1 datetime) engine='MYISAM' -partition by list(datediff(col1,col1)) -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -create table t3 (col1 datetime) engine='MYISAM' -partition by hash(datediff(col1,col1)); -create table t4 (colint int, col1 datetime) engine='MYISAM' -partition by range(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than (31)); -create table t5 (colint int, col1 datetime) engine='MYISAM' -partition by list(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -create table t6 (colint int, col1 datetime) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (datediff('1997-11-30 23:59:59','1997-12-31')), -partition p1 values less than maxvalue); -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 (col1 datetime) engine='MYISAM' ; -create table t22 (col1 datetime) engine='MYISAM' ; -create table t33 (col1 datetime) engine='MYISAM' ; -create table t44 (colint int, col1 datetime) engine='MYISAM' ; -create table t55 (colint int, col1 datetime) engine='MYISAM' ; -create table t66 (colint int, col1 datetime) engine='MYISAM' ; -alter table t11 -partition by range(datediff(col1,col1)) -(partition p0 values less than (15), -partition p1 values less than (31)); -alter table t22 -partition by list(datediff(col1,col1)) -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -alter table t33 -partition by hash(datediff(col1,col1)); -alter table t44 -partition by range(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than (31)); -alter table t55 -partition by list(colint) -subpartition by hash(datediff(col1,col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -alter table t66 -partition by range(colint) -(partition p0 values less than (datediff('1997-11-30 23:59:59','1997-12-31')), -partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2154,7 +2552,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- period_add(col1,5) in partition with coltype datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2165,28 +2563,34 @@ create table t1 (col1 datetime) engine='MYISAM' partition by range(period_add(col1,5)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime) engine='MYISAM' partition by list(period_add(col1,5)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime) engine='MYISAM' partition by hash(period_add(col1,5)); +Got one of the listed errors create table t4 (colint int, col1 datetime) engine='MYISAM' partition by range(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime) engine='MYISAM' partition by list(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime) engine='MYISAM' partition by range(colint) (partition p0 values less than (period_add(9804,5)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2203,28 +2607,34 @@ alter table t11 partition by range(period_add(col1,5)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(period_add(col1,5)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(period_add(col1,5)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(period_add(col1,5)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (period_add(9804,5)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2240,7 +2650,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- period_diff(col1,col2) in partition with coltype datetime,col2 datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2251,28 +2661,34 @@ create table t1 (col1 datetime,col2 datetime) engine='MYISAM' partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime,col2 datetime) engine='MYISAM' partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime,col2 datetime) engine='MYISAM' partition by hash(period_diff(col1,col2)); +Got one of the listed errors create table t4 (colint int, col1 datetime,col2 datetime) engine='MYISAM' partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime,col2 datetime) engine='MYISAM' partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime,col2 datetime) engine='MYISAM' partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2289,28 +2705,34 @@ alter table t11 partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(period_diff(col1,col2)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2326,7 +2748,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- period_diff(col1,col2) in partition with coltype int,col2 int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2337,28 +2759,34 @@ create table t1 (col1 int,col2 int) engine='MYISAM' partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int,col2 int) engine='MYISAM' partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int,col2 int) engine='MYISAM' partition by hash(period_diff(col1,col2)); +Got one of the listed errors create table t4 (colint int, col1 int,col2 int) engine='MYISAM' partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int,col2 int) engine='MYISAM' partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int,col2 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2375,28 +2803,34 @@ alter table t11 partition by range(period_diff(col1,col2)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(period_diff(col1,col2)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(period_diff(col1,col2)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(period_diff(col1,col2)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (period_diff(9809,199907)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2412,7 +2846,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- timestampdiff(day,5,col1) in partition with coltype datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2423,28 +2857,34 @@ create table t1 (col1 datetime) engine='MYISAM' partition by range(timestampdiff(day,5,col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime) engine='MYISAM' partition by list(timestampdiff(day,5,col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime) engine='MYISAM' partition by hash(timestampdiff(day,5,col1)); +Got one of the listed errors create table t4 (colint int, col1 datetime) engine='MYISAM' partition by range(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime) engine='MYISAM' partition by list(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime) engine='MYISAM' partition by range(colint) (partition p0 values less than (timestampdiff(YEAR,'2002-05-01','2001-01-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2461,28 +2901,34 @@ alter table t11 partition by range(timestampdiff(day,5,col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(timestampdiff(day,5,col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(timestampdiff(day,5,col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(timestampdiff(day,5,col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (timestampdiff(YEAR,'2002-05-01','2001-01-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2498,7 +2944,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- unix_timestamp(col1) in partition with coltype date ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2509,28 +2955,34 @@ create table t1 (col1 date) engine='MYISAM' partition by range(unix_timestamp(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 date) engine='MYISAM' partition by list(unix_timestamp(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 date) engine='MYISAM' partition by hash(unix_timestamp(col1)); +Got one of the listed errors create table t4 (colint int, col1 date) engine='MYISAM' partition by range(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 date) engine='MYISAM' partition by list(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 date) engine='MYISAM' partition by range(colint) (partition p0 values less than (unix_timestamp ('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2547,28 +2999,34 @@ alter table t11 partition by range(unix_timestamp(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(unix_timestamp(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(unix_timestamp(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(unix_timestamp(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (unix_timestamp ('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2584,7 +3042,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- week(col1) in partition with coltype datetime ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2595,28 +3053,34 @@ create table t1 (col1 datetime) engine='MYISAM' partition by range(week(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 datetime) engine='MYISAM' partition by list(week(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 datetime) engine='MYISAM' partition by hash(week(col1)); +Got one of the listed errors create table t4 (colint int, col1 datetime) engine='MYISAM' partition by range(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 datetime) engine='MYISAM' partition by list(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 datetime) engine='MYISAM' partition by range(colint) (partition p0 values less than (week('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2633,28 +3097,132 @@ alter table t11 partition by range(week(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(week(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(week(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(week(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (week('2002-05-01')), partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- +--- weekofyear(col1) in partition with coltype datetime +------------------------------------------------------------------------- +must all fail! +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +create table t1 (col1 datetime) engine='MYISAM' +partition by range(weekofyear(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t2 (col1 datetime) engine='MYISAM' +partition by list(weekofyear(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t3 (col1 datetime) engine='MYISAM' +partition by hash(weekofyear(col1)); +Got one of the listed errors +create table t4 (colint int, col1 datetime) engine='MYISAM' +partition by range(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +create table t5 (colint int, col1 datetime) engine='MYISAM' +partition by list(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +create table t6 (colint int, col1 datetime) engine='MYISAM' +partition by range(colint) +(partition p0 values less than (weekofyear('2002-05-01')), +partition p1 values less than maxvalue); +Got one of the listed errors +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 (col1 datetime) engine='MYISAM' ; +create table t22 (col1 datetime) engine='MYISAM' ; +create table t33 (col1 datetime) engine='MYISAM' ; +create table t44 (colint int, col1 datetime) engine='MYISAM' ; +create table t55 (colint int, col1 datetime) engine='MYISAM' ; +create table t66 (colint int, col1 datetime) engine='MYISAM' ; +alter table t11 +partition by range(weekofyear(col1)) +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t22 +partition by list(weekofyear(col1)) +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t33 +partition by hash(weekofyear(col1)); +Got one of the listed errors +alter table t44 +partition by range(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than (31)); +Got one of the listed errors +alter table t55 +partition by list(colint) +subpartition by hash(weekofyear(col1)) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors +alter table t66 +partition by range(colint) +(partition p0 values less than (weekofyear('2002-05-01')), +partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2670,7 +3238,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- cast(col1 as signed) in partition with coltype varchar(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2681,28 +3249,34 @@ create table t1 (col1 varchar(30)) engine='MYISAM' partition by range(cast(col1 as signed)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 varchar(30)) engine='MYISAM' partition by list(cast(col1 as signed)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 varchar(30)) engine='MYISAM' partition by hash(cast(col1 as signed)); +Got one of the listed errors create table t4 (colint int, col1 varchar(30)) engine='MYISAM' partition by range(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 varchar(30)) engine='MYISAM' partition by list(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 varchar(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (cast(123 as signed)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2719,28 +3293,34 @@ alter table t11 partition by range(cast(col1 as signed)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(cast(col1 as signed)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(cast(col1 as signed)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(cast(col1 as signed)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (cast(123 as signed)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2756,7 +3336,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- convert(col1,unsigned) in partition with coltype varchar(30) ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2767,28 +3347,34 @@ create table t1 (col1 varchar(30)) engine='MYISAM' partition by range(convert(col1,unsigned)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 varchar(30)) engine='MYISAM' partition by list(convert(col1,unsigned)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 varchar(30)) engine='MYISAM' partition by hash(convert(col1,unsigned)); +Got one of the listed errors create table t4 (colint int, col1 varchar(30)) engine='MYISAM' partition by range(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 varchar(30)) engine='MYISAM' partition by list(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 varchar(30)) engine='MYISAM' partition by range(colint) (partition p0 values less than (convert(123,unsigned)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2805,28 +3391,34 @@ alter table t11 partition by range(convert(col1,unsigned)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(convert(col1,unsigned)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(convert(col1,unsigned)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(convert(col1,unsigned)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (convert(123,unsigned)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2842,7 +3434,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 | 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2853,28 +3445,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(col1 | 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(col1 | 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(col1 | 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (10 | 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2891,28 +3489,34 @@ alter table t11 partition by range(col1 | 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 | 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 | 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 | 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 | 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2928,7 +3532,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 & 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -2939,28 +3543,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(col1 & 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(col1 & 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(col1 & 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (10 & 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -2977,28 +3587,34 @@ alter table t11 partition by range(col1 & 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 & 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 & 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 & 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 & 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3014,7 +3630,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 ^ 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3025,28 +3641,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(col1 ^ 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(col1 ^ 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(col1 ^ 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (10 ^ 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3063,28 +3685,34 @@ alter table t11 partition by range(col1 ^ 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 ^ 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 ^ 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 ^ 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 ^ 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3100,7 +3728,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 << 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3111,28 +3739,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(col1 << 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(col1 << 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(col1 << 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (10 << 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3149,28 +3783,34 @@ alter table t11 partition by range(col1 << 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 << 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 << 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 << 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 << 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3186,7 +3826,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- col1 >> 20 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3197,28 +3837,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(col1 >> 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(col1 >> 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(col1 >> 20); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (10 >> 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3235,28 +3881,34 @@ alter table t11 partition by range(col1 >> 20) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(col1 >> 20) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(col1 >> 20); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(col1 >> 20) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (10 >> 20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3272,7 +3924,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- ~col1 in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3283,28 +3935,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(~col1) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(~col1) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(~col1); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (~20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3321,28 +3979,34 @@ alter table t11 partition by range(~col1) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(~col1) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(~col1); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(~col1) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (~20), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3358,7 +4022,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- bit_count(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3369,28 +4033,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(bit_count(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(bit_count(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(bit_count(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (bit_count(20)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3407,28 +4077,34 @@ alter table t11 partition by range(bit_count(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(bit_count(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(bit_count(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_count(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_count(20)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3444,7 +4120,7 @@ drop table if exists t66 ; ------------------------------------------------------------------------- --- inet_aton(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3455,28 +4131,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(inet_aton(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(inet_aton(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(inet_aton(col1)); +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (inet_aton('192.168.1.1')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3493,28 +4175,34 @@ alter table t11 partition by range(inet_aton(col1)) (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t22 partition by list(inet_aton(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t33 partition by hash(inet_aton(col1)); +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(inet_aton(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (inet_aton('192.168.1.1')), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3531,7 +4219,7 @@ set @var =20; ------------------------------------------------------------------------- --- bit_length(col1)+@var-@var in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3542,35 +4230,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(bit_length(col1)+@var-@var) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(bit_length(col1)+@var-@var) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(bit_length(col1)+@var-@var); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (bit_length(20)+@var-@var), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3587,35 +4274,34 @@ alter table t11 partition by range(bit_length(col1)+@var-@var) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors alter table t22 partition by list(bit_length(col1)+@var-@var) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors alter table t33 partition by hash(bit_length(col1)+@var-@var); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(bit_length(col1)+@var-@var) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (bit_length(20)+@var-@var), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3652,7 +4338,7 @@ end// ------------------------------------------------------------------------- --- getmaxsigned_t1(col1) in partition with coltype int ------------------------------------------------------------------------- -must all fail! (delete 0 and comment char, if bug fixed) +must all fail! drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; @@ -3663,35 +4349,34 @@ create table t1 (col1 int) engine='MYISAM' partition by range(getmaxsigned_t1(col1)) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors create table t2 (col1 int) engine='MYISAM' partition by list(getmaxsigned_t1(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors create table t3 (col1 int) engine='MYISAM' partition by hash(getmaxsigned_t1(col1)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) (partition p0 values less than (getmaxsigned(10)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t11 ; drop table if exists t22 ; drop table if exists t33 ; @@ -3708,35 +4393,34 @@ alter table t11 partition by range(getmaxsigned_t1(col1)) (partition p0 values less than (15), partition p1 values less than (31)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values less than (15), -partition p1 values less than (31))' at line 2 +Got one of the listed errors alter table t22 partition by list(getmaxsigned_t1(col1)) (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ') -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12' at line 2 +Got one of the listed errors alter table t33 partition by hash(getmaxsigned_t1(col1)); -ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2 +Got one of the listed errors alter table t44 partition by range(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than (31)); +Got one of the listed errors alter table t55 partition by list(colint) subpartition by hash(getmaxsigned_t1(col1)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30)); +Got one of the listed errors alter table t66 partition by range(colint) (partition p0 values less than (getmaxsigned(10)), partition p1 values less than maxvalue); +Got one of the listed errors drop table if exists t1 ; drop table if exists t2 ; drop table if exists t3 ; diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result b/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result index 1e158e0a787..c47c22ed363 100644 --- a/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result +++ b/mysql-test/suite/parts/r/part_supported_sql_func_innodb.result @@ -55,9 +55,9 @@ insert into t2 values (17 ); insert into t3 values (5 ); insert into t3 values (13 ); insert into t3 values (17 ); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_int.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_int.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_int.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t6; select abs(col1) from t1 order by col1; abs(col1) 5 @@ -1675,7 +1675,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- ascii(col1) in partition with coltype char(1) +--- mod(col1,10) in partition with coltype int ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -1684,14 +1684,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with ascii(col1) +--- Create tables with mod(col1,10) ------------------------------------------------------------------------- -create table t1 (col1 char(1)) engine='INNODB' -partition by range(ascii(col1)) +create table t1 (col1 int) engine='INNODB' +partition by range(mod(col1,10)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 char(1)) engine='INNODB' -partition by list(ascii(col1)) +create table t2 (col1 int) engine='INNODB' +partition by list(mod(col1,10)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -1699,16 +1699,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 char(1)) engine='INNODB' -partition by hash(ascii(col1)); -create table t4 (colint int, col1 char(1)) engine='INNODB' +create table t3 (col1 int) engine='INNODB' +partition by hash(mod(col1,10)); +create table t4 (colint int, col1 int) engine='INNODB' partition by range(colint) -subpartition by hash(ascii(col1)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(1)) engine='INNODB' +create table t5 (colint int, col1 int) engine='INNODB' partition by list(colint) -subpartition by hash(ascii(col1)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -1716,1596 +1716,346 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 char(1)) engine='INNODB' +create table t6 (colint int, col1 int) engine='INNODB' partition by range(colint) -(partition p0 values less than (ascii('5')), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with ascii(col1) +--- Access tables with mod(col1,10) ------------------------------------------------------------------------- -insert into t1 values ('1'); -insert into t1 values ('9'); -insert into t2 values ('1'); -insert into t2 values ('9'); -insert into t2 values ('3'); -insert into t3 values ('1'); -insert into t3 values ('9'); -insert into t3 values ('3'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t6; -select ascii(col1) from t1 order by col1; -ascii(col1) -49 -57 -select * from t1 order by col1; -col1 -1 -9 -select * from t2 order by col1; -col1 -1 -3 -9 -select * from t3 order by col1; -col1 -1 -3 -9 -select * from t4 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -update t1 set col1='8' where col1='1'; -update t2 set col1='8' where col1='1'; -update t3 set col1='8' where col1='1'; -update t4 set col1='8' where col1='1'; -update t5 set col1='8' where col1='1'; -update t6 set col1='8' where col1='1'; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Alter tables with ascii(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(ascii(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(ascii(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(ascii(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(ascii(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(ascii(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (ascii('5')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t55 -partition by list(colint) -subpartition by hash(ascii(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(1) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (ascii(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ascii('5')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ascii('5')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ascii(col1) -------------------------------------------------------------------------- -delete from t1 where col1='9'; -delete from t2 where col1='9'; -delete from t3 where col1='9'; -delete from t4 where col1='9'; -delete from t5 where col1='9'; -delete from t6 where col1='9'; -select * from t1 order by col1; -col1 -8 -select * from t2 order by col1; -col1 -3 -8 -select * from t3 order by col1; -col1 -3 -8 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t1 values ('9'); -insert into t2 values ('9'); -insert into t3 values ('9'); -insert into t4 values (60,'9'); -insert into t5 values (60,'9'); -insert into t6 values (60,'9'); -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t6 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -60 9 -select * from t5 order by colint; -colint col1 -60 9 -select * from t6 order by colint; -colint col1 -60 9 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ascii(col1) -------------------------------------------------------------------------- -delete from t11 where col1='9'; -delete from t22 where col1='9'; -delete from t33 where col1='9'; -delete from t44 where col1='9'; -delete from t55 where col1='9'; -delete from t66 where col1='9'; -select * from t11 order by col1; -col1 -8 -select * from t22 order by col1; -col1 -3 -8 -select * from t33 order by col1; -col1 -3 -8 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t11 values ('9'); -insert into t22 values ('9'); -insert into t33 values ('9'); -insert into t44 values (60,'9'); -insert into t55 values (60,'9'); -insert into t66 values (60,'9'); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t66 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -60 9 -select * from t55 order by colint; -colint col1 -60 9 -select * from t66 order by colint; -colint col1 -60 9 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- cast(ceiling(col1) as signed integer) in partition with coltype float(7,4) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -create table t1 (col1 float(7,4)) engine='INNODB' -partition by range(cast(ceiling(col1) as signed integer)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 float(7,4)) engine='INNODB' -partition by list(cast(ceiling(col1) as signed integer)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 float(7,4)) engine='INNODB' -partition by hash(cast(ceiling(col1) as signed integer)); -create table t4 (colint int, col1 float(7,4)) engine='INNODB' -partition by range(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 float(7,4)) engine='INNODB' -partition by list(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 float(7,4)) engine='INNODB' -partition by range(colint) -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -insert into t1 values (5.1230); -insert into t1 values (13.345); -insert into t2 values (5.1230); -insert into t2 values (13.345); -insert into t2 values (17.987); -insert into t3 values (5.1230); -insert into t3 values (13.345); -insert into t3 values (17.987); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t6; -select cast(ceiling(col1) as signed integer) from t1 order by col1; -cast(ceiling(col1) as signed integer) -6 -14 -select * from t1 order by col1; -col1 -5.1230 -13.3450 -select * from t2 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t3 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t4 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -update t1 set col1=15.654 where col1=5.1230; -update t2 set col1=15.654 where col1=5.1230; -update t3 set col1=15.654 where col1=5.1230; -update t4 set col1=15.654 where col1=5.1230; -update t5 set col1=15.654 where col1=5.1230; -update t6 set col1=15.654 where col1=5.1230; -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Alter tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(cast(ceiling(col1) as signed integer)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(cast(ceiling(col1) as signed integer)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(cast(ceiling(col1) as signed integer)); -alter table t44 -partition by range(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t55 -partition by list(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` float(7,4) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (cast(ceiling(col1) as signed integer)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -delete from t1 where col1=13.345; -delete from t2 where col1=13.345; -delete from t3 where col1=13.345; -delete from t4 where col1=13.345; -delete from t5 where col1=13.345; -delete from t6 where col1=13.345; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t1 values (13.345); -insert into t2 values (13.345); -insert into t3 values (13.345); -insert into t4 values (60,13.345); -insert into t5 values (60,13.345); -insert into t6 values (60,13.345); -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t6 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -60 13.3450 -select * from t5 order by colint; -colint col1 -60 13.3450 -select * from t6 order by colint; -colint col1 -60 13.3450 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -delete from t11 where col1=13.345; -delete from t22 where col1=13.345; -delete from t33 where col1=13.345; -delete from t44 where col1=13.345; -delete from t55 where col1=13.345; -delete from t66 where col1=13.345; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t11 values (13.345); -insert into t22 values (13.345); -insert into t33 values (13.345); -insert into t44 values (60,13.345); -insert into t55 values (60,13.345); -insert into t66 values (60,13.345); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t66 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -60 13.3450 -select * from t55 order by colint; -colint col1 -60 13.3450 -select * from t66 order by colint; -colint col1 -60 13.3450 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- cast(floor(col1) as signed) in partition with coltype float(7,4) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -create table t1 (col1 float(7,4)) engine='INNODB' -partition by range(cast(floor(col1) as signed)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 float(7,4)) engine='INNODB' -partition by list(cast(floor(col1) as signed)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 float(7,4)) engine='INNODB' -partition by hash(cast(floor(col1) as signed)); -create table t4 (colint int, col1 float(7,4)) engine='INNODB' -partition by range(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 float(7,4)) engine='INNODB' -partition by list(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 float(7,4)) engine='INNODB' -partition by range(colint) -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -insert into t1 values (5.1230); -insert into t1 values (13.345); -insert into t2 values (5.1230); -insert into t2 values (13.345); -insert into t2 values (17.987); -insert into t3 values (5.1230); -insert into t3 values (13.345); -insert into t3 values (17.987); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t6; -select cast(floor(col1) as signed) from t1 order by col1; -cast(floor(col1) as signed) -5 -13 -select * from t1 order by col1; -col1 -5.1230 -13.3450 -select * from t2 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t3 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t4 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -update t1 set col1=15.654 where col1=5.1230; -update t2 set col1=15.654 where col1=5.1230; -update t3 set col1=15.654 where col1=5.1230; -update t4 set col1=15.654 where col1=5.1230; -update t5 set col1=15.654 where col1=5.1230; -update t6 set col1=15.654 where col1=5.1230; -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Alter tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(cast(floor(col1) as signed)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(cast(floor(col1) as signed)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(cast(floor(col1) as signed)); -alter table t44 -partition by range(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t55 -partition by list(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` float(7,4) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (cast(floor(col1) as signed)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -delete from t1 where col1=13.345; -delete from t2 where col1=13.345; -delete from t3 where col1=13.345; -delete from t4 where col1=13.345; -delete from t5 where col1=13.345; -delete from t6 where col1=13.345; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t1 values (13.345); -insert into t2 values (13.345); -insert into t3 values (13.345); -insert into t4 values (60,13.345); -insert into t5 values (60,13.345); -insert into t6 values (60,13.345); -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t6 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -60 13.3450 -select * from t5 order by colint; -colint col1 -60 13.3450 -select * from t6 order by colint; -colint col1 -60 13.3450 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -delete from t11 where col1=13.345; -delete from t22 where col1=13.345; -delete from t33 where col1=13.345; -delete from t44 where col1=13.345; -delete from t55 where col1=13.345; -delete from t66 where col1=13.345; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t11 values (13.345); -insert into t22 values (13.345); -insert into t33 values (13.345); -insert into t44 values (60,13.345); -insert into t55 values (60,13.345); -insert into t66 values (60,13.345); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t66 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -60 13.3450 -select * from t55 order by colint; -colint col1 -60 13.3450 -select * from t66 order by colint; -colint col1 -60 13.3450 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- cast(mod(col1,10) as signed) in partition with coltype float(7,4) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with cast(mod(col1,10) as signed) -------------------------------------------------------------------------- -create table t1 (col1 float(7,4)) engine='INNODB' -partition by range(cast(mod(col1,10) as signed)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 float(7,4)) engine='INNODB' -partition by list(cast(mod(col1,10) as signed)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 float(7,4)) engine='INNODB' -partition by hash(cast(mod(col1,10) as signed)); -create table t4 (colint int, col1 float(7,4)) engine='INNODB' -partition by range(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 float(7,4)) engine='INNODB' -partition by list(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 float(7,4)) engine='INNODB' -partition by range(colint) -(partition p0 values less than (cast(mod(15,10) as signed)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with cast(mod(col1,10) as signed) -------------------------------------------------------------------------- -insert into t1 values (5.0000); +insert into t1 values (5); insert into t1 values (19); -insert into t2 values (5.0000); +insert into t2 values (5); insert into t2 values (19); insert into t2 values (17); -insert into t3 values (5.0000); +insert into t3 values (5); insert into t3 values (19); insert into t3 values (17); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t6; -select cast(mod(col1,10) as signed) from t1 order by col1; -cast(mod(col1,10) as signed) +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t6; +select mod(col1,10) from t1 order by col1; +mod(col1,10) 5 9 select * from t1 order by col1; col1 -5.0000 -19.0000 +5 +19 select * from t2 order by col1; col1 -5.0000 -17.0000 -19.0000 +5 +17 +19 select * from t3 order by col1; col1 -5.0000 -17.0000 -19.0000 +5 +17 +19 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 5 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 5 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 5 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 5 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t6 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -update t1 set col1=15 where col1=5.0000; -update t2 set col1=15 where col1=5.0000; -update t3 set col1=15 where col1=5.0000; -update t4 set col1=15 where col1=5.0000; -update t5 set col1=15 where col1=5.0000; -update t6 set col1=15 where col1=5.0000; +1 5 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 5 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +update t1 set col1=15 where col1=5; +update t2 set col1=15 where col1=5; +update t3 set col1=15 where col1=5; +update t4 set col1=15 where col1=5; +update t5 set col1=15 where col1=5; +update t6 set col1=15 where col1=5; select * from t1 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t2 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t3 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t6 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 ------------------------------------------------------------------------- ---- Alter tables with cast(mod(col1,10) as signed) +--- Alter tables with mod(col1,10) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -3320,11 +2070,11 @@ create table t44 engine='INNODB' as select * from t4; create table t55 engine='INNODB' as select * from t5; create table t66 engine='INNODB' as select * from t6; alter table t11 -partition by range(cast(mod(col1,10) as signed)) +partition by range(mod(col1,10)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(cast(mod(col1,10) as signed)) +partition by list(mod(col1,10)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -3333,15 +2083,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(cast(mod(col1,10) as signed)); +partition by hash(mod(col1,10)); alter table t44 partition by range(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -3351,40 +2101,163 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (cast(mod(15,10) as signed)), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t22 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t33 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t44 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 --------------------------- ---- some alter table begin --------------------------- @@ -3393,19 +2266,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 alter table t55 partition by list(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 5 +subpartition by hash(mod(col1,10)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -3417,54 +2290,259 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` float(7,4) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (cast(mod(col1,10) as signed)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ + `col1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (mod(col1,10)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition s1 into -(partition p0 values less than (cast(mod(15,10) as signed)), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition s1 into -(partition p0 values less than (cast(mod(15,10) as signed)), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(mod(col1,10) as signed) +--- Delete rows and partitions of tables with mod(col1,10) ------------------------------------------------------------------------- delete from t1 where col1=19; delete from t2 where col1=19; @@ -3474,27 +2552,109 @@ delete from t5 where col1=19; delete from t6 where col1=19; select * from t1 order by col1; col1 -15.0000 +15 select * from t2 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t3 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 insert into t1 values (19); insert into t2 values (19); insert into t3 values (19); @@ -3503,39 +2663,162 @@ insert into t5 values (60,19); insert into t6 values (60,19); select * from t1 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t2 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t3 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t6 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -3547,20 +2830,127 @@ select * from t2 order by col1; col1 select * from t3 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t4 order by colint; colint col1 -60 19.0000 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t5 order by colint; colint col1 -60 19.0000 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t6 order by colint; colint col1 -60 19.0000 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(mod(col1,10) as signed) +--- Delete rows and partitions of tables with mod(col1,10) ------------------------------------------------------------------------- delete from t11 where col1=19; delete from t22 where col1=19; @@ -3570,27 +2960,109 @@ delete from t55 where col1=19; delete from t66 where col1=19; select * from t11 order by col1; col1 -15.0000 +15 select * from t22 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t33 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t44 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 insert into t11 values (19); insert into t22 values (19); insert into t33 values (19); @@ -3599,39 +3071,162 @@ insert into t55 values (60,19); insert into t66 values (60,19); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t22 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t33 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t44 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -3643,516 +3238,125 @@ select * from t22 order by col1; col1 select * from t33 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t44 order by colint; colint col1 -60 19.0000 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t55 order by colint; colint col1 -60 19.0000 -select * from t66 order by colint; -colint col1 -60 19.0000 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- ord(col1) in partition with coltype char(3) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with ord(col1) -------------------------------------------------------------------------- -create table t1 (col1 char(3)) engine='INNODB' -partition by range(ord(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 char(3)) engine='INNODB' -partition by list(ord(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 char(3)) engine='INNODB' -partition by hash(ord(col1)); -create table t4 (colint int, col1 char(3)) engine='INNODB' -partition by range(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(3)) engine='INNODB' -partition by list(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 char(3)) engine='INNODB' -partition by range(colint) -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with ord(col1) -------------------------------------------------------------------------- -insert into t1 values ('1'); -insert into t1 values ('9'); -insert into t2 values ('1'); -insert into t2 values ('9'); -insert into t2 values ('3'); -insert into t3 values ('1'); -insert into t3 values ('9'); -insert into t3 values ('3'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t6; -select ord(col1) from t1 order by col1; -ord(col1) -49 -57 -select * from t1 order by col1; -col1 -1 -9 -select * from t2 order by col1; -col1 -1 -3 -9 -select * from t3 order by col1; -col1 -1 -3 -9 -select * from t4 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -update t1 set col1='8' where col1='1'; -update t2 set col1='8' where col1='1'; -update t3 set col1='8' where col1='1'; -update t4 set col1='8' where col1='1'; -update t5 set col1='8' where col1='1'; -update t6 set col1='8' where col1='1'; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Alter tables with ord(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(ord(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(ord(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(ord(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t55 -partition by list(colint) -subpartition by hash(ord(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(3) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (ord(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ord(col1) -------------------------------------------------------------------------- -delete from t1 where col1='9'; -delete from t2 where col1='9'; -delete from t3 where col1='9'; -delete from t4 where col1='9'; -delete from t5 where col1='9'; -delete from t6 where col1='9'; -select * from t1 order by col1; -col1 -8 -select * from t2 order by col1; -col1 -3 -8 -select * from t3 order by col1; -col1 -3 -8 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t1 values ('9'); -insert into t2 values ('9'); -insert into t3 values ('9'); -insert into t4 values (60,'9'); -insert into t5 values (60,'9'); -insert into t6 values (60,'9'); -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t6 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -60 9 -select * from t5 order by colint; -colint col1 -60 9 -select * from t6 order by colint; -colint col1 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ord(col1) -------------------------------------------------------------------------- -delete from t11 where col1='9'; -delete from t22 where col1='9'; -delete from t33 where col1='9'; -delete from t44 where col1='9'; -delete from t55 where col1='9'; -delete from t66 where col1='9'; -select * from t11 order by col1; -col1 -8 -select * from t22 order by col1; -col1 -3 -8 -select * from t33 order by col1; -col1 -3 -8 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t11 values ('9'); -insert into t22 values ('9'); -insert into t33 values ('9'); -insert into t44 values (60,'9'); -insert into t55 values (60,'9'); -insert into t66 values (60,'9'); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t66 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -60 9 -select * from t55 order by colint; -colint col1 -60 9 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t66 order by colint; colint col1 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 ------------------------- ---- some alter table end ------------------------- @@ -4225,9 +3429,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-02-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select day(col1) from t1 order by col1; day(col1) 17 @@ -4721,9 +3925,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-02-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofmonth(col1) from t1 order by col1; dayofmonth(col1) 17 @@ -5217,9 +4421,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-02-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofweek(col1) from t1 order by col1; dayofweek(col1) 3 @@ -5725,9 +4929,9 @@ insert into t2 values ('2006-02-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-02-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofyear(col1) from t1 order by col1; dayofyear(col1) 3 @@ -6223,9 +5427,9 @@ insert into t2 values ('2006-02-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-02-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofyear(col1) from t1 order by col1; dayofyear(col1) 3 @@ -6721,9 +5925,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-02-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select extract(month from col1) from t1 order by col1; extract(month from col1) 1 @@ -7219,9 +6423,9 @@ insert into t2 values ('21:59'); insert into t3 values ('09:09'); insert into t3 values ('14:30'); insert into t3 values ('21:59'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select hour(col1) from t1 order by col1; hour(col1) 9 @@ -7723,9 +6927,9 @@ insert into t2 values ('00:59:22.000024'); insert into t3 values ('09:09:15.000002'); insert into t3 values ('04:30:01.000018'); insert into t3 values ('00:59:22.000024'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select microsecond(col1) from t1 order by col1; microsecond(col1) 0 @@ -8213,9 +7417,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:15'); insert into t3 values ('14:30:45'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select minute(col1) from t1 order by col1; minute(col1) 9 @@ -8723,9 +7927,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:09'); insert into t3 values ('14:30:20'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select second(col1) from t1 order by col1; second(col1) 9 @@ -9233,9 +8437,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:09'); insert into t3 values ('14:30:20'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select second(col1) from t1 order by col1; second(col1) 9 @@ -9743,9 +8947,9 @@ insert into t2 values ('2006-05-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-12-17'); insert into t3 values ('2006-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select month(col1) from t1 order by col1; month(col1) 1 @@ -10247,9 +9451,9 @@ insert into t2 values ('2006-09-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-12-17'); insert into t3 values ('2006-09-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select quarter(col1) from t1 order by col1; quarter(col1) 1 @@ -10749,9 +9953,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:15'); insert into t3 values ('14:30:45'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; time_to_sec(col1)-(time_to_sec(col1)-20) 20 @@ -11257,9 +10461,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-02-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select to_days(col1)-to_days('2006-01-01') from t1 order by col1; to_days(col1)-to_days('2006-01-01') 16 @@ -11701,6 +10905,506 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- +--- datediff(col1, '2006-01-01') in partition with coltype date +------------------------------------------------------------------------- +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +------------------------------------------------------------------------- +--- Create tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +create table t1 (col1 date) engine='INNODB' +partition by range(datediff(col1, '2006-01-01')) +(partition p0 values less than (15), +partition p1 values less than maxvalue); +create table t2 (col1 date) engine='INNODB' +partition by list(datediff(col1, '2006-01-01')) +(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +create table t3 (col1 date) engine='INNODB' +partition by hash(datediff(col1, '2006-01-01')); +create table t4 (colint int, col1 date) engine='INNODB' +partition by range(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than maxvalue); +create table t5 (colint int, col1 date) engine='INNODB' +partition by list(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +create table t6 (colint int, col1 date) engine='INNODB' +partition by range(colint) +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +------------------------------------------------------------------------- +--- Access tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +insert into t1 values ('2006-02-03'); +insert into t1 values ('2006-01-17'); +insert into t2 values ('2006-02-03'); +insert into t2 values ('2006-01-17'); +insert into t2 values ('2006-01-25'); +insert into t3 values ('2006-02-03'); +insert into t3 values ('2006-01-17'); +insert into t3 values ('2006-01-25'); +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; +select datediff(col1, '2006-01-01') from t1 order by col1; +datediff(col1, '2006-01-01') +16 +33 +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-03 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-03 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-03 +select * from t4 order by colint; +colint col1 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t5 order by colint; +colint col1 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t6 order by colint; +colint col1 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +update t1 set col1='2006-02-06' where col1='2006-02-03'; +update t2 set col1='2006-02-06' where col1='2006-02-03'; +update t3 set col1='2006-02-06' where col1='2006-02-03'; +update t4 set col1='2006-02-06' where col1='2006-02-03'; +update t5 set col1='2006-02-06' where col1='2006-02-03'; +update t6 set col1='2006-02-06' where col1='2006-02-03'; +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t5 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t6 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +------------------------------------------------------------------------- +--- Alter tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 engine='INNODB' as select * from t1; +create table t22 engine='INNODB' as select * from t2; +create table t33 engine='INNODB' as select * from t3; +create table t44 engine='INNODB' as select * from t4; +create table t55 engine='INNODB' as select * from t5; +create table t66 engine='INNODB' as select * from t6; +alter table t11 +partition by range(datediff(col1, '2006-01-01')) +(partition p0 values less than (15), +partition p1 values less than maxvalue); +alter table t22 +partition by list(datediff(col1, '2006-01-01')) +(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +alter table t33 +partition by hash(datediff(col1, '2006-01-01')); +alter table t44 +partition by range(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than maxvalue); +alter table t55 +partition by list(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +alter table t66 +partition by range(colint) +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t55 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +--------------------------- +---- some alter table begin +--------------------------- +alter table t11 +reorganize partition p0,p1 into +(partition s1 values less than maxvalue); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +alter table t11 +reorganize partition s1 into +(partition p0 values less than (15), +partition p1 values less than maxvalue); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +alter table t55 +partition by list(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 5 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +show create table t55; +Table Create Table +t55 CREATE TABLE `t55` ( + `colint` int(11) DEFAULT NULL, + `col1` date DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (datediff(col1, '2006-01-01')) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ +select * from t55 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition p0,p1 into +(partition s1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition s1 into +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition p0,p1 into +(partition s1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition s1 into +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +------------------------------------------------------------------------- +--- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +delete from t1 where col1='2006-01-17'; +delete from t2 where col1='2006-01-17'; +delete from t3 where col1='2006-01-17'; +delete from t4 where col1='2006-01-17'; +delete from t5 where col1='2006-01-17'; +delete from t6 where col1='2006-01-17'; +select * from t1 order by col1; +col1 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +select * from t5 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +insert into t1 values ('2006-01-17'); +insert into t2 values ('2006-01-17'); +insert into t3 values ('2006-01-17'); +insert into t4 values (60,'2006-01-17'); +insert into t5 values (60,'2006-01-17'); +insert into t6 values (60,'2006-01-17'); +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t5 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t6 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +alter table t1 drop partition p0; +alter table t2 drop partition p0; +alter table t4 drop partition p0; +alter table t5 drop partition p0; +alter table t6 drop partition p0; +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +60 2006-01-17 +select * from t5 order by colint; +colint col1 +60 2006-01-17 +select * from t6 order by colint; +colint col1 +60 2006-01-17 +------------------------------------------------------------------------- +--- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +delete from t11 where col1='2006-01-17'; +delete from t22 where col1='2006-01-17'; +delete from t33 where col1='2006-01-17'; +delete from t44 where col1='2006-01-17'; +delete from t55 where col1='2006-01-17'; +delete from t66 where col1='2006-01-17'; +select * from t11 order by col1; +col1 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +select * from t55 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +insert into t11 values ('2006-01-17'); +insert into t22 values ('2006-01-17'); +insert into t33 values ('2006-01-17'); +insert into t44 values (60,'2006-01-17'); +insert into t55 values (60,'2006-01-17'); +insert into t66 values (60,'2006-01-17'); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t55 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t66 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +alter table t11 drop partition p0; +alter table t22 drop partition p0; +alter table t44 drop partition p0; +alter table t55 drop partition p0; +alter table t66 drop partition p0; +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +60 2006-01-17 +select * from t55 order by colint; +colint col1 +60 2006-01-17 +select * from t66 order by colint; +colint col1 +60 2006-01-17 +------------------------- +---- some alter table end +------------------------- +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- --- weekday(col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; @@ -11757,9 +11461,9 @@ insert into t2 values ('2006-05-25'); insert into t3 values ('2006-12-03'); insert into t3 values ('2006-11-17'); insert into t3 values ('2006-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select weekday(col1) from t1 order by col1; weekday(col1) 4 @@ -12201,514 +11905,6 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- weekofyear(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with weekofyear(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='INNODB' -partition by range(weekofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='INNODB' -partition by list(weekofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='INNODB' -partition by hash(weekofyear(col1)); -create table t4 (colint int, col1 date) engine='INNODB' -partition by range(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='INNODB' -partition by list(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='INNODB' -partition by range(colint) -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with weekofyear(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-03-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-03-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-03-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; -select weekofyear(col1) from t1 order by col1; -weekofyear(col1) -1 -11 -select * from t1 order by col1; -col1 -2006-01-03 -2006-03-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-03-17 -2006-05-25 -select * from t3 order by col1; -col1 -2006-01-03 -2006-03-17 -2006-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-09-06' where col1='2006-01-03'; -update t2 set col1='2006-09-06' where col1='2006-01-03'; -update t3 set col1='2006-09-06' where col1='2006-01-03'; -update t4 set col1='2006-09-06' where col1='2006-01-03'; -update t5 set col1='2006-09-06' where col1='2006-01-03'; -update t6 set col1='2006-09-06' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t2 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with weekofyear(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='INNODB' as select * from t1; -create table t22 engine='INNODB' as select * from t2; -create table t33 engine='INNODB' as select * from t3; -create table t44 engine='INNODB' as select * from t4; -create table t55 engine='INNODB' as select * from t5; -create table t66 engine='INNODB' as select * from t6; -alter table t11 -partition by range(weekofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(weekofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(weekofyear(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t22 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -alter table t55 -partition by list(colint) -subpartition by hash(weekofyear(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (weekofyear(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = InnoDB, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = InnoDB, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = InnoDB, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = InnoDB, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekofyear(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-03-17'; -delete from t2 where col1='2006-03-17'; -delete from t3 where col1='2006-03-17'; -delete from t4 where col1='2006-03-17'; -delete from t5 where col1='2006-03-17'; -delete from t6 where col1='2006-03-17'; -select * from t1 order by col1; -col1 -2006-09-06 -select * from t2 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-03-17'); -insert into t2 values ('2006-03-17'); -insert into t3 values ('2006-03-17'); -insert into t4 values (60,'2006-03-17'); -insert into t5 values (60,'2006-03-17'); -insert into t6 values (60,'2006-03-17'); -select * from t1 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t2 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -2006-09-06 -select * from t2 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -60 2006-03-17 -select * from t5 order by colint; -colint col1 -60 2006-03-17 -select * from t6 order by colint; -colint col1 -60 2006-03-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekofyear(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-03-17'; -delete from t22 where col1='2006-03-17'; -delete from t33 where col1='2006-03-17'; -delete from t44 where col1='2006-03-17'; -delete from t55 where col1='2006-03-17'; -delete from t66 where col1='2006-03-17'; -select * from t11 order by col1; -col1 -2006-09-06 -select * from t22 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-03-17'); -insert into t22 values ('2006-03-17'); -insert into t33 values ('2006-03-17'); -insert into t44 values (60,'2006-03-17'); -insert into t55 values (60,'2006-03-17'); -insert into t66 values (60,'2006-03-17'); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t22 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -2006-09-06 -select * from t22 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -60 2006-03-17 -select * from t55 order by colint; -colint col1 -60 2006-03-17 -select * from t66 order by colint; -colint col1 -60 2006-03-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- --- year(col1)-1990 in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; @@ -12765,9 +11961,9 @@ insert into t2 values ('2004-05-25'); insert into t3 values ('1996-01-03'); insert into t3 values ('2000-02-17'); insert into t3 values ('2004-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select year(col1)-1990 from t1 order by col1; year(col1)-1990 6 @@ -13269,9 +12465,9 @@ insert into t2 values ('2006-03-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-08-17'); insert into t3 values ('2006-03-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select yearweek(col1)-200600 from t1 order by col1; yearweek(col1)-200600 1 diff --git a/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result b/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result index 3e668139c7d..f14f9517646 100644 --- a/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result +++ b/mysql-test/suite/parts/r/part_supported_sql_func_myisam.result @@ -55,9 +55,9 @@ insert into t2 values (17 ); insert into t3 values (5 ); insert into t3 values (13 ); insert into t3 values (17 ); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_int.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_int.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_int.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t6; select abs(col1) from t1 order by col1; abs(col1) 5 @@ -1675,7 +1675,7 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- ascii(col1) in partition with coltype char(1) +--- mod(col1,10) in partition with coltype int ------------------------------------------------------------------------- drop table if exists t1 ; drop table if exists t2 ; @@ -1684,14 +1684,14 @@ drop table if exists t4 ; drop table if exists t5 ; drop table if exists t6 ; ------------------------------------------------------------------------- ---- Create tables with ascii(col1) +--- Create tables with mod(col1,10) ------------------------------------------------------------------------- -create table t1 (col1 char(1)) engine='MYISAM' -partition by range(ascii(col1)) +create table t1 (col1 int) engine='MYISAM' +partition by range(mod(col1,10)) (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t2 (col1 char(1)) engine='MYISAM' -partition by list(ascii(col1)) +create table t2 (col1 int) engine='MYISAM' +partition by list(mod(col1,10)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -1699,16 +1699,16 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t3 (col1 char(1)) engine='MYISAM' -partition by hash(ascii(col1)); -create table t4 (colint int, col1 char(1)) engine='MYISAM' +create table t3 (col1 int) engine='MYISAM' +partition by hash(mod(col1,10)); +create table t4 (colint int, col1 int) engine='MYISAM' partition by range(colint) -subpartition by hash(ascii(col1)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(1)) engine='MYISAM' +create table t5 (colint int, col1 int) engine='MYISAM' partition by list(colint) -subpartition by hash(ascii(col1)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -1716,1596 +1716,346 @@ partition p3 values in (31,32,33,34,35,36,37,38,39,40), partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); -create table t6 (colint int, col1 char(1)) engine='MYISAM' +create table t6 (colint int, col1 int) engine='MYISAM' partition by range(colint) -(partition p0 values less than (ascii('5')), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); ------------------------------------------------------------------------- ---- Access tables with ascii(col1) +--- Access tables with mod(col1,10) ------------------------------------------------------------------------- -insert into t1 values ('1'); -insert into t1 values ('9'); -insert into t2 values ('1'); -insert into t2 values ('9'); -insert into t2 values ('3'); -insert into t3 values ('1'); -insert into t3 values ('9'); -insert into t3 values ('3'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t6; -select ascii(col1) from t1 order by col1; -ascii(col1) -49 -57 -select * from t1 order by col1; -col1 -1 -9 -select * from t2 order by col1; -col1 -1 -3 -9 -select * from t3 order by col1; -col1 -1 -3 -9 -select * from t4 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -update t1 set col1='8' where col1='1'; -update t2 set col1='8' where col1='1'; -update t3 set col1='8' where col1='1'; -update t4 set col1='8' where col1='1'; -update t5 set col1='8' where col1='1'; -update t6 set col1='8' where col1='1'; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Alter tables with ascii(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(ascii(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(ascii(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(ascii(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(ascii(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(ascii(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (ascii('5')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t55 -partition by list(colint) -subpartition by hash(ascii(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(1) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (ascii(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ascii('5')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ascii('5')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ascii(col1) -------------------------------------------------------------------------- -delete from t1 where col1='9'; -delete from t2 where col1='9'; -delete from t3 where col1='9'; -delete from t4 where col1='9'; -delete from t5 where col1='9'; -delete from t6 where col1='9'; -select * from t1 order by col1; -col1 -8 -select * from t2 order by col1; -col1 -3 -8 -select * from t3 order by col1; -col1 -3 -8 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t1 values ('9'); -insert into t2 values ('9'); -insert into t3 values ('9'); -insert into t4 values (60,'9'); -insert into t5 values (60,'9'); -insert into t6 values (60,'9'); -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t6 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -60 9 -select * from t5 order by colint; -colint col1 -60 9 -select * from t6 order by colint; -colint col1 -60 9 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ascii(col1) -------------------------------------------------------------------------- -delete from t11 where col1='9'; -delete from t22 where col1='9'; -delete from t33 where col1='9'; -delete from t44 where col1='9'; -delete from t55 where col1='9'; -delete from t66 where col1='9'; -select * from t11 order by col1; -col1 -8 -select * from t22 order by col1; -col1 -3 -8 -select * from t33 order by col1; -col1 -3 -8 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t11 values ('9'); -insert into t22 values ('9'); -insert into t33 values ('9'); -insert into t44 values (60,'9'); -insert into t55 values (60,'9'); -insert into t66 values (60,'9'); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t66 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -60 9 -select * from t55 order by colint; -colint col1 -60 9 -select * from t66 order by colint; -colint col1 -60 9 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- cast(ceiling(col1) as signed integer) in partition with coltype float(7,4) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -create table t1 (col1 float(7,4)) engine='MYISAM' -partition by range(cast(ceiling(col1) as signed integer)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 float(7,4)) engine='MYISAM' -partition by list(cast(ceiling(col1) as signed integer)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 float(7,4)) engine='MYISAM' -partition by hash(cast(ceiling(col1) as signed integer)); -create table t4 (colint int, col1 float(7,4)) engine='MYISAM' -partition by range(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 float(7,4)) engine='MYISAM' -partition by list(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 float(7,4)) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -insert into t1 values (5.1230); -insert into t1 values (13.345); -insert into t2 values (5.1230); -insert into t2 values (13.345); -insert into t2 values (17.987); -insert into t3 values (5.1230); -insert into t3 values (13.345); -insert into t3 values (17.987); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t6; -select cast(ceiling(col1) as signed integer) from t1 order by col1; -cast(ceiling(col1) as signed integer) -6 -14 -select * from t1 order by col1; -col1 -5.1230 -13.3450 -select * from t2 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t3 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t4 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -update t1 set col1=15.654 where col1=5.1230; -update t2 set col1=15.654 where col1=5.1230; -update t3 set col1=15.654 where col1=5.1230; -update t4 set col1=15.654 where col1=5.1230; -update t5 set col1=15.654 where col1=5.1230; -update t6 set col1=15.654 where col1=5.1230; -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Alter tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(cast(ceiling(col1) as signed integer)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(cast(ceiling(col1) as signed integer)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(cast(ceiling(col1) as signed integer)); -alter table t44 -partition by range(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t55 -partition by list(colint) -subpartition by hash(cast(ceiling(col1) as signed integer)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` float(7,4) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (cast(ceiling(col1) as signed integer)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(ceiling(15) as signed integer)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -delete from t1 where col1=13.345; -delete from t2 where col1=13.345; -delete from t3 where col1=13.345; -delete from t4 where col1=13.345; -delete from t5 where col1=13.345; -delete from t6 where col1=13.345; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t1 values (13.345); -insert into t2 values (13.345); -insert into t3 values (13.345); -insert into t4 values (60,13.345); -insert into t5 values (60,13.345); -insert into t6 values (60,13.345); -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t6 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -60 13.3450 -select * from t5 order by colint; -colint col1 -60 13.3450 -select * from t6 order by colint; -colint col1 -60 13.3450 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(ceiling(col1) as signed integer) -------------------------------------------------------------------------- -delete from t11 where col1=13.345; -delete from t22 where col1=13.345; -delete from t33 where col1=13.345; -delete from t44 where col1=13.345; -delete from t55 where col1=13.345; -delete from t66 where col1=13.345; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t11 values (13.345); -insert into t22 values (13.345); -insert into t33 values (13.345); -insert into t44 values (60,13.345); -insert into t55 values (60,13.345); -insert into t66 values (60,13.345); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t66 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -60 13.3450 -select * from t55 order by colint; -colint col1 -60 13.3450 -select * from t66 order by colint; -colint col1 -60 13.3450 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- cast(floor(col1) as signed) in partition with coltype float(7,4) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -create table t1 (col1 float(7,4)) engine='MYISAM' -partition by range(cast(floor(col1) as signed)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 float(7,4)) engine='MYISAM' -partition by list(cast(floor(col1) as signed)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 float(7,4)) engine='MYISAM' -partition by hash(cast(floor(col1) as signed)); -create table t4 (colint int, col1 float(7,4)) engine='MYISAM' -partition by range(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 float(7,4)) engine='MYISAM' -partition by list(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 float(7,4)) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -insert into t1 values (5.1230); -insert into t1 values (13.345); -insert into t2 values (5.1230); -insert into t2 values (13.345); -insert into t2 values (17.987); -insert into t3 values (5.1230); -insert into t3 values (13.345); -insert into t3 values (17.987); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t6; -select cast(floor(col1) as signed) from t1 order by col1; -cast(floor(col1) as signed) -5 -13 -select * from t1 order by col1; -col1 -5.1230 -13.3450 -select * from t2 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t3 order by col1; -col1 -5.1230 -13.3450 -17.9870 -select * from t4 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -update t1 set col1=15.654 where col1=5.1230; -update t2 set col1=15.654 where col1=5.1230; -update t3 set col1=15.654 where col1=5.1230; -update t4 set col1=15.654 where col1=5.1230; -update t5 set col1=15.654 where col1=5.1230; -update t6 set col1=15.654 where col1=5.1230; -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t6 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Alter tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(cast(floor(col1) as signed)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(cast(floor(col1) as signed)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(cast(floor(col1) as signed)); -alter table t44 -partition by range(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -alter table t55 -partition by list(colint) -subpartition by hash(cast(floor(col1) as signed)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` float(7,4) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (cast(floor(col1) as signed)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (cast(floor(15.123) as signed)), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 15.6540 -2 13.3450 -3 17.9870 -4 15.6540 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -delete from t1 where col1=13.345; -delete from t2 where col1=13.345; -delete from t3 where col1=13.345; -delete from t4 where col1=13.345; -delete from t5 where col1=13.345; -delete from t6 where col1=13.345; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t1 values (13.345); -insert into t2 values (13.345); -insert into t3 values (13.345); -insert into t4 values (60,13.345); -insert into t5 values (60,13.345); -insert into t6 values (60,13.345); -select * from t1 order by col1; -col1 -13.3450 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t5 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t6 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -15.6540 -select * from t2 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t3 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t4 order by colint; -colint col1 -60 13.3450 -select * from t5 order by colint; -colint col1 -60 13.3450 -select * from t6 order by colint; -colint col1 -60 13.3450 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(floor(col1) as signed) -------------------------------------------------------------------------- -delete from t11 where col1=13.345; -delete from t22 where col1=13.345; -delete from t33 where col1=13.345; -delete from t44 where col1=13.345; -delete from t55 where col1=13.345; -delete from t66 where col1=13.345; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -insert into t11 values (13.345); -insert into t22 values (13.345); -insert into t33 values (13.345); -insert into t44 values (60,13.345); -insert into t55 values (60,13.345); -insert into t66 values (60,13.345); -select * from t11 order by col1; -col1 -13.3450 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t55 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -select * from t66 order by colint; -colint col1 -1 15.6540 -3 17.9870 -4 15.6540 -60 13.3450 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -15.6540 -select * from t22 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t33 order by col1; -col1 -13.3450 -15.6540 -17.9870 -select * from t44 order by colint; -colint col1 -60 13.3450 -select * from t55 order by colint; -colint col1 -60 13.3450 -select * from t66 order by colint; -colint col1 -60 13.3450 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- cast(mod(col1,10) as signed) in partition with coltype float(7,4) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with cast(mod(col1,10) as signed) -------------------------------------------------------------------------- -create table t1 (col1 float(7,4)) engine='MYISAM' -partition by range(cast(mod(col1,10) as signed)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 float(7,4)) engine='MYISAM' -partition by list(cast(mod(col1,10) as signed)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 float(7,4)) engine='MYISAM' -partition by hash(cast(mod(col1,10) as signed)); -create table t4 (colint int, col1 float(7,4)) engine='MYISAM' -partition by range(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 float(7,4)) engine='MYISAM' -partition by list(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 float(7,4)) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (cast(mod(15,10) as signed)), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with cast(mod(col1,10) as signed) -------------------------------------------------------------------------- -insert into t1 values (5.0000); +insert into t1 values (5); insert into t1 values (19); -insert into t2 values (5.0000); +insert into t2 values (5); insert into t2 values (19); insert into t2 values (17); -insert into t3 values (5.0000); +insert into t3 values (5); insert into t3 values (19); insert into t3 values (17); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_float.inc' into table t6; -select cast(mod(col1,10) as signed) from t1 order by col1; -cast(mod(col1,10) as signed) +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_int.inc' into table t6; +select mod(col1,10) from t1 order by col1; +mod(col1,10) 5 9 select * from t1 order by col1; col1 -5.0000 -19.0000 +5 +19 select * from t2 order by col1; col1 -5.0000 -17.0000 -19.0000 +5 +17 +19 select * from t3 order by col1; col1 -5.0000 -17.0000 -19.0000 +5 +17 +19 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 5 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 5 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 5 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 5 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t6 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -update t1 set col1=15 where col1=5.0000; -update t2 set col1=15 where col1=5.0000; -update t3 set col1=15 where col1=5.0000; -update t4 set col1=15 where col1=5.0000; -update t5 set col1=15 where col1=5.0000; -update t6 set col1=15 where col1=5.0000; +1 5 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 5 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +update t1 set col1=15 where col1=5; +update t2 set col1=15 where col1=5; +update t3 set col1=15 where col1=5; +update t4 set col1=15 where col1=5; +update t5 set col1=15 where col1=5; +update t6 set col1=15 where col1=5; select * from t1 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t2 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t3 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t6 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 ------------------------------------------------------------------------- ---- Alter tables with cast(mod(col1,10) as signed) +--- Alter tables with mod(col1,10) ------------------------------------------------------------------------- drop table if exists t11 ; drop table if exists t22 ; @@ -3320,11 +2070,11 @@ create table t44 engine='MYISAM' as select * from t4; create table t55 engine='MYISAM' as select * from t5; create table t66 engine='MYISAM' as select * from t6; alter table t11 -partition by range(cast(mod(col1,10) as signed)) +partition by range(mod(col1,10)) (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t22 -partition by list(cast(mod(col1,10) as signed)) +partition by list(mod(col1,10)) (partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -3333,15 +2083,15 @@ partition p4 values in (41,42,43,44,45,46,47,48,49,50), partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t33 -partition by hash(cast(mod(col1,10) as signed)); +partition by hash(mod(col1,10)); alter table t44 partition by range(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values less than (15), partition p1 values less than maxvalue); alter table t55 partition by list(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 2 +subpartition by hash(mod(col1,10)) subpartitions 2 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -3351,40 +2101,163 @@ partition p5 values in (51,52,53,54,55,56,57,58,59,60) ); alter table t66 partition by range(colint) -(partition p0 values less than (cast(mod(15,10) as signed)), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t22 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t33 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t44 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 --------------------------- ---- some alter table begin --------------------------- @@ -3393,19 +2266,19 @@ reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 alter table t11 reorganize partition s1 into (partition p0 values less than (15), partition p1 values less than maxvalue); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 alter table t55 partition by list(colint) -subpartition by hash(cast(mod(col1,10) as signed)) subpartitions 5 +subpartition by hash(mod(col1,10)) subpartitions 5 (partition p0 values in (1,2,3,4,5,6,7,8,9,10), partition p1 values in (11,12,13,14,15,16,17,18,19,20), partition p2 values in (21,22,23,24,25,26,27,28,29,30), @@ -3417,54 +2290,259 @@ show create table t55; Table Create Table t55 CREATE TABLE `t55` ( `colint` int(11) DEFAULT NULL, - `col1` float(7,4) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (cast(mod(col1,10) as signed)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ + `col1` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (mod(col1,10)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition s1 into -(partition p0 values less than (cast(mod(15,10) as signed)), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition p0,p1 into (partition s1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 alter table t66 reorganize partition s1 into -(partition p0 values less than (cast(mod(15,10) as signed)), +(partition p0 values less than (mod(15,10)), partition p1 values less than maxvalue); select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(mod(col1,10) as signed) +--- Delete rows and partitions of tables with mod(col1,10) ------------------------------------------------------------------------- delete from t1 where col1=19; delete from t2 where col1=19; @@ -3474,27 +2552,109 @@ delete from t5 where col1=19; delete from t6 where col1=19; select * from t1 order by col1; col1 -15.0000 +15 select * from t2 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t3 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 insert into t1 values (19); insert into t2 values (19); insert into t3 values (19); @@ -3503,39 +2663,162 @@ insert into t5 values (60,19); insert into t6 values (60,19); select * from t1 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t2 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t3 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t4 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t5 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t6 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 alter table t1 drop partition p0; alter table t2 drop partition p0; alter table t4 drop partition p0; @@ -3547,20 +2830,127 @@ select * from t2 order by col1; col1 select * from t3 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t4 order by colint; colint col1 -60 19.0000 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t5 order by colint; colint col1 -60 19.0000 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t6 order by colint; colint col1 -60 19.0000 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 ------------------------------------------------------------------------- ---- Delete rows and partitions of tables with cast(mod(col1,10) as signed) +--- Delete rows and partitions of tables with mod(col1,10) ------------------------------------------------------------------------- delete from t11 where col1=19; delete from t22 where col1=19; @@ -3570,27 +2960,109 @@ delete from t55 where col1=19; delete from t66 where col1=19; select * from t11 order by col1; col1 -15.0000 +15 select * from t22 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t33 order by col1; col1 -15.0000 -17.0000 +15 +17 select * from t44 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 insert into t11 values (19); insert into t22 values (19); insert into t33 values (19); @@ -3599,39 +3071,162 @@ insert into t55 values (60,19); insert into t66 values (60,19); select * from t11 order by col1; col1 -15.0000 -19.0000 +15 +19 select * from t22 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t33 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t44 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t55 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t66 order by colint; colint col1 -1 5.1230 -2 13.3450 -3 17.9870 -4 15.6540 -60 19.0000 +1 15 +2 13 +3 15 +4 17 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 alter table t11 drop partition p0; alter table t22 drop partition p0; alter table t44 drop partition p0; @@ -3643,516 +3238,125 @@ select * from t22 order by col1; col1 select * from t33 order by col1; col1 -15.0000 -17.0000 -19.0000 +15 +17 +19 select * from t44 order by colint; colint col1 -60 19.0000 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t55 order by colint; colint col1 -60 19.0000 -select * from t66 order by colint; -colint col1 -60 19.0000 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- ---- ord(col1) in partition with coltype char(3) -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with ord(col1) -------------------------------------------------------------------------- -create table t1 (col1 char(3)) engine='MYISAM' -partition by range(ord(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 char(3)) engine='MYISAM' -partition by list(ord(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 char(3)) engine='MYISAM' -partition by hash(ord(col1)); -create table t4 (colint int, col1 char(3)) engine='MYISAM' -partition by range(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 char(3)) engine='MYISAM' -partition by list(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 char(3)) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with ord(col1) -------------------------------------------------------------------------- -insert into t1 values ('1'); -insert into t1 values ('9'); -insert into t2 values ('1'); -insert into t2 values ('9'); -insert into t2 values ('3'); -insert into t3 values ('1'); -insert into t3 values ('9'); -insert into t3 values ('3'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_ch1.inc' into table t6; -select ord(col1) from t1 order by col1; -ord(col1) -49 -57 -select * from t1 order by col1; -col1 -1 -9 -select * from t2 order by col1; -col1 -1 -3 -9 -select * from t3 order by col1; -col1 -1 -3 -9 -select * from t4 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 1 -2 9 -3 3 -4 8 -update t1 set col1='8' where col1='1'; -update t2 set col1='8' where col1='1'; -update t3 set col1='8' where col1='1'; -update t4 set col1='8' where col1='1'; -update t5 set col1='8' where col1='1'; -update t6 set col1='8' where col1='1'; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t6 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Alter tables with ord(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(ord(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(ord(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(ord(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(ord(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -8 -9 -alter table t55 -partition by list(colint) -subpartition by hash(ord(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` char(3) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (ord(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (ord('a')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 8 -2 9 -3 3 -4 8 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ord(col1) -------------------------------------------------------------------------- -delete from t1 where col1='9'; -delete from t2 where col1='9'; -delete from t3 where col1='9'; -delete from t4 where col1='9'; -delete from t5 where col1='9'; -delete from t6 where col1='9'; -select * from t1 order by col1; -col1 -8 -select * from t2 order by col1; -col1 -3 -8 -select * from t3 order by col1; -col1 -3 -8 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t1 values ('9'); -insert into t2 values ('9'); -insert into t3 values ('9'); -insert into t4 values (60,'9'); -insert into t5 values (60,'9'); -insert into t6 values (60,'9'); -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t5 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t6 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -8 -9 -select * from t2 order by col1; -col1 -3 -8 -9 -select * from t3 order by col1; -col1 -3 -8 -9 -select * from t4 order by colint; -colint col1 -60 9 -select * from t5 order by colint; -colint col1 -60 9 -select * from t6 order by colint; -colint col1 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with ord(col1) -------------------------------------------------------------------------- -delete from t11 where col1='9'; -delete from t22 where col1='9'; -delete from t33 where col1='9'; -delete from t44 where col1='9'; -delete from t55 where col1='9'; -delete from t66 where col1='9'; -select * from t11 order by col1; -col1 -8 -select * from t22 order by col1; -col1 -3 -8 -select * from t33 order by col1; -col1 -3 -8 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -insert into t11 values ('9'); -insert into t22 values ('9'); -insert into t33 values ('9'); -insert into t44 values (60,'9'); -insert into t55 values (60,'9'); -insert into t66 values (60,'9'); -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t55 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -select * from t66 order by colint; -colint col1 -1 8 -3 3 -4 8 -60 9 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -8 -9 -select * from t22 order by col1; -col1 -3 -8 -9 -select * from t33 order by col1; -col1 -3 -8 -9 -select * from t44 order by colint; -colint col1 -60 9 -select * from t55 order by colint; -colint col1 -60 9 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 select * from t66 order by colint; colint col1 +5 23 +6 34 +7 56 +8 56 +9 45 +10 34 +11 78 +12 89 +13 67 +14 46 +15 34 +16 324 +17 345 +18 34 +19 78 +20 567 +21 4 +22 435 +23 34 +24 45 +25 4565 +26 4 +27 3 +28 2 +29 3 +30 15 +31 6 +32 8 +33 9 +34 745 +35 34 +36 34 +37 324 +38 67 +39 78 +40 89 +41 90 +42 78967 +50 56 +51 34 +55 123 +60 19 ------------------------- ---- some alter table end ------------------------- @@ -4225,9 +3429,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-02-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select day(col1) from t1 order by col1; day(col1) 17 @@ -4721,9 +3925,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-02-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofmonth(col1) from t1 order by col1; dayofmonth(col1) 17 @@ -5217,9 +4421,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-02-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofweek(col1) from t1 order by col1; dayofweek(col1) 3 @@ -5725,9 +4929,9 @@ insert into t2 values ('2006-02-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-02-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofyear(col1) from t1 order by col1; dayofyear(col1) 3 @@ -6223,9 +5427,9 @@ insert into t2 values ('2006-02-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-02-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select dayofyear(col1) from t1 order by col1; dayofyear(col1) 3 @@ -6721,9 +5925,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-02-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select extract(month from col1) from t1 order by col1; extract(month from col1) 1 @@ -7219,9 +6423,9 @@ insert into t2 values ('21:59'); insert into t3 values ('09:09'); insert into t3 values ('14:30'); insert into t3 values ('21:59'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select hour(col1) from t1 order by col1; hour(col1) 9 @@ -7723,9 +6927,9 @@ insert into t2 values ('00:59:22.000024'); insert into t3 values ('09:09:15.000002'); insert into t3 values ('04:30:01.000018'); insert into t3 values ('00:59:22.000024'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select microsecond(col1) from t1 order by col1; microsecond(col1) 0 @@ -8213,9 +7417,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:15'); insert into t3 values ('14:30:45'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select minute(col1) from t1 order by col1; minute(col1) 9 @@ -8723,9 +7927,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:09'); insert into t3 values ('14:30:20'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select second(col1) from t1 order by col1; second(col1) 9 @@ -9233,9 +8437,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:09'); insert into t3 values ('14:30:20'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select second(col1) from t1 order by col1; second(col1) 9 @@ -9743,9 +8947,9 @@ insert into t2 values ('2006-05-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-12-17'); insert into t3 values ('2006-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select month(col1) from t1 order by col1; month(col1) 1 @@ -10247,9 +9451,9 @@ insert into t2 values ('2006-09-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-12-17'); insert into t3 values ('2006-09-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select quarter(col1) from t1 order by col1; quarter(col1) 1 @@ -10749,9 +9953,9 @@ insert into t2 values ('21:59:22'); insert into t3 values ('09:09:15'); insert into t3 values ('14:30:45'); insert into t3 values ('21:59:22'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_time.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_time.inc' into table t6; select time_to_sec(col1)-(time_to_sec(col1)-20) from t1 order by col1; time_to_sec(col1)-(time_to_sec(col1)-20) 20 @@ -11257,9 +10461,9 @@ insert into t2 values ('2006-01-25'); insert into t3 values ('2006-02-03'); insert into t3 values ('2006-01-17'); insert into t3 values ('2006-01-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select to_days(col1)-to_days('2006-01-01') from t1 order by col1; to_days(col1)-to_days('2006-01-01') 16 @@ -11701,6 +10905,506 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- +--- datediff(col1, '2006-01-01') in partition with coltype date +------------------------------------------------------------------------- +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +------------------------------------------------------------------------- +--- Create tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +create table t1 (col1 date) engine='MYISAM' +partition by range(datediff(col1, '2006-01-01')) +(partition p0 values less than (15), +partition p1 values less than maxvalue); +create table t2 (col1 date) engine='MYISAM' +partition by list(datediff(col1, '2006-01-01')) +(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +create table t3 (col1 date) engine='MYISAM' +partition by hash(datediff(col1, '2006-01-01')); +create table t4 (colint int, col1 date) engine='MYISAM' +partition by range(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than maxvalue); +create table t5 (colint int, col1 date) engine='MYISAM' +partition by list(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +create table t6 (colint int, col1 date) engine='MYISAM' +partition by range(colint) +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +------------------------------------------------------------------------- +--- Access tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +insert into t1 values ('2006-02-03'); +insert into t1 values ('2006-01-17'); +insert into t2 values ('2006-02-03'); +insert into t2 values ('2006-01-17'); +insert into t2 values ('2006-01-25'); +insert into t3 values ('2006-02-03'); +insert into t3 values ('2006-01-17'); +insert into t3 values ('2006-01-25'); +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; +select datediff(col1, '2006-01-01') from t1 order by col1; +datediff(col1, '2006-01-01') +16 +33 +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-03 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-03 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-03 +select * from t4 order by colint; +colint col1 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t5 order by colint; +colint col1 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t6 order by colint; +colint col1 +1 2006-02-03 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +update t1 set col1='2006-02-06' where col1='2006-02-03'; +update t2 set col1='2006-02-06' where col1='2006-02-03'; +update t3 set col1='2006-02-06' where col1='2006-02-03'; +update t4 set col1='2006-02-06' where col1='2006-02-03'; +update t5 set col1='2006-02-06' where col1='2006-02-03'; +update t6 set col1='2006-02-06' where col1='2006-02-03'; +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t5 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t6 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +------------------------------------------------------------------------- +--- Alter tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +create table t11 engine='MYISAM' as select * from t1; +create table t22 engine='MYISAM' as select * from t2; +create table t33 engine='MYISAM' as select * from t3; +create table t44 engine='MYISAM' as select * from t4; +create table t55 engine='MYISAM' as select * from t5; +create table t66 engine='MYISAM' as select * from t6; +alter table t11 +partition by range(datediff(col1, '2006-01-01')) +(partition p0 values less than (15), +partition p1 values less than maxvalue); +alter table t22 +partition by list(datediff(col1, '2006-01-01')) +(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +alter table t33 +partition by hash(datediff(col1, '2006-01-01')); +alter table t44 +partition by range(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values less than (15), +partition p1 values less than maxvalue); +alter table t55 +partition by list(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 2 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +alter table t66 +partition by range(colint) +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t55 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +--------------------------- +---- some alter table begin +--------------------------- +alter table t11 +reorganize partition p0,p1 into +(partition s1 values less than maxvalue); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +alter table t11 +reorganize partition s1 into +(partition p0 values less than (15), +partition p1 values less than maxvalue); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +alter table t55 +partition by list(colint) +subpartition by hash(datediff(col1, '2006-01-01')) subpartitions 5 +(partition p0 values in (1,2,3,4,5,6,7,8,9,10), +partition p1 values in (11,12,13,14,15,16,17,18,19,20), +partition p2 values in (21,22,23,24,25,26,27,28,29,30), +partition p3 values in (31,32,33,34,35,36,37,38,39,40), +partition p4 values in (41,42,43,44,45,46,47,48,49,50), +partition p5 values in (51,52,53,54,55,56,57,58,59,60) +); +show create table t55; +Table Create Table +t55 CREATE TABLE `t55` ( + `colint` int(11) DEFAULT NULL, + `col1` date DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (datediff(col1, '2006-01-01')) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ +select * from t55 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition p0,p1 into +(partition s1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition s1 into +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition p0,p1 into +(partition s1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +alter table t66 +reorganize partition s1 into +(partition p0 values less than (datediff('2006-02-02', '2006-01-01')), +partition p1 values less than maxvalue); +select * from t66 order by colint; +colint col1 +1 2006-02-06 +2 2006-01-17 +3 2006-01-25 +4 2006-02-05 +------------------------------------------------------------------------- +--- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +delete from t1 where col1='2006-01-17'; +delete from t2 where col1='2006-01-17'; +delete from t3 where col1='2006-01-17'; +delete from t4 where col1='2006-01-17'; +delete from t5 where col1='2006-01-17'; +delete from t6 where col1='2006-01-17'; +select * from t1 order by col1; +col1 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +select * from t5 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +insert into t1 values ('2006-01-17'); +insert into t2 values ('2006-01-17'); +insert into t3 values ('2006-01-17'); +insert into t4 values (60,'2006-01-17'); +insert into t5 values (60,'2006-01-17'); +insert into t6 values (60,'2006-01-17'); +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t5 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t6 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +alter table t1 drop partition p0; +alter table t2 drop partition p0; +alter table t4 drop partition p0; +alter table t5 drop partition p0; +alter table t6 drop partition p0; +select * from t1 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t2 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t3 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t4 order by colint; +colint col1 +60 2006-01-17 +select * from t5 order by colint; +colint col1 +60 2006-01-17 +select * from t6 order by colint; +colint col1 +60 2006-01-17 +------------------------------------------------------------------------- +--- Delete rows and partitions of tables with datediff(col1, '2006-01-01') +------------------------------------------------------------------------- +delete from t11 where col1='2006-01-17'; +delete from t22 where col1='2006-01-17'; +delete from t33 where col1='2006-01-17'; +delete from t44 where col1='2006-01-17'; +delete from t55 where col1='2006-01-17'; +delete from t66 where col1='2006-01-17'; +select * from t11 order by col1; +col1 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +select * from t55 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +insert into t11 values ('2006-01-17'); +insert into t22 values ('2006-01-17'); +insert into t33 values ('2006-01-17'); +insert into t44 values (60,'2006-01-17'); +insert into t55 values (60,'2006-01-17'); +insert into t66 values (60,'2006-01-17'); +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t55 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +select * from t66 order by colint; +colint col1 +1 2006-02-06 +3 2006-01-25 +4 2006-02-05 +60 2006-01-17 +alter table t11 drop partition p0; +alter table t22 drop partition p0; +alter table t44 drop partition p0; +alter table t55 drop partition p0; +alter table t66 drop partition p0; +select * from t11 order by col1; +col1 +2006-01-17 +2006-02-06 +select * from t22 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t33 order by col1; +col1 +2006-01-17 +2006-01-25 +2006-02-06 +select * from t44 order by colint; +colint col1 +60 2006-01-17 +select * from t55 order by colint; +colint col1 +60 2006-01-17 +select * from t66 order by colint; +colint col1 +60 2006-01-17 +------------------------- +---- some alter table end +------------------------- +drop table if exists t1 ; +drop table if exists t2 ; +drop table if exists t3 ; +drop table if exists t4 ; +drop table if exists t5 ; +drop table if exists t6 ; +drop table if exists t11 ; +drop table if exists t22 ; +drop table if exists t33 ; +drop table if exists t44 ; +drop table if exists t55 ; +drop table if exists t66 ; +------------------------------------------------------------------------- --- weekday(col1) in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; @@ -11757,9 +11461,9 @@ insert into t2 values ('2006-05-25'); insert into t3 values ('2006-12-03'); insert into t3 values ('2006-11-17'); insert into t3 values ('2006-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select weekday(col1) from t1 order by col1; weekday(col1) 4 @@ -12201,514 +11905,6 @@ drop table if exists t44 ; drop table if exists t55 ; drop table if exists t66 ; ------------------------------------------------------------------------- ---- weekofyear(col1) in partition with coltype date -------------------------------------------------------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -------------------------------------------------------------------------- ---- Create tables with weekofyear(col1) -------------------------------------------------------------------------- -create table t1 (col1 date) engine='MYISAM' -partition by range(weekofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t2 (col1 date) engine='MYISAM' -partition by list(weekofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t3 (col1 date) engine='MYISAM' -partition by hash(weekofyear(col1)); -create table t4 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -create table t5 (colint int, col1 date) engine='MYISAM' -partition by list(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -create table t6 (colint int, col1 date) engine='MYISAM' -partition by range(colint) -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -------------------------------------------------------------------------- ---- Access tables with weekofyear(col1) -------------------------------------------------------------------------- -insert into t1 values ('2006-01-03'); -insert into t1 values ('2006-03-17'); -insert into t2 values ('2006-01-03'); -insert into t2 values ('2006-03-17'); -insert into t2 values ('2006-05-25'); -insert into t3 values ('2006-01-03'); -insert into t3 values ('2006-03-17'); -insert into t3 values ('2006-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; -select weekofyear(col1) from t1 order by col1; -weekofyear(col1) -1 -11 -select * from t1 order by col1; -col1 -2006-01-03 -2006-03-17 -select * from t2 order by col1; -col1 -2006-01-03 -2006-03-17 -2006-05-25 -select * from t3 order by col1; -col1 -2006-01-03 -2006-03-17 -2006-05-25 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -update t1 set col1='2006-09-06' where col1='2006-01-03'; -update t2 set col1='2006-09-06' where col1='2006-01-03'; -update t3 set col1='2006-09-06' where col1='2006-01-03'; -update t4 set col1='2006-09-06' where col1='2006-01-03'; -update t5 set col1='2006-09-06' where col1='2006-01-03'; -update t6 set col1='2006-09-06' where col1='2006-01-03'; -select * from t1 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t2 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Alter tables with weekofyear(col1) -------------------------------------------------------------------------- -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -create table t11 engine='MYISAM' as select * from t1; -create table t22 engine='MYISAM' as select * from t2; -create table t33 engine='MYISAM' as select * from t3; -create table t44 engine='MYISAM' as select * from t4; -create table t55 engine='MYISAM' as select * from t5; -create table t66 engine='MYISAM' as select * from t6; -alter table t11 -partition by range(weekofyear(col1)) -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t22 -partition by list(weekofyear(col1)) -(partition p0 values in (0,1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t33 -partition by hash(weekofyear(col1)); -alter table t44 -partition by range(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values less than (15), -partition p1 values less than maxvalue); -alter table t55 -partition by list(colint) -subpartition by hash(weekofyear(col1)) subpartitions 2 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -alter table t66 -partition by range(colint) -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t22 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 ---------------------------- ----- some alter table begin ---------------------------- -alter table t11 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -alter table t11 -reorganize partition s1 into -(partition p0 values less than (15), -partition p1 values less than maxvalue); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -alter table t55 -partition by list(colint) -subpartition by hash(weekofyear(col1)) subpartitions 5 -(partition p0 values in (1,2,3,4,5,6,7,8,9,10), -partition p1 values in (11,12,13,14,15,16,17,18,19,20), -partition p2 values in (21,22,23,24,25,26,27,28,29,30), -partition p3 values in (31,32,33,34,35,36,37,38,39,40), -partition p4 values in (41,42,43,44,45,46,47,48,49,50), -partition p5 values in (51,52,53,54,55,56,57,58,59,60) -); -show create table t55; -Table Create Table -t55 CREATE TABLE `t55` ( - `colint` int(11) DEFAULT NULL, - `col1` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (colint) SUBPARTITION BY HASH (weekofyear(col1)) SUBPARTITIONS 5 (PARTITION p0 VALUES IN (1,2,3,4,5,6,7,8,9,10) ENGINE = MyISAM, PARTITION p1 VALUES IN (11,12,13,14,15,16,17,18,19,20) ENGINE = MyISAM, PARTITION p2 VALUES IN (21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION p3 VALUES IN (31,32,33,34,35,36,37,38,39,40) ENGINE = MyISAM, PARTITION p4 VALUES IN (41,42,43,44,45,46,47,48,49,50) ENGINE = MyISAM, PARTITION p5 VALUES IN (51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition p0,p1 into -(partition s1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -alter table t66 -reorganize partition s1 into -(partition p0 values less than (weekofyear('2006-02-14')), -partition p1 values less than maxvalue); -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekofyear(col1) -------------------------------------------------------------------------- -delete from t1 where col1='2006-03-17'; -delete from t2 where col1='2006-03-17'; -delete from t3 where col1='2006-03-17'; -delete from t4 where col1='2006-03-17'; -delete from t5 where col1='2006-03-17'; -delete from t6 where col1='2006-03-17'; -select * from t1 order by col1; -col1 -2006-09-06 -select * from t2 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t1 values ('2006-03-17'); -insert into t2 values ('2006-03-17'); -insert into t3 values ('2006-03-17'); -insert into t4 values (60,'2006-03-17'); -insert into t5 values (60,'2006-03-17'); -insert into t6 values (60,'2006-03-17'); -select * from t1 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t2 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t5 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t6 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -alter table t1 drop partition p0; -alter table t2 drop partition p0; -alter table t4 drop partition p0; -alter table t5 drop partition p0; -alter table t6 drop partition p0; -select * from t1 order by col1; -col1 -2006-09-06 -select * from t2 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t3 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t4 order by colint; -colint col1 -60 2006-03-17 -select * from t5 order by colint; -colint col1 -60 2006-03-17 -select * from t6 order by colint; -colint col1 -60 2006-03-17 -------------------------------------------------------------------------- ---- Delete rows and partitions of tables with weekofyear(col1) -------------------------------------------------------------------------- -delete from t11 where col1='2006-03-17'; -delete from t22 where col1='2006-03-17'; -delete from t33 where col1='2006-03-17'; -delete from t44 where col1='2006-03-17'; -delete from t55 where col1='2006-03-17'; -delete from t66 where col1='2006-03-17'; -select * from t11 order by col1; -col1 -2006-09-06 -select * from t22 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -insert into t11 values ('2006-03-17'); -insert into t22 values ('2006-03-17'); -insert into t33 values ('2006-03-17'); -insert into t44 values (60,'2006-03-17'); -insert into t55 values (60,'2006-03-17'); -insert into t66 values (60,'2006-03-17'); -select * from t11 order by col1; -col1 -2006-03-17 -2006-09-06 -select * from t22 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t55 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -select * from t66 order by colint; -colint col1 -1 2006-02-03 -2 2006-01-17 -3 2006-01-25 -4 2006-02-05 -60 2006-03-17 -alter table t11 drop partition p0; -alter table t22 drop partition p0; -alter table t44 drop partition p0; -alter table t55 drop partition p0; -alter table t66 drop partition p0; -select * from t11 order by col1; -col1 -2006-09-06 -select * from t22 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t33 order by col1; -col1 -2006-03-17 -2006-05-25 -2006-09-06 -select * from t44 order by colint; -colint col1 -60 2006-03-17 -select * from t55 order by colint; -colint col1 -60 2006-03-17 -select * from t66 order by colint; -colint col1 -60 2006-03-17 -------------------------- ----- some alter table end -------------------------- -drop table if exists t1 ; -drop table if exists t2 ; -drop table if exists t3 ; -drop table if exists t4 ; -drop table if exists t5 ; -drop table if exists t6 ; -drop table if exists t11 ; -drop table if exists t22 ; -drop table if exists t33 ; -drop table if exists t44 ; -drop table if exists t55 ; -drop table if exists t66 ; -------------------------------------------------------------------------- --- year(col1)-1990 in partition with coltype date ------------------------------------------------------------------------- drop table if exists t1 ; @@ -12765,9 +11961,9 @@ insert into t2 values ('2004-05-25'); insert into t3 values ('1996-01-03'); insert into t3 values ('2000-02-17'); insert into t3 values ('2004-05-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select year(col1)-1990 from t1 order by col1; year(col1)-1990 6 @@ -13269,9 +12465,9 @@ insert into t2 values ('2006-03-25'); insert into t3 values ('2006-01-03'); insert into t3 values ('2006-08-17'); insert into t3 values ('2006-03-25'); -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t4; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t5; -load data infile 'MYSQL_TEST_DIR/suite/parts/inc/part_supported_sql_funcs_int_date.inc' into table t6; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t4; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t5; +load data infile '../std_data_ln/parts/part_supported_sql_funcs_int_date.inc' into table t6; select yearweek(col1)-200600 from t1 order by col1; yearweek(col1)-200600 1 diff --git a/mysql-test/suite/parts/r/partition_alter3_innodb.result b/mysql-test/suite/parts/r/partition_alter3_innodb.result index 25387301cdb..7228462c61d 100644 --- a/mysql-test/suite/parts/r/partition_alter3_innodb.result +++ b/mysql-test/suite/parts/r/partition_alter3_innodb.result @@ -64,7 +64,7 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where @@ -78,15 +78,15 @@ id select_type table partitions type possible_keys key key_len ref rows Extra ALTER TABLE t1 ADD PARTITION (PARTITION part2); ERROR HY000: Partition management on a not partitioned table is not possible # 1.1.2 Assign HASH partitioning -ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -95,51 +95,30 @@ id select_type table partitions type possible_keys key key_len ref rows Extra # check read row by row success: 1 # 1.1.3 Assign other HASH partitioning to already partitioned table # + test and switch back + test -ALTER TABLE t1 PARTITION BY HASH(CAST(f_varchar AS SIGNED INTEGER)); -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '20 ' -Warning 1292 Truncated incorrect INTEGER value: '19 ' -Warning 1292 Truncated incorrect INTEGER value: '18 ' -Warning 1292 Truncated incorrect INTEGER value: '17 ' -Warning 1292 Truncated incorrect INTEGER value: '16 ' -Warning 1292 Truncated incorrect INTEGER value: '15 ' -Warning 1292 Truncated incorrect INTEGER value: '14 ' -Warning 1292 Truncated incorrect INTEGER value: '13 ' -Warning 1292 Truncated incorrect INTEGER value: '12 ' -Warning 1292 Truncated incorrect INTEGER value: '11 ' -Warning 1292 Truncated incorrect INTEGER value: '10 ' -Warning 1292 Truncated incorrect INTEGER value: '9 ' -Warning 1292 Truncated incorrect INTEGER value: '8 ' -Warning 1292 Truncated incorrect INTEGER value: '7 ' -Warning 1292 Truncated incorrect INTEGER value: '6 ' -Warning 1292 Truncated incorrect INTEGER value: '5 ' -Warning 1292 Truncated incorrect INTEGER value: '4 ' -Warning 1292 Truncated incorrect INTEGER value: '3 ' -Warning 1292 Truncated incorrect INTEGER value: '2 ' -Warning 1292 Truncated incorrect INTEGER value: '1 ' +ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(f_varchar AS SIGNED INTEGER)) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where # check read single success: 1 # check read all success: 1 # check read row by row success: 1 -ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -158,9 +137,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where @@ -177,9 +156,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where @@ -193,9 +172,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB, PARTITION p7 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB, PARTITION p7 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where @@ -221,9 +200,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where @@ -236,9 +215,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where @@ -251,9 +230,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where @@ -266,9 +245,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where @@ -281,9 +260,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where @@ -296,9 +275,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where @@ -311,9 +290,9 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = InnoDB) */ +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -331,7 +310,7 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where @@ -370,7 +349,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where @@ -392,8 +371,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -416,8 +395,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where @@ -435,8 +414,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where @@ -454,8 +433,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB, PARTITION p7 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where @@ -480,8 +459,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB, PARTITION p6 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where @@ -498,8 +477,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB, PARTITION p5 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where @@ -516,8 +495,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB, PARTITION p4 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where @@ -534,8 +513,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where @@ -552,8 +531,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB, PARTITION part7 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where @@ -570,8 +549,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB, PARTITION part1 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where @@ -588,8 +567,8 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = InnoDB) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -610,7 +589,7 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where diff --git a/mysql-test/suite/parts/r/partition_alter3_myisam.result b/mysql-test/suite/parts/r/partition_alter3_myisam.result index f320dd69dd7..c24858aa2ca 100644 --- a/mysql-test/suite/parts/r/partition_alter3_myisam.result +++ b/mysql-test/suite/parts/r/partition_alter3_myisam.result @@ -64,9 +64,9 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.MYD +MYSQLTEST_VARDIR/master-data/test/t1.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where @@ -80,17 +80,17 @@ id select_type table partitions type possible_keys key key_len ref rows Extra ALTER TABLE t1 ADD PARTITION (PARTITION part2); ERROR HY000: Partition management on a not partitioned table is not possible # 1.1.2 Assign HASH partitioning -ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -99,55 +99,34 @@ id select_type table partitions type possible_keys key key_len ref rows Extra # check read row by row success: 1 # 1.1.3 Assign other HASH partitioning to already partitioned table # + test and switch back + test -ALTER TABLE t1 PARTITION BY HASH(CAST(f_varchar AS SIGNED INTEGER)); -Warnings: -Warning 1292 Truncated incorrect INTEGER value: '20' -Warning 1292 Truncated incorrect INTEGER value: '19' -Warning 1292 Truncated incorrect INTEGER value: '18' -Warning 1292 Truncated incorrect INTEGER value: '17' -Warning 1292 Truncated incorrect INTEGER value: '16' -Warning 1292 Truncated incorrect INTEGER value: '15' -Warning 1292 Truncated incorrect INTEGER value: '14' -Warning 1292 Truncated incorrect INTEGER value: '13' -Warning 1292 Truncated incorrect INTEGER value: '12' -Warning 1292 Truncated incorrect INTEGER value: '11' -Warning 1292 Truncated incorrect INTEGER value: '10' -Warning 1292 Truncated incorrect INTEGER value: '90' -Warning 1292 Truncated incorrect INTEGER value: '80' -Warning 1292 Truncated incorrect INTEGER value: '70' -Warning 1292 Truncated incorrect INTEGER value: '60' -Warning 1292 Truncated incorrect INTEGER value: '50' -Warning 1292 Truncated incorrect INTEGER value: '40' -Warning 1292 Truncated incorrect INTEGER value: '30' -Warning 1292 Truncated incorrect INTEGER value: '20' -Warning 1292 Truncated incorrect INTEGER value: '10' +ALTER TABLE t1 PARTITION BY HASH(DAYOFYEAR(f_date)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(f_varchar AS SIGNED INTEGER)) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (DAYOFYEAR(f_date)) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where # check read single success: 1 # check read all success: 1 # check read row by row success: 1 -ALTER TABLE t1 PARTITION BY HASH(CAST(YEAR(f_date) AS SIGNED INTEGER)); +ALTER TABLE t1 PARTITION BY HASH(YEAR(f_date)); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -166,15 +145,15 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where @@ -191,17 +170,17 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where @@ -215,25 +194,25 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM, PARTITION p7 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM, PARTITION p7 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 3 Using where @@ -259,23 +238,23 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where @@ -288,21 +267,21 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 4 Using where @@ -315,19 +294,19 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where @@ -340,17 +319,17 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 5 Using where @@ -363,15 +342,15 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part1 ALL NULL NULL NULL NULL 7 Using where @@ -384,13 +363,13 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where @@ -403,11 +382,11 @@ Table Create Table t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (CAST(YEAR(f_date) AS SIGNED INTEGER)) (PARTITION p0 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (YEAR(f_date)) (PARTITION p0 ENGINE = MyISAM) */ +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -425,9 +404,9 @@ t1 CREATE TABLE `t1` ( `f_date` date DEFAULT NULL, `f_varchar` varchar(30) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.MYD +MYSQLTEST_VARDIR/master-data/test/t1.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) FROM t1 WHERE f_date = '1000-02-10'; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where @@ -460,9 +439,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.MYD +MYSQLTEST_VARDIR/master-data/test/t1.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where @@ -484,10 +463,10 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -510,14 +489,14 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where @@ -535,16 +514,16 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where @@ -562,24 +541,24 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM, PARTITION p7 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p7.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p6 ALL NULL NULL NULL NULL 3 Using where @@ -604,22 +583,22 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM, PARTITION p6 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p6.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p6.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 4 Using where @@ -636,20 +615,20 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 3 Using where @@ -666,18 +645,18 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p4 ALL NULL NULL NULL NULL 10 Using where @@ -694,16 +673,16 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 5 Using where @@ -720,14 +699,14 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM, PARTITION part7 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part7.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part7.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 part7 ALL NULL NULL NULL NULL 7 Using where @@ -744,12 +723,12 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM, PARTITION part1 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 10 Using where @@ -766,10 +745,10 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p0 ENGINE = MyISAM) */ -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p0.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.par EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p0 ALL NULL NULL NULL NULL 20 Using where @@ -790,9 +769,9 @@ t1 CREATE TABLE `t1` ( `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYD -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.MYI -/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm +MYSQLTEST_VARDIR/master-data/test/t1.MYD +MYSQLTEST_VARDIR/master-data/test/t1.MYI +MYSQLTEST_VARDIR/master-data/test/t1.frm EXPLAIN PARTITIONS SELECT COUNT(*) <> 1 FROM t1 WHERE f_int1 = 3; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 NULL ALL NULL NULL NULL NULL 20 Using where diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result index f9ae10caf18..dc875980678 100644 --- a/mysql-test/suite/parts/r/partition_basic_innodb.result +++ b/mysql-test/suite/parts/r/partition_basic_innodb.result @@ -59,15 +59,6 @@ SET @@session.sql_mode= ''; #------------------------------------------------------------------------ # 1.1 The partitioning function contains one column. DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -513,6 +504,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -956,6 +949,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -1399,52 +1394,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) - -, -PARTITION partb VALUES LESS THAN (5) - -, -PARTITION partc VALUES LESS THAN (10) - -, -PARTITION partd VALUES LESS THAN (10 + 5) - -, -PARTITION parte VALUES LESS THAN (20) - -, -PARTITION partf VALUES LESS THAN (2147483646) - -)'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) - -, -PARTITION partb VALUES LESS THAN (5) - -, -PARTITION partc VALUES LESS THAN (10) - -, -PARTITION partd VALUES LESS THAN (10 + 5) - -, -PARTITION parte VALUES LESS THAN (20) - -, -PARTITION partf VALUES LESS THAN (2147483646) - -); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -1888,27 +1837,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) - -, -PARTITION partb VALUES LESS THAN (5) - -, -PARTITION partc VALUES LESS THAN (10) - -, -PARTITION partd VALUES LESS THAN (2147483646) - -); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -2354,31 +2282,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) - - -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) - - -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) - - -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) - - -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -2822,47 +2725,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - - - (SUBPARTITION sp11 - - , - SUBPARTITION sp12 - - ), - PARTITION part2 VALUES IN (1) - - - (SUBPARTITION sp21 - - , - SUBPARTITION sp22 - - ), - PARTITION part3 VALUES IN (2) - - - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - - - (SUBPARTITION sp41 - - , - SUBPARTITION sp42 - - )); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -3308,25 +3170,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - - , - PARTITION part2 VALUES IN (1) - - , - PARTITION part3 VALUES IN (NULL) - - ); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -3773,25 +3616,6 @@ DROP TABLE t1; unified filelist --- not determined --- # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 2 -(PARTITION p1 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p2 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -3804,7 +3628,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4237,40 +4061,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 5 -(PARTITION p1 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p2 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p3 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p4 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p5 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -4283,7 +4073,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4716,6 +4506,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -4726,7 +4518,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5159,76 +4951,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -5241,7 +4963,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5672,35 +5394,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -5713,7 +5406,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6146,39 +5839,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -6191,7 +5851,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6622,67 +6282,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp12 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp22 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -6695,7 +6294,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7128,31 +6727,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part3 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -7165,7 +6739,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7599,15 +7173,6 @@ DROP TABLE t1; unified filelist --- not determined --- DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -8053,6 +7618,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -8496,6 +8063,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -8506,7 +8075,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8939,52 +8508,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'', -PARTITION partf VALUES LESS THAN (2147483646) -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', -PARTITION partf VALUES LESS THAN (2147483646) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -8997,7 +8520,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9428,27 +8951,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -9461,7 +8963,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9894,31 +9396,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -9931,7 +9408,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10362,51 +9839,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', - SUBPARTITION sp12 - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', - SUBPARTITION sp22 - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -10419,7 +9851,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14476,15 +13908,6 @@ DROP TABLE t1; #------------------------------------------------------------------------ # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -14967,6 +14390,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -15447,6 +14872,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -15459,7 +14886,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15927,76 +15354,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -16011,7 +15368,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16477,35 +15834,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -16520,7 +15848,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16988,39 +16316,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -17035,7 +16330,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17501,67 +16796,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp12 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp22 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -17576,7 +16810,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18044,31 +17278,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part3 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -18083,7 +17292,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18552,15 +17761,6 @@ DROP TABLE t1; unified filelist --- not determined --- DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -19043,6 +18243,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -19523,6 +18725,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -19535,7 +18739,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20003,76 +19207,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -20087,7 +19221,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20553,35 +19687,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -20596,7 +19701,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21064,39 +20169,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -21111,7 +20183,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21577,67 +20649,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp12 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp22 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -21652,7 +20663,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22120,31 +21131,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part3 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -22159,7 +21145,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22628,15 +21614,6 @@ DROP TABLE t1; unified filelist --- not determined --- DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -23135,6 +22112,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -23631,6 +22610,8 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -23643,7 +22624,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24127,76 +23108,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -24211,7 +23122,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24693,35 +23604,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -24736,7 +23618,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25220,39 +24102,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -25267,7 +24116,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25749,67 +24598,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp12 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp22 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -25824,7 +24612,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -26308,31 +25096,6 @@ DROP TABLE t1; # We found: unified filelist --- not determined --- -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part3 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -26347,7 +25110,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result index 3a4a1c0d571..471eb4973f6 100644 --- a/mysql-test/suite/parts/r/partition_basic_myisam.result +++ b/mysql-test/suite/parts/r/partition_basic_myisam.result @@ -59,15 +59,6 @@ SET @@session.sql_mode= ''; #------------------------------------------------------------------------ # 1.1 The partitioning function contains one column. DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -517,6 +508,8 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -970,6 +963,8 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -1429,52 +1424,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) - -, -PARTITION partb VALUES LESS THAN (5) - -, -PARTITION partc VALUES LESS THAN (10) - -, -PARTITION partd VALUES LESS THAN (10 + 5) - -, -PARTITION parte VALUES LESS THAN (20) - -, -PARTITION partf VALUES LESS THAN (2147483646) - -)'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) - -, -PARTITION partb VALUES LESS THAN (5) - -, -PARTITION partc VALUES LESS THAN (10) - -, -PARTITION partd VALUES LESS THAN (10 + 5) - -, -PARTITION parte VALUES LESS THAN (20) - -, -PARTITION partf VALUES LESS THAN (2147483646) - -); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -1930,27 +1879,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) - -, -PARTITION partb VALUES LESS THAN (5) - -, -PARTITION partc VALUES LESS THAN (10) - -, -PARTITION partd VALUES LESS THAN (2147483646) - -); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -2412,31 +2340,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) - - -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) - - -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) - - -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) - - -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -2896,47 +2799,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - - - (SUBPARTITION sp11 - - , - SUBPARTITION sp12 - - ), - PARTITION part2 VALUES IN (1) - - - (SUBPARTITION sp21 - - , - SUBPARTITION sp22 - - ), - PARTITION part3 VALUES IN (2) - - - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - - - (SUBPARTITION sp41 - - , - SUBPARTITION sp42 - - )); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -3398,25 +3260,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - - , - PARTITION part2 VALUES IN (1) - - , - PARTITION part3 VALUES IN (NULL) - - ); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -3881,25 +3724,6 @@ TRUNCATE t1; # End usability test (include/partition_check.inc) DROP TABLE t1; # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 2 -(PARTITION p1 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p2 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -3912,7 +3736,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD @@ -4343,68 +4167,34 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 5 -(PARTITION p1 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p2 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p3 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p4 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION p5 -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -4417,7 +4207,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD @@ -4860,34 +4650,36 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p5.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p5.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#p5.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p4.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#p5.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p4.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#p5.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -4898,7 +4690,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -5353,104 +5145,34 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_N.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_N.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part_N.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_3.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part_N.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_3.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part_N.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -5463,7 +5185,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -5908,63 +5630,34 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partf.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partf.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partf.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parte.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partf.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parte.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partf.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -5977,7 +5670,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -6432,67 +6125,34 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#partd#SP#partdsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta#SP#partasp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#parta#SP#partasp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb#SP#partbsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partb#SP#partbsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc#SP#partcsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partc#SP#partcsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd#SP#partdsp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#partd#SP#partdsp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta#SP#partasp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#parta#SP#partasp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb#SP#partbsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partb#SP#partbsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc#SP#partcsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partc#SP#partcsp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd#SP#partdsp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -6505,7 +6165,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -6958,95 +6618,34 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#subpart42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#subpart42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#subpart42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#subpart11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#subpart12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#subpart21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#subpart22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#subpart31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#subpart32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#subpart41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#subpart42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#subpart11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#subpart12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#subpart21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#subpart22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#subpart31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#subpart32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#subpart41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#subpart42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp12 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp22 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -7059,7 +6658,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -7514,59 +7113,34 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#sp42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#sp42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part4#SP#sp42.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#sp11.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#sp12.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#sp21.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#sp22.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#sp31.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#sp32.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#sp41.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part4#SP#sp42.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#sp11.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#sp12.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#sp21.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#sp22.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#sp31.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#sp32.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#sp41.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part4#SP#sp42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part3 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -7579,7 +7153,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD @@ -8038,44 +7612,35 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ -File list /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1#P#part3#SP#part3sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.frm /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/t1.par /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part1#SP#part1sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part2#SP#part2sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp0.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp1.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/t1#P#part3#SP#part3sp2.MYD /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part1#SP#part1sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part2#SP#part2sp2.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp0.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp1.MYI /data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI # check layout success: 0 # End usability test (include/partition_check.inc) DROP TABLE t1; DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -8525,6 +8090,8 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -8978,6 +8545,8 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -8988,7 +8557,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -9437,52 +9006,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'', -PARTITION partf VALUES LESS THAN (2147483646) -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', -PARTITION partf VALUES LESS THAN (2147483646) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -9495,7 +9018,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -9938,27 +9461,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -9971,7 +9473,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -10420,31 +9922,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -10457,7 +9934,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -10904,51 +10381,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) - -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', - SUBPARTITION sp12 - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data', - SUBPARTITION sp22 - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -10961,7 +10393,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -15190,15 +14622,6 @@ DROP TABLE t1; #------------------------------------------------------------------------ # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns DROP TABLE IF EXISTS t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY HASH(f_int1) PARTITIONS 2; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -15701,6 +15124,8 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -16207,6 +15632,8 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) create_command SHOW CREATE TABLE t1; @@ -16219,7 +15646,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -16719,76 +16146,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -SET @aux = 'PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data'' -INDEX DIRECTORY = - ''/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'')'; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY RANGE(f_int1) -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (10 + 5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION parte VALUES LESS THAN (20) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partf VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -16803,7 +16160,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -17297,35 +16654,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partb VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partc VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', -PARTITION partd VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -17340,7 +16668,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -17840,39 +17168,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) -(PARTITION part1 VALUES LESS THAN (0) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' -INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' -(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -17887,7 +17182,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -18385,67 +17680,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp11 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp12 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp21 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp22 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'), - PARTITION part3 VALUES IN (2) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp31, - SUBPARTITION sp32), - PARTITION part4 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' - (SUBPARTITION sp41 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - SUBPARTITION sp42 - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index')); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -18460,7 +17694,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -18960,31 +18194,6 @@ TRUNCATE t1; # check layout success: 1 # End usability test (include/partition_check.inc) DROP TABLE t1; -CREATE TABLE t1 ( -f_int1 INTEGER, -f_int2 INTEGER, -f_char1 CHAR(20), -f_char2 CHAR(20), -f_charbig VARCHAR(1000) -, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part2 VALUES IN (1) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index', - PARTITION part3 VALUES IN (NULL) - DATA DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' - INDEX DIRECTORY = - '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index'); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (include/partition_check.inc) @@ -18999,7 +18208,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data/' INDEX DIRECTORY='/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/data' INDEX DIRECTORY = '/data0/mysql/mysql-5.1-build/mysql-test/var/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/master-data/test/data/' INDEX DIRECTORY='MYSQLTEST_VARDIR/master-data/test/index/' /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD diff --git a/mysql-test/suite/parts/r/partition_datetime_innodb.result b/mysql-test/suite/parts/r/partition_datetime_innodb.result index f8cf390ebbb..4ced059ba9e 100644 --- a/mysql-test/suite/parts/r/partition_datetime_innodb.result +++ b/mysql-test/suite/parts/r/partition_datetime_innodb.result @@ -186,7 +186,7 @@ a 1971-01-01 00:00:59 drop table t2; create table t3 (a timestamp not null, primary key(a)) engine='InnoDB' -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -198,7 +198,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */ 12 inserts; insert into t3 values (date_add('1970-01-01 00:00:00',interval 12-1 month)); insert into t3 values (date_add('1970-01-01 00:00:00',interval 11-1 month)); @@ -233,7 +233,7 @@ a 1970-12-01 00:00:00 drop table t3; create table t4 (a timestamp not null, primary key(a)) engine='InnoDB' -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (0,1,2,3), partition quarter2 values in (4,5,6), @@ -245,7 +245,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */ 12 inserts; insert into t4 values (date_add('1970-01-01 00:00:00',interval 12-1 month)); insert into t4 values (date_add('1970-01-01 00:00:00',interval 11-1 month)); @@ -517,7 +517,7 @@ a 1970-03-28 drop table t2; create table t3 (a date not null, primary key(a)) engine='InnoDB' -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -529,7 +529,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` date NOT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */ 12 inserts; insert into t3 values (adddate(19700101,interval 12-1 month)); insert into t3 values (adddate(19700101,interval 11-1 month)); @@ -562,7 +562,7 @@ a 1970-12-01 drop table t3; create table t4 (a date not null, primary key(a)) engine='InnoDB' -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3), partition quarter2 values in (4,5,6), @@ -574,7 +574,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` date NOT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */ 12 inserts; insert into t4 values (adddate(19700101,interval 12-1 month)); insert into t4 values (adddate(19700101,interval 11-1 month)); @@ -794,7 +794,7 @@ a 00:01:59 drop table t2; create table t3 (a time not null, primary key(a)) engine='InnoDB' -partition by range (cast(second(a) as unsigned)) subpartition by key (a) +partition by range (second(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (16), partition quarter2 values less than (31), @@ -806,7 +806,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` time NOT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = InnoDB) */ 59 inserts; insert into t3 values (100000+59); insert into t3 values (100000+58); @@ -933,7 +933,7 @@ a 10:00:59 drop table t3; create table t4 (a time not null, primary key(a)) engine='InnoDB' -partition by list (cast(second(a) as unsigned)) subpartition by key (a) +partition by list (second(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), partition quarter2 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), @@ -945,7 +945,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` time NOT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = InnoDB) */ 59 inserts; insert into t4 values (100000+59); insert into t4 values (100000+58); @@ -1259,7 +1259,7 @@ a 1970-01-01 00:00:59 drop table t2; create table t3 (a datetime not null, primary key(a)) engine='InnoDB' -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -1271,7 +1271,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` datetime NOT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = InnoDB, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = InnoDB) */ 12 inserts; insert into t3 values (adddate(19700101000000,interval 12-1 month)); insert into t3 values (adddate(19700101000000,interval 11-1 month)); @@ -1304,7 +1304,7 @@ a 1970-12-01 00:00:00 drop table t3; create table t4 (a datetime not null, primary key(a)) engine='InnoDB' -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3), partition quarter2 values in (4,5,6), @@ -1316,7 +1316,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` datetime NOT NULL, PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = InnoDB, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = InnoDB, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = InnoDB, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = InnoDB) */ 12 inserts; insert into t4 values (adddate(19700101000000,interval 12-1 month)); insert into t4 values (adddate(19700101000000,interval 11-1 month)); diff --git a/mysql-test/suite/parts/r/partition_datetime_myisam.result b/mysql-test/suite/parts/r/partition_datetime_myisam.result index 2c0091322e1..1ef281f2766 100644 --- a/mysql-test/suite/parts/r/partition_datetime_myisam.result +++ b/mysql-test/suite/parts/r/partition_datetime_myisam.result @@ -186,7 +186,7 @@ a 1971-01-01 00:00:59 drop table t2; create table t3 (a timestamp not null, primary key(a)) engine='MyISAM' -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -198,7 +198,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */ 12 inserts; insert into t3 values (date_add('1970-01-01 00:00:00',interval 12-1 month)); insert into t3 values (date_add('1970-01-01 00:00:00',interval 11-1 month)); @@ -233,7 +233,7 @@ a 1970-12-01 00:00:00 drop table t3; create table t4 (a timestamp not null, primary key(a)) engine='MyISAM' -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (0,1,2,3), partition quarter2 values in (4,5,6), @@ -245,7 +245,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (0,1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */ 12 inserts; insert into t4 values (date_add('1970-01-01 00:00:00',interval 12-1 month)); insert into t4 values (date_add('1970-01-01 00:00:00',interval 11-1 month)); @@ -517,7 +517,7 @@ a 1970-03-28 drop table t2; create table t3 (a date not null, primary key(a)) engine='MyISAM' -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -529,7 +529,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` date NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */ 12 inserts; insert into t3 values (adddate(19700101,interval 12-1 month)); insert into t3 values (adddate(19700101,interval 11-1 month)); @@ -562,7 +562,7 @@ a 1970-12-01 drop table t3; create table t4 (a date not null, primary key(a)) engine='MyISAM' -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3), partition quarter2 values in (4,5,6), @@ -574,7 +574,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` date NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */ 12 inserts; insert into t4 values (adddate(19700101,interval 12-1 month)); insert into t4 values (adddate(19700101,interval 11-1 month)); @@ -794,7 +794,7 @@ a 00:01:59 drop table t2; create table t3 (a time not null, primary key(a)) engine='MyISAM' -partition by range (cast(second(a) as unsigned)) subpartition by key (a) +partition by range (second(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (16), partition quarter2 values less than (31), @@ -806,7 +806,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` time NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (16) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (31) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (46) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (61) ENGINE = MyISAM) */ 59 inserts; insert into t3 values (100000+59); insert into t3 values (100000+58); @@ -933,7 +933,7 @@ a 10:00:59 drop table t3; create table t4 (a time not null, primary key(a)) engine='MyISAM' -partition by list (cast(second(a) as unsigned)) subpartition by key (a) +partition by list (second(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15), partition quarter2 values in (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30), @@ -945,7 +945,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` time NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(second(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (second(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14,15) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (16,17,18,19,20,21,22,23,24,25,26,27,28,29,30) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (31,32,33,34,35,36,37,38,39,40,41,42,43,44,45) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (46,47,48,49,50,51,52,53,54,55,56,57,58,59,60) ENGINE = MyISAM) */ 59 inserts; insert into t4 values (100000+59); insert into t4 values (100000+58); @@ -1259,7 +1259,7 @@ a 1970-01-01 00:00:59 drop table t2; create table t3 (a datetime not null, primary key(a)) engine='MyISAM' -partition by range (cast(month(a) as unsigned)) subpartition by key (a) +partition by range (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values less than (4), partition quarter2 values less than (7), @@ -1271,7 +1271,7 @@ Table Create Table t3 CREATE TABLE `t3` ( `a` datetime NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION quarter2 VALUES LESS THAN (7) ENGINE = MyISAM, PARTITION quarter3 VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION quarter4 VALUES LESS THAN (13) ENGINE = MyISAM) */ 12 inserts; insert into t3 values (adddate(19700101000000,interval 12-1 month)); insert into t3 values (adddate(19700101000000,interval 11-1 month)); @@ -1304,7 +1304,7 @@ a 1970-12-01 00:00:00 drop table t3; create table t4 (a datetime not null, primary key(a)) engine='MyISAM' -partition by list (cast(month(a) as unsigned)) subpartition by key (a) +partition by list (month(a)) subpartition by key (a) subpartitions 3 ( partition quarter1 values in (1,2,3), partition quarter2 values in (4,5,6), @@ -1316,7 +1316,7 @@ Table Create Table t4 CREATE TABLE `t4` ( `a` datetime NOT NULL, PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(month(a) as unsigned)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (month(a)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION quarter1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION quarter2 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION quarter3 VALUES IN (7,8,9) ENGINE = MyISAM, PARTITION quarter4 VALUES IN (10,11,12) ENGINE = MyISAM) */ 12 inserts; insert into t4 values (adddate(19700101000000,interval 12-1 month)); insert into t4 values (adddate(19700101000000,interval 11-1 month)); diff --git a/mysql-test/suite/parts/r/partition_decimal_innodb.result b/mysql-test/suite/parts/r/partition_decimal_innodb.result index 584ce91724e..c0a165cf189 100644 --- a/mysql-test/suite/parts/r/partition_decimal_innodb.result +++ b/mysql-test/suite/parts/r/partition_decimal_innodb.result @@ -87,95 +87,3 @@ select count(*) from t2; count(*) 3072 drop table t2; -create table t3 (a decimal(18,9) not null, primary key(a)) engine='InnoDB' -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 ( -partition pa2 values less than (2), -partition pa4 values less than (4), -partition pa6 values less than (6), -partition pa8 values less than (8), -partition pa10 values less than (10) -); -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` decimal(18,9) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES LESS THAN (2) ENGINE = InnoDB, PARTITION pa4 VALUES LESS THAN (4) ENGINE = InnoDB, PARTITION pa6 VALUES LESS THAN (6) ENGINE = InnoDB, PARTITION pa8 VALUES LESS THAN (8) ENGINE = InnoDB, PARTITION pa10 VALUES LESS THAN (10) ENGINE = InnoDB) */ -9*3 inserts; -insert into t3 values (9); -insert into t3 values (9+0.333333333); -insert into t3 values (9+0.755555555); -insert into t3 values (8); -insert into t3 values (8+0.333333333); -insert into t3 values (8+0.755555555); -insert into t3 values (7); -insert into t3 values (7+0.333333333); -insert into t3 values (7+0.755555555); -insert into t3 values (6); -insert into t3 values (6+0.333333333); -insert into t3 values (6+0.755555555); -insert into t3 values (5); -insert into t3 values (5+0.333333333); -insert into t3 values (5+0.755555555); -insert into t3 values (4); -insert into t3 values (4+0.333333333); -insert into t3 values (4+0.755555555); -insert into t3 values (3); -insert into t3 values (3+0.333333333); -insert into t3 values (3+0.755555555); -insert into t3 values (2); -insert into t3 values (2+0.333333333); -insert into t3 values (2+0.755555555); -insert into t3 values (1); -insert into t3 values (1+0.333333333); -insert into t3 values (1+0.755555555); -select count(*) from t3; -count(*) -27 -drop table t3; -create table t4 (a decimal(18,9) not null, primary key(a)) engine='InnoDB' -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 ( -partition pa2 values in (1,2), -partition pa4 values in (3,4), -partition pa6 values in (5,6), -partition pa8 values in (7,8), -partition pa10 values in (9,10) -); -show create table t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `a` decimal(18,9) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES IN (1,2) ENGINE = InnoDB, PARTITION pa4 VALUES IN (3,4) ENGINE = InnoDB, PARTITION pa6 VALUES IN (5,6) ENGINE = InnoDB, PARTITION pa8 VALUES IN (7,8) ENGINE = InnoDB, PARTITION pa10 VALUES IN (9,10) ENGINE = InnoDB) */ -9*3 inserts; -insert into t4 values (9); -insert into t4 values (9+0.333333333); -insert into t4 values (9+0.755555555); -insert into t4 values (8); -insert into t4 values (8+0.333333333); -insert into t4 values (8+0.755555555); -insert into t4 values (7); -insert into t4 values (7+0.333333333); -insert into t4 values (7+0.755555555); -insert into t4 values (6); -insert into t4 values (6+0.333333333); -insert into t4 values (6+0.755555555); -insert into t4 values (5); -insert into t4 values (5+0.333333333); -insert into t4 values (5+0.755555555); -insert into t4 values (4); -insert into t4 values (4+0.333333333); -insert into t4 values (4+0.755555555); -insert into t4 values (3); -insert into t4 values (3+0.333333333); -insert into t4 values (3+0.755555555); -insert into t4 values (2); -insert into t4 values (2+0.333333333); -insert into t4 values (2+0.755555555); -insert into t4 values (1); -insert into t4 values (1+0.333333333); -insert into t4 values (1+0.755555555); -select count(*) from t4; -count(*) -27 -drop table t4; diff --git a/mysql-test/suite/parts/r/partition_decimal_myisam.result b/mysql-test/suite/parts/r/partition_decimal_myisam.result index 008c249165d..464ac4ddaf5 100644 --- a/mysql-test/suite/parts/r/partition_decimal_myisam.result +++ b/mysql-test/suite/parts/r/partition_decimal_myisam.result @@ -87,95 +87,3 @@ select count(*) from t2; count(*) 196605 drop table t2; -create table t3 (a decimal(18,9) not null, primary key(a)) engine='MYISAM' -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 ( -partition pa2 values less than (2), -partition pa4 values less than (4), -partition pa6 values less than (6), -partition pa8 values less than (8), -partition pa10 values less than (10) -); -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` decimal(18,9) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES LESS THAN (2) ENGINE = MyISAM, PARTITION pa4 VALUES LESS THAN (4) ENGINE = MyISAM, PARTITION pa6 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION pa8 VALUES LESS THAN (8) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */ -9*3 inserts; -insert into t3 values (9); -insert into t3 values (9+0.333333333); -insert into t3 values (9+0.755555555); -insert into t3 values (8); -insert into t3 values (8+0.333333333); -insert into t3 values (8+0.755555555); -insert into t3 values (7); -insert into t3 values (7+0.333333333); -insert into t3 values (7+0.755555555); -insert into t3 values (6); -insert into t3 values (6+0.333333333); -insert into t3 values (6+0.755555555); -insert into t3 values (5); -insert into t3 values (5+0.333333333); -insert into t3 values (5+0.755555555); -insert into t3 values (4); -insert into t3 values (4+0.333333333); -insert into t3 values (4+0.755555555); -insert into t3 values (3); -insert into t3 values (3+0.333333333); -insert into t3 values (3+0.755555555); -insert into t3 values (2); -insert into t3 values (2+0.333333333); -insert into t3 values (2+0.755555555); -insert into t3 values (1); -insert into t3 values (1+0.333333333); -insert into t3 values (1+0.755555555); -select count(*) from t3; -count(*) -27 -drop table t3; -create table t4 (a decimal(18,9) not null, primary key(a)) engine='MYISAM' -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 2 ( -partition pa2 values in (1,2), -partition pa4 values in (3,4), -partition pa6 values in (5,6), -partition pa8 values in (7,8), -partition pa10 values in (9,10) -); -show create table t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `a` decimal(18,9) NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 2 (PARTITION pa2 VALUES IN (1,2) ENGINE = MyISAM, PARTITION pa4 VALUES IN (3,4) ENGINE = MyISAM, PARTITION pa6 VALUES IN (5,6) ENGINE = MyISAM, PARTITION pa8 VALUES IN (7,8) ENGINE = MyISAM, PARTITION pa10 VALUES IN (9,10) ENGINE = MyISAM) */ -9*3 inserts; -insert into t4 values (9); -insert into t4 values (9+0.333333333); -insert into t4 values (9+0.755555555); -insert into t4 values (8); -insert into t4 values (8+0.333333333); -insert into t4 values (8+0.755555555); -insert into t4 values (7); -insert into t4 values (7+0.333333333); -insert into t4 values (7+0.755555555); -insert into t4 values (6); -insert into t4 values (6+0.333333333); -insert into t4 values (6+0.755555555); -insert into t4 values (5); -insert into t4 values (5+0.333333333); -insert into t4 values (5+0.755555555); -insert into t4 values (4); -insert into t4 values (4+0.333333333); -insert into t4 values (4+0.755555555); -insert into t4 values (3); -insert into t4 values (3+0.333333333); -insert into t4 values (3+0.755555555); -insert into t4 values (2); -insert into t4 values (2+0.333333333); -insert into t4 values (2+0.755555555); -insert into t4 values (1); -insert into t4 values (1+0.333333333); -insert into t4 values (1+0.755555555); -select count(*) from t4; -count(*) -27 -drop table t4; diff --git a/mysql-test/suite/parts/r/partition_float_myisam.result b/mysql-test/suite/parts/r/partition_float_myisam.result index 08a1c20d224..aba62b8ba70 100644 --- a/mysql-test/suite/parts/r/partition_float_myisam.result +++ b/mysql-test/suite/parts/r/partition_float_myisam.result @@ -89,152 +89,6 @@ select count(*) from t2; count(*) 49152 drop table t2; -create table t3 (a float not null, primary key(a)) engine='MYISAM' -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( -partition pa1 values less than (3), -partition pa3 values less than (6), -partition pa10 values less than (10) -); -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` float NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */ -9*3 inserts; -insert into t3 values (9); -insert into t3 values (9+0.33); -insert into t3 values (9+0.75); -insert into t3 values (8); -insert into t3 values (8+0.33); -insert into t3 values (8+0.75); -insert into t3 values (7); -insert into t3 values (7+0.33); -insert into t3 values (7+0.75); -insert into t3 values (6); -insert into t3 values (6+0.33); -insert into t3 values (6+0.75); -insert into t3 values (5); -insert into t3 values (5+0.33); -insert into t3 values (5+0.75); -insert into t3 values (4); -insert into t3 values (4+0.33); -insert into t3 values (4+0.75); -insert into t3 values (3); -insert into t3 values (3+0.33); -insert into t3 values (3+0.75); -insert into t3 values (2); -insert into t3 values (2+0.33); -insert into t3 values (2+0.75); -insert into t3 values (1); -insert into t3 values (1+0.33); -insert into t3 values (1+0.75); -select count(*) from t3; -count(*) -27 -select * from t3; -a -1 -1.33 -1.75 -2 -2.33 -2.75 -3 -3.33 -3.75 -4 -4.33 -4.75 -5 -5.33 -5.75 -6 -6.33 -6.75 -7 -7.33 -7.75 -8 -8.33 -8.75 -9 -9.33 -9.75 -drop table t3; -create table t4 (a float not null, primary key(a)) engine='MYISAM' -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( -partition pa1 values in (1,2,3), -partition pa3 values in (4,5,6), -partition pa10 values in (7,8,9,10) -); -show create table t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `a` float NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION pa3 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = MyISAM) */ -9*3 inserts; -insert into t4 values (9); -insert into t4 values (9+0.33); -insert into t4 values (9+0.75); -insert into t4 values (8); -insert into t4 values (8+0.33); -insert into t4 values (8+0.75); -insert into t4 values (7); -insert into t4 values (7+0.33); -insert into t4 values (7+0.75); -insert into t4 values (6); -insert into t4 values (6+0.33); -insert into t4 values (6+0.75); -insert into t4 values (5); -insert into t4 values (5+0.33); -insert into t4 values (5+0.75); -insert into t4 values (4); -insert into t4 values (4+0.33); -insert into t4 values (4+0.75); -insert into t4 values (3); -insert into t4 values (3+0.33); -insert into t4 values (3+0.75); -insert into t4 values (2); -insert into t4 values (2+0.33); -insert into t4 values (2+0.75); -insert into t4 values (1); -insert into t4 values (1+0.33); -insert into t4 values (1+0.75); -select count(*) from t4; -count(*) -27 -select * from t4; -a -1 -1.33 -1.75 -2 -2.33 -2.75 -3 -3.33 -3.75 -4 -4.33 -4.75 -5 -5.33 -5.75 -6 -6.33 -6.75 -7 -7.33 -7.75 -8 -8.33 -8.75 -9 -9.33 -9.75 -drop table t4; create table t1 (a double not null, primary key(a)) engine='MYISAM' partition by key (a) ( partition pa1 DATA DIRECTORY = @@ -318,149 +172,3 @@ select count(*) from t2; count(*) 49152 drop table t2; -create table t3 (a double not null, primary key(a)) engine='MYISAM' -partition by range (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( -partition pa1 values less than (3), -partition pa3 values less than (6), -partition pa10 values less than (10) -); -show create table t3; -Table Create Table -t3 CREATE TABLE `t3` ( - `a` double NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES LESS THAN (3) ENGINE = MyISAM, PARTITION pa3 VALUES LESS THAN (6) ENGINE = MyISAM, PARTITION pa10 VALUES LESS THAN (10) ENGINE = MyISAM) */ -9*3 inserts; -insert into t3 values (9); -insert into t3 values (9+0.33); -insert into t3 values (9+0.75); -insert into t3 values (8); -insert into t3 values (8+0.33); -insert into t3 values (8+0.75); -insert into t3 values (7); -insert into t3 values (7+0.33); -insert into t3 values (7+0.75); -insert into t3 values (6); -insert into t3 values (6+0.33); -insert into t3 values (6+0.75); -insert into t3 values (5); -insert into t3 values (5+0.33); -insert into t3 values (5+0.75); -insert into t3 values (4); -insert into t3 values (4+0.33); -insert into t3 values (4+0.75); -insert into t3 values (3); -insert into t3 values (3+0.33); -insert into t3 values (3+0.75); -insert into t3 values (2); -insert into t3 values (2+0.33); -insert into t3 values (2+0.75); -insert into t3 values (1); -insert into t3 values (1+0.33); -insert into t3 values (1+0.75); -select count(*) from t3; -count(*) -27 -select * from t3; -a -1 -1.33 -1.75 -2 -2.33 -2.75 -3 -3.33 -3.75 -4 -4.33 -4.75 -5 -5.33 -5.75 -6 -6.33 -6.75 -7 -7.33 -7.75 -8 -8.33 -8.75 -9 -9.33 -9.75 -drop table t3; -create table t4 (a double not null, primary key(a)) engine='MYISAM' -partition by list (cast(floor(a) as signed)) subpartition by key (a) subpartitions 3 ( -partition pa1 values in (1,2,3), -partition pa3 values in (4,5,6), -partition pa10 values in (7,8,9,10) -); -show create table t4; -Table Create Table -t4 CREATE TABLE `t4` ( - `a` double NOT NULL, - PRIMARY KEY (`a`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (cast(floor(a) as signed)) SUBPARTITION BY KEY (a) SUBPARTITIONS 3 (PARTITION pa1 VALUES IN (1,2,3) ENGINE = MyISAM, PARTITION pa3 VALUES IN (4,5,6) ENGINE = MyISAM, PARTITION pa10 VALUES IN (7,8,9,10) ENGINE = MyISAM) */ -9*3 inserts; -insert into t4 values (9); -insert into t4 values (9+0.33); -insert into t4 values (9+0.75); -insert into t4 values (8); -insert into t4 values (8+0.33); -insert into t4 values (8+0.75); -insert into t4 values (7); -insert into t4 values (7+0.33); -insert into t4 values (7+0.75); -insert into t4 values (6); -insert into t4 values (6+0.33); -insert into t4 values (6+0.75); -insert into t4 values (5); -insert into t4 values (5+0.33); -insert into t4 values (5+0.75); -insert into t4 values (4); -insert into t4 values (4+0.33); -insert into t4 values (4+0.75); -insert into t4 values (3); -insert into t4 values (3+0.33); -insert into t4 values (3+0.75); -insert into t4 values (2); -insert into t4 values (2+0.33); -insert into t4 values (2+0.75); -insert into t4 values (1); -insert into t4 values (1+0.33); -insert into t4 values (1+0.75); -select count(*) from t4; -count(*) -27 -select * from t4; -a -1 -1.33 -1.75 -2 -2.33 -2.75 -3 -3.33 -3.75 -4 -4.33 -4.75 -5 -5.33 -5.75 -6 -6.33 -6.75 -7 -7.33 -7.75 -8 -8.33 -8.75 -9 -9.33 -9.75 -drop table t4; diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result index d64bfdde239..c6fb2d38e4c 100644 --- a/mysql-test/suite/parts/r/partition_syntax_innodb.result +++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result @@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1) PARTITION part2 VALUES LESS THAN (1000)); ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), PARTITION part2 VALUES LESS THAN (1000))' at line 9 -# 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed +# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -629,7 +629,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), PARTITION part2 VALUES LESS THAN (1000))' at line 9 @@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2)) PARTITION part2 VALUES IN (0), PARTITION part3 VALUES IN (1)); DROP TABLE t1; -# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) +# 3.5.2.2 VALUE IN (NULL) CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -656,7 +656,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES IN (NULL), PARTITION part3 VALUES IN (1)); create_command SHOW CREATE TABLE t1; @@ -679,7 +679,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES IN (NULL), PARTITION part2 VALUES IN (0), PARTITION part3 VALUES IN (1)); create_command diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result index 34f771ba51d..49a7b155a58 100644 --- a/mysql-test/suite/parts/r/partition_syntax_myisam.result +++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result @@ -620,7 +620,7 @@ PARTITION BY RANGE(f_int1) PARTITION part2 VALUES LESS THAN (1000)); ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), PARTITION part2 VALUES LESS THAN (1000))' at line 9 -# 3.5.1.2 VALUE LESS THAN (CAST(NULL AS SIGNED INTEGER)) is not allowed +# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -629,7 +629,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) -( PARTITION part1 VALUES LESS THAN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), PARTITION part2 VALUES LESS THAN (1000))' at line 9 @@ -647,7 +647,7 @@ PARTITION BY LIST(MOD(f_int1,2)) PARTITION part2 VALUES IN (0), PARTITION part3 VALUES IN (1)); DROP TABLE t1; -# 3.5.2.2 VALUE IN (CAST(NULL AS SIGNED INTEGER)) +# 3.5.2.2 VALUE IN (NULL) CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -656,7 +656,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES IN (NULL), PARTITION part3 VALUES IN (1)); create_command SHOW CREATE TABLE t1; @@ -687,7 +687,7 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) PARTITION BY LIST(MOD(f_int1,2)) -( PARTITION part1 VALUES IN (CAST(NULL AS SIGNED INTEGER)), +( PARTITION part1 VALUES IN (NULL), PARTITION part2 VALUES IN (0), PARTITION part3 VALUES IN (1)); create_command diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 36bf08e9851..1b70519b72c 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -6,6 +6,8 @@ ndb_partition_range : cannot create t1 partition_bit_ndb : cannot create t1 partition_int_ndb : cannot create t1 partition_syntax_ndb : cannot create t1 +partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function +partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function partition_value_ndb : cannot create t1 partition_basic_ndb : cannot create t1 partition_alter1_ndb : timeout. Needs too much time. @@ -13,3 +15,6 @@ partition_alter2_ndb : cannot create t1 partition_char_innodb : crash. Bug? More investigations partition_sessions : needs system_3_init.inc partition_engine_ndb : cannot create t1 +part_supported_sql_func_ndb : cannot create t1 +rpl_ndb_dd_partitions : cannot create t1 +partition_float_innodb : Bug#30583 Partition on DOUBLE key + INNODB + count(*) == crash From 7dbef328bef2436c553387814e4207bc56643c34 Mon Sep 17 00:00:00 2001 From: "tsmith@ramayana.hindu.god" <> Date: Mon, 27 Aug 2007 14:12:12 -0600 Subject: [PATCH 5/5] Bug #30412 and Bug #30413 Update some tests in the "parts" suite, so they're skipped if the requisite plugins are not present in the mysqld. --- mysql-test/suite/parts/t/partition_char_innodb.test | 1 + mysql-test/suite/parts/t/partition_datetime_innodb.test | 1 + mysql-test/suite/parts/t/partition_decimal_innodb.test | 2 ++ mysql-test/suite/parts/t/partition_float_innodb.test | 2 ++ mysql-test/suite/parts/t/partition_int_innodb.test | 1 + mysql-test/suite/parts/t/partition_special_innodb.test | 1 + mysql-test/suite/parts/t/rpl_partition.test | 1 + 7 files changed, 9 insertions(+) diff --git a/mysql-test/suite/parts/t/partition_char_innodb.test b/mysql-test/suite/parts/t/partition_char_innodb.test index d0389517927..27295084de4 100644 --- a/mysql-test/suite/parts/t/partition_char_innodb.test +++ b/mysql-test/suite/parts/t/partition_char_innodb.test @@ -36,6 +36,7 @@ let $debug= 0; ##### Storage engine to be tested let $engine= 'InnoDB'; +--source include/have_innodb.inc ##### max rows to be inserted let $maxrows=65535; diff --git a/mysql-test/suite/parts/t/partition_datetime_innodb.test b/mysql-test/suite/parts/t/partition_datetime_innodb.test index fe19e2803c5..eba0bc3e10b 100644 --- a/mysql-test/suite/parts/t/partition_datetime_innodb.test +++ b/mysql-test/suite/parts/t/partition_datetime_innodb.test @@ -36,6 +36,7 @@ let $debug= 0; ##### Storage engine to be tested let $engine= 'InnoDB'; +--source include/have_innodb.inc ##### max rows to be inserted let $maxrows=1024; diff --git a/mysql-test/suite/parts/t/partition_decimal_innodb.test b/mysql-test/suite/parts/t/partition_decimal_innodb.test index ec5948097c8..22e759ec5d9 100644 --- a/mysql-test/suite/parts/t/partition_decimal_innodb.test +++ b/mysql-test/suite/parts/t/partition_decimal_innodb.test @@ -36,6 +36,8 @@ let $debug= 0; ##### Storage engine to be tested let $engine= 'InnoDB'; +--source include/have_innodb.inc + ##### number of rows to be inserted let $maxrows=1024; diff --git a/mysql-test/suite/parts/t/partition_float_innodb.test b/mysql-test/suite/parts/t/partition_float_innodb.test index b36dc0668a6..3395d1812d2 100644 --- a/mysql-test/suite/parts/t/partition_float_innodb.test +++ b/mysql-test/suite/parts/t/partition_float_innodb.test @@ -36,6 +36,8 @@ let $debug= 0; ##### Storage engine to be tested let $engine= 'InnoDB'; +--source include/have_innodb.inc + ##### Number of row to be inserted. let $maxrows=1024; diff --git a/mysql-test/suite/parts/t/partition_int_innodb.test b/mysql-test/suite/parts/t/partition_int_innodb.test index fda7398565c..dc14b369654 100644 --- a/mysql-test/suite/parts/t/partition_int_innodb.test +++ b/mysql-test/suite/parts/t/partition_int_innodb.test @@ -36,6 +36,7 @@ let $debug= 0; ##### Storage engine to be tested let $engine= 'InnoDB'; +--source include/have_innodb.inc ##### max rows to be inserted let $maxrows=1024; diff --git a/mysql-test/suite/parts/t/partition_special_innodb.test b/mysql-test/suite/parts/t/partition_special_innodb.test index 5df518a3952..f552d64f4e4 100644 --- a/mysql-test/suite/parts/t/partition_special_innodb.test +++ b/mysql-test/suite/parts/t/partition_special_innodb.test @@ -36,6 +36,7 @@ let $debug= 0; ##### Storage engine to be tested let $engine= 'InnoDB'; +--source include/have_innodb.inc #------------------------------------------------------------------------------# # Execute the tests to be applied to all storage engines diff --git a/mysql-test/suite/parts/t/rpl_partition.test b/mysql-test/suite/parts/t/rpl_partition.test index ffd6d17ec6f..f1002ded81f 100644 --- a/mysql-test/suite/parts/t/rpl_partition.test +++ b/mysql-test/suite/parts/t/rpl_partition.test @@ -1,3 +1,4 @@ +--source include/have_partition.inc --source include/have_innodb.inc --source include/master-slave.inc