Merge lp:~vkolesnikov/pbxt/pbxt-bug-349177 into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-bug-349177
Merge into: lp:pbxt
Diff against target: None lines
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-bug-349177
Reviewer Review Type Date Requested Status
PBXT Core Pending
Review via email: mp+5295@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2009-03-31 14:47:43 +0000
+++ ChangeLog 2009-04-04 03:13:24 +0000
@@ -3,6 +3,10 @@
33
4------- 1.0.08 RC - Not yet released4------- 1.0.08 RC - Not yet released
55
6RB235: Fixed bug #349177: a bug in configure.in script
7
8RN234: Fixed bug #349176: a compiler warning
9
6RN233: Fixed bugs which occur when PBXT is used together with PBMS (BLOB Streaming engine).10RN233: Fixed bugs which occur when PBXT is used together with PBMS (BLOB Streaming engine).
711
8RN232: Merged Drizzle-specific changes into the main tree.12RN232: Merged Drizzle-specific changes into the main tree.
913
=== modified file 'configure.in'
--- configure.in 2008-12-22 14:36:48 +0000
+++ configure.in 2009-04-04 03:57:57 +0000
@@ -68,8 +68,8 @@
6868
69strip_mysql_opt_dbg_flags()69strip_mysql_opt_dbg_flags()
70{70{
71 MYSQL_CFLAGS=`echo "$MYSQL_CFLAGS" | sed "s/-Os//" | sed "s/-O3//" | sed "s/-O2//" | sed "s/-O//" | sed "s/-g//"`71 MYSQL_CFLAGS=`echo "$MYSQL_CFLAGS" | sed "s/-Os//" | sed "s/-O3//" | sed "s/-O2//" | sed "s/-O//" | sed "s/-g[[A-Za-z0-9]]*//g"`
72 MYSQL_CXXFLAGS=`echo "$MYSQL_CXXFLAGS" | sed "s/-Os//" | sed "s/-O3//" | sed "s/-O2//" | sed "s/-O//" | sed "s/-g//"`72 MYSQL_CXXFLAGS=`echo "$MYSQL_CXXFLAGS" | sed "s/-Os//" | sed "s/-O3//" | sed "s/-O2//" | sed "s/-O//" | sed "s/-g[[A-Za-z0-9]]*//g"`
73}73}
7474
75# ----- AC_ARG_WITH(debug75# ----- AC_ARG_WITH(debug
7676
=== modified file 'src/cache_xt.h'
--- src/cache_xt.h 2009-03-02 13:10:56 +0000
+++ src/cache_xt.h 2009-04-04 01:03:03 +0000
@@ -45,8 +45,8 @@
45#define IDX_CAC_BLOCK_CLEAN 145#define IDX_CAC_BLOCK_CLEAN 1
46#define IDX_CAC_BLOCK_DIRTY 246#define IDX_CAC_BLOCK_DIRTY 2
4747
48typedef enum XTPageLockType { XT_LOCK_READ, XT_LOCK_WRITE, XT_XLOCK_LEAF };48enum XTPageLockType { XT_LOCK_READ, XT_LOCK_WRITE, XT_XLOCK_LEAF };
49typedef enum XTPageUnlockType { XT_UNLOCK_NONE, XT_UNLOCK_READ, XT_UNLOCK_WRITE, XT_UNLOCK_R_UPDATE, XT_UNLOCK_W_UPDATE };49enum XTPageUnlockType { XT_UNLOCK_NONE, XT_UNLOCK_READ, XT_UNLOCK_WRITE, XT_UNLOCK_R_UPDATE, XT_UNLOCK_W_UPDATE };
5050
51/* A block is X locked if it is being changed or freed.51/* A block is X locked if it is being changed or freed.
52 * A block is S locked if it is being read.52 * A block is S locked if it is being read.
5353
=== modified file 'src/ha_pbxt.cc'
--- src/ha_pbxt.cc 2009-04-03 10:08:43 +0000
+++ src/ha_pbxt.cc 2009-04-03 19:39:12 +0000
@@ -91,16 +91,16 @@
91//#define PRINT_STATEMENTS91//#define PRINT_STATEMENTS
92#endif92#endif
9393
94#ifndef DRIZZLED
94static handler *pbxt_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root);95static handler *pbxt_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root);
95static int pbxt_init(void *p);96static int pbxt_init(void *p);
96static int pbxt_end(void *p);97static int pbxt_end(void *p);
97#ifndef DRIZZLED
98static int pbxt_panic(handlerton *hton, enum ha_panic_function flag);98static int pbxt_panic(handlerton *hton, enum ha_panic_function flag);
99#endif
100static void pbxt_drop_database(handlerton *hton, char *path);99static void pbxt_drop_database(handlerton *hton, char *path);
101static int pbxt_close_connection(handlerton *hton, THD* thd);100static int pbxt_close_connection(handlerton *hton, THD* thd);
102static int pbxt_commit(handlerton *hton, THD *thd, bool all);101static int pbxt_commit(handlerton *hton, THD *thd, bool all);
103static int pbxt_rollback(handlerton *hton, THD *thd, bool all);102static int pbxt_rollback(handlerton *hton, THD *thd, bool all);
103#endif
104static void ha_aquire_exclusive_use(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);104static void ha_aquire_exclusive_use(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);
105static void ha_release_exclusive_use(XTThreadPtr self, XTSharePtr share);105static void ha_release_exclusive_use(XTThreadPtr self, XTSharePtr share);
106static void ha_close_open_tables(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);106static void ha_close_open_tables(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);
@@ -979,9 +979,13 @@
979/*979/*
980 * Outout the PBXT status. Return FALSE on error.980 * Outout the PBXT status. Return FALSE on error.
981 */981 */
982#ifdef DRIZZLED
983bool PBXTStorageEngine::show_status(Session *thd, stat_print_fn *stat_print, enum ha_stat_type)
984#else
982static bool pbxt_show_status(handlerton *hton __attribute__((unused)), THD* thd, 985static bool pbxt_show_status(handlerton *hton __attribute__((unused)), THD* thd,
983 stat_print_fn* stat_print,986 stat_print_fn* stat_print,
984 enum ha_stat_type stat_type __attribute__((unused)))987 enum ha_stat_type stat_type __attribute__((unused)))
988#endif
985{989{
986 XTThreadPtr self; 990 XTThreadPtr self;
987 int err = 0;991 int err = 0;
@@ -1045,22 +1049,23 @@
10451049
1046 xt_p_mutex_init_with_autoname(&pbxt_database_mutex, NULL);1050 xt_p_mutex_init_with_autoname(&pbxt_database_mutex, NULL);
10471051
1052#ifdef DRIZZLED
1053 StorageEngine **engine= static_cast<StorageEngine **>(p);
1054 pbxt_hton= new PBXTStorageEngine(std::string("PBXT"));
1055 *engine = pbxt_hton;
1056#else
1048 pbxt_hton = (handlerton *) p;1057 pbxt_hton = (handlerton *) p;
1049 pbxt_hton->state = SHOW_OPTION_YES;1058 pbxt_hton->state = SHOW_OPTION_YES;
1050#ifndef DRIZZLED
1051 pbxt_hton->db_type = DB_TYPE_PBXT; // Wow! I have my own!1059 pbxt_hton->db_type = DB_TYPE_PBXT; // Wow! I have my own!
1052#endif
1053 pbxt_hton->close_connection = pbxt_close_connection; /* close_connection, cleanup thread related data. */1060 pbxt_hton->close_connection = pbxt_close_connection; /* close_connection, cleanup thread related data. */
1054 pbxt_hton->commit = pbxt_commit; /* commit */1061 pbxt_hton->commit = pbxt_commit; /* commit */
1055 pbxt_hton->rollback = pbxt_rollback; /* rollback */1062 pbxt_hton->rollback = pbxt_rollback; /* rollback */
1056 pbxt_hton->create = pbxt_create_handler; /* Create a new handler */1063 pbxt_hton->create = pbxt_create_handler; /* Create a new handler */
1057 pbxt_hton->drop_database = pbxt_drop_database; /* Drop a database */1064 pbxt_hton->drop_database = pbxt_drop_database; /* Drop a database */
1058#ifndef DRIZZLED
1059 pbxt_hton->panic = pbxt_panic; /* Panic call */1065 pbxt_hton->panic = pbxt_panic; /* Panic call */
1060#endif
1061 pbxt_hton->show_status = pbxt_show_status;1066 pbxt_hton->show_status = pbxt_show_status;
1062 pbxt_hton->flags = HTON_NO_FLAGS; /* HTON_CAN_RECREATE - Without this flags TRUNCATE uses delete_all_rows() */1067 pbxt_hton->flags = HTON_NO_FLAGS; /* HTON_CAN_RECREATE - Without this flags TRUNCATE uses delete_all_rows() */
10631068#endif
1064 if (!xt_init_logging()) /* Initialize logging */1069 if (!xt_init_logging()) /* Initialize logging */
1065 goto error_1;1070 goto error_1;
10661071
@@ -1262,8 +1267,14 @@
1262/*1267/*
1263 * Kill the PBXT thread associated with the MySQL thread.1268 * Kill the PBXT thread associated with the MySQL thread.
1264 */1269 */
1270#ifdef DRIZZLED
1271int PBXTStorageEngine::close_connection(Session *thd)
1272{
1273 PBXTStorageEngine * const hton = this;
1274#else
1265static int pbxt_close_connection(handlerton *hton, THD* thd)1275static int pbxt_close_connection(handlerton *hton, THD* thd)
1266{1276{
1277#endif
1267 XTThreadPtr self;1278 XTThreadPtr self;
1268#ifdef XT_STREAMING1279#ifdef XT_STREAMING
1269 XTExceptionRec e;1280 XTExceptionRec e;
@@ -1290,7 +1301,11 @@
1290 * when the last PBXT table was removed from the 1301 * when the last PBXT table was removed from the
1291 * database.1302 * database.
1292 */1303 */
1304#ifdef DRIZZLED
1305void PBXTStorageEngine::drop_database(char *)
1306#else
1293static void pbxt_drop_database(handlerton *hton __attribute__((unused)), char *path __attribute__((unused)))1307static void pbxt_drop_database(handlerton *hton __attribute__((unused)), char *path __attribute__((unused)))
1308#endif
1294{1309{
1295 XT_TRACE_CALL();1310 XT_TRACE_CALL();
1296}1311}
@@ -1317,8 +1332,14 @@
1317 * pbxt_thr is a pointer the the PBXT thread structure.1332 * pbxt_thr is a pointer the the PBXT thread structure.
1318 *1333 *
1319 */1334 */
1335#ifdef DRIZZLED
1336int PBXTStorageEngine::commit(Session *thd, bool all)
1337{
1338 PBXTStorageEngine * const hton = this;
1339#else
1320static int pbxt_commit(handlerton *hton, THD *thd, bool all)1340static int pbxt_commit(handlerton *hton, THD *thd, bool all)
1321{1341{
1342#endif
1322 int err = 0;1343 int err = 0;
1323 XTThreadPtr self;1344 XTThreadPtr self;
13241345
@@ -1343,8 +1364,14 @@
1343 return err;1364 return err;
1344}1365}
13451366
1367#ifdef DRIZZLED
1368int PBXTStorageEngine::rollback(Session *thd, bool all)
1369{
1370 PBXTStorageEngine * const hton = this;
1371#else
1346static int pbxt_rollback(handlerton *hton, THD *thd, bool all)1372static int pbxt_rollback(handlerton *hton, THD *thd, bool all)
1347{1373{
1374#endif
1348 int err = 0;1375 int err = 0;
1349 XTThreadPtr self;1376 XTThreadPtr self;
13501377
@@ -1377,8 +1404,14 @@
1377 return 0;1404 return 0;
1378}1405}
13791406
1407#ifdef DRIZZLED
1408handler *PBXTStorageEngine::create(TABLE_SHARE *table, MEM_ROOT *mem_root)
1409{
1410 PBXTStorageEngine * const hton = this;
1411#else
1380static handler *pbxt_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root)1412static handler *pbxt_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root)
1381{1413{
1414#endif
1382 if (table && XTSystemTableShare::isSystemTable(table->path.str))1415 if (table && XTSystemTableShare::isSystemTable(table->path.str))
1383 return new (mem_root) ha_xtsys(hton, table);1416 return new (mem_root) ha_xtsys(hton, table);
1384 else1417 else
@@ -1631,7 +1664,12 @@
16311664
1632int pbxt_init_statitics(void *p)1665int pbxt_init_statitics(void *p)
1633{1666{
1667#ifdef DRIZZLED
1668 ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *)xt_calloc_ns(sizeof(ST_SCHEMA_TABLE));
1669 *(ST_SCHEMA_TABLE **)p = schema;
1670#else
1634 ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;1671 ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;
1672#endif
1635 schema->fields_info = pbxt_statistics_fields_info;1673 schema->fields_info = pbxt_statistics_fields_info;
1636 schema->fill_table = pbxt_statistics_fill_table;1674 schema->fill_table = pbxt_statistics_fill_table;
16371675
@@ -1647,6 +1685,9 @@
16471685
1648int pbxt_exit_statitics(void *p __attribute__((unused)))1686int pbxt_exit_statitics(void *p __attribute__((unused)))
1649{1687{
1688#ifdef DRIZZLED
1689 xt_free_ns(p);
1690#endif
1650 return(0);1691 return(0);
1651}1692}
16521693
@@ -2887,9 +2928,12 @@
2887 xt_idx_prep_key(ind, &search_key, ((find_flag == HA_READ_AFTER_KEY) ? XT_SEARCH_AFTER_KEY : 0) | prefix, (xtWord1 *) key, key_len);2928 xt_idx_prep_key(ind, &search_key, ((find_flag == HA_READ_AFTER_KEY) ? XT_SEARCH_AFTER_KEY : 0) | prefix, (xtWord1 *) key, key_len);
2888 if (!xt_idx_search(pb_open_tab, ind, &search_key))2929 if (!xt_idx_search(pb_open_tab, ind, &search_key))
2889 err = ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);2930 err = ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);
2890 else2931 else {
2891 err = xt_index_next_read(pb_open_tab, ind, pb_key_read,2932 err = xt_index_next_read(pb_open_tab, ind, pb_key_read,
2892 (find_flag == HA_READ_KEY_EXACT || find_flag == HA_READ_PREFIX) ? &search_key : NULL, buf);2933 (find_flag == HA_READ_KEY_EXACT || find_flag == HA_READ_PREFIX) ? &search_key : NULL, buf);
2934 if (err == HA_ERR_END_OF_FILE && find_flag == HA_READ_AFTER_KEY)
2935 err = HA_ERR_KEY_NOT_FOUND;
2936 }
2893 break;2937 break;
2894 }2938 }
28952939
@@ -3445,7 +3489,7 @@
3445 if (ind->mi_seg_count == 1 && (ind->mi_flags & HA_NOSAME))3489 if (ind->mi_seg_count == 1 && (ind->mi_flags & HA_NOSAME))
3446 rec_per_key = 1;3490 rec_per_key = 1;
3447 else {3491 else {
3448 3492 rec_per_key = 1;
3449 }3493 }
3450 for (u_int j = 0; j < table->key_info[i].key_parts; j++)3494 for (u_int j = 0; j < table->key_info[i].key_parts; j++)
3451 table->key_info[i].rec_per_key[j] = (ulong) rec_per_key;3495 table->key_info[i].rec_per_key[j] = (ulong) rec_per_key;
@@ -3570,6 +3614,8 @@
3570 if (pb_open_tab)3614 if (pb_open_tab)
3571 pb_open_tab->ot_table->tab_locks.xt_make_lock_permanent(pb_open_tab, &self->st_lock_list);3615 pb_open_tab->ot_table->tab_locks.xt_make_lock_permanent(pb_open_tab, &self->st_lock_list);
3572 }3616 }
3617 if (pb_open_tab)
3618 pb_open_tab->ot_for_update = 0;
3573 break;3619 break;
3574 case HA_EXTRA_KEYREAD:3620 case HA_EXTRA_KEYREAD:
3575 /* This means we so not need to read the entire record. */3621 /* This means we so not need to read the entire record. */
@@ -3993,8 +4039,10 @@
3993 * (or update statement) just saw.4039 * (or update statement) just saw.
3994 */4040 */
3995 if (pb_open_tab) {4041 if (pb_open_tab) {
3996 if (pb_open_tab->ot_for_update)4042 if (pb_open_tab->ot_for_update) {
3997 self->st_visible_time = self->st_database->db_xn_end_time;4043 self->st_visible_time = self->st_database->db_xn_end_time;
4044 pb_open_tab->ot_for_update = 0;
4045 }
39984046
3999 if (pb_share->sh_recalc_selectivity) {4047 if (pb_share->sh_recalc_selectivity) {
4000 if ((pb_share->sh_table->tab_row_eof_id - 1 - pb_share->sh_table->tab_row_fnum) >= 200) {4048 if ((pb_share->sh_table->tab_row_eof_id - 1 - pb_share->sh_table->tab_row_fnum) >= 200) {
@@ -4592,10 +4640,17 @@
4592 freer_(); // ha_unget_share(share)4640 freer_(); // ha_unget_share(share)
4593 }4641 }
4594 catch_(b) {4642 catch_(b) {
4595 /* If the table does not exist, just log the error and continue... */4643 /* In MySQL if the table does not exist, just log the error and continue. This is
4644 * needed to delete table in the case when CREATE TABLE fails and no PBXT disk
4645 * structures were created.
4646 * Drizzle unlike MySQL iterates over all handlers and tries to delete table. It
4647 * stops after when a handler returns TRUE, so in Drizzle we need to report error.
4648 */
4649#ifndef DRIZZLED
4596 if (self->t_exception.e_xt_err == XT_ERR_TABLE_NOT_FOUND)4650 if (self->t_exception.e_xt_err == XT_ERR_TABLE_NOT_FOUND)
4597 xt_log_and_clear_exception(self);4651 xt_log_and_clear_exception(self);
4598 else4652 else
4653#endif
4599 throw_();4654 throw_();
4600 }4655 }
4601 cont_(b);4656 cont_(b);
@@ -4619,6 +4674,10 @@
4619 }4674 }
4620 catch_(a) {4675 catch_(a) {
4621 err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);4676 err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
4677#ifdef DRIZZLED
4678 if (err == HA_ERR_NO_SUCH_TABLE)
4679 err = ENOENT;
4680#endif
4622 }4681 }
4623 cont_(a);4682 cont_(a);
46244683
46254684
=== modified file 'src/ha_pbxt.h'
--- src/ha_pbxt.h 2009-03-25 01:43:40 +0000
+++ src/ha_pbxt.h 2009-04-03 19:39:12 +0000
@@ -28,7 +28,7 @@
28#ifdef DRIZZLED28#ifdef DRIZZLED
29#include <drizzled/common.h>29#include <drizzled/common.h>
30#include <drizzled/handler.h>30#include <drizzled/handler.h>
31#include <drizzled/handlerton.h>31#include <drizzled/plugin/storage_engine.h>
32#include <mysys/thr_lock.h>32#include <mysys/thr_lock.h>
33#else33#else
34#include "mysql_priv.h"34#include "mysql_priv.h"
@@ -51,6 +51,25 @@
5151
52class ha_pbxt;52class ha_pbxt;
5353
54#ifdef DRIZZLED
55
56class PBXTStorageEngine : public StorageEngine {
57public:
58 PBXTStorageEngine(std::string name_arg)
59 : StorageEngine(name_arg, HTON_NO_FLAGS) {}
60
61 /* override */ int close_connection(Session *);
62 /* override */ int commit(Session *, bool);
63 /* override */ int rollback(Session *, bool);
64 /* override */ handler *create(TABLE_SHARE *, MEM_ROOT *);
65 /* override */ void drop_database(char *);
66 /* override */ bool show_status(Session *, stat_print_fn *, enum ha_stat_type);
67};
68
69typedef PBXTStorageEngine handlerton;
70
71#endif
72
54extern handlerton *pbxt_hton;73extern handlerton *pbxt_hton;
5574
56/*75/*
5776
=== modified file 'src/myxt_xt.cc'
--- src/myxt_xt.cc 2009-03-31 12:33:50 +0000
+++ src/myxt_xt.cc 2009-04-03 19:39:12 +0000
@@ -1989,7 +1989,9 @@
1989 * plugin_shutdown() and reap_plugins() in sql_plugin.cc1989 * plugin_shutdown() and reap_plugins() in sql_plugin.cc
1990 * from doing their job on shutdown!1990 * from doing their job on shutdown!
1991 */1991 */
1992#ifndef DRIZZLED
1992 plugin_unlock(NULL, table->s->db_plugin);1993 plugin_unlock(NULL, table->s->db_plugin);
1994#endif
1993 table->s->db_plugin = NULL;1995 table->s->db_plugin = NULL;
1994 return table;1996 return table;
1995}1997}
19961998
=== modified file 'src/table_xt.cc'
--- src/table_xt.cc 2009-04-02 20:27:49 +0000
+++ src/table_xt.cc 2009-04-03 19:39:12 +0000
@@ -35,7 +35,7 @@
35#include <drizzled/common.h>35#include <drizzled/common.h>
36#include <mysys/thr_lock.h>36#include <mysys/thr_lock.h>
37#include <drizzled/dtcollation.h>37#include <drizzled/dtcollation.h>
38#include <drizzled/handlerton.h>38#include <drizzled/plugin/storage_engine.h>
39#else39#else
40#include "mysql_priv.h"40#include "mysql_priv.h"
41#endif41#endif
@@ -1598,6 +1598,14 @@
1598 if (!self->st_ignore_fkeys) 1598 if (!self->st_ignore_fkeys)
1599 can_drop = tab->tab_dic.dic_table->checkCanDrop();1599 can_drop = tab->tab_dic.dic_table->checkCanDrop();
1600 }1600 }
1601#ifdef DRIZZLED
1602 /* See the comment in ha_pbxt::delete_table regarding different implmentation of DROP TABLE
1603 * in MySQL and Drizzle
1604 */
1605 else {
1606 xt_throw_xterr(XT_CONTEXT, XT_ERR_TABLE_NOT_FOUND);
1607 }
1608#endif
16011609
1602 if (can_drop) {1610 if (can_drop) {
1603 if (tab_id) {1611 if (tab_id) {
16041612
=== modified file 'src/xt_defs.h'
--- src/xt_defs.h 2009-03-25 01:43:40 +0000
+++ src/xt_defs.h 2009-04-03 19:39:12 +0000
@@ -750,6 +750,9 @@
750 (((uint32_t) (((const unsigned char*) (A))[1])) << 16) +\750 (((uint32_t) (((const unsigned char*) (A))[1])) << 16) +\
751 (((uint32_t) (((const unsigned char*) (A))[0])) << 24)))751 (((uint32_t) (((const unsigned char*) (A))[0])) << 24)))
752752
753class PBXTStorageEngine;
754typedef PBXTStorageEngine handlerton;
755
753#else // DRIZZLED756#else // DRIZZLED
754/* The MySQL case: */757/* The MySQL case: */
755#if MYSQL_VERSION_ID >= 60008758#if MYSQL_VERSION_ID >= 60008
756759
=== modified file 'test/mysql-test/r/alter_table.result'
--- test/mysql-test/r/alter_table.result 2008-11-01 09:01:35 +0000
+++ test/mysql-test/r/alter_table.result 2009-04-03 19:39:12 +0000
@@ -126,23 +126,23 @@
126alter table t1 disable keys;126alter table t1 disable keys;
127show keys from t1;127show keys from t1;
128Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment128Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
129t1 0 n1 1 n1 NULL 0 NULL NULL BTREE 129t1 0 n1 1 n1 A 0 NULL NULL BTREE
130t1 1 n1_2 1 n1 NULL NULL NULL NULL BTREE 130t1 1 n1_2 1 n1 A 0 NULL NULL BTREE
131t1 1 n1_2 2 n2 NULL NULL NULL NULL YES BTREE 131t1 1 n1_2 2 n2 A 0 NULL NULL YES BTREE
132t1 1 n1_2 3 n3 NULL NULL NULL NULL YES BTREE 132t1 1 n1_2 3 n3 A 0 NULL NULL YES BTREE
133t1 1 n1_2 4 n4 NULL NULL NULL NULL YES BTREE 133t1 1 n1_2 4 n4 A 0 NULL NULL YES BTREE
134t1 1 n2 1 n2 NULL NULL NULL NULL YES BTREE 134t1 1 n2 1 n2 A 0 NULL NULL YES BTREE
135t1 1 n2 2 n3 NULL NULL NULL NULL YES BTREE 135t1 1 n2 2 n3 A 0 NULL NULL YES BTREE
136t1 1 n2 3 n4 NULL NULL NULL NULL YES BTREE 136t1 1 n2 3 n4 A 0 NULL NULL YES BTREE
137t1 1 n2 4 n1 NULL NULL NULL NULL BTREE 137t1 1 n2 4 n1 A 0 NULL NULL BTREE
138t1 1 n3 1 n3 NULL NULL NULL NULL YES BTREE 138t1 1 n3 1 n3 A 0 NULL NULL YES BTREE
139t1 1 n3 2 n4 NULL NULL NULL NULL YES BTREE 139t1 1 n3 2 n4 A 0 NULL NULL YES BTREE
140t1 1 n3 3 n1 NULL NULL NULL NULL BTREE 140t1 1 n3 3 n1 A 0 NULL NULL BTREE
141t1 1 n3 4 n2 NULL NULL NULL NULL YES BTREE 141t1 1 n3 4 n2 A 0 NULL NULL YES BTREE
142t1 1 n4 1 n4 NULL NULL NULL NULL YES BTREE 142t1 1 n4 1 n4 A 0 NULL NULL YES BTREE
143t1 1 n4 2 n1 NULL NULL NULL NULL BTREE 143t1 1 n4 2 n1 A 0 NULL NULL BTREE
144t1 1 n4 3 n2 NULL NULL NULL NULL YES BTREE 144t1 1 n4 3 n2 A 0 NULL NULL YES BTREE
145t1 1 n4 4 n3 NULL NULL NULL NULL YES BTREE 145t1 1 n4 4 n3 A 0 NULL NULL YES BTREE
146insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());146insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());
147insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());147insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());
148insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());148insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());
@@ -156,23 +156,23 @@
156alter table t1 enable keys;156alter table t1 enable keys;
157show keys from t1;157show keys from t1;
158Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment158Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
159t1 0 n1 1 n1 NULL 10 NULL NULL BTREE 159t1 0 n1 1 n1 A 10 NULL NULL BTREE
160t1 1 n1_2 1 n1 NULL NULL NULL NULL BTREE 160t1 1 n1_2 1 n1 A 10 NULL NULL BTREE
161t1 1 n1_2 2 n2 NULL NULL NULL NULL YES BTREE 161t1 1 n1_2 2 n2 A 10 NULL NULL YES BTREE
162t1 1 n1_2 3 n3 NULL NULL NULL NULL YES BTREE 162t1 1 n1_2 3 n3 A 10 NULL NULL YES BTREE
163t1 1 n1_2 4 n4 NULL NULL NULL NULL YES BTREE 163t1 1 n1_2 4 n4 A 10 NULL NULL YES BTREE
164t1 1 n2 1 n2 NULL NULL NULL NULL YES BTREE 164t1 1 n2 1 n2 A 10 NULL NULL YES BTREE
165t1 1 n2 2 n3 NULL NULL NULL NULL YES BTREE 165t1 1 n2 2 n3 A 10 NULL NULL YES BTREE
166t1 1 n2 3 n4 NULL NULL NULL NULL YES BTREE 166t1 1 n2 3 n4 A 10 NULL NULL YES BTREE
167t1 1 n2 4 n1 NULL NULL NULL NULL BTREE 167t1 1 n2 4 n1 A 10 NULL NULL BTREE
168t1 1 n3 1 n3 NULL NULL NULL NULL YES BTREE 168t1 1 n3 1 n3 A 10 NULL NULL YES BTREE
169t1 1 n3 2 n4 NULL NULL NULL NULL YES BTREE 169t1 1 n3 2 n4 A 10 NULL NULL YES BTREE
170t1 1 n3 3 n1 NULL NULL NULL NULL BTREE 170t1 1 n3 3 n1 A 10 NULL NULL BTREE
171t1 1 n3 4 n2 NULL NULL NULL NULL YES BTREE 171t1 1 n3 4 n2 A 10 NULL NULL YES BTREE
172t1 1 n4 1 n4 NULL NULL NULL NULL YES BTREE 172t1 1 n4 1 n4 A 10 NULL NULL YES BTREE
173t1 1 n4 2 n1 NULL NULL NULL NULL BTREE 173t1 1 n4 2 n1 A 10 NULL NULL BTREE
174t1 1 n4 3 n2 NULL NULL NULL NULL YES BTREE 174t1 1 n4 3 n2 A 10 NULL NULL YES BTREE
175t1 1 n4 4 n3 NULL NULL NULL NULL YES BTREE 175t1 1 n4 4 n3 A 10 NULL NULL YES BTREE
176drop table t1;176drop table t1;
177create table t1 (i int unsigned not null auto_increment primary key);177create table t1 (i int unsigned not null auto_increment primary key);
178alter table t1 rename t2;178alter table t1 rename t2;
@@ -286,17 +286,17 @@
286alter table t1 add unique (a,b), add key (b);286alter table t1 add unique (a,b), add key (b);
287show keys from t1;287show keys from t1;
288Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment288Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
289t1 0 a 1 a A NULL NULL NULL YES BTREE 289t1 0 a 1 a A 300 NULL NULL YES BTREE
290t1 0 a 2 b A NULL NULL NULL YES BTREE 290t1 0 a 2 b A 300 NULL NULL YES BTREE
291t1 1 b 1 b A NULL NULL NULL YES BTREE 291t1 1 b 1 b A 300 NULL NULL YES BTREE
292analyze table t1;292analyze table t1;
293Table Op Msg_type Msg_text293Table Op Msg_type Msg_text
294test.t1 analyze status OK294test.t1 analyze status OK
295show keys from t1;295show keys from t1;
296Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment296Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
297t1 0 a 1 a A NULL NULL NULL YES BTREE 297t1 0 a 1 a A 300 NULL NULL YES BTREE
298t1 0 a 2 b A NULL NULL NULL YES BTREE 298t1 0 a 2 b A 300 NULL NULL YES BTREE
299t1 1 b 1 b A NULL NULL NULL YES BTREE 299t1 1 b 1 b A 300 NULL NULL YES BTREE
300drop table t1;300drop table t1;
301CREATE TABLE t1 (i int(10), index(i) );301CREATE TABLE t1 (i int(10), index(i) );
302ALTER TABLE t1 DISABLE KEYS;302ALTER TABLE t1 DISABLE KEYS;
@@ -545,37 +545,37 @@
545create table t1 (a int, key(a));545create table t1 (a int, key(a));
546show indexes from t1;546show indexes from t1;
547Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment547Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
548t1 1 a 1 a A NULL NULL NULL YES BTREE 548t1 1 a 1 a A 0 NULL NULL YES BTREE
549"this used not to disable the index"549"this used not to disable the index"
550alter table t1 modify a int, disable keys;550alter table t1 modify a int, disable keys;
551show indexes from t1;551show indexes from t1;
552Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment552Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
553t1 1 a 1 a A NULL NULL NULL YES BTREE 553t1 1 a 1 a A 0 NULL NULL YES BTREE
554alter table t1 enable keys;554alter table t1 enable keys;
555show indexes from t1;555show indexes from t1;
556Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment556Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
557t1 1 a 1 a NULL NULL NULL NULL YES BTREE 557t1 1 a 1 a A 0 NULL NULL YES BTREE
558alter table t1 modify a bigint, disable keys;558alter table t1 modify a bigint, disable keys;
559show indexes from t1;559show indexes from t1;
560Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment560Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
561t1 1 a 1 a A NULL NULL NULL YES BTREE 561t1 1 a 1 a A 0 NULL NULL YES BTREE
562alter table t1 enable keys;562alter table t1 enable keys;
563show indexes from t1;563show indexes from t1;
564Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment564Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
565t1 1 a 1 a NULL NULL NULL NULL YES BTREE 565t1 1 a 1 a A 0 NULL NULL YES BTREE
566alter table t1 add b char(10), disable keys;566alter table t1 add b char(10), disable keys;
567show indexes from t1;567show indexes from t1;
568Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment568Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
569t1 1 a 1 a A NULL NULL NULL YES BTREE 569t1 1 a 1 a A 0 NULL NULL YES BTREE
570alter table t1 add c decimal(10,2), enable keys;570alter table t1 add c decimal(10,2), enable keys;
571show indexes from t1;571show indexes from t1;
572Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment572Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
573t1 1 a 1 a A NULL NULL NULL YES BTREE 573t1 1 a 1 a A 0 NULL NULL YES BTREE
574"this however did"574"this however did"
575alter table t1 disable keys;575alter table t1 disable keys;
576show indexes from t1;576show indexes from t1;
577Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment577Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
578t1 1 a 1 a NULL NULL NULL NULL YES BTREE 578t1 1 a 1 a A 0 NULL NULL YES BTREE
579desc t1;579desc t1;
580Field Type Null Key Default Extra580Field Type Null Key Default Extra
581a bigint(20) YES MUL NULL 581a bigint(20) YES MUL NULL
@@ -585,7 +585,7 @@
585"The key should still be disabled"585"The key should still be disabled"
586show indexes from t1;586show indexes from t1;
587Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment587Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
588t1 1 a 1 a A NULL NULL NULL YES BTREE 588t1 1 a 1 a A 0 NULL NULL YES BTREE
589drop table t1;589drop table t1;
590"Now will test with one unique index"590"Now will test with one unique index"
591create table t1(a int, b char(10), unique(a));591create table t1(a int, b char(10), unique(a));
@@ -595,7 +595,7 @@
595alter table t1 disable keys;595alter table t1 disable keys;
596show indexes from t1;596show indexes from t1;
597Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment597Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
598t1 0 a 1 a NULL 0 NULL NULL YES BTREE 598t1 0 a 1 a A 0 NULL NULL YES BTREE
599alter table t1 enable keys;599alter table t1 enable keys;
600"If no copy on noop change, this won't touch the data file"600"If no copy on noop change, this won't touch the data file"
601"Unique index, no change"601"Unique index, no change"
@@ -623,12 +623,12 @@
623show indexes from t1;623show indexes from t1;
624Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment624Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
625t1 0 a 1 a A 0 NULL NULL YES BTREE 625t1 0 a 1 a A 0 NULL NULL YES BTREE
626t1 1 b 1 b A NULL NULL NULL YES BTREE 626t1 1 b 1 b A 0 NULL NULL YES BTREE
627alter table t1 disable keys;627alter table t1 disable keys;
628show indexes from t1;628show indexes from t1;
629Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment629Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
630t1 0 a 1 a NULL 0 NULL NULL YES BTREE 630t1 0 a 1 a A 0 NULL NULL YES BTREE
631t1 1 b 1 b NULL NULL NULL NULL YES BTREE 631t1 1 b 1 b A 0 NULL NULL YES BTREE
632alter table t1 enable keys;632alter table t1 enable keys;
633"If no copy on noop change, this won't touch the data file"633"If no copy on noop change, this won't touch the data file"
634"The non-unique index will be disabled"634"The non-unique index will be disabled"
@@ -636,31 +636,31 @@
636show indexes from t1;636show indexes from t1;
637Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment637Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
638t1 0 a 1 a A 0 NULL NULL YES BTREE 638t1 0 a 1 a A 0 NULL NULL YES BTREE
639t1 1 b 1 b A NULL NULL NULL YES BTREE 639t1 1 b 1 b A 0 NULL NULL YES BTREE
640alter table t1 enable keys;640alter table t1 enable keys;
641show indexes from t1;641show indexes from t1;
642Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment642Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
643t1 0 a 1 a NULL 0 NULL NULL YES BTREE 643t1 0 a 1 a A 0 NULL NULL YES BTREE
644t1 1 b 1 b NULL NULL NULL NULL YES BTREE 644t1 1 b 1 b A 0 NULL NULL YES BTREE
645"Change the type implying data copy"645"Change the type implying data copy"
646"The non-unique index will be disabled"646"The non-unique index will be disabled"
647alter table t1 modify a bigint, disable keys;647alter table t1 modify a bigint, disable keys;
648show indexes from t1;648show indexes from t1;
649Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment649Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
650t1 0 a 1 a A 0 NULL NULL YES BTREE 650t1 0 a 1 a A 0 NULL NULL YES BTREE
651t1 1 b 1 b A NULL NULL NULL YES BTREE 651t1 1 b 1 b A 0 NULL NULL YES BTREE
652"Change again the type, but leave the indexes as_is"652"Change again the type, but leave the indexes as_is"
653alter table t1 modify a int;653alter table t1 modify a int;
654show indexes from t1;654show indexes from t1;
655Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment655Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
656t1 0 a 1 a A 0 NULL NULL YES BTREE 656t1 0 a 1 a A 0 NULL NULL YES BTREE
657t1 1 b 1 b A NULL NULL NULL YES BTREE 657t1 1 b 1 b A 0 NULL NULL YES BTREE
658"Try the same. When data is no copied on similar tables, this is noop"658"Try the same. When data is no copied on similar tables, this is noop"
659alter table t1 modify a int;659alter table t1 modify a int;
660show indexes from t1;660show indexes from t1;
661Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment661Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
662t1 0 a 1 a A 0 NULL NULL YES BTREE 662t1 0 a 1 a A 0 NULL NULL YES BTREE
663t1 1 b 1 b A NULL NULL NULL YES BTREE 663t1 1 b 1 b A 0 NULL NULL YES BTREE
664drop table t1;664drop table t1;
665create database mysqltest;665create database mysqltest;
666create table t1 (c1 int);666create table t1 (c1 int);
@@ -697,11 +697,11 @@
697CREATE TABLE bug24219 (a INT, INDEX(a));697CREATE TABLE bug24219 (a INT, INDEX(a));
698SHOW INDEX FROM bug24219;698SHOW INDEX FROM bug24219;
699Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment699Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
700bug24219 1 a 1 a A NULL NULL NULL YES BTREE 700bug24219 1 a 1 a A 0 NULL NULL YES BTREE
701ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;701ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;
702SHOW INDEX FROM bug24219_2;702SHOW INDEX FROM bug24219_2;
703Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment703Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
704bug24219_2 1 a 1 a A NULL NULL NULL YES BTREE 704bug24219_2 1 a 1 a A 0 NULL NULL YES BTREE
705DROP TABLE bug24219_2;705DROP TABLE bug24219_2;
706create table t1 (mycol int(10) not null);706create table t1 (mycol int(10) not null);
707alter table t1 alter column mycol set default 0;707alter table t1 alter column mycol set default 0;
@@ -882,7 +882,7 @@
882char_field char(10) YES NULL 882char_field char(10) YES NULL
883SHOW INDEXES FROM t1;883SHOW INDEXES FROM t1;
884Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment884Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
885t1 1 int_field 1 int_field A NULL NULL NULL BTREE 885t1 1 int_field 1 int_field A 0 NULL NULL BTREE
886INSERT INTO t1 VALUES (1, "edno"), (1, "edno"), (2, "dve"), (3, "tri"), (5, "pet");886INSERT INTO t1 VALUES (1, "edno"), (1, "edno"), (2, "dve"), (3, "tri"), (5, "pet");
887"Non-copy data change - new frm, but old data and index files"887"Non-copy data change - new frm, but old data and index files"
888ALTER TABLE t1888ALTER TABLE t1
889889
=== modified file 'test/mysql-test/r/analyze.result'
--- test/mysql-test/r/analyze.result 2008-06-09 12:49:32 +0000
+++ test/mysql-test/r/analyze.result 2009-04-03 19:39:12 +0000
@@ -56,5 +56,5 @@
56test.t1 analyze status OK56test.t1 analyze status OK
57show index from t1;57show index from t1;
58Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment58Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
59t1 1 a 1 a NULL NULL NULL NULL YES BTREE 59t1 1 a 1 a A 5 NULL NULL YES BTREE
60drop table t1;60drop table t1;
6161
=== modified file 'test/mysql-test/r/compress.result'
--- test/mysql-test/r/compress.result 2008-06-09 12:49:32 +0000
+++ test/mysql-test/r/compress.result 2009-04-03 19:39:12 +0000
@@ -611,15 +611,15 @@
611explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;611explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
612id select_type table type possible_keys key key_len ref rows Extra612id select_type table type possible_keys key key_len ref rows Extra
6131 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort6131 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
6141 SIMPLE t3 ref period period 4 test.t1.period 18 6141 SIMPLE t3 ref period period 4 test.t1.period 1
615explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;615explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
616id select_type table type possible_keys key key_len ref rows Extra616id select_type table type possible_keys key key_len ref rows Extra
6171 SIMPLE t3 index period period 4 NULL 1 6171 SIMPLE t3 index period period 4 NULL 10
6181 SIMPLE t1 ref period period 4 test.t3.period 18 6181 SIMPLE t1 ref period period 4 test.t3.period 1
619explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;619explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
620id select_type table type possible_keys key key_len ref rows Extra620id select_type table type possible_keys key key_len ref rows Extra
6211 SIMPLE t1 index period period 4 NULL 1 6211 SIMPLE t1 index period period 4 NULL 10
6221 SIMPLE t3 ref period period 4 test.t1.period 18 6221 SIMPLE t3 ref period period 4 test.t1.period 1
623select period from t1;623select period from t1;
624period624period
62594106259410
@@ -2099,7 +2099,7 @@
2099Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment2099Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
2100t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE 2100t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
2101t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE 2101t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
2102t2 1 fld3 1 fld3 A NULL NULL NULL BTREE 2102t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE
2103drop table t4, t3, t2, t1;2103drop table t4, t3, t2, t1;
2104CREATE TABLE t1 (2104CREATE TABLE t1 (
2105cont_nr int(11) NOT NULL auto_increment,2105cont_nr int(11) NOT NULL auto_increment,
21062106
=== modified file 'test/mysql-test/r/ctype_mb.result'
--- test/mysql-test/r/ctype_mb.result 2006-10-23 09:14:04 +0000
+++ test/mysql-test/r/ctype_mb.result 2009-04-03 19:39:12 +0000
@@ -33,7 +33,7 @@
33) ENGINE=PBXT DEFAULT CHARSET=latin133) ENGINE=PBXT DEFAULT CHARSET=latin1
34SHOW KEYS FROM t1;34SHOW KEYS FROM t1;
35Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment35Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
36t1 1 key_a 1 a A NULL 3 NULL YES BTREE 36t1 1 key_a 1 a A 0 3 NULL YES BTREE
37ALTER TABLE t1 CHANGE a a CHAR(4);37ALTER TABLE t1 CHANGE a a CHAR(4);
38SHOW CREATE TABLE t1;38SHOW CREATE TABLE t1;
39Table Create Table39Table Create Table
@@ -43,7 +43,7 @@
43) ENGINE=PBXT DEFAULT CHARSET=latin143) ENGINE=PBXT DEFAULT CHARSET=latin1
44SHOW KEYS FROM t1;44SHOW KEYS FROM t1;
45Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment45Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
46t1 1 key_a 1 a A NULL 3 NULL YES BTREE 46t1 1 key_a 1 a A 0 3 NULL YES BTREE
47ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;47ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;
48SHOW CREATE TABLE t1;48SHOW CREATE TABLE t1;
49Table Create Table49Table Create Table
@@ -53,5 +53,5 @@
53) ENGINE=PBXT DEFAULT CHARSET=latin153) ENGINE=PBXT DEFAULT CHARSET=latin1
54SHOW KEYS FROM t1;54SHOW KEYS FROM t1;
55Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment55Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
56t1 1 key_a 1 a A NULL 3 NULL YES BTREE 56t1 1 key_a 1 a A 0 3 NULL YES BTREE
57DROP TABLE t1;57DROP TABLE t1;
5858
=== modified file 'test/mysql-test/r/distinct.result'
--- test/mysql-test/r/distinct.result 2008-03-28 10:24:43 +0000
+++ test/mysql-test/r/distinct.result 2009-04-03 19:39:12 +0000
@@ -174,8 +174,8 @@
174explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;174explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
175id select_type table type possible_keys key key_len ref rows Extra175id select_type table type possible_keys key key_len ref rows Extra
1761 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary1761 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
1771 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index1771 SIMPLE t2 ref a a 4 test.t1.a 1 Using index
1781 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer1781 SIMPLE t3 ref a a 5 test.t1.b 1 Using where; Using index
179SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;179SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
180a180a
18111811
@@ -190,7 +190,7 @@
190explain select distinct t1.a from t1,t3 where t1.a=t3.a;190explain select distinct t1.a from t1,t3 where t1.a=t3.a;
191id select_type table type possible_keys key key_len ref rows Extra191id select_type table type possible_keys key key_len ref rows Extra
1921 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary1921 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary
1931 SIMPLE t3 ref a a 5 test.t1.a 11 Using where; Using index; Distinct1931 SIMPLE t3 ref a a 5 test.t1.a 1 Using where; Using index; Distinct
194select distinct t1.a from t1,t3 where t1.a=t3.a;194select distinct t1.a from t1,t3 where t1.a=t3.a;
195a195a
19611961
@@ -212,7 +212,7 @@
2121 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using index2121 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using index
213explain SELECT distinct a from t3 order by a desc limit 2;213explain SELECT distinct a from t3 order by a desc limit 2;
214id select_type table type possible_keys key key_len ref rows Extra214id select_type table type possible_keys key key_len ref rows Extra
2151 SIMPLE t3 index NULL a 5 NULL 40 Using index2151 SIMPLE t3 index NULL a 5 NULL 2 Using index
216explain SELECT distinct a,b from t3 order by a+1;216explain SELECT distinct a,b from t3 order by a+1;
217id select_type table type possible_keys key key_len ref rows Extra217id select_type table type possible_keys key key_len ref rows Extra
2181 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort2181 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort
219219
=== modified file 'test/mysql-test/r/func_group.result'
--- test/mysql-test/r/func_group.result 2008-03-10 11:36:34 +0000
+++ test/mysql-test/r/func_group.result 2009-04-03 19:39:12 +0000
@@ -613,8 +613,8 @@
613explain613explain
614select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';614select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
615id select_type table type possible_keys key key_len ref rows Extra615id select_type table type possible_keys key key_len ref rows Extra
6161 SIMPLE t2 range k1 k1 3 NULL 1 Using where; Using index6161 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index
6171 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index; Using join buffer6171 SIMPLE t2 range k1 k1 3 NULL 1 Using where; Using index; Using join buffer
618explain618explain
619select min(a4 - 0.01) from t1;619select min(a4 - 0.01) from t1;
620id select_type table type possible_keys key key_len ref rows Extra620id select_type table type possible_keys key key_len ref rows Extra
621621
=== modified file 'test/mysql-test/r/group_min_max.result'
--- test/mysql-test/r/group_min_max.result 2009-03-27 20:05:34 +0000
+++ test/mysql-test/r/group_min_max.result 2009-04-03 19:39:12 +0000
@@ -133,34 +133,34 @@
133test.t3 analyze status OK133test.t3 analyze status OK
134explain select a1, min(a2) from t1 group by a1;134explain select a1, min(a2) from t1 group by a1;
135id select_type table type possible_keys key key_len ref rows Extra135id select_type table type possible_keys key key_len ref rows Extra
1361 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by1361 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
137explain select a1, max(a2) from t1 group by a1;137explain select a1, max(a2) from t1 group by a1;
138id select_type table type possible_keys key key_len ref rows Extra138id select_type table type possible_keys key key_len ref rows Extra
1391 SIMPLE t1 range NULL idx_t1_1 65 NULL 10 Using index for group-by1391 SIMPLE t1 range NULL idx_t1_1 65 NULL 129 Using index for group-by
140explain select a1, min(a2), max(a2) from t1 group by a1;140explain select a1, min(a2), max(a2) from t1 group by a1;
141id select_type table type possible_keys key key_len ref rows Extra141id select_type table type possible_keys key key_len ref rows Extra
1421 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by1421 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
143explain select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b;143explain select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b;
144id select_type table type possible_keys key key_len ref rows Extra144id select_type table type possible_keys key key_len ref rows Extra
1451 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by1451 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
146explain select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b;146explain select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b;
147id select_type table type possible_keys key key_len ref rows Extra147id select_type table type possible_keys key key_len ref rows Extra
1481 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by1481 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
149explain select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b;149explain select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b;
150id select_type table type possible_keys key key_len ref rows Extra150id select_type table type possible_keys key key_len ref rows Extra
1511 SIMPLE t2 range NULL idx_t2_1 # NULL # Using index for group-by1511 SIMPLE t2 range NULL idx_t2_1 # NULL # Using index for group-by
152explain select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1;152explain select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1;
153id select_type table type possible_keys key key_len ref rows Extra153id select_type table type possible_keys key key_len ref rows Extra
1541 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by1541 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
155explain select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b;155explain select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b;
156id select_type table type possible_keys key key_len ref rows Extra156id select_type table type possible_keys key key_len ref rows Extra
1571 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by1571 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
158explain select min(a2) from t1 group by a1;158explain select min(a2) from t1 group by a1;
159id select_type table type possible_keys key key_len ref rows Extra159id select_type table type possible_keys key key_len ref rows Extra
1601 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by1601 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
161explain select a2, min(c), max(c) from t1 group by a1,a2,b;161explain select a2, min(c), max(c) from t1 group by a1,a2,b;
162id select_type table type possible_keys key key_len ref rows Extra162id select_type table type possible_keys key key_len ref rows Extra
1631 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by1631 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
164select a1, min(a2) from t1 group by a1;164select a1, min(a2) from t1 group by a1;
165a1 min(a2)165a1 min(a2)
166a a166a a
@@ -293,13 +293,13 @@
2931 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where2931 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where
294explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;294explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
295id select_type table type possible_keys key key_len ref rows Extra295id select_type table type possible_keys key key_len ref rows Extra
2961 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 1 Using where; Using index for group-by2961 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 2 Using where; Using index for group-by
297explain select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;297explain select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
298id select_type table type possible_keys key key_len ref rows Extra298id select_type table type possible_keys key key_len ref rows Extra
2991 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 1 Using where; Using index for group-by2991 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 2 Using where; Using index for group-by
300explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b;300explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b;
301id select_type table type possible_keys key key_len ref rows Extra301id select_type table type possible_keys key key_len ref rows Extra
3021 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by3021 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 129 Using where; Using index for group-by
303explain select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;303explain select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
304id select_type table type possible_keys key key_len ref rows Extra304id select_type table type possible_keys key key_len ref rows Extra
3051 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 65 NULL 3 Using where; Using index3051 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 65 NULL 3 Using where; Using index
@@ -669,40 +669,40 @@
669d p422669d p422
670explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;670explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
671id select_type table type possible_keys key key_len ref rows Extra671id select_type table type possible_keys key key_len ref rows Extra
6721 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by6721 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
673explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;673explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
674id select_type table type possible_keys key key_len ref rows Extra674id select_type table type possible_keys key key_len ref rows Extra
6751 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by6751 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
676explain select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;676explain select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;
677id select_type table type possible_keys key key_len ref rows Extra677id select_type table type possible_keys key key_len ref rows Extra
6781 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by6781 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
679explain select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2;679explain select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2;
680id select_type table type possible_keys key key_len ref rows Extra680id select_type table type possible_keys key key_len ref rows Extra
6811 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by6811 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
682explain select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2;682explain select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2;
683id select_type table type possible_keys key key_len ref rows Extra683id select_type table type possible_keys key key_len ref rows Extra
6841 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by6841 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
685explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;685explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
686id select_type table type possible_keys key key_len ref rows Extra686id select_type table type possible_keys key key_len ref rows Extra
6871 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by6871 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
688explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;688explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
689id select_type table type possible_keys key key_len ref rows Extra689id select_type table type possible_keys key key_len ref rows Extra
6901 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by6901 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
691explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;691explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;
692id select_type table type possible_keys key key_len ref rows Extra692id select_type table type possible_keys key key_len ref rows Extra
6931 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by6931 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
694explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;694explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;
695id select_type table type possible_keys key key_len ref rows Extra695id select_type table type possible_keys key key_len ref rows Extra
6961 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by6961 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
697explain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;697explain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;
698id select_type table type possible_keys key key_len ref rows Extra698id select_type table type possible_keys key key_len ref rows Extra
6991 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by6991 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
700explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;700explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
701id select_type table type possible_keys key key_len ref rows Extra701id select_type table type possible_keys key key_len ref rows Extra
7021 SIMPLE t3 range NULL idx_t3_1 6 NULL 10 Using where; Using index for group-by7021 SIMPLE t3 range NULL idx_t3_1 6 NULL 193 Using where; Using index for group-by
703explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;703explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
704id select_type table type possible_keys key key_len ref rows Extra704id select_type table type possible_keys key key_len ref rows Extra
7051 SIMPLE t3 range NULL idx_t3_1 6 NULL 10 Using where; Using index for group-by7051 SIMPLE t3 range NULL idx_t3_1 6 NULL 193 Using where; Using index for group-by
706select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;706select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
707a1 a2 b max(c) min(c)707a1 a2 b max(c) min(c)
708a a b h112 e112708a a b h112 e112
@@ -804,22 +804,22 @@
804c h312 e312804c h312 e312
805explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;805explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
806id select_type table type possible_keys key key_len ref rows Extra806id select_type table type possible_keys key key_len ref rows Extra
8071 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by8071 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
808explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;808explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
809id select_type table type possible_keys key key_len ref rows Extra809id select_type table type possible_keys key key_len ref rows Extra
8101 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by8101 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
811explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;811explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
812id select_type table type possible_keys key key_len ref rows Extra812id select_type table type possible_keys key key_len ref rows Extra
8131 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by8131 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
814explain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;814explain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;
815id select_type table type possible_keys key key_len ref rows Extra815id select_type table type possible_keys key key_len ref rows Extra
8161 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by8161 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
817explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;817explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
818id select_type table type possible_keys key key_len ref rows Extra818id select_type table type possible_keys key key_len ref rows Extra
8191 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by8191 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
820explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;820explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
821id select_type table type possible_keys key key_len ref rows Extra821id select_type table type possible_keys key key_len ref rows Extra
8221 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by8221 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
823select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;823select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
824a1 a2 b min(c)824a1 a2 b min(c)
825a a NULL a777825a a NULL a777
@@ -849,49 +849,49 @@
8491 SIMPLE t1 range NULL idx_t1_1 147 NULL # Using where; Using index for group-by8491 SIMPLE t1 range NULL idx_t1_1 147 NULL # Using where; Using index for group-by
850explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;850explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;
851id select_type table type possible_keys key key_len ref rows Extra851id select_type table type possible_keys key key_len ref rows Extra
8521 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8521 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
853explain select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;853explain select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;
854id select_type table type possible_keys key key_len ref rows Extra854id select_type table type possible_keys key key_len ref rows Extra
8551 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by8551 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
856explain select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b;856explain select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b;
857id select_type table type possible_keys key key_len ref rows Extra857id select_type table type possible_keys key key_len ref rows Extra
8581 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8581 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
859explain select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b;859explain select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b;
860id select_type table type possible_keys key key_len ref rows Extra860id select_type table type possible_keys key key_len ref rows Extra
8611 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8611 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
862explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;862explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;
863id select_type table type possible_keys key key_len ref rows Extra863id select_type table type possible_keys key key_len ref rows Extra
8641 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8641 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
865explain select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b;865explain select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b;
866id select_type table type possible_keys key key_len ref rows Extra866id select_type table type possible_keys key key_len ref rows Extra
8671 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8671 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
868explain select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;868explain select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;
869id select_type table type possible_keys key key_len ref rows Extra869id select_type table type possible_keys key key_len ref rows Extra
8701 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8701 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
871explain select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;871explain select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
872id select_type table type possible_keys key key_len ref rows Extra872id select_type table type possible_keys key key_len ref rows Extra
8731 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8731 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
874explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;874explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
875id select_type table type possible_keys key key_len ref rows Extra875id select_type table type possible_keys key key_len ref rows Extra
8761 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8761 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
877explain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;877explain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
878id select_type table type possible_keys key key_len ref rows Extra878id select_type table type possible_keys key key_len ref rows Extra
8791 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by8791 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
880explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;880explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
881id select_type table type possible_keys key key_len ref rows Extra881id select_type table type possible_keys key key_len ref rows Extra
8821 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by8821 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
883explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;883explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;
884id select_type table type possible_keys key key_len ref rows Extra884id select_type table type possible_keys key key_len ref rows Extra
8851 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8851 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
886explain select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;886explain select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;
887id select_type table type possible_keys key key_len ref rows Extra887id select_type table type possible_keys key key_len ref rows Extra
8881 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8881 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
889explain select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;889explain select a1,a2,b,min(c),max(c) from t1 where ((c > 'b111') and (c <= 'g112')) or ((c > 'd000') and (c <= 'i110')) group by a1,a2,b;
890id select_type table type possible_keys key key_len ref rows Extra890id select_type table type possible_keys key key_len ref rows Extra
8911 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8911 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
892explain select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b;892explain select a1,a2,b,min(c),max(c) from t1 where (c between 'b111' and 'g112') or (c between 'd000' and 'i110') group by a1,a2,b;
893id select_type table type possible_keys key key_len ref rows Extra893id select_type table type possible_keys key key_len ref rows Extra
8941 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by8941 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
895explain select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b;895explain select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b;
896id select_type table type possible_keys key key_len ref rows Extra896id select_type table type possible_keys key key_len ref rows Extra
8971 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by8971 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
@@ -1364,29 +1364,29 @@
1364where exists ( select * from t2 where t2.c > 'b1' )1364where exists ( select * from t2 where t2.c > 'b1' )
1365group by a1,a2,b;1365group by a1,a2,b;
1366id select_type table type possible_keys key key_len ref rows Extra1366id select_type table type possible_keys key key_len ref rows Extra
13671 PRIMARY t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by13671 PRIMARY t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
13682 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index13682 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
1369explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;1369explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
1370id select_type table type possible_keys key key_len ref rows Extra1370id select_type table type possible_keys key key_len ref rows Extra
13711 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by13711 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 129 Using where; Using index for group-by
1372explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;1372explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;
1373id select_type table type possible_keys key key_len ref rows Extra1373id select_type table type possible_keys key key_len ref rows Extra
13741 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 10 Using where; Using index for group-by13741 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 129 Using where; Using index for group-by
1375explain select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;1375explain select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;
1376id select_type table type possible_keys key key_len ref rows Extra1376id select_type table type possible_keys key key_len ref rows Extra
13771 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by13771 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
1378explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;1378explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c < 'h112') or (c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122')) group by a1,a2,b;
1379id select_type table type possible_keys key key_len ref rows Extra1379id select_type table type possible_keys key key_len ref rows Extra
13801 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 1 Using where; Using index for group-by13801 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 2 Using where; Using index for group-by
1381explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;1381explain select a1,a2,b,min(c) from t1 where ((a1 > 'a') or (a1 < '9')) and ((a2 >= 'b') and (a2 < 'z')) and (b = 'a') and ((c = 'j121') or (c > 'k121' and c < 'm122') or (c > 'o122') or (c < 'h112') or (c = 'c111')) group by a1,a2,b;
1382id select_type table type possible_keys key key_len ref rows Extra1382id select_type table type possible_keys key key_len ref rows Extra
13831 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 1 Using where; Using index for group-by13831 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 2 Using where; Using index for group-by
1384explain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;1384explain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
1385id select_type table type possible_keys key key_len ref rows Extra1385id select_type table type possible_keys key key_len ref rows Extra
13861 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where13861 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where
1387explain select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;1387explain select a1,a2,b,min(c) from t1 where (ord(a1) > 97) and (ord(a2) + ord(a1) > 194) and (b = 'c') group by a1,a2,b;
1388id select_type table type possible_keys key key_len ref rows Extra1388id select_type table type possible_keys key key_len ref rows Extra
13891 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by13891 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
1390explain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;1390explain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
1391id select_type table type possible_keys key key_len ref rows Extra1391id select_type table type possible_keys key key_len ref rows Extra
13921 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by13921 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by
@@ -1491,13 +1491,13 @@
1491a1 a2 b min(c)1491a1 a2 b min(c)
1492explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;1492explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
1493id select_type table type possible_keys key key_len ref rows Extra1493id select_type table type possible_keys key key_len ref rows Extra
14941 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by14941 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 129 Using where; Using index for group-by
1495explain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;1495explain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
1496id select_type table type possible_keys key key_len ref rows Extra1496id select_type table type possible_keys key key_len ref rows Extra
14971 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by14971 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
1498explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;1498explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
1499id select_type table type possible_keys key key_len ref rows Extra1499id select_type table type possible_keys key key_len ref rows Extra
15001 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by15001 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
1501explain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;1501explain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
1502id select_type table type possible_keys key key_len ref rows Extra1502id select_type table type possible_keys key key_len ref rows Extra
15031 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 1 Using where15031 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 1 Using where
@@ -1554,13 +1554,13 @@
1554a1 a2 b1554a1 a2 b
1555explain select distinct a1,a2,b from t1;1555explain select distinct a1,a2,b from t1;
1556id select_type table type possible_keys key key_len ref rows Extra1556id select_type table type possible_keys key key_len ref rows Extra
15571 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by15571 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
1558explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');1558explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');
1559id select_type table type possible_keys key key_len ref rows Extra1559id select_type table type possible_keys key key_len ref rows Extra
15601 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by15601 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
1561explain extended select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');1561explain extended select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
1562id select_type table type possible_keys key key_len ref rows filtered Extra1562id select_type table type possible_keys key key_len ref rows filtered Extra
15631 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 100.00 Using where; Using index for group-by15631 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 99.22 Using where; Using index for group-by
1564Warnings:1564Warnings:
1565Note 1003 select distinct `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`c` = 'i121') and (`test`.`t1`.`b` = 'a') and (`test`.`t1`.`a2` >= 'b'))1565Note 1003 select distinct `test`.`t1`.`a1` AS `a1`,`test`.`t1`.`a2` AS `a2`,`test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`c` = 'i121') and (`test`.`t1`.`b` = 'a') and (`test`.`t1`.`a2` >= 'b'))
1566explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');1566explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
@@ -1577,7 +1577,7 @@
15771 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by15771 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by
1578explain extended select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');1578explain extended select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
1579id select_type table type possible_keys key key_len ref rows filtered Extra1579id select_type table type possible_keys key key_len ref rows filtered Extra
15801 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 100.00 Using where; Using index for group-by15801 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 99.39 Using where; Using index for group-by
1581Warnings:1581Warnings:
1582Note 1003 select distinct `test`.`t2`.`a1` AS `a1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 'i121') and (`test`.`t2`.`b` = 'a') and (`test`.`t2`.`a2` >= 'b'))1582Note 1003 select distinct `test`.`t2`.`a1` AS `a1`,`test`.`t2`.`a2` AS `a2`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c` from `test`.`t2` where ((`test`.`t2`.`c` = 'i121') and (`test`.`t2`.`b` = 'a') and (`test`.`t2`.`a2` >= 'b'))
1583explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');1583explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
@@ -1702,19 +1702,19 @@
1702d e1702d e
1703explain select distinct a1,a2,b from t1;1703explain select distinct a1,a2,b from t1;
1704id select_type table type possible_keys key key_len ref rows Extra1704id select_type table type possible_keys key key_len ref rows Extra
17051 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by17051 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
1706explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;1706explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
1707id select_type table type possible_keys key key_len ref rows Extra1707id select_type table type possible_keys key key_len ref rows Extra
17081 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by17081 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
1709explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;1709explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
1710id select_type table type possible_keys key key_len ref rows Extra1710id select_type table type possible_keys key key_len ref rows Extra
17111 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by17111 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
1712explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;1712explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
1713id select_type table type possible_keys key key_len ref rows Extra1713id select_type table type possible_keys key key_len ref rows Extra
17141 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 1 Using where17141 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 1 Using where
1715explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;1715explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
1716id select_type table type possible_keys key key_len ref rows Extra1716id select_type table type possible_keys key key_len ref rows Extra
17171 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by; Using temporary; Using filesort17171 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by; Using temporary; Using filesort
1718explain select distinct a1,a2,b from t2;1718explain select distinct a1,a2,b from t2;
1719id select_type table type possible_keys key key_len ref rows Extra1719id select_type table type possible_keys key key_len ref rows Extra
17201 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using index for group-by17201 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using index for group-by
@@ -1846,7 +1846,7 @@
18461 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where18461 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where
1847explain select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2;1847explain select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2;
1848id select_type table type possible_keys key key_len ref rows Extra1848id select_type table type possible_keys key key_len ref rows Extra
18491 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by18491 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
1850select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;1850select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;
1851a1 a2 b concat(min(c), max(c))1851a1 a2 b concat(min(c), max(c))
1852a a a a111d1111852a a a a111d111
@@ -1985,7 +1985,7 @@
1985d1985d
1986explain select a1 from t1 where a2 = 'b' group by a1;1986explain select a1 from t1 where a2 = 'b' group by a1;
1987id select_type table type possible_keys key key_len ref rows Extra1987id select_type table type possible_keys key key_len ref rows Extra
19881 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using where; Using index for group-by19881 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using where; Using index for group-by
1989select a1 from t1 where a2 = 'b' group by a1;1989select a1 from t1 where a2 = 'b' group by a1;
1990a11990a1
1991a1991a
@@ -1994,7 +1994,7 @@
1994d1994d
1995explain select distinct a1 from t1 where a2 = 'b';1995explain select distinct a1 from t1 where a2 = 'b';
1996id select_type table type possible_keys key key_len ref rows Extra1996id select_type table type possible_keys key key_len ref rows Extra
19971 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using where; Using index for group-by19971 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using where; Using index for group-by
1998select distinct a1 from t1 where a2 = 'b';1998select distinct a1 from t1 where a2 = 'b';
1999a11999a1
2000a2000a
@@ -2188,7 +2188,7 @@
2188(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);2188(2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
2189EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;2189EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
2190id select_type table type possible_keys key key_len ref rows Extra2190id select_type table type possible_keys key key_len ref rows Extra
21911 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by21911 SIMPLE t1 index NULL a 10 NULL 15 Using index
2192FLUSH STATUS;2192FLUSH STATUS;
2193SELECT max(b), a FROM t1 GROUP BY a;2193SELECT max(b), a FROM t1 GROUP BY a;
2194max(b) a2194max(b) a
@@ -2202,7 +2202,7 @@
2202Handler_read_next 02202Handler_read_next 0
2203EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;2203EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
2204id select_type table type possible_keys key key_len ref rows Extra2204id select_type table type possible_keys key key_len ref rows Extra
22051 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by22051 SIMPLE t1 index NULL a 10 NULL 15 Using index
2206FLUSH STATUS;2206FLUSH STATUS;
2207CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;2207CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;
2208SHOW STATUS LIKE 'handler_read__e%';2208SHOW STATUS LIKE 'handler_read__e%';
@@ -2235,14 +2235,14 @@
2235EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION 2235EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
2236(SELECT max(b), a FROM t1 GROUP BY a);2236(SELECT max(b), a FROM t1 GROUP BY a);
2237id select_type table type possible_keys key key_len ref rows Extra2237id select_type table type possible_keys key key_len ref rows Extra
22381 PRIMARY t1 range NULL a 5 NULL 8 Using index for group-by22381 PRIMARY t1 index NULL a 10 NULL 15 Using index
22392 UNION t1 range NULL a 5 NULL 8 Using index for group-by22392 UNION t1 index NULL a 10 NULL 15 Using index
2240NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL 2240NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
2241EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x2241EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
2242FROM t1 AS t1_outer;2242FROM t1 AS t1_outer;
2243id select_type table type possible_keys key key_len ref rows Extra2243id select_type table type possible_keys key key_len ref rows Extra
22441 PRIMARY t1_outer index NULL a 10 NULL 15 Using index22441 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
22452 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by22452 SUBQUERY t1 index NULL a 10 NULL 15 Using index
2246EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS 2246EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
2247(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);2247(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
2248id select_type table type possible_keys key key_len ref rows Extra2248id select_type table type possible_keys key key_len ref rows Extra
@@ -2252,7 +2252,7 @@
2252(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;2252(SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
2253id select_type table type possible_keys key key_len ref rows Extra2253id select_type table type possible_keys key key_len ref rows Extra
22541 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE22541 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
22552 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by22552 SUBQUERY t1 index NULL a 10 NULL 15 Using index
2256EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE 2256EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
2257a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);2257a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
2258id select_type table type possible_keys key key_len ref rows Extra2258id select_type table type possible_keys key key_len ref rows Extra
@@ -2261,21 +2261,21 @@
2261EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING 2261EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
2262a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);2262a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
2263id select_type table type possible_keys key key_len ref rows Extra2263id select_type table type possible_keys key key_len ref rows Extra
22641 PRIMARY t1_outer range NULL a 5 NULL 8 Using index for group-by22641 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
22652 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by22652 SUBQUERY t1 index NULL a 10 NULL 15 Using index
2266EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2 2266EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
2267ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) 2267ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
2268AND t1_outer1.b = t1_outer2.b;2268AND t1_outer1.b = t1_outer2.b;
2269id select_type table type possible_keys key key_len ref rows Extra2269id select_type table type possible_keys key key_len ref rows Extra
22701 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index22701 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
22711 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer22711 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer
22722 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by22722 SUBQUERY t1 index NULL a 10 NULL 15 Using index
2273EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x2273EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
2274FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;2274FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
2275id select_type table type possible_keys key key_len ref rows Extra2275id select_type table type possible_keys key key_len ref rows Extra
22761 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index22761 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index
22772 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index22772 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index
22783 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by22783 SUBQUERY t1 index NULL a 10 NULL 15 Using index
2279CREATE TABLE t3 LIKE t1;2279CREATE TABLE t3 LIKE t1;
2280FLUSH STATUS;2280FLUSH STATUS;
2281INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;2281INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
@@ -2312,7 +2312,7 @@
2312(4), (2), (1), (2), (2), (4), (1), (4);2312(4), (2), (1), (2), (2), (4), (1), (4);
2313EXPLAIN SELECT DISTINCT(a) FROM t1;2313EXPLAIN SELECT DISTINCT(a) FROM t1;
2314id select_type table type possible_keys key key_len ref rows Extra2314id select_type table type possible_keys key key_len ref rows Extra
23151 SIMPLE t1 range NULL idx 5 NULL 9 Using index for group-by23151 SIMPLE t1 index NULL idx 5 NULL 16 Using index
2316SELECT DISTINCT(a) FROM t1;2316SELECT DISTINCT(a) FROM t1;
2317a2317a
2318123181
@@ -2320,7 +2320,7 @@
2320423204
2321EXPLAIN SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;2321EXPLAIN SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
2322id select_type table type possible_keys key key_len ref rows Extra2322id select_type table type possible_keys key key_len ref rows Extra
23231 SIMPLE t1 range NULL idx 5 NULL 9 Using index for group-by23231 SIMPLE t1 index NULL idx 5 NULL 16 Using index
2324SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;2324SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
2325a2325a
2326123261
@@ -2345,7 +2345,7 @@
2345EXPLAIN2345EXPLAIN
2346SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;2346SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
2347id select_type table type possible_keys key key_len ref rows Extra2347id select_type table type possible_keys key key_len ref rows Extra
23481 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by23481 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
2349SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;2349SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
2350a MIN(b) MAX(b)2350a MIN(b) MAX(b)
23511 1 323511 1 3
@@ -2355,7 +2355,7 @@
2355EXPLAIN2355EXPLAIN
2356SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;2356SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
2357id select_type table type possible_keys key key_len ref rows Extra2357id select_type table type possible_keys key key_len ref rows Extra
23581 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by; Using temporary; Using filesort23581 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
2359SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;2359SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
2360a MIN(b) MAX(b)2360a MIN(b) MAX(b)
23614 1 323614 1 3
23622362
=== modified file 'test/mysql-test/r/join.result'
--- test/mysql-test/r/join.result 2008-03-10 11:36:34 +0000
+++ test/mysql-test/r/join.result 2009-04-03 19:39:12 +0000
@@ -774,7 +774,7 @@
774explain select * from t2,t3 where t2.a < 200 and t2.b=t3.b;774explain select * from t2,t3 where t2.a < 200 and t2.b=t3.b;
775id select_type table type possible_keys key key_len ref rows Extra775id select_type table type possible_keys key key_len ref rows Extra
7761 SIMPLE t2 range a,b a 5 NULL 1 Using where7761 SIMPLE t2 range a,b a 5 NULL 1 Using where
7771 SIMPLE t3 ref b b 5 test.t2.b 11 Using where7771 SIMPLE t3 ref b b 5 test.t2.b 1 Using where
778drop table t1, t2, t3;778drop table t1, t2, t3;
779create table t1 (a int);779create table t1 (a int);
780insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);780insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
781781
=== modified file 'test/mysql-test/r/join_nested.result'
--- test/mysql-test/r/join_nested.result 2009-03-27 20:05:34 +0000
+++ test/mysql-test/r/join_nested.result 2009-04-03 19:39:12 +0000
@@ -851,7 +851,7 @@
851id select_type table type possible_keys key key_len ref rows filtered Extra851id select_type table type possible_keys key key_len ref rows filtered Extra
8521 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 8521 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
8531 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer8531 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
8541 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00 8541 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 1 100.00
8551 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 8551 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
856Warnings:856Warnings:
857Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1857Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b` from `test`.`t3` join `test`.`t4` left join (`test`.`t1` join `test`.`t2`) on(((`test`.`t3`.`a` = 1) and (`test`.`t3`.`b` = `test`.`t2`.`b`) and (`test`.`t2`.`b` = `test`.`t4`.`b`))) where 1
@@ -958,15 +958,15 @@
9581 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where9581 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
9591 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer9591 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
9601 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where9601 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
9611 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
9611 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where9621 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
9621 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
9631 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where9631 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
9641 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where9641 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
9651 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where9651 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
9661 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where9661 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
9671 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer9671 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
968Warnings:968Warnings:
969Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))969Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t3`.`b` = `test`.`t4`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
970CREATE INDEX idx_b ON t8(b);970CREATE INDEX idx_b ON t8(b);
971EXPLAIN EXTENDED971EXPLAIN EXTENDED
972SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,972SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
@@ -1006,16 +1006,16 @@
1006id select_type table type possible_keys key key_len ref rows filtered Extra1006id select_type table type possible_keys key key_len ref rows filtered Extra
10071 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where10071 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
10081 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer10081 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
10091 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
10101 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
10111 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
10121 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where10091 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
10131 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where10101 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
10141 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where10111 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
10151 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where10121 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
10131 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
10141 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
10151 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
10161 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer10161 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1017Warnings:1017Warnings:
1018Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))1018Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t3`.`b` = `test`.`t4`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
1019CREATE INDEX idx_b ON t1(b);1019CREATE INDEX idx_b ON t1(b);
1020CREATE INDEX idx_a ON t0(a);1020CREATE INDEX idx_a ON t0(a);
1021EXPLAIN EXTENDED1021EXPLAIN EXTENDED
@@ -1055,17 +1055,17 @@
1055(t9.a=1);1055(t9.a=1);
1056id select_type table type possible_keys key key_len ref rows filtered Extra1056id select_type table type possible_keys key key_len ref rows filtered Extra
10571 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where10571 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
10581 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using where10581 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00 Using where
10591 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
10601 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
10611 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
10621 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where10591 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
10631 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where10601 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
10641 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where10611 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
10651 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where10621 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
10631 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
10641 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
10651 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
10661 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer10661 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1067Warnings:1067Warnings:
1068Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t4`.`b` = `test`.`t3`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))1068Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(((`test`.`t4`.`b` = `test`.`t2`.`b`) and (`test`.`t3`.`a` = 1))) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(((`test`.`t8`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` < 10)))) on(((`test`.`t7`.`b` = `test`.`t5`.`b`) and (`test`.`t6`.`b` >= 2)))) on((((`test`.`t3`.`b` = 2) or isnull(`test`.`t3`.`c`)) and ((`test`.`t6`.`b` = 2) or isnull(`test`.`t6`.`c`)) and ((`test`.`t5`.`b` = `test`.`t0`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t6`.`c`) or isnull(`test`.`t8`.`c`)) and (`test`.`t1`.`a` <> 2))) join `test`.`t9` where ((`test`.`t9`.`a` = 1) and (`test`.`t1`.`b` = `test`.`t0`.`b`) and (`test`.`t0`.`a` = 1) and ((`test`.`t2`.`a` >= 4) or isnull(`test`.`t2`.`c`)) and ((`test`.`t3`.`a` < 5) or isnull(`test`.`t3`.`c`)) and ((`test`.`t3`.`b` = `test`.`t4`.`b`) or isnull(`test`.`t3`.`c`) or isnull(`test`.`t4`.`c`)) and ((`test`.`t5`.`a` >= 2) or isnull(`test`.`t5`.`c`)) and ((`test`.`t6`.`a` >= 4) or isnull(`test`.`t6`.`c`)) and ((`test`.`t7`.`a` <= 2) or isnull(`test`.`t7`.`c`)) and ((`test`.`t8`.`a` < 1) or isnull(`test`.`t8`.`c`)) and ((`test`.`t9`.`b` = `test`.`t8`.`b`) or isnull(`test`.`t8`.`c`)))
1069SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,1069SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1070t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b1070t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
1071FROM t0,t11071FROM t0,t1
@@ -1103,20 +1103,20 @@
1103a b a b a b a b a b a b a b a b a b a b1103a b a b a b a b a b a b a b a b a b a b
11041 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 111041 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 1
11051 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 111051 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 1
11061 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1
11071 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1
11061 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 111081 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 1
11071 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1
11081 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 111091 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 1
11091 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1
11101 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 111101 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 1
11111 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 211111 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 2
11121 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 211121 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 2
11131 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 2
11141 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 2
11131 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 1 211151 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 1 2
11161 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 1 2
11171 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 1 2
11141 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 211181 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 2
11151 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 2
11161 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 1 2
11171 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 211191 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 2
11181 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 2
11191 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 1 2
11201 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 211201 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 2
1121SELECT t2.a,t2.b1121SELECT t2.a,t2.b
1122FROM t2;1122FROM t2;
@@ -1203,7 +1203,7 @@
1203id select_type table type possible_keys key key_len ref rows Extra1203id select_type table type possible_keys key key_len ref rows Extra
12041 SIMPLE t1 index NULL a 5 NULL 21 Using index12041 SIMPLE t1 index NULL a 5 NULL 21 Using index
12051 SIMPLE t3 index c c 5 NULL 6 Using index12051 SIMPLE t3 index c c 5 NULL 6 Using index
12061 SIMPLE t2 ref b b 5 test.t3.c 2 Using index12061 SIMPLE t2 ref b b 5 test.t3.c 1 Using index
1207EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;1207EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
1208id select_type table type possible_keys key key_len ref rows Extra1208id select_type table type possible_keys key key_len ref rows Extra
12091 SIMPLE t1 index NULL a 5 NULL # Using index12091 SIMPLE t1 index NULL a 5 NULL # Using index
@@ -1484,8 +1484,8 @@
1484on (t1.a = t2.a);1484on (t1.a = t2.a);
1485id select_type table type possible_keys key key_len ref rows Extra1485id select_type table type possible_keys key key_len ref rows Extra
14861 SIMPLE t1 ALL NULL NULL NULL NULL 10 14861 SIMPLE t1 ALL NULL NULL NULL NULL 10
14871 SIMPLE t2 ref a a 5 test.t1.a 11 14871 SIMPLE t2 ref a a 5 test.t1.a 1
14881 SIMPLE t3 ref a a 5 test.t2.a 11 14881 SIMPLE t3 ref a a 5 test.t2.a 1
1489drop table t1, t2, t3;1489drop table t1, t2, t3;
1490CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10));1490CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10));
1491CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10));1491CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10));
14921492
=== modified file 'test/mysql-test/r/key.result'
--- test/mysql-test/r/key.result 2008-03-11 16:31:13 +0000
+++ test/mysql-test/r/key.result 2009-04-03 19:39:12 +0000
@@ -153,7 +153,7 @@
153t1 0 a 1 a A 0 NULL NULL BTREE 153t1 0 a 1 a A 0 NULL NULL BTREE
154t1 0 e 1 e A 0 NULL NULL BTREE 154t1 0 e 1 e A 0 NULL NULL BTREE
155t1 0 b 1 b A 0 NULL NULL YES BTREE 155t1 0 b 1 b A 0 NULL NULL YES BTREE
156t1 1 c 1 c A NULL NULL NULL YES BTREE 156t1 1 c 1 c A 0 NULL NULL YES BTREE
157drop table t1;157drop table t1;
158CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,158CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
159UNIQUE (c,i));159UNIQUE (c,i));
160160
=== modified file 'test/mysql-test/r/key_cache.result'
--- test/mysql-test/r/key_cache.result 2008-11-14 12:08:22 +0000
+++ test/mysql-test/r/key_cache.result 2009-04-03 19:39:12 +0000
@@ -122,7 +122,7 @@
122explain select count(*) from t1, t2 where t1.p = t2.i;122explain select count(*) from t1, t2 where t1.p = t2.i;
123id select_type table type possible_keys key key_len ref rows Extra123id select_type table type possible_keys key key_len ref rows Extra
1241 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index1241 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index
1251 SIMPLE t2 ref k1 k1 5 test.t1.p 2 Using where; Using index1251 SIMPLE t2 ref k1 k1 5 test.t1.p 1 Using where; Using index
126select count(*) from t1, t2 where t1.p = t2.i;126select count(*) from t1, t2 where t1.p = t2.i;
127count(*)127count(*)
12831283
129129
=== modified file 'test/mysql-test/r/key_diff.result'
--- test/mysql-test/r/key_diff.result 2008-03-10 11:36:34 +0000
+++ test/mysql-test/r/key_diff.result 2009-04-03 19:39:12 +0000
@@ -36,7 +36,7 @@
36explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;36explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
37id select_type table type possible_keys key key_len ref rows Extra37id select_type table type possible_keys key key_len ref rows Extra
381 SIMPLE t1 ALL a NULL NULL NULL 5 381 SIMPLE t1 ALL a NULL NULL NULL 5
391 SIMPLE t2 ALL b NULL NULL NULL 5 Using where; Using join buffer391 SIMPLE t2 ref b b 4 test.t1.a 1 Using where
40select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;40select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
41a b a b41a b a b
42A B a a42A B a a
4343
=== modified file 'test/mysql-test/r/myisam.result'
--- test/mysql-test/r/myisam.result 2009-03-27 20:05:34 +0000
+++ test/mysql-test/r/myisam.result 2009-04-03 19:39:12 +0000
@@ -42,16 +42,16 @@
42test.t1 optimize status OK42test.t1 optimize status OK
43show index from t1;43show index from t1;
44Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment44Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
45t1 0 PRIMARY 1 a NULL 5 NULL NULL BTREE 45t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
46t1 1 b 1 b NULL NULL NULL NULL BTREE 46t1 1 b 1 b A 5 NULL NULL BTREE
47optimize table t1;47optimize table t1;
48Table Op Msg_type Msg_text48Table Op Msg_type Msg_text
49test.t1 optimize note Table does not support optimize, doing recreate + analyze instead49test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
50test.t1 optimize status OK50test.t1 optimize status OK
51show index from t1;51show index from t1;
52Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment52Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
53t1 0 PRIMARY 1 a NULL 5 NULL NULL BTREE 53t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
54t1 1 b 1 b NULL NULL NULL NULL BTREE 54t1 1 b 1 b A 5 NULL NULL BTREE
55drop table t1;55drop table t1;
56create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=pbxt;56create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=pbxt;
57insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);57insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
@@ -344,12 +344,12 @@
344test.t1 optimize status OK344test.t1 optimize status OK
345show index from t1;345show index from t1;
346Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment346Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
347t1 1 b 1 b NULL NULL NULL NULL YES BTREE 347t1 1 b 1 b A 5 NULL NULL YES BTREE
348t1 1 c 1 c NULL NULL NULL NULL YES BTREE 348t1 1 c 1 c A 5 NULL NULL YES BTREE
349t1 1 a 1 a NULL NULL NULL NULL BTREE 349t1 1 a 1 a A 5 NULL NULL BTREE
350t1 1 a 2 b NULL NULL NULL NULL YES BTREE 350t1 1 a 2 b A 5 NULL NULL YES BTREE
351t1 1 c_2 1 c NULL NULL NULL NULL YES BTREE 351t1 1 c_2 1 c A 5 NULL NULL YES BTREE
352t1 1 c_2 2 a NULL NULL NULL NULL BTREE 352t1 1 c_2 2 a A 5 NULL NULL BTREE
353explain select * from t1,t2 where t1.a=t2.a;353explain select * from t1,t2 where t1.a=t2.a;
354id select_type table type possible_keys key key_len ref rows Extra354id select_type table type possible_keys key key_len ref rows Extra
3551 SIMPLE t2 ALL a NULL NULL NULL 2 3551 SIMPLE t2 ALL a NULL NULL NULL 2
@@ -365,7 +365,7 @@
365explain select * from t1,t2 where t1.b=t2.b;365explain select * from t1,t2 where t1.b=t2.b;
366id select_type table type possible_keys key key_len ref rows Extra366id select_type table type possible_keys key key_len ref rows Extra
3671 SIMPLE t2 ALL b NULL NULL NULL 2 3671 SIMPLE t2 ALL b NULL NULL NULL 2
3681 SIMPLE t1 ALL b NULL NULL NULL 5 Using where; Using join buffer3681 SIMPLE t1 ref b b 5 test.t2.b 1 Using where
369explain select * from t1,t2 force index(c) where t1.a=t2.a;369explain select * from t1,t2 force index(c) where t1.a=t2.a;
370id select_type table type possible_keys key key_len ref rows Extra370id select_type table type possible_keys key key_len ref rows Extra
3711 SIMPLE t2 ALL NULL NULL NULL NULL 2 3711 SIMPLE t2 ALL NULL NULL NULL NULL 2
@@ -584,25 +584,25 @@
584create table t1 (a int, key (a));584create table t1 (a int, key (a));
585show keys from t1;585show keys from t1;
586Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment586Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
587t1 1 a 1 a A NULL NULL NULL YES BTREE 587t1 1 a 1 a A 0 NULL NULL YES BTREE
588alter table t1 disable keys;588alter table t1 disable keys;
589Warnings:589Warnings:
590Note 1031 Table storage engine for 't1' doesn't have this option590Note 1031 Table storage engine for 't1' doesn't have this option
591show keys from t1;591show keys from t1;
592Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment592Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
593t1 1 a 1 a NULL NULL NULL NULL YES BTREE 593t1 1 a 1 a A 0 NULL NULL YES BTREE
594create table t2 (a int);594create table t2 (a int);
595set @@rand_seed1=31415926,@@rand_seed2=2718281828;595set @@rand_seed1=31415926,@@rand_seed2=2718281828;
596insert t1 select * from t2;596insert t1 select * from t2;
597show keys from t1;597show keys from t1;
598Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment598Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
599t1 1 a 1 a NULL NULL NULL NULL YES BTREE 599t1 1 a 1 a A 1000 NULL NULL YES BTREE
600alter table t1 enable keys;600alter table t1 enable keys;
601Warnings:601Warnings:
602Note 1031 Table storage engine for 't1' doesn't have this option602Note 1031 Table storage engine for 't1' doesn't have this option
603show keys from t1;603show keys from t1;
604Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment604Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
605t1 1 a 1 a NULL NULL NULL NULL YES BTREE 605t1 1 a 1 a A 1000 NULL NULL YES BTREE
606alter table t1 engine=heap;606alter table t1 engine=heap;
607alter table t1 disable keys;607alter table t1 disable keys;
608Warnings:608Warnings:
@@ -670,7 +670,7 @@
670test.t1 analyze status OK670test.t1 analyze status OK
671show index from t1;671show index from t1;
672Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment672Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
673t1 1 a 1 a A NULL NULL NULL YES BTREE 673t1 1 a 1 a A 10 NULL NULL YES BTREE
674insert into t1 values (11);674insert into t1 values (11);
675delete from t1 where a=11;675delete from t1 where a=11;
676check table t1;676check table t1;
@@ -678,7 +678,7 @@
678test.t1 check status OK678test.t1 check status OK
679show index from t1;679show index from t1;
680Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment680Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
681t1 1 a 1 a A NULL NULL NULL YES BTREE 681t1 1 a 1 a A 11 NULL NULL YES BTREE
682set myisam_stats_method=nulls_equal;682set myisam_stats_method=nulls_equal;
683show variables like 'myisam_stats_method';683show variables like 'myisam_stats_method';
684Variable_name Value684Variable_name Value
@@ -690,7 +690,7 @@
690test.t1 analyze status OK690test.t1 analyze status OK
691show index from t1;691show index from t1;
692Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment692Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
693t1 1 a 1 a A NULL NULL NULL YES BTREE 693t1 1 a 1 a A 10 NULL NULL YES BTREE
694insert into t1 values (11);694insert into t1 values (11);
695delete from t1 where a=11;695delete from t1 where a=11;
696check table t1;696check table t1;
@@ -698,7 +698,7 @@
698test.t1 check status OK698test.t1 check status OK
699show index from t1;699show index from t1;
700Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment700Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
701t1 1 a 1 a A NULL NULL NULL YES BTREE 701t1 1 a 1 a A 11 NULL NULL YES BTREE
702set myisam_stats_method=DEFAULT;702set myisam_stats_method=DEFAULT;
703show variables like 'myisam_stats_method';703show variables like 'myisam_stats_method';
704Variable_name Value704Variable_name Value
@@ -710,7 +710,7 @@
710test.t1 analyze status OK710test.t1 analyze status OK
711show index from t1;711show index from t1;
712Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment712Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
713t1 1 a 1 a A NULL NULL NULL YES BTREE 713t1 1 a 1 a A 10 NULL NULL YES BTREE
714insert into t1 values (11);714insert into t1 values (11);
715delete from t1 where a=11;715delete from t1 where a=11;
716check table t1;716check table t1;
@@ -718,7 +718,7 @@
718test.t1 check status OK718test.t1 check status OK
719show index from t1;719show index from t1;
720Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment720Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
721t1 1 a 1 a A NULL NULL NULL YES BTREE 721t1 1 a 1 a A 11 NULL NULL YES BTREE
722drop table t1;722drop table t1;
723set myisam_stats_method=nulls_ignored;723set myisam_stats_method=nulls_ignored;
724show variables like 'myisam_stats_method';724show variables like 'myisam_stats_method';
@@ -737,20 +737,20 @@
737test.t1 analyze status OK737test.t1 analyze status OK
738show index from t1;738show index from t1;
739Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment739Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
740t1 1 a 1 a A NULL NULL NULL YES BTREE 740t1 1 a 1 a A 4 NULL NULL YES BTREE
741t1 1 a 2 b A NULL NULL NULL YES BTREE 741t1 1 a 2 b A 4 NULL NULL YES BTREE
742t1 1 a 3 c A NULL NULL NULL YES BTREE 742t1 1 a 3 c A 4 NULL NULL YES BTREE
743t1 1 a 4 d A NULL NULL NULL YES BTREE 743t1 1 a 4 d A 4 NULL NULL YES BTREE
744delete from t1;744delete from t1;
745analyze table t1;745analyze table t1;
746Table Op Msg_type Msg_text746Table Op Msg_type Msg_text
747test.t1 analyze status OK747test.t1 analyze status OK
748show index from t1;748show index from t1;
749Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment749Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
750t1 1 a 1 a A NULL NULL NULL YES BTREE 750t1 1 a 1 a A 0 NULL NULL YES BTREE
751t1 1 a 2 b A NULL NULL NULL YES BTREE 751t1 1 a 2 b A 0 NULL NULL YES BTREE
752t1 1 a 3 c A NULL NULL NULL YES BTREE 752t1 1 a 3 c A 0 NULL NULL YES BTREE
753t1 1 a 4 d A NULL NULL NULL YES BTREE 753t1 1 a 4 d A 0 NULL NULL YES BTREE
754set myisam_stats_method=DEFAULT;754set myisam_stats_method=DEFAULT;
755drop table t1;755drop table t1;
756create table t1(756create table t1(
@@ -1788,7 +1788,7 @@
1788test.t1 analyze status OK1788test.t1 analyze status OK
1789show keys from t1;1789show keys from t1;
1790Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment1790Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1791t1 1 a 1 a A NULL NULL NULL YES BTREE 1791t1 1 a 1 a A 8 NULL NULL YES BTREE
1792alter table t1 disable keys;1792alter table t1 disable keys;
1793Warnings:1793Warnings:
1794Note 1031 Table storage engine for 't1' doesn't have this option1794Note 1031 Table storage engine for 't1' doesn't have this option
@@ -1797,7 +1797,7 @@
1797Note 1031 Table storage engine for 't1' doesn't have this option1797Note 1031 Table storage engine for 't1' doesn't have this option
1798show keys from t1;1798show keys from t1;
1799Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment1799Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1800t1 1 a 1 a NULL NULL NULL NULL YES BTREE 1800t1 1 a 1 a A 8 NULL NULL YES BTREE
1801drop table t1;1801drop table t1;
1802create table t1 (c1 int) engine=myisam pack_keys=0;1802create table t1 (c1 int) engine=myisam pack_keys=0;
1803create table t2 (c1 int) engine=myisam pack_keys=1;1803create table t2 (c1 int) engine=myisam pack_keys=1;
18041804
=== modified file 'test/mysql-test/r/mysqldump.result'
--- test/mysql-test/r/mysqldump.result 2008-12-04 13:27:22 +0000
+++ test/mysql-test/r/mysqldump.result 2009-04-03 19:39:12 +0000
@@ -10,7 +10,7 @@
10<database name="test">10<database name="test">
11 <table_structure name="t1">11 <table_structure name="t1">
12 <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" />12 <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" />
13 <key Table="t1" Non_unique="1" Key_name="a" Seq_in_index="1" Column_name="a" Collation="A" Null="YES" Index_type="BTREE" Comment="" />13 <key Table="t1" Non_unique="1" Key_name="a" Seq_in_index="1" Column_name="a" Collation="A" Cardinality="2" Null="YES" Index_type="BTREE" Comment="" />
14 </table_structure>14 </table_structure>
15 <table_data name="t1">15 <table_data name="t1">
16 <row>16 <row>
1717
=== modified file 'test/mysql-test/r/ndb_alter_table3.result'
--- test/mysql-test/r/ndb_alter_table3.result 2008-05-21 12:07:14 +0000
+++ test/mysql-test/r/ndb_alter_table3.result 2009-04-03 19:39:12 +0000
@@ -5,8 +5,8 @@
5show indexes from t1;5show indexes from t1;
6Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment6Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
7t1 0 PRIMARY 1 a A 3 NULL NULL BTREE 7t1 0 PRIMARY 1 a A 3 NULL NULL BTREE
8t1 1 b 1 b A NULL NULL NULL YES BTREE 8t1 1 b 1 b A 3 NULL NULL YES BTREE
9t1 1 c 1 c A NULL NULL NULL YES BTREE 9t1 1 c 1 c A 3 NULL NULL YES BTREE
10select * from t1 where c = 'two';10select * from t1 where c = 'two';
11a b c11a b c
122 two two122 two two
@@ -14,7 +14,7 @@
14show indexes from t1;14show indexes from t1;
15Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment15Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
16t1 0 PRIMARY 1 a A 3 NULL NULL BTREE 16t1 0 PRIMARY 1 a A 3 NULL NULL BTREE
17t1 1 b 1 b A NULL NULL NULL YES BTREE 17t1 1 b 1 b A 3 NULL NULL YES BTREE
18select * from t1 where c = 'two';18select * from t1 where c = 'two';
19a b c19a b c
202 two two202 two two
2121
=== modified file 'test/mysql-test/r/ndb_basic.result'
--- test/mysql-test/r/ndb_basic.result 2008-12-11 01:07:22 +0000
+++ test/mysql-test/r/ndb_basic.result 2009-04-03 19:39:12 +0000
@@ -12,7 +12,7 @@
12INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');12INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
13SHOW INDEX FROM t1;13SHOW INDEX FROM t1;
14Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment14Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
15t1 0 PRIMARY 1 pk1 NULL 2 NULL NULL BTREE 15t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE
16SELECT pk1 FROM t1 ORDER BY pk1;16SELECT pk1 FROM t1 ORDER BY pk1;
17pk117pk1
189410189410
1919
=== modified file 'test/mysql-test/r/null_key.result'
--- test/mysql-test/r/null_key.result 2007-03-13 19:06:47 +0000
+++ test/mysql-test/r/null_key.result 2009-04-03 19:39:12 +0000
@@ -407,8 +407,8 @@
407LEFT JOIN t3 ON t2.b=t3.b;407LEFT JOIN t3 ON t2.b=t3.b;
408id select_type table type possible_keys key key_len ref rows Extra408id select_type table type possible_keys key key_len ref rows Extra
4091 SIMPLE t1 ALL NULL NULL NULL NULL 4 4091 SIMPLE t1 ALL NULL NULL NULL NULL 4
4101 SIMPLE t2 ref idx idx 5 test.t1.a 2 4101 SIMPLE t2 ref idx idx 5 test.t1.a 1
4111 SIMPLE t3 ref idx idx 5 test.t2.b 186 Using index4111 SIMPLE t3 ref idx idx 5 test.t2.b 1 Using index
412FLUSH STATUS ;412FLUSH STATUS ;
413SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a413SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
414LEFT JOIN t3 ON t2.b=t3.b;414LEFT JOIN t3 ON t2.b=t3.b;
415415
=== modified file 'test/mysql-test/r/partition_pruning.result'
--- test/mysql-test/r/partition_pruning.result 2009-03-27 20:05:34 +0000
+++ test/mysql-test/r/partition_pruning.result 2009-04-03 19:39:12 +0000
@@ -338,12 +338,12 @@
338where X.b = Y.b and (X.a=1 or X.a=2) and (Y.a=2 or Y.a=3);338where X.b = Y.b and (X.a=1 or X.a=2) and (Y.a=2 or Y.a=3);
339id select_type table partitions type possible_keys key key_len ref rows Extra339id select_type table partitions type possible_keys key key_len ref rows Extra
3401 SIMPLE X p1,p2 ALL a,b NULL NULL NULL 2 Using where3401 SIMPLE X p1,p2 ALL a,b NULL NULL NULL 2 Using where
3411 SIMPLE Y p2,p3 ref a,b b 4 test.X.b 2 Using where3411 SIMPLE Y p2,p3 ref a,b b 4 test.X.b 1 Using where
342explain partitions342explain partitions
343select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);343select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);
344id select_type table partitions type possible_keys key key_len ref rows Extra344id select_type table partitions type possible_keys key key_len ref rows Extra
3451 SIMPLE X p1,p2 ALL a NULL NULL NULL 4 Using where3451 SIMPLE X p1,p2 ALL a NULL NULL NULL 4 Using where
3461 SIMPLE Y p1,p2 ref a a 4 test.X.a 2 3461 SIMPLE Y p1,p2 ref a a 4 test.X.a 1
347drop table t1;347drop table t1;
348create table t1 (a int) partition by hash(a) partitions 20;348create table t1 (a int) partition by hash(a) partitions 20;
349insert into t1 values (1),(2),(3);349insert into t1 values (1),(2),(3);
350350
=== modified file 'test/mysql-test/r/ps_1general.result'
--- test/mysql-test/r/ps_1general.result 2008-09-17 07:41:28 +0000
+++ test/mysql-test/r/ps_1general.result 2009-04-03 19:39:12 +0000
@@ -288,7 +288,7 @@
288execute stmt4;288execute stmt4;
289Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment289Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
290t2 0 PRIMARY 1 a A 0 NULL NULL BTREE 290t2 0 PRIMARY 1 a A 0 NULL NULL BTREE
291t2 1 t2_idx 1 b A NULL NULL NULL YES BTREE 291t2 1 t2_idx 1 b A 0 NULL NULL YES BTREE
292prepare stmt4 from ' show table status from test like ''t2%'' ';292prepare stmt4 from ' show table status from test like ''t2%'' ';
293execute stmt4;293execute stmt4;
294Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment294Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
295295
=== modified file 'test/mysql-test/r/range.result'
--- test/mysql-test/r/range.result 2009-03-27 20:05:34 +0000
+++ test/mysql-test/r/range.result 2009-04-03 19:39:12 +0000
@@ -423,19 +423,19 @@
423explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;423explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
424id select_type table type possible_keys key key_len ref rows Extra424id select_type table type possible_keys key key_len ref rows Extra
4251 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where4251 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where
4261 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12 4261 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
427explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;427explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
428id select_type table type possible_keys key key_len ref rows Extra428id select_type table type possible_keys key key_len ref rows Extra
4291 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where4291 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where
4301 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12 4301 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
431explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;431explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
432id select_type table type possible_keys key key_len ref rows Extra432id select_type table type possible_keys key key_len ref rows Extra
4331 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where4331 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where
4341 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12 4341 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
435explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;435explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
436id select_type table type possible_keys key key_len ref rows Extra436id select_type table type possible_keys key key_len ref rows Extra
4371 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where4371 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where
4381 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12 4381 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
439select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;439select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
440id name uid id name uid440id name uid id name uid
4411001 A 1 1001 A 14411001 A 1 1001 A 1
442442
=== modified file 'test/mysql-test/r/repair.result'
--- test/mysql-test/r/repair.result 2008-11-20 09:17:23 +0000
+++ test/mysql-test/r/repair.result 2009-04-03 19:39:12 +0000
@@ -48,7 +48,7 @@
48test.t1 repair status OK48test.t1 repair status OK
49SHOW INDEX FROM t1;49SHOW INDEX FROM t1;
50Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment50Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
51t1 1 a 1 a NULL NULL NULL NULL YES BTREE 51t1 1 a 1 a A 5 NULL NULL YES BTREE
52SET myisam_repair_threads=@@global.myisam_repair_threads;52SET myisam_repair_threads=@@global.myisam_repair_threads;
53DROP TABLE t1;53DROP TABLE t1;
54CREATE TABLE t1(a INT) engine = myisam;54CREATE TABLE t1(a INT) engine = myisam;
5555
=== modified file 'test/mysql-test/r/select.result'
--- test/mysql-test/r/select.result 2009-03-27 20:05:34 +0000
+++ test/mysql-test/r/select.result 2009-04-03 19:39:12 +0000
@@ -604,15 +604,15 @@
604explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;604explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
605id select_type table type possible_keys key key_len ref rows Extra605id select_type table type possible_keys key key_len ref rows Extra
6061 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort6061 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
6071 SIMPLE t3 ref period period 4 test.t1.period 18 6071 SIMPLE t3 ref period period 4 test.t1.period 1
608explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;608explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
609id select_type table type possible_keys key key_len ref rows Extra609id select_type table type possible_keys key key_len ref rows Extra
6101 SIMPLE t3 index period period 4 NULL 1 6101 SIMPLE t3 index period period 4 NULL 10
6111 SIMPLE t1 ref period period 4 test.t3.period 18 6111 SIMPLE t1 ref period period 4 test.t3.period 1
612explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;612explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
613id select_type table type possible_keys key key_len ref rows Extra613id select_type table type possible_keys key key_len ref rows Extra
6141 SIMPLE t1 index period period 4 NULL 1 6141 SIMPLE t1 index period period 4 NULL 10
6151 SIMPLE t3 ref period period 4 test.t1.period 18 6151 SIMPLE t3 ref period period 4 test.t1.period 1
616select period from t1;616select period from t1;
617period617period
61894106189410
@@ -2095,7 +2095,7 @@
2095Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment2095Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
2096t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE 2096t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
2097t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE 2097t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
2098t2 1 fld3 1 fld3 A NULL NULL NULL BTREE 2098t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE
2099drop table t4, t3, t2, t1;2099drop table t4, t3, t2, t1;
2100DO 1;2100DO 1;
2101DO benchmark(100,1+1),1,1;2101DO benchmark(100,1+1),1,1;
@@ -2369,7 +2369,7 @@
2369explain select * from t1 left join t2 on a=c where d in (4);2369explain select * from t1 left join t2 on a=c where d in (4);
2370id select_type table type possible_keys key key_len ref rows Extra2370id select_type table type possible_keys key key_len ref rows Extra
23711 SIMPLE t2 ref c,d d 5 const 1 Using where23711 SIMPLE t2 ref c,d d 5 const 1 Using where
23721 SIMPLE t1 ref a a 5 test.t2.c 2 Using where23721 SIMPLE t1 ref a a 5 test.t2.c 1 Using where
2373select * from t1 left join t2 on a=c where d in (4);2373select * from t1 left join t2 on a=c where d in (4);
2374a b c d2374a b c d
23753 2 3 423753 2 3 4
@@ -2377,7 +2377,7 @@
2377explain select * from t1 left join t2 on a=c where d = 4;2377explain select * from t1 left join t2 on a=c where d = 4;
2378id select_type table type possible_keys key key_len ref rows Extra2378id select_type table type possible_keys key key_len ref rows Extra
23791 SIMPLE t2 ref c,d d 5 const 1 Using where23791 SIMPLE t2 ref c,d d 5 const 1 Using where
23801 SIMPLE t1 ref a a 5 test.t2.c 2 Using where23801 SIMPLE t1 ref a a 5 test.t2.c 1 Using where
2381select * from t1 left join t2 on a=c where d = 4;2381select * from t1 left join t2 on a=c where d = 4;
2382a b c d2382a b c d
23833 2 3 423833 2 3 4
@@ -2403,11 +2403,11 @@
2403EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;2403EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
2404id select_type table type possible_keys key key_len ref rows Extra2404id select_type table type possible_keys key key_len ref rows Extra
24051 SIMPLE t1 ALL NULL NULL NULL NULL 5 24051 SIMPLE t1 ALL NULL NULL NULL NULL 5
24061 SIMPLE t2 ref a a 23 test.t1.a 2 24061 SIMPLE t2 ref a a 23 test.t1.a 1
2407EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;2407EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
2408id select_type table type possible_keys key key_len ref rows Extra2408id select_type table type possible_keys key key_len ref rows Extra
24091 SIMPLE t1 ALL NULL NULL NULL NULL 5 24091 SIMPLE t1 ALL NULL NULL NULL NULL 5
24101 SIMPLE t2 ref a a 23 test.t1.a 2 24101 SIMPLE t2 ref a a 23 test.t1.a 1
2411DROP TABLE t1, t2;2411DROP TABLE t1, t2;
2412CREATE TABLE t1 ( city char(30) );2412CREATE TABLE t1 ( city char(30) );
2413INSERT INTO t1 VALUES ('London');2413INSERT INTO t1 VALUES ('London');
@@ -3454,7 +3454,7 @@
3454and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);3454and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
3455id select_type table type possible_keys key key_len ref rows Extra3455id select_type table type possible_keys key key_len ref rows Extra
34561 SIMPLE A range PRIMARY PRIMARY 12 NULL 1 Using where34561 SIMPLE A range PRIMARY PRIMARY 12 NULL 1 Using where
34571 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 11 34571 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 1
3458drop table t1, t2;3458drop table t1, t2;
3459CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));3459CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
3460INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),3460INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
@@ -3468,12 +3468,12 @@
3468SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;3468SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
3469id select_type table type possible_keys key key_len ref rows Extra3469id select_type table type possible_keys key key_len ref rows Extra
34701 SIMPLE t1 range PRIMARY,b b 5 NULL 1 Using where34701 SIMPLE t1 range PRIMARY,b b 5 NULL 1 Using where
34711 SIMPLE t2 ref c c 5 test.t1.a 2 Using where34711 SIMPLE t2 ref c c 5 test.t1.a 1 Using where
3472EXPLAIN3472EXPLAIN
3473SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;3473SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
3474id select_type table type possible_keys key key_len ref rows Extra3474id select_type table type possible_keys key key_len ref rows Extra
34751 SIMPLE t1 range PRIMARY,b PRIMARY 4 NULL 1 Using where34751 SIMPLE t1 range PRIMARY,b PRIMARY 4 NULL 1 Using where
34761 SIMPLE t2 ref c c 5 test.t1.a 2 Using where34761 SIMPLE t2 ref c c 5 test.t1.a 1 Using where
3477DROP TABLE t1, t2;3477DROP TABLE t1, t2;
3478create table t1 (3478create table t1 (
3479a int unsigned not null auto_increment primary key,3479a int unsigned not null auto_increment primary key,
34803480
=== modified file 'test/mysql-test/r/select_safe.result'
--- test/mysql-test/r/select_safe.result 2006-10-23 09:14:04 +0000
+++ test/mysql-test/r/select_safe.result 2009-04-03 19:39:12 +0000
@@ -70,12 +70,12 @@
70explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;70explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
71id select_type table type possible_keys key key_len ref rows Extra71id select_type table type possible_keys key key_len ref rows Extra
721 SIMPLE t1 ALL b NULL NULL NULL 21 721 SIMPLE t1 ALL b NULL NULL NULL 21
731 SIMPLE t2 ref b b 21 test.t1.b 2 Using where731 SIMPLE t2 ref b b 21 test.t1.b 1 Using where
74set MAX_SEEKS_FOR_KEY=1;74set MAX_SEEKS_FOR_KEY=1;
75explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;75explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
76id select_type table type possible_keys key key_len ref rows Extra76id select_type table type possible_keys key key_len ref rows Extra
771 SIMPLE t1 ALL b NULL NULL NULL 21 771 SIMPLE t1 ALL b NULL NULL NULL 21
781 SIMPLE t2 ref b b 21 test.t1.b 2 Using where781 SIMPLE t2 ref b b 21 test.t1.b 1 Using where
79SET MAX_SEEKS_FOR_KEY=DEFAULT;79SET MAX_SEEKS_FOR_KEY=DEFAULT;
80drop table t1;80drop table t1;
81create table t1 (a int);81create table t1 (a int);
8282
=== modified file 'test/mysql-test/r/subselect.result'
--- test/mysql-test/r/subselect.result 2008-12-11 01:07:22 +0000
+++ test/mysql-test/r/subselect.result 2009-04-03 19:39:12 +0000
@@ -1333,7 +1333,7 @@
1333explain extended select * from t2 where t2.a in (select a from t1);1333explain extended select * from t2 where t2.a in (select a from t1);
1334id select_type table type possible_keys key key_len ref rows filtered Extra1334id select_type table type possible_keys key key_len ref rows filtered Extra
13351 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index13351 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
13362 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where13362 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1 100.00 Using index; Using where
1337Warnings:1337Warnings:
1338Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))1338Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))
1339select * from t2 where t2.a in (select a from t1 where t1.b <> 30);1339select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
@@ -1343,7 +1343,7 @@
1343explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);1343explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
1344id select_type table type possible_keys key key_len ref rows filtered Extra1344id select_type table type possible_keys key key_len ref rows filtered Extra
13451 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index13451 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
13462 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where13462 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1 100.00 Using index; Using where
1347Warnings:1347Warnings:
1348Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))1348Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))
1349select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);1349select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
@@ -1353,8 +1353,8 @@
1353explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);1353explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
1354id select_type table type possible_keys key key_len ref rows filtered Extra1354id select_type table type possible_keys key key_len ref rows filtered Extra
13551 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index13551 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
13562 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index13562 DEPENDENT SUBQUERY t1 ref a a 5 func 1 100.00 Using where; Using index
13572 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 100.00 Using where; Using index; Using join buffer13572 DEPENDENT SUBQUERY t3 ref a a 5 test.t1.b 1 100.00 Using where; Using index
1358Warnings:1358Warnings:
1359Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))1359Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t3` where ((`test`.`t3`.`a` = `test`.`t1`.`b`) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`))))
1360insert into t1 values (3,31);1360insert into t1 values (3,31);
@@ -1370,7 +1370,7 @@
1370explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);1370explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
1371id select_type table type possible_keys key key_len ref rows filtered Extra1371id select_type table type possible_keys key key_len ref rows filtered Extra
13721 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index13721 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
13732 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where13732 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1 100.00 Using index; Using where
1374Warnings:1374Warnings:
1375Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))1375Note 1003 select `test`.`t2`.`a` AS `a` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a where ((`test`.`t1`.`b` <> 30) and (<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`)))))
1376drop table t1, t2, t3;1376drop table t1, t2, t3;
@@ -3546,7 +3546,7 @@
3546id select_type table type possible_keys key key_len ref rows Extra3546id select_type table type possible_keys key key_len ref rows Extra
35471 PRIMARY t2 ALL NULL NULL NULL NULL 1 35471 PRIMARY t2 ALL NULL NULL NULL NULL 1
35481 PRIMARY t1 index NULL PRIMARY 16 NULL 11 Using where; Using index; Using join buffer35481 PRIMARY t1 index NULL PRIMARY 16 NULL 11 Using where; Using index; Using join buffer
35492 DEPENDENT SUBQUERY t1 ref PRIMARY PRIMARY 8 test.t2.i1,const 2 Using where; Using index; Using filesort35492 DEPENDENT SUBQUERY t1 ref PRIMARY PRIMARY 8 test.t2.i1,const 1 Using where; Using index; Using filesort
3550SELECT * FROM t1,t23550SELECT * FROM t1,t2
3551WHERE t1.t = (SELECT t1.t FROM t1 3551WHERE t1.t = (SELECT t1.t FROM t1
3552WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i13552WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
@@ -4214,7 +4214,7 @@
4214EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);4214EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
4215id select_type table type possible_keys key key_len ref rows Extra4215id select_type table type possible_keys key key_len ref rows Extra
42161 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where42161 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
42172 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 2 Using index; Using where42172 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 1 Using index; Using where
4218SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);4218SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
4219a b4219a b
4220CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));4220CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
@@ -4224,14 +4224,14 @@
4224EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);4224EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
4225id select_type table type possible_keys key key_len ref rows Extra4225id select_type table type possible_keys key key_len ref rows Extra
42261 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where42261 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
42272 DEPENDENT SUBQUERY t2 index_subquery I1 I1 4 func 2 Using index; Using where42272 DEPENDENT SUBQUERY t2 index_subquery I1 I1 4 func 1 Using index; Using where
4228SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);4228SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
4229a b4229a b
4230EXPLAIN4230EXPLAIN
4231SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);4231SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
4232id select_type table type possible_keys key key_len ref rows Extra4232id select_type table type possible_keys key key_len ref rows Extra
42331 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where42331 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
42342 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 2 Using index; Using where42342 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 1 Using index; Using where
4235SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);4235SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
4236a b4236a b
4237DROP TABLE t1,t2;4237DROP TABLE t1,t2;
42384238
=== modified file 'test/mysql-test/r/type_ranges.result'
--- test/mysql-test/r/type_ranges.result 2008-03-11 16:31:13 +0000
+++ test/mysql-test/r/type_ranges.result 2009-04-03 19:39:12 +0000
@@ -70,19 +70,19 @@
70show keys from t1;70show keys from t1;
71Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment71Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
72t1 0 PRIMARY 1 auto A 0 NULL NULL BTREE 72t1 0 PRIMARY 1 auto A 0 NULL NULL BTREE
73t1 1 utiny 1 utiny A NULL NULL NULL BTREE 73t1 1 utiny 1 utiny A 0 NULL NULL BTREE
74t1 1 tiny 1 tiny A NULL NULL NULL BTREE 74t1 1 tiny 1 tiny A 0 NULL NULL BTREE
75t1 1 short 1 short A NULL NULL NULL BTREE 75t1 1 short 1 short A 0 NULL NULL BTREE
76t1 1 any_name 1 medium A NULL NULL NULL BTREE 76t1 1 any_name 1 medium A 0 NULL NULL BTREE
77t1 1 longlong 1 longlong A NULL NULL NULL BTREE 77t1 1 longlong 1 longlong A 0 NULL NULL BTREE
78t1 1 real_float 1 real_float A NULL NULL NULL BTREE 78t1 1 real_float 1 real_float A 0 NULL NULL BTREE
79t1 1 ushort 1 ushort A NULL NULL NULL BTREE 79t1 1 ushort 1 ushort A 0 NULL NULL BTREE
80t1 1 umedium 1 umedium A NULL NULL NULL BTREE 80t1 1 umedium 1 umedium A 0 NULL NULL BTREE
81t1 1 ulong 1 ulong A NULL NULL NULL BTREE 81t1 1 ulong 1 ulong A 0 NULL NULL BTREE
82t1 1 ulonglong 1 ulonglong A NULL NULL NULL BTREE 82t1 1 ulonglong 1 ulonglong A 0 NULL NULL BTREE
83t1 1 ulonglong 2 ulong A NULL NULL NULL BTREE 83t1 1 ulonglong 2 ulong A 0 NULL NULL BTREE
84t1 1 options 1 options A NULL NULL NULL BTREE 84t1 1 options 1 options A 0 NULL NULL BTREE
85t1 1 options 2 flags A NULL NULL NULL BTREE 85t1 1 options 2 flags A 0 NULL NULL BTREE
86CREATE UNIQUE INDEX test on t1 ( auto ) ;86CREATE UNIQUE INDEX test on t1 ( auto ) ;
87CREATE INDEX test2 on t1 ( ulonglong,ulong) ;87CREATE INDEX test2 on t1 ( ulonglong,ulong) ;
88CREATE INDEX test3 on t1 ( medium ) ;88CREATE INDEX test3 on t1 ( medium ) ;
8989
=== modified file 'test/mysql-test/t/query_cache.test'
--- test/mysql-test/t/query_cache.test 2008-11-14 12:08:22 +0000
+++ test/mysql-test/t/query_cache.test 2009-04-03 19:39:12 +0000
@@ -1240,6 +1240,7 @@
1240--disable_result_log1240--disable_result_log
1241--reap1241--reap
1242--enable_result_log1242--enable_result_log
1243--sleep 2
1243--echo Next select should contain 4 rows, as the insert is long finished.1244--echo Next select should contain 4 rows, as the insert is long finished.
1244select *, (select count(*) from t2) from t1;1245select *, (select count(*) from t2) from t1;
1245reset query cache;1246reset query cache;

Subscribers

People subscribed via source and target branches