Merge lp:~vkolesnikov/pbxt/pbxt-drizzle-merge into lp:pbxt

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

Merged RN234: Drizzle integration

611. By Paul McCullagh

Merged RN235

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ha_pbxt.cc'
2--- src/ha_pbxt.cc 2009-04-03 10:08:43 +0000
3+++ src/ha_pbxt.cc 2009-04-03 19:39:12 +0000
4@@ -91,16 +91,16 @@
5 //#define PRINT_STATEMENTS
6 #endif
7
8+#ifndef DRIZZLED
9 static handler *pbxt_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root);
10 static int pbxt_init(void *p);
11 static int pbxt_end(void *p);
12-#ifndef DRIZZLED
13 static int pbxt_panic(handlerton *hton, enum ha_panic_function flag);
14-#endif
15 static void pbxt_drop_database(handlerton *hton, char *path);
16 static int pbxt_close_connection(handlerton *hton, THD* thd);
17 static int pbxt_commit(handlerton *hton, THD *thd, bool all);
18 static int pbxt_rollback(handlerton *hton, THD *thd, bool all);
19+#endif
20 static void ha_aquire_exclusive_use(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);
21 static void ha_release_exclusive_use(XTThreadPtr self, XTSharePtr share);
22 static void ha_close_open_tables(XTThreadPtr self, XTSharePtr share, ha_pbxt *mine);
23@@ -979,9 +979,13 @@
24 /*
25 * Outout the PBXT status. Return FALSE on error.
26 */
27+#ifdef DRIZZLED
28+bool PBXTStorageEngine::show_status(Session *thd, stat_print_fn *stat_print, enum ha_stat_type)
29+#else
30 static bool pbxt_show_status(handlerton *hton __attribute__((unused)), THD* thd,
31 stat_print_fn* stat_print,
32 enum ha_stat_type stat_type __attribute__((unused)))
33+#endif
34 {
35 XTThreadPtr self;
36 int err = 0;
37@@ -1045,22 +1049,23 @@
38
39 xt_p_mutex_init_with_autoname(&pbxt_database_mutex, NULL);
40
41+#ifdef DRIZZLED
42+ StorageEngine **engine= static_cast<StorageEngine **>(p);
43+ pbxt_hton= new PBXTStorageEngine(std::string("PBXT"));
44+ *engine = pbxt_hton;
45+#else
46 pbxt_hton = (handlerton *) p;
47 pbxt_hton->state = SHOW_OPTION_YES;
48-#ifndef DRIZZLED
49 pbxt_hton->db_type = DB_TYPE_PBXT; // Wow! I have my own!
50-#endif
51 pbxt_hton->close_connection = pbxt_close_connection; /* close_connection, cleanup thread related data. */
52 pbxt_hton->commit = pbxt_commit; /* commit */
53 pbxt_hton->rollback = pbxt_rollback; /* rollback */
54 pbxt_hton->create = pbxt_create_handler; /* Create a new handler */
55 pbxt_hton->drop_database = pbxt_drop_database; /* Drop a database */
56-#ifndef DRIZZLED
57 pbxt_hton->panic = pbxt_panic; /* Panic call */
58-#endif
59 pbxt_hton->show_status = pbxt_show_status;
60 pbxt_hton->flags = HTON_NO_FLAGS; /* HTON_CAN_RECREATE - Without this flags TRUNCATE uses delete_all_rows() */
61-
62+#endif
63 if (!xt_init_logging()) /* Initialize logging */
64 goto error_1;
65
66@@ -1262,8 +1267,14 @@
67 /*
68 * Kill the PBXT thread associated with the MySQL thread.
69 */
70+#ifdef DRIZZLED
71+int PBXTStorageEngine::close_connection(Session *thd)
72+{
73+ PBXTStorageEngine * const hton = this;
74+#else
75 static int pbxt_close_connection(handlerton *hton, THD* thd)
76 {
77+#endif
78 XTThreadPtr self;
79 #ifdef XT_STREAMING
80 XTExceptionRec e;
81@@ -1290,7 +1301,11 @@
82 * when the last PBXT table was removed from the
83 * database.
84 */
85+#ifdef DRIZZLED
86+void PBXTStorageEngine::drop_database(char *)
87+#else
88 static void pbxt_drop_database(handlerton *hton __attribute__((unused)), char *path __attribute__((unused)))
89+#endif
90 {
91 XT_TRACE_CALL();
92 }
93@@ -1317,8 +1332,14 @@
94 * pbxt_thr is a pointer the the PBXT thread structure.
95 *
96 */
97+#ifdef DRIZZLED
98+int PBXTStorageEngine::commit(Session *thd, bool all)
99+{
100+ PBXTStorageEngine * const hton = this;
101+#else
102 static int pbxt_commit(handlerton *hton, THD *thd, bool all)
103 {
104+#endif
105 int err = 0;
106 XTThreadPtr self;
107
108@@ -1343,8 +1364,14 @@
109 return err;
110 }
111
112+#ifdef DRIZZLED
113+int PBXTStorageEngine::rollback(Session *thd, bool all)
114+{
115+ PBXTStorageEngine * const hton = this;
116+#else
117 static int pbxt_rollback(handlerton *hton, THD *thd, bool all)
118 {
119+#endif
120 int err = 0;
121 XTThreadPtr self;
122
123@@ -1377,8 +1404,14 @@
124 return 0;
125 }
126
127+#ifdef DRIZZLED
128+handler *PBXTStorageEngine::create(TABLE_SHARE *table, MEM_ROOT *mem_root)
129+{
130+ PBXTStorageEngine * const hton = this;
131+#else
132 static handler *pbxt_create_handler(handlerton *hton, TABLE_SHARE *table, MEM_ROOT *mem_root)
133 {
134+#endif
135 if (table && XTSystemTableShare::isSystemTable(table->path.str))
136 return new (mem_root) ha_xtsys(hton, table);
137 else
138@@ -1631,7 +1664,12 @@
139
140 int pbxt_init_statitics(void *p)
141 {
142+#ifdef DRIZZLED
143+ ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *)xt_calloc_ns(sizeof(ST_SCHEMA_TABLE));
144+ *(ST_SCHEMA_TABLE **)p = schema;
145+#else
146 ST_SCHEMA_TABLE *schema = (ST_SCHEMA_TABLE *) p;
147+#endif
148 schema->fields_info = pbxt_statistics_fields_info;
149 schema->fill_table = pbxt_statistics_fill_table;
150
151@@ -1647,6 +1685,9 @@
152
153 int pbxt_exit_statitics(void *p __attribute__((unused)))
154 {
155+#ifdef DRIZZLED
156+ xt_free_ns(p);
157+#endif
158 return(0);
159 }
160
161@@ -2887,9 +2928,12 @@
162 xt_idx_prep_key(ind, &search_key, ((find_flag == HA_READ_AFTER_KEY) ? XT_SEARCH_AFTER_KEY : 0) | prefix, (xtWord1 *) key, key_len);
163 if (!xt_idx_search(pb_open_tab, ind, &search_key))
164 err = ha_log_pbxt_thread_error_for_mysql(pb_ignore_dup_key);
165- else
166+ else {
167 err = xt_index_next_read(pb_open_tab, ind, pb_key_read,
168 (find_flag == HA_READ_KEY_EXACT || find_flag == HA_READ_PREFIX) ? &search_key : NULL, buf);
169+ if (err == HA_ERR_END_OF_FILE && find_flag == HA_READ_AFTER_KEY)
170+ err = HA_ERR_KEY_NOT_FOUND;
171+ }
172 break;
173 }
174
175@@ -3445,7 +3489,7 @@
176 if (ind->mi_seg_count == 1 && (ind->mi_flags & HA_NOSAME))
177 rec_per_key = 1;
178 else {
179-
180+ rec_per_key = 1;
181 }
182 for (u_int j = 0; j < table->key_info[i].key_parts; j++)
183 table->key_info[i].rec_per_key[j] = (ulong) rec_per_key;
184@@ -3570,6 +3614,8 @@
185 if (pb_open_tab)
186 pb_open_tab->ot_table->tab_locks.xt_make_lock_permanent(pb_open_tab, &self->st_lock_list);
187 }
188+ if (pb_open_tab)
189+ pb_open_tab->ot_for_update = 0;
190 break;
191 case HA_EXTRA_KEYREAD:
192 /* This means we so not need to read the entire record. */
193@@ -3993,8 +4039,10 @@
194 * (or update statement) just saw.
195 */
196 if (pb_open_tab) {
197- if (pb_open_tab->ot_for_update)
198+ if (pb_open_tab->ot_for_update) {
199 self->st_visible_time = self->st_database->db_xn_end_time;
200+ pb_open_tab->ot_for_update = 0;
201+ }
202
203 if (pb_share->sh_recalc_selectivity) {
204 if ((pb_share->sh_table->tab_row_eof_id - 1 - pb_share->sh_table->tab_row_fnum) >= 200) {
205@@ -4592,10 +4640,17 @@
206 freer_(); // ha_unget_share(share)
207 }
208 catch_(b) {
209- /* If the table does not exist, just log the error and continue... */
210+ /* In MySQL if the table does not exist, just log the error and continue. This is
211+ * needed to delete table in the case when CREATE TABLE fails and no PBXT disk
212+ * structures were created.
213+ * Drizzle unlike MySQL iterates over all handlers and tries to delete table. It
214+ * stops after when a handler returns TRUE, so in Drizzle we need to report error.
215+ */
216+#ifndef DRIZZLED
217 if (self->t_exception.e_xt_err == XT_ERR_TABLE_NOT_FOUND)
218 xt_log_and_clear_exception(self);
219 else
220+#endif
221 throw_();
222 }
223 cont_(b);
224@@ -4619,6 +4674,10 @@
225 }
226 catch_(a) {
227 err = xt_ha_pbxt_thread_error_for_mysql(thd, self, pb_ignore_dup_key);
228+#ifdef DRIZZLED
229+ if (err == HA_ERR_NO_SUCH_TABLE)
230+ err = ENOENT;
231+#endif
232 }
233 cont_(a);
234
235
236=== modified file 'src/ha_pbxt.h'
237--- src/ha_pbxt.h 2009-03-25 01:43:40 +0000
238+++ src/ha_pbxt.h 2009-04-03 19:39:12 +0000
239@@ -28,7 +28,7 @@
240 #ifdef DRIZZLED
241 #include <drizzled/common.h>
242 #include <drizzled/handler.h>
243-#include <drizzled/handlerton.h>
244+#include <drizzled/plugin/storage_engine.h>
245 #include <mysys/thr_lock.h>
246 #else
247 #include "mysql_priv.h"
248@@ -51,6 +51,25 @@
249
250 class ha_pbxt;
251
252+#ifdef DRIZZLED
253+
254+class PBXTStorageEngine : public StorageEngine {
255+public:
256+ PBXTStorageEngine(std::string name_arg)
257+ : StorageEngine(name_arg, HTON_NO_FLAGS) {}
258+
259+ /* override */ int close_connection(Session *);
260+ /* override */ int commit(Session *, bool);
261+ /* override */ int rollback(Session *, bool);
262+ /* override */ handler *create(TABLE_SHARE *, MEM_ROOT *);
263+ /* override */ void drop_database(char *);
264+ /* override */ bool show_status(Session *, stat_print_fn *, enum ha_stat_type);
265+};
266+
267+typedef PBXTStorageEngine handlerton;
268+
269+#endif
270+
271 extern handlerton *pbxt_hton;
272
273 /*
274
275=== modified file 'src/myxt_xt.cc'
276--- src/myxt_xt.cc 2009-03-31 12:33:50 +0000
277+++ src/myxt_xt.cc 2009-04-03 19:39:12 +0000
278@@ -1989,7 +1989,9 @@
279 * plugin_shutdown() and reap_plugins() in sql_plugin.cc
280 * from doing their job on shutdown!
281 */
282+#ifndef DRIZZLED
283 plugin_unlock(NULL, table->s->db_plugin);
284+#endif
285 table->s->db_plugin = NULL;
286 return table;
287 }
288
289=== modified file 'src/table_xt.cc'
290--- src/table_xt.cc 2009-04-02 20:27:49 +0000
291+++ src/table_xt.cc 2009-04-03 19:39:12 +0000
292@@ -35,7 +35,7 @@
293 #include <drizzled/common.h>
294 #include <mysys/thr_lock.h>
295 #include <drizzled/dtcollation.h>
296-#include <drizzled/handlerton.h>
297+#include <drizzled/plugin/storage_engine.h>
298 #else
299 #include "mysql_priv.h"
300 #endif
301@@ -1598,6 +1598,14 @@
302 if (!self->st_ignore_fkeys)
303 can_drop = tab->tab_dic.dic_table->checkCanDrop();
304 }
305+#ifdef DRIZZLED
306+ /* See the comment in ha_pbxt::delete_table regarding different implmentation of DROP TABLE
307+ * in MySQL and Drizzle
308+ */
309+ else {
310+ xt_throw_xterr(XT_CONTEXT, XT_ERR_TABLE_NOT_FOUND);
311+ }
312+#endif
313
314 if (can_drop) {
315 if (tab_id) {
316
317=== modified file 'src/xt_defs.h'
318--- src/xt_defs.h 2009-03-25 01:43:40 +0000
319+++ src/xt_defs.h 2009-04-03 19:39:12 +0000
320@@ -750,6 +750,9 @@
321 (((uint32_t) (((const unsigned char*) (A))[1])) << 16) +\
322 (((uint32_t) (((const unsigned char*) (A))[0])) << 24)))
323
324+class PBXTStorageEngine;
325+typedef PBXTStorageEngine handlerton;
326+
327 #else // DRIZZLED
328 /* The MySQL case: */
329 #if MYSQL_VERSION_ID >= 60008
330
331=== modified file 'test/mysql-test/r/alter_table.result'
332--- test/mysql-test/r/alter_table.result 2008-11-01 09:01:35 +0000
333+++ test/mysql-test/r/alter_table.result 2009-04-03 19:39:12 +0000
334@@ -126,23 +126,23 @@
335 alter table t1 disable keys;
336 show keys from t1;
337 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
338-t1 0 n1 1 n1 NULL 0 NULL NULL BTREE
339-t1 1 n1_2 1 n1 NULL NULL NULL NULL BTREE
340-t1 1 n1_2 2 n2 NULL NULL NULL NULL YES BTREE
341-t1 1 n1_2 3 n3 NULL NULL NULL NULL YES BTREE
342-t1 1 n1_2 4 n4 NULL NULL NULL NULL YES BTREE
343-t1 1 n2 1 n2 NULL NULL NULL NULL YES BTREE
344-t1 1 n2 2 n3 NULL NULL NULL NULL YES BTREE
345-t1 1 n2 3 n4 NULL NULL NULL NULL YES BTREE
346-t1 1 n2 4 n1 NULL NULL NULL NULL BTREE
347-t1 1 n3 1 n3 NULL NULL NULL NULL YES BTREE
348-t1 1 n3 2 n4 NULL NULL NULL NULL YES BTREE
349-t1 1 n3 3 n1 NULL NULL NULL NULL BTREE
350-t1 1 n3 4 n2 NULL NULL NULL NULL YES BTREE
351-t1 1 n4 1 n4 NULL NULL NULL NULL YES BTREE
352-t1 1 n4 2 n1 NULL NULL NULL NULL BTREE
353-t1 1 n4 3 n2 NULL NULL NULL NULL YES BTREE
354-t1 1 n4 4 n3 NULL NULL NULL NULL YES BTREE
355+t1 0 n1 1 n1 A 0 NULL NULL BTREE
356+t1 1 n1_2 1 n1 A 0 NULL NULL BTREE
357+t1 1 n1_2 2 n2 A 0 NULL NULL YES BTREE
358+t1 1 n1_2 3 n3 A 0 NULL NULL YES BTREE
359+t1 1 n1_2 4 n4 A 0 NULL NULL YES BTREE
360+t1 1 n2 1 n2 A 0 NULL NULL YES BTREE
361+t1 1 n2 2 n3 A 0 NULL NULL YES BTREE
362+t1 1 n2 3 n4 A 0 NULL NULL YES BTREE
363+t1 1 n2 4 n1 A 0 NULL NULL BTREE
364+t1 1 n3 1 n3 A 0 NULL NULL YES BTREE
365+t1 1 n3 2 n4 A 0 NULL NULL YES BTREE
366+t1 1 n3 3 n1 A 0 NULL NULL BTREE
367+t1 1 n3 4 n2 A 0 NULL NULL YES BTREE
368+t1 1 n4 1 n4 A 0 NULL NULL YES BTREE
369+t1 1 n4 2 n1 A 0 NULL NULL BTREE
370+t1 1 n4 3 n2 A 0 NULL NULL YES BTREE
371+t1 1 n4 4 n3 A 0 NULL NULL YES BTREE
372 insert into t1 values(10,RAND()*1000,RAND()*1000,RAND());
373 insert into t1 values(9,RAND()*1000,RAND()*1000,RAND());
374 insert into t1 values(8,RAND()*1000,RAND()*1000,RAND());
375@@ -156,23 +156,23 @@
376 alter table t1 enable keys;
377 show keys from t1;
378 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
379-t1 0 n1 1 n1 NULL 10 NULL NULL BTREE
380-t1 1 n1_2 1 n1 NULL NULL NULL NULL BTREE
381-t1 1 n1_2 2 n2 NULL NULL NULL NULL YES BTREE
382-t1 1 n1_2 3 n3 NULL NULL NULL NULL YES BTREE
383-t1 1 n1_2 4 n4 NULL NULL NULL NULL YES BTREE
384-t1 1 n2 1 n2 NULL NULL NULL NULL YES BTREE
385-t1 1 n2 2 n3 NULL NULL NULL NULL YES BTREE
386-t1 1 n2 3 n4 NULL NULL NULL NULL YES BTREE
387-t1 1 n2 4 n1 NULL NULL NULL NULL BTREE
388-t1 1 n3 1 n3 NULL NULL NULL NULL YES BTREE
389-t1 1 n3 2 n4 NULL NULL NULL NULL YES BTREE
390-t1 1 n3 3 n1 NULL NULL NULL NULL BTREE
391-t1 1 n3 4 n2 NULL NULL NULL NULL YES BTREE
392-t1 1 n4 1 n4 NULL NULL NULL NULL YES BTREE
393-t1 1 n4 2 n1 NULL NULL NULL NULL BTREE
394-t1 1 n4 3 n2 NULL NULL NULL NULL YES BTREE
395-t1 1 n4 4 n3 NULL NULL NULL NULL YES BTREE
396+t1 0 n1 1 n1 A 10 NULL NULL BTREE
397+t1 1 n1_2 1 n1 A 10 NULL NULL BTREE
398+t1 1 n1_2 2 n2 A 10 NULL NULL YES BTREE
399+t1 1 n1_2 3 n3 A 10 NULL NULL YES BTREE
400+t1 1 n1_2 4 n4 A 10 NULL NULL YES BTREE
401+t1 1 n2 1 n2 A 10 NULL NULL YES BTREE
402+t1 1 n2 2 n3 A 10 NULL NULL YES BTREE
403+t1 1 n2 3 n4 A 10 NULL NULL YES BTREE
404+t1 1 n2 4 n1 A 10 NULL NULL BTREE
405+t1 1 n3 1 n3 A 10 NULL NULL YES BTREE
406+t1 1 n3 2 n4 A 10 NULL NULL YES BTREE
407+t1 1 n3 3 n1 A 10 NULL NULL BTREE
408+t1 1 n3 4 n2 A 10 NULL NULL YES BTREE
409+t1 1 n4 1 n4 A 10 NULL NULL YES BTREE
410+t1 1 n4 2 n1 A 10 NULL NULL BTREE
411+t1 1 n4 3 n2 A 10 NULL NULL YES BTREE
412+t1 1 n4 4 n3 A 10 NULL NULL YES BTREE
413 drop table t1;
414 create table t1 (i int unsigned not null auto_increment primary key);
415 alter table t1 rename t2;
416@@ -286,17 +286,17 @@
417 alter table t1 add unique (a,b), add key (b);
418 show keys from t1;
419 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
420-t1 0 a 1 a A NULL NULL NULL YES BTREE
421-t1 0 a 2 b A NULL NULL NULL YES BTREE
422-t1 1 b 1 b A NULL NULL NULL YES BTREE
423+t1 0 a 1 a A 300 NULL NULL YES BTREE
424+t1 0 a 2 b A 300 NULL NULL YES BTREE
425+t1 1 b 1 b A 300 NULL NULL YES BTREE
426 analyze table t1;
427 Table Op Msg_type Msg_text
428 test.t1 analyze status OK
429 show keys from t1;
430 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
431-t1 0 a 1 a A NULL NULL NULL YES BTREE
432-t1 0 a 2 b A NULL NULL NULL YES BTREE
433-t1 1 b 1 b A NULL NULL NULL YES BTREE
434+t1 0 a 1 a A 300 NULL NULL YES BTREE
435+t1 0 a 2 b A 300 NULL NULL YES BTREE
436+t1 1 b 1 b A 300 NULL NULL YES BTREE
437 drop table t1;
438 CREATE TABLE t1 (i int(10), index(i) );
439 ALTER TABLE t1 DISABLE KEYS;
440@@ -545,37 +545,37 @@
441 create table t1 (a int, key(a));
442 show indexes from t1;
443 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
444-t1 1 a 1 a A NULL NULL NULL YES BTREE
445+t1 1 a 1 a A 0 NULL NULL YES BTREE
446 "this used not to disable the index"
447 alter table t1 modify a int, disable keys;
448 show indexes from t1;
449 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
450-t1 1 a 1 a A NULL NULL NULL YES BTREE
451+t1 1 a 1 a A 0 NULL NULL YES BTREE
452 alter table t1 enable keys;
453 show indexes from t1;
454 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
455-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
456+t1 1 a 1 a A 0 NULL NULL YES BTREE
457 alter table t1 modify a bigint, disable keys;
458 show indexes from t1;
459 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
460-t1 1 a 1 a A NULL NULL NULL YES BTREE
461+t1 1 a 1 a A 0 NULL NULL YES BTREE
462 alter table t1 enable keys;
463 show indexes from t1;
464 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
465-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
466+t1 1 a 1 a A 0 NULL NULL YES BTREE
467 alter table t1 add b char(10), disable keys;
468 show indexes from t1;
469 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
470-t1 1 a 1 a A NULL NULL NULL YES BTREE
471+t1 1 a 1 a A 0 NULL NULL YES BTREE
472 alter table t1 add c decimal(10,2), enable keys;
473 show indexes from t1;
474 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
475-t1 1 a 1 a A NULL NULL NULL YES BTREE
476+t1 1 a 1 a A 0 NULL NULL YES BTREE
477 "this however did"
478 alter table t1 disable keys;
479 show indexes from t1;
480 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
481-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
482+t1 1 a 1 a A 0 NULL NULL YES BTREE
483 desc t1;
484 Field Type Null Key Default Extra
485 a bigint(20) YES MUL NULL
486@@ -585,7 +585,7 @@
487 "The key should still be disabled"
488 show indexes from t1;
489 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
490-t1 1 a 1 a A NULL NULL NULL YES BTREE
491+t1 1 a 1 a A 0 NULL NULL YES BTREE
492 drop table t1;
493 "Now will test with one unique index"
494 create table t1(a int, b char(10), unique(a));
495@@ -595,7 +595,7 @@
496 alter table t1 disable keys;
497 show indexes from t1;
498 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
499-t1 0 a 1 a NULL 0 NULL NULL YES BTREE
500+t1 0 a 1 a A 0 NULL NULL YES BTREE
501 alter table t1 enable keys;
502 "If no copy on noop change, this won't touch the data file"
503 "Unique index, no change"
504@@ -623,12 +623,12 @@
505 show indexes from t1;
506 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
507 t1 0 a 1 a A 0 NULL NULL YES BTREE
508-t1 1 b 1 b A NULL NULL NULL YES BTREE
509+t1 1 b 1 b A 0 NULL NULL YES BTREE
510 alter table t1 disable keys;
511 show indexes from t1;
512 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
513-t1 0 a 1 a NULL 0 NULL NULL YES BTREE
514-t1 1 b 1 b NULL NULL NULL NULL YES BTREE
515+t1 0 a 1 a A 0 NULL NULL YES BTREE
516+t1 1 b 1 b A 0 NULL NULL YES BTREE
517 alter table t1 enable keys;
518 "If no copy on noop change, this won't touch the data file"
519 "The non-unique index will be disabled"
520@@ -636,31 +636,31 @@
521 show indexes from t1;
522 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
523 t1 0 a 1 a A 0 NULL NULL YES BTREE
524-t1 1 b 1 b A NULL NULL NULL YES BTREE
525+t1 1 b 1 b A 0 NULL NULL YES BTREE
526 alter table t1 enable keys;
527 show indexes from t1;
528 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
529-t1 0 a 1 a NULL 0 NULL NULL YES BTREE
530-t1 1 b 1 b NULL NULL NULL NULL YES BTREE
531+t1 0 a 1 a A 0 NULL NULL YES BTREE
532+t1 1 b 1 b A 0 NULL NULL YES BTREE
533 "Change the type implying data copy"
534 "The non-unique index will be disabled"
535 alter table t1 modify a bigint, disable keys;
536 show indexes from t1;
537 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
538 t1 0 a 1 a A 0 NULL NULL YES BTREE
539-t1 1 b 1 b A NULL NULL NULL YES BTREE
540+t1 1 b 1 b A 0 NULL NULL YES BTREE
541 "Change again the type, but leave the indexes as_is"
542 alter table t1 modify a int;
543 show indexes from t1;
544 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
545 t1 0 a 1 a A 0 NULL NULL YES BTREE
546-t1 1 b 1 b A NULL NULL NULL YES BTREE
547+t1 1 b 1 b A 0 NULL NULL YES BTREE
548 "Try the same. When data is no copied on similar tables, this is noop"
549 alter table t1 modify a int;
550 show indexes from t1;
551 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
552 t1 0 a 1 a A 0 NULL NULL YES BTREE
553-t1 1 b 1 b A NULL NULL NULL YES BTREE
554+t1 1 b 1 b A 0 NULL NULL YES BTREE
555 drop table t1;
556 create database mysqltest;
557 create table t1 (c1 int);
558@@ -697,11 +697,11 @@
559 CREATE TABLE bug24219 (a INT, INDEX(a));
560 SHOW INDEX FROM bug24219;
561 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
562-bug24219 1 a 1 a A NULL NULL NULL YES BTREE
563+bug24219 1 a 1 a A 0 NULL NULL YES BTREE
564 ALTER TABLE bug24219 RENAME TO bug24219_2, DISABLE KEYS;
565 SHOW INDEX FROM bug24219_2;
566 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
567-bug24219_2 1 a 1 a A NULL NULL NULL YES BTREE
568+bug24219_2 1 a 1 a A 0 NULL NULL YES BTREE
569 DROP TABLE bug24219_2;
570 create table t1 (mycol int(10) not null);
571 alter table t1 alter column mycol set default 0;
572@@ -882,7 +882,7 @@
573 char_field char(10) YES NULL
574 SHOW INDEXES FROM t1;
575 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
576-t1 1 int_field 1 int_field A NULL NULL NULL BTREE
577+t1 1 int_field 1 int_field A 0 NULL NULL BTREE
578 INSERT INTO t1 VALUES (1, "edno"), (1, "edno"), (2, "dve"), (3, "tri"), (5, "pet");
579 "Non-copy data change - new frm, but old data and index files"
580 ALTER TABLE t1
581
582=== modified file 'test/mysql-test/r/analyze.result'
583--- test/mysql-test/r/analyze.result 2008-06-09 12:49:32 +0000
584+++ test/mysql-test/r/analyze.result 2009-04-03 19:39:12 +0000
585@@ -56,5 +56,5 @@
586 test.t1 analyze status OK
587 show index from t1;
588 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
589-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
590+t1 1 a 1 a A 5 NULL NULL YES BTREE
591 drop table t1;
592
593=== modified file 'test/mysql-test/r/compress.result'
594--- test/mysql-test/r/compress.result 2008-06-09 12:49:32 +0000
595+++ test/mysql-test/r/compress.result 2009-04-03 19:39:12 +0000
596@@ -611,15 +611,15 @@
597 explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
598 id select_type table type possible_keys key key_len ref rows Extra
599 1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
600-1 SIMPLE t3 ref period period 4 test.t1.period 18
601+1 SIMPLE t3 ref period period 4 test.t1.period 1
602 explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
603 id select_type table type possible_keys key key_len ref rows Extra
604-1 SIMPLE t3 index period period 4 NULL 1
605-1 SIMPLE t1 ref period period 4 test.t3.period 18
606+1 SIMPLE t3 index period period 4 NULL 10
607+1 SIMPLE t1 ref period period 4 test.t3.period 1
608 explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
609 id select_type table type possible_keys key key_len ref rows Extra
610-1 SIMPLE t1 index period period 4 NULL 1
611-1 SIMPLE t3 ref period period 4 test.t1.period 18
612+1 SIMPLE t1 index period period 4 NULL 10
613+1 SIMPLE t3 ref period period 4 test.t1.period 1
614 select period from t1;
615 period
616 9410
617@@ -2099,7 +2099,7 @@
618 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
619 t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
620 t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
621-t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
622+t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE
623 drop table t4, t3, t2, t1;
624 CREATE TABLE t1 (
625 cont_nr int(11) NOT NULL auto_increment,
626
627=== modified file 'test/mysql-test/r/ctype_mb.result'
628--- test/mysql-test/r/ctype_mb.result 2006-10-23 09:14:04 +0000
629+++ test/mysql-test/r/ctype_mb.result 2009-04-03 19:39:12 +0000
630@@ -33,7 +33,7 @@
631 ) ENGINE=PBXT DEFAULT CHARSET=latin1
632 SHOW KEYS FROM t1;
633 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
634-t1 1 key_a 1 a A NULL 3 NULL YES BTREE
635+t1 1 key_a 1 a A 0 3 NULL YES BTREE
636 ALTER TABLE t1 CHANGE a a CHAR(4);
637 SHOW CREATE TABLE t1;
638 Table Create Table
639@@ -43,7 +43,7 @@
640 ) ENGINE=PBXT DEFAULT CHARSET=latin1
641 SHOW KEYS FROM t1;
642 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
643-t1 1 key_a 1 a A NULL 3 NULL YES BTREE
644+t1 1 key_a 1 a A 0 3 NULL YES BTREE
645 ALTER TABLE t1 CHANGE a a CHAR(4) CHARACTER SET utf8;
646 SHOW CREATE TABLE t1;
647 Table Create Table
648@@ -53,5 +53,5 @@
649 ) ENGINE=PBXT DEFAULT CHARSET=latin1
650 SHOW KEYS FROM t1;
651 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
652-t1 1 key_a 1 a A NULL 3 NULL YES BTREE
653+t1 1 key_a 1 a A 0 3 NULL YES BTREE
654 DROP TABLE t1;
655
656=== modified file 'test/mysql-test/r/distinct.result'
657--- test/mysql-test/r/distinct.result 2008-03-28 10:24:43 +0000
658+++ test/mysql-test/r/distinct.result 2009-04-03 19:39:12 +0000
659@@ -174,8 +174,8 @@
660 explain SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
661 id select_type table type possible_keys key key_len ref rows Extra
662 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 4 Using temporary
663-1 SIMPLE t3 ref a a 5 test.t1.b 2 Using where; Using index
664-1 SIMPLE t2 index a a 4 NULL 5 Using where; Using index; Distinct; Using join buffer
665+1 SIMPLE t2 ref a a 4 test.t1.a 1 Using index
666+1 SIMPLE t3 ref a a 5 test.t1.b 1 Using where; Using index
667 SELECT distinct t3.a FROM t3,t2,t1 WHERE t3.a=t1.b AND t1.a=t2.a;
668 a
669 1
670@@ -190,7 +190,7 @@
671 explain select distinct t1.a from t1,t3 where t1.a=t3.a;
672 id select_type table type possible_keys key key_len ref rows Extra
673 1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 4 Using index; Using temporary
674-1 SIMPLE t3 ref a a 5 test.t1.a 11 Using where; Using index; Distinct
675+1 SIMPLE t3 ref a a 5 test.t1.a 1 Using where; Using index; Distinct
676 select distinct t1.a from t1,t3 where t1.a=t3.a;
677 a
678 1
679@@ -212,7 +212,7 @@
680 1 SIMPLE t1 index NULL PRIMARY 4 NULL 1 Using index
681 explain SELECT distinct a from t3 order by a desc limit 2;
682 id select_type table type possible_keys key key_len ref rows Extra
683-1 SIMPLE t3 index NULL a 5 NULL 40 Using index
684+1 SIMPLE t3 index NULL a 5 NULL 2 Using index
685 explain SELECT distinct a,b from t3 order by a+1;
686 id select_type table type possible_keys key key_len ref rows Extra
687 1 SIMPLE t3 ALL NULL NULL NULL NULL 204 Using temporary; Using filesort
688
689=== modified file 'test/mysql-test/r/func_group.result'
690--- test/mysql-test/r/func_group.result 2008-03-10 11:36:34 +0000
691+++ test/mysql-test/r/func_group.result 2009-04-03 19:39:12 +0000
692@@ -613,8 +613,8 @@
693 explain
694 select max(t1.a3), min(t2.a2) from t1, t2 where t1.a2 = 2 and t1.a3 < 'MIN' and t2.a3 > 'CA';
695 id select_type table type possible_keys key key_len ref rows Extra
696-1 SIMPLE t2 range k1 k1 3 NULL 1 Using where; Using index
697-1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index; Using join buffer
698+1 SIMPLE t1 range k1 k1 7 NULL 1 Using where; Using index
699+1 SIMPLE t2 range k1 k1 3 NULL 1 Using where; Using index; Using join buffer
700 explain
701 select min(a4 - 0.01) from t1;
702 id select_type table type possible_keys key key_len ref rows Extra
703
704=== modified file 'test/mysql-test/r/group_min_max.result'
705--- test/mysql-test/r/group_min_max.result 2009-03-27 20:05:34 +0000
706+++ test/mysql-test/r/group_min_max.result 2009-04-03 19:39:12 +0000
707@@ -133,34 +133,34 @@
708 test.t3 analyze status OK
709 explain select a1, min(a2) from t1 group by a1;
710 id select_type table type possible_keys key key_len ref rows Extra
711-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by
712+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
713 explain select a1, max(a2) from t1 group by a1;
714 id select_type table type possible_keys key key_len ref rows Extra
715-1 SIMPLE t1 range NULL idx_t1_1 65 NULL 10 Using index for group-by
716+1 SIMPLE t1 range NULL idx_t1_1 65 NULL 129 Using index for group-by
717 explain select a1, min(a2), max(a2) from t1 group by a1;
718 id select_type table type possible_keys key key_len ref rows Extra
719-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by
720+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
721 explain select a1, a2, b, min(c), max(c) from t1 group by a1,a2,b;
722 id select_type table type possible_keys key key_len ref rows Extra
723-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
724+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
725 explain select a1,a2,b,max(c),min(c) from t1 group by a1,a2,b;
726 id select_type table type possible_keys key key_len ref rows Extra
727-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
728+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
729 explain select a1,a2,b,max(c),min(c) from t2 group by a1,a2,b;
730 id select_type table type possible_keys key key_len ref rows Extra
731 1 SIMPLE t2 range NULL idx_t2_1 # NULL # Using index for group-by
732 explain select min(a2), a1, max(a2), min(a2), a1 from t1 group by a1;
733 id select_type table type possible_keys key key_len ref rows Extra
734-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by
735+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
736 explain select a1, b, min(c), a1, max(c), b, a2, max(c), max(c) from t1 group by a1, a2, b;
737 id select_type table type possible_keys key key_len ref rows Extra
738-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
739+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
740 explain select min(a2) from t1 group by a1;
741 id select_type table type possible_keys key key_len ref rows Extra
742-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using index for group-by
743+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using index for group-by
744 explain select a2, min(c), max(c) from t1 group by a1,a2,b;
745 id select_type table type possible_keys key key_len ref rows Extra
746-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
747+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
748 select a1, min(a2) from t1 group by a1;
749 a1 min(a2)
750 a a
751@@ -293,13 +293,13 @@
752 1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where
753 explain select a1,a2,b, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
754 id select_type table type possible_keys key key_len ref rows Extra
755-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 1 Using where; Using index for group-by
756+1 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
757 explain select a1, max(c) from t1 where a1 >= 'c' or a1 < 'b' group by a1,a2,b;
758 id select_type table type possible_keys key key_len ref rows Extra
759-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 1 Using where; Using index for group-by
760+1 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
761 explain select a1,a2,b,min(c),max(c) from t1 where a1 >= 'c' or a2 < 'b' group by a1,a2,b;
762 id select_type table type possible_keys key key_len ref rows Extra
763-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
764+1 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
765 explain select a1,a2,b, max(c) from t1 where a1 = 'z' or a1 = 'b' or a1 = 'd' group by a1,a2,b;
766 id select_type table type possible_keys key key_len ref rows Extra
767 1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 65 NULL 3 Using where; Using index
768@@ -669,40 +669,40 @@
769 d p422
770 explain select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
771 id select_type table type possible_keys key key_len ref rows Extra
772-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
773+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
774 explain select a1,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
775 id select_type table type possible_keys key key_len ref rows Extra
776-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
777+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
778 explain select a1,a2,b, max(c) from t1 where (b = 'b') group by a1,a2;
779 id select_type table type possible_keys key key_len ref rows Extra
780-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
781+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
782 explain select a1,a2,b,min(c),max(c) from t1 where (b = 'b') group by a1,a2;
783 id select_type table type possible_keys key key_len ref rows Extra
784-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
785+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
786 explain select a1,a2, max(c) from t1 where (b = 'b') group by a1,a2;
787 id select_type table type possible_keys key key_len ref rows Extra
788-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
789+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
790 explain select a1,a2,b,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
791 id select_type table type possible_keys key key_len ref rows Extra
792-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
793+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
794 explain select a1,max(c),min(c) from t2 where (a2 = 'a') and (b = 'b') group by a1;
795 id select_type table type possible_keys key key_len ref rows Extra
796-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
797+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
798 explain select a1,a2,b, max(c) from t2 where (b = 'b') group by a1,a2;
799 id select_type table type possible_keys key key_len ref rows Extra
800-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
801+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
802 explain select a1,a2,b,min(c),max(c) from t2 where (b = 'b') group by a1,a2;
803 id select_type table type possible_keys key key_len ref rows Extra
804-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
805+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
806 explain select a1,a2, max(c) from t2 where (b = 'b') group by a1,a2;
807 id select_type table type possible_keys key key_len ref rows Extra
808-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
809+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
810 explain select a1,a2,b,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
811 id select_type table type possible_keys key key_len ref rows Extra
812-1 SIMPLE t3 range NULL idx_t3_1 6 NULL 10 Using where; Using index for group-by
813+1 SIMPLE t3 range NULL idx_t3_1 6 NULL 193 Using where; Using index for group-by
814 explain select a1,max(c),min(c) from t3 where (a2 = 'a') and (b = 'b') group by a1;
815 id select_type table type possible_keys key key_len ref rows Extra
816-1 SIMPLE t3 range NULL idx_t3_1 6 NULL 10 Using where; Using index for group-by
817+1 SIMPLE t3 range NULL idx_t3_1 6 NULL 193 Using where; Using index for group-by
818 select a1,a2,b,max(c),min(c) from t1 where (a2 = 'a') and (b = 'b') group by a1;
819 a1 a2 b max(c) min(c)
820 a a b h112 e112
821@@ -804,22 +804,22 @@
822 c h312 e312
823 explain select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
824 id select_type table type possible_keys key key_len ref rows Extra
825-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
826+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
827 explain select a1,a2,b,max(c) from t2 where (a2 = 'a') and b is NULL group by a1;
828 id select_type table type possible_keys key key_len ref rows Extra
829-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
830+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
831 explain select a1,a2,b,min(c) from t2 where b is NULL group by a1,a2;
832 id select_type table type possible_keys key key_len ref rows Extra
833-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
834+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
835 explain select a1,a2,b,max(c) from t2 where b is NULL group by a1,a2;
836 id select_type table type possible_keys key key_len ref rows Extra
837-1 SIMPLE t2 range NULL idx_t2_1 146 NULL 10 Using where; Using index for group-by
838-explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
839-id select_type table type possible_keys key key_len ref rows Extra
840-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
841-explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
842-id select_type table type possible_keys key key_len ref rows Extra
843-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 Using where; Using index for group-by
844+1 SIMPLE t2 range NULL idx_t2_1 146 NULL 165 Using where; Using index for group-by
845+explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
846+id select_type table type possible_keys key key_len ref rows Extra
847+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
848+explain select a1,a2,b,min(c),max(c) from t2 where b is NULL group by a1,a2;
849+id select_type table type possible_keys key key_len ref rows Extra
850+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 Using where; Using index for group-by
851 select a1,a2,b,min(c) from t2 where (a2 = 'a') and b is NULL group by a1;
852 a1 a2 b min(c)
853 a a NULL a777
854@@ -849,49 +849,49 @@
855 1 SIMPLE t1 range NULL idx_t1_1 147 NULL # Using where; Using index for group-by
856 explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') group by a1,a2,b;
857 id select_type table type possible_keys key key_len ref rows Extra
858-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
859+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
860 explain select a1,a2,b, max(c) from t1 where (c > 'f123') group by a1,a2,b;
861 id select_type table type possible_keys key key_len ref rows Extra
862-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
863+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
864 explain select a1,a2,b,min(c),max(c) from t1 where (c > 'f123') group by a1,a2,b;
865 id select_type table type possible_keys key key_len ref rows Extra
866-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
867+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
868 explain select a1,a2,b, max(c) from t1 where (c < 'a0') group by a1,a2,b;
869 id select_type table type possible_keys key key_len ref rows Extra
870-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
871+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
872 explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') group by a1,a2,b;
873 id select_type table type possible_keys key key_len ref rows Extra
874-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
875+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
876 explain select a1,a2,b, max(c) from t1 where (c < 'k321') group by a1,a2,b;
877 id select_type table type possible_keys key key_len ref rows Extra
878-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
879+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
880 explain select a1,a2,b,min(c),max(c) from t1 where (c < 'k321') group by a1,a2,b;
881 id select_type table type possible_keys key key_len ref rows Extra
882-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
883+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
884 explain select a1,a2,b, max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
885 id select_type table type possible_keys key key_len ref rows Extra
886-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
887+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
888 explain select a1,a2,b,min(c),max(c) from t1 where (c < 'a0') or (c > 'b1') group by a1,a2,b;
889 id select_type table type possible_keys key key_len ref rows Extra
890-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
891+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
892 explain select a1,a2,b, max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
893 id select_type table type possible_keys key key_len ref rows Extra
894-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
895+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
896 explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b1') or (c <= 'g1') group by a1,a2,b;
897 id select_type table type possible_keys key key_len ref rows Extra
898-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
899+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
900 explain select a1,a2,b,min(c),max(c) from t1 where (c > 'b111') and (c <= 'g112') group by a1,a2,b;
901 id select_type table type possible_keys key key_len ref rows Extra
902-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
903+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
904 explain select a1,a2,b,min(c),max(c) from t1 where (c < 'c5') or (c = 'g412') or (c = 'k421') group by a1,a2,b;
905 id select_type table type possible_keys key key_len ref rows Extra
906-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
907+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
908 explain 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;
909 id select_type table type possible_keys key key_len ref rows Extra
910-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
911+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
912 explain 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;
913 id select_type table type possible_keys key key_len ref rows Extra
914-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
915+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
916 explain select a1,a2,b, max(c) from t2 where (c > 'b1') group by a1,a2,b;
917 id select_type table type possible_keys key key_len ref rows Extra
918 1 SIMPLE t2 range NULL idx_t2_1 146 NULL # Using where; Using index for group-by
919@@ -1364,29 +1364,29 @@
920 where exists ( select * from t2 where t2.c > 'b1' )
921 group by a1,a2,b;
922 id select_type table type possible_keys key key_len ref rows Extra
923-1 PRIMARY t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
924+1 PRIMARY t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
925 2 SUBQUERY t2 index NULL idx_t2_1 163 NULL 164 Using where; Using index
926 explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
927 id select_type table type possible_keys key key_len ref rows Extra
928-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
929+1 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
930 explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (c > 'b111') group by a1,a2,b;
931 id select_type table type possible_keys key key_len ref rows Extra
932-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 10 Using where; Using index for group-by
933+1 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
934 explain select a1,a2,b,min(c),max(c) from t1 where (a2 >= 'b') and (b = 'a') and (c > 'b111') group by a1,a2,b;
935 id select_type table type possible_keys key key_len ref rows Extra
936-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
937+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
938 explain 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;
939 id select_type table type possible_keys key key_len ref rows Extra
940-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 1 Using where; Using index for group-by
941+1 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
942 explain 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;
943 id select_type table type possible_keys key key_len ref rows Extra
944-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 163 NULL 1 Using where; Using index for group-by
945+1 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
946 explain select a1,a2,b,min(c) from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
947 id select_type table type possible_keys key key_len ref rows Extra
948 1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where
949 explain 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;
950 id select_type table type possible_keys key key_len ref rows Extra
951-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
952+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
953 explain select a1,a2,b,min(c),max(c) from t2 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
954 id select_type table type possible_keys key key_len ref rows Extra
955 1 SIMPLE t2 range idx_t2_0,idx_t2_1,idx_t2_2 idx_t2_1 163 NULL # Using where; Using index for group-by
956@@ -1491,13 +1491,13 @@
957 a1 a2 b min(c)
958 explain select a1,a2,b from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
959 id select_type table type possible_keys key key_len ref rows Extra
960-1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_1 147 NULL 10 Using where; Using index for group-by
961+1 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
962 explain select a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
963 id select_type table type possible_keys key key_len ref rows Extra
964-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
965+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
966 explain select a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
967 id select_type table type possible_keys key key_len ref rows Extra
968-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
969+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
970 explain select a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
971 id select_type table type possible_keys key key_len ref rows Extra
972 1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 1 Using where
973@@ -1554,13 +1554,13 @@
974 a1 a2 b
975 explain select distinct a1,a2,b from t1;
976 id select_type table type possible_keys key key_len ref rows Extra
977-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
978+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
979 explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a');
980 id select_type table type possible_keys key key_len ref rows Extra
981-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
982+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
983 explain extended select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
984 id select_type table type possible_keys key key_len ref rows filtered Extra
985-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 100.00 Using where; Using index for group-by
986+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 99.22 Using where; Using index for group-by
987 Warnings:
988 Note 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'))
989 explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
990@@ -1577,7 +1577,7 @@
991 1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using where; Using index for group-by
992 explain extended select distinct a1,a2,b,c from t2 where (a2 >= 'b') and (b = 'a') and (c = 'i121');
993 id select_type table type possible_keys key key_len ref rows filtered Extra
994-1 SIMPLE t2 range NULL idx_t2_1 163 NULL 10 100.00 Using where; Using index for group-by
995+1 SIMPLE t2 range NULL idx_t2_1 163 NULL 165 99.39 Using where; Using index for group-by
996 Warnings:
997 Note 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'))
998 explain select distinct a1,a2,b from t2 where (a1 > 'a') and (a2 > 'a') and (b = 'c');
999@@ -1702,19 +1702,19 @@
1000 d e
1001 explain select distinct a1,a2,b from t1;
1002 id select_type table type possible_keys key key_len ref rows Extra
1003-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
1004+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
1005 explain select distinct a1,a2,b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
1006 id select_type table type possible_keys key key_len ref rows Extra
1007-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by
1008+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by
1009 explain select distinct a1,a2,b,c from t1 where (a2 >= 'b') and (b = 'a') and (c = 'i121') group by a1,a2,b;
1010 id select_type table type possible_keys key key_len ref rows Extra
1011-1 SIMPLE t1 range NULL idx_t1_1 163 NULL 10 Using where; Using index for group-by
1012+1 SIMPLE t1 range NULL idx_t1_1 163 NULL 129 Using where; Using index for group-by
1013 explain select distinct a1,a2,b from t1 where (a1 > 'a') and (a2 > 'a') and (b = 'c') group by a1,a2,b;
1014 id select_type table type possible_keys key key_len ref rows Extra
1015 1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 147 NULL 1 Using where
1016 explain select distinct b from t1 where (a2 >= 'b') and (b = 'a') group by a1,a2,b;
1017 id select_type table type possible_keys key key_len ref rows Extra
1018-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using where; Using index for group-by; Using temporary; Using filesort
1019+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using where; Using index for group-by; Using temporary; Using filesort
1020 explain select distinct a1,a2,b from t2;
1021 id select_type table type possible_keys key key_len ref rows Extra
1022 1 SIMPLE t2 range NULL idx_t2_2 146 NULL # Using index for group-by
1023@@ -1846,7 +1846,7 @@
1024 1 SIMPLE t1 range idx_t1_0,idx_t1_1,idx_t1_2 idx_t1_2 65 NULL 1 Using where
1025 explain select concat(ord(min(b)),ord(max(b))),min(b),max(b) from t1 group by a1,a2;
1026 id select_type table type possible_keys key key_len ref rows Extra
1027-1 SIMPLE t1 range NULL idx_t1_1 147 NULL 10 Using index for group-by
1028+1 SIMPLE t1 range NULL idx_t1_1 147 NULL 129 Using index for group-by
1029 select a1,a2,b, concat(min(c), max(c)) from t1 where a1 < 'd' group by a1,a2,b;
1030 a1 a2 b concat(min(c), max(c))
1031 a a a a111d111
1032@@ -1985,7 +1985,7 @@
1033 d
1034 explain select a1 from t1 where a2 = 'b' group by a1;
1035 id select_type table type possible_keys key key_len ref rows Extra
1036-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using where; Using index for group-by
1037+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using where; Using index for group-by
1038 select a1 from t1 where a2 = 'b' group by a1;
1039 a1
1040 a
1041@@ -1994,7 +1994,7 @@
1042 d
1043 explain select distinct a1 from t1 where a2 = 'b';
1044 id select_type table type possible_keys key key_len ref rows Extra
1045-1 SIMPLE t1 range NULL idx_t1_1 130 NULL 10 Using where; Using index for group-by
1046+1 SIMPLE t1 range NULL idx_t1_1 130 NULL 129 Using where; Using index for group-by
1047 select distinct a1 from t1 where a2 = 'b';
1048 a1
1049 a
1050@@ -2188,7 +2188,7 @@
1051 (2,2), (2,3), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6);
1052 EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
1053 id select_type table type possible_keys key key_len ref rows Extra
1054-1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
1055+1 SIMPLE t1 index NULL a 10 NULL 15 Using index
1056 FLUSH STATUS;
1057 SELECT max(b), a FROM t1 GROUP BY a;
1058 max(b) a
1059@@ -2202,7 +2202,7 @@
1060 Handler_read_next 0
1061 EXPLAIN SELECT max(b), a FROM t1 GROUP BY a;
1062 id select_type table type possible_keys key key_len ref rows Extra
1063-1 SIMPLE t1 range NULL a 5 NULL 8 Using index for group-by
1064+1 SIMPLE t1 index NULL a 10 NULL 15 Using index
1065 FLUSH STATUS;
1066 CREATE TABLE t2 SELECT max(b), a FROM t1 GROUP BY a;
1067 SHOW STATUS LIKE 'handler_read__e%';
1068@@ -2235,14 +2235,14 @@
1069 EXPLAIN (SELECT max(b), a FROM t1 GROUP BY a) UNION
1070 (SELECT max(b), a FROM t1 GROUP BY a);
1071 id select_type table type possible_keys key key_len ref rows Extra
1072-1 PRIMARY t1 range NULL a 5 NULL 8 Using index for group-by
1073-2 UNION t1 range NULL a 5 NULL 8 Using index for group-by
1074+1 PRIMARY t1 index NULL a 10 NULL 15 Using index
1075+2 UNION t1 index NULL a 10 NULL 15 Using index
1076 NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL
1077 EXPLAIN SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
1078 FROM t1 AS t1_outer;
1079 id select_type table type possible_keys key key_len ref rows Extra
1080 1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
1081-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
1082+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
1083 EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE EXISTS
1084 (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
1085 id select_type table type possible_keys key key_len ref rows Extra
1086@@ -2252,7 +2252,7 @@
1087 (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) > 12;
1088 id select_type table type possible_keys key key_len ref rows Extra
1089 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
1090-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
1091+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
1092 EXPLAIN SELECT 1 FROM t1 AS t1_outer WHERE
1093 a IN (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
1094 id select_type table type possible_keys key key_len ref rows Extra
1095@@ -2261,21 +2261,21 @@
1096 EXPLAIN SELECT 1 FROM t1 AS t1_outer GROUP BY a HAVING
1097 a > (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2);
1098 id select_type table type possible_keys key key_len ref rows Extra
1099-1 PRIMARY t1_outer range NULL a 5 NULL 8 Using index for group-by
1100-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
1101+1 PRIMARY t1_outer index NULL a 10 NULL 15 Using index
1102+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
1103 EXPLAIN SELECT 1 FROM t1 AS t1_outer1 JOIN t1 AS t1_outer2
1104 ON t1_outer1.a = (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2)
1105 AND t1_outer1.b = t1_outer2.b;
1106 id select_type table type possible_keys key key_len ref rows Extra
1107 1 PRIMARY t1_outer1 ref a a 5 const 1 Using where; Using index
1108 1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using where; Using index; Using join buffer
1109-2 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
1110+2 SUBQUERY t1 index NULL a 10 NULL 15 Using index
1111 EXPLAIN SELECT (SELECT (SELECT max(b) FROM t1 GROUP BY a HAVING a < 2) x
1112 FROM t1 AS t1_outer) x2 FROM t1 AS t1_outer2;
1113 id select_type table type possible_keys key key_len ref rows Extra
1114 1 PRIMARY t1_outer2 index NULL a 10 NULL 15 Using index
1115 2 SUBQUERY t1_outer index NULL a 10 NULL 15 Using index
1116-3 SUBQUERY t1 range NULL a 5 NULL 8 Using index for group-by
1117+3 SUBQUERY t1 index NULL a 10 NULL 15 Using index
1118 CREATE TABLE t3 LIKE t1;
1119 FLUSH STATUS;
1120 INSERT INTO t3 SELECT a,MAX(b) FROM t1 GROUP BY a;
1121@@ -2312,7 +2312,7 @@
1122 (4), (2), (1), (2), (2), (4), (1), (4);
1123 EXPLAIN SELECT DISTINCT(a) FROM t1;
1124 id select_type table type possible_keys key key_len ref rows Extra
1125-1 SIMPLE t1 range NULL idx 5 NULL 9 Using index for group-by
1126+1 SIMPLE t1 index NULL idx 5 NULL 16 Using index
1127 SELECT DISTINCT(a) FROM t1;
1128 a
1129 1
1130@@ -2320,7 +2320,7 @@
1131 4
1132 EXPLAIN SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
1133 id select_type table type possible_keys key key_len ref rows Extra
1134-1 SIMPLE t1 range NULL idx 5 NULL 9 Using index for group-by
1135+1 SIMPLE t1 index NULL idx 5 NULL 16 Using index
1136 SELECT SQL_BIG_RESULT DISTINCT(a) FROM t1;
1137 a
1138 1
1139@@ -2345,7 +2345,7 @@
1140 EXPLAIN
1141 SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
1142 id select_type table type possible_keys key key_len ref rows Extra
1143-1 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by
1144+1 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
1145 SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a;
1146 a MIN(b) MAX(b)
1147 1 1 3
1148@@ -2355,7 +2355,7 @@
1149 EXPLAIN
1150 SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
1151 id select_type table type possible_keys key key_len ref rows Extra
1152-1 SIMPLE t1 range NULL break_it 10 NULL 7 Using index for group-by; Using temporary; Using filesort
1153+1 SIMPLE t1 index NULL break_it 10 NULL 12 Using index
1154 SELECT a, MIN(b), MAX(b) FROM t1 GROUP BY a ORDER BY a DESC;
1155 a MIN(b) MAX(b)
1156 4 1 3
1157
1158=== modified file 'test/mysql-test/r/join.result'
1159--- test/mysql-test/r/join.result 2008-03-10 11:36:34 +0000
1160+++ test/mysql-test/r/join.result 2009-04-03 19:39:12 +0000
1161@@ -774,7 +774,7 @@
1162 explain select * from t2,t3 where t2.a < 200 and t2.b=t3.b;
1163 id select_type table type possible_keys key key_len ref rows Extra
1164 1 SIMPLE t2 range a,b a 5 NULL 1 Using where
1165-1 SIMPLE t3 ref b b 5 test.t2.b 11 Using where
1166+1 SIMPLE t3 ref b b 5 test.t2.b 1 Using where
1167 drop table t1, t2, t3;
1168 create table t1 (a int);
1169 insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
1170
1171=== modified file 'test/mysql-test/r/join_nested.result'
1172--- test/mysql-test/r/join_nested.result 2009-03-27 20:05:34 +0000
1173+++ test/mysql-test/r/join_nested.result 2009-04-03 19:39:12 +0000
1174@@ -851,7 +851,7 @@
1175 id select_type table type possible_keys key key_len ref rows filtered Extra
1176 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00
1177 1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
1178-1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 2 100.00
1179+1 SIMPLE t2 ref idx_b idx_b 5 test.t3.b 1 100.00
1180 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00
1181 Warnings:
1182 Note 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
1183@@ -958,15 +958,15 @@
1184 1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
1185 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1186 1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1187+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
1188 1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1189-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
1190 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
1191 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
1192 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
1193 1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
1194 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1195 Warnings:
1196-Note 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`)))
1197+Note 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`)))
1198 CREATE INDEX idx_b ON t8(b);
1199 EXPLAIN EXTENDED
1200 SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1201@@ -1006,16 +1006,16 @@
1202 id select_type table type possible_keys key key_len ref rows filtered Extra
1203 1 SIMPLE t0 ALL NULL NULL NULL NULL 3 100.00 Using where
1204 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1205-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1206-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1207-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
1208 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
1209 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
1210 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
1211-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where
1212+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
1213+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1214+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
1215+1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1216 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1217 Warnings:
1218-Note 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`)))
1219+Note 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`)))
1220 CREATE INDEX idx_b ON t1(b);
1221 CREATE INDEX idx_a ON t0(a);
1222 EXPLAIN EXTENDED
1223@@ -1055,17 +1055,17 @@
1224 (t9.a=1);
1225 id select_type table type possible_keys key key_len ref rows filtered Extra
1226 1 SIMPLE t0 ref idx_a idx_a 5 const 1 100.00 Using where
1227-1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 2 100.00 Using where
1228-1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1229-1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1230-1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where
1231+1 SIMPLE t1 ref idx_b idx_b 5 test.t0.b 1 100.00 Using where
1232 1 SIMPLE t5 ALL idx_b NULL NULL NULL 3 100.00 Using where
1233 1 SIMPLE t7 ALL NULL NULL NULL NULL 2 100.00 Using where
1234 1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
1235-1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where
1236+1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 1 100.00 Using where
1237+1 SIMPLE t2 ALL NULL NULL NULL NULL 3 100.00 Using where
1238+1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 1 100.00
1239+1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
1240 1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer
1241 Warnings:
1242-Note 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`)))
1243+Note 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`)))
1244 SELECT t0.a,t0.b,t1.a,t1.b,t2.a,t2.b,t3.a,t3.b,t4.a,t4.b,
1245 t5.a,t5.b,t6.a,t6.b,t7.a,t7.b,t8.a,t8.b,t9.a,t9.b
1246 FROM t0,t1
1247@@ -1103,20 +1103,20 @@
1248 a b a b a b a b a b a b a b a b a b a b
1249 1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 1
1250 1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 1
1251+1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1
1252+1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1
1253 1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 1
1254-1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 1
1255 1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 1
1256-1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 1
1257 1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 1
1258 1 2 2 2 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 1 2
1259 1 2 3 2 4 2 1 2 3 2 3 1 6 2 1 1 NULL NULL 1 2
1260+1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 2
1261+1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 2
1262 1 2 3 2 4 2 1 2 3 2 2 2 6 2 2 2 0 2 1 2
1263+1 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 1 2
1264+1 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 1 2
1265 1 2 3 2 4 2 1 2 3 2 3 3 NULL NULL NULL NULL NULL NULL 1 2
1266-1 2 3 2 4 2 1 2 4 2 3 1 6 2 1 1 NULL NULL 1 2
1267-1 2 3 2 4 2 1 2 4 2 2 2 6 2 2 2 0 2 1 2
1268 1 2 3 2 4 2 1 2 4 2 3 3 NULL NULL NULL NULL NULL NULL 1 2
1269-1 2 3 2 5 3 NULL NULL NULL NULL 3 1 6 2 1 1 NULL NULL 1 2
1270-1 2 3 2 5 3 NULL NULL NULL NULL 2 2 6 2 2 2 0 2 1 2
1271 1 2 3 2 5 3 NULL NULL NULL NULL 3 3 NULL NULL NULL NULL NULL NULL 1 2
1272 SELECT t2.a,t2.b
1273 FROM t2;
1274@@ -1203,7 +1203,7 @@
1275 id select_type table type possible_keys key key_len ref rows Extra
1276 1 SIMPLE t1 index NULL a 5 NULL 21 Using index
1277 1 SIMPLE t3 index c c 5 NULL 6 Using index
1278-1 SIMPLE t2 ref b b 5 test.t3.c 2 Using index
1279+1 SIMPLE t2 ref b b 5 test.t3.c 1 Using index
1280 EXPLAIN SELECT a, b, c FROM t1 LEFT JOIN (t2, t3) ON b < 3 and b = c;
1281 id select_type table type possible_keys key key_len ref rows Extra
1282 1 SIMPLE t1 index NULL a 5 NULL # Using index
1283@@ -1484,8 +1484,8 @@
1284 on (t1.a = t2.a);
1285 id select_type table type possible_keys key key_len ref rows Extra
1286 1 SIMPLE t1 ALL NULL NULL NULL NULL 10
1287-1 SIMPLE t2 ref a a 5 test.t1.a 11
1288-1 SIMPLE t3 ref a a 5 test.t2.a 11
1289+1 SIMPLE t2 ref a a 5 test.t1.a 1
1290+1 SIMPLE t3 ref a a 5 test.t2.a 1
1291 drop table t1, t2, t3;
1292 CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, type varchar(10));
1293 CREATE TABLE t2 (pid int NOT NULL PRIMARY KEY, type varchar(10));
1294
1295=== modified file 'test/mysql-test/r/key.result'
1296--- test/mysql-test/r/key.result 2008-03-11 16:31:13 +0000
1297+++ test/mysql-test/r/key.result 2009-04-03 19:39:12 +0000
1298@@ -153,7 +153,7 @@
1299 t1 0 a 1 a A 0 NULL NULL BTREE
1300 t1 0 e 1 e A 0 NULL NULL BTREE
1301 t1 0 b 1 b A 0 NULL NULL YES BTREE
1302-t1 1 c 1 c A NULL NULL NULL YES BTREE
1303+t1 1 c 1 c A 0 NULL NULL YES BTREE
1304 drop table t1;
1305 CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
1306 UNIQUE (c,i));
1307
1308=== modified file 'test/mysql-test/r/key_cache.result'
1309--- test/mysql-test/r/key_cache.result 2008-11-14 12:08:22 +0000
1310+++ test/mysql-test/r/key_cache.result 2009-04-03 19:39:12 +0000
1311@@ -122,7 +122,7 @@
1312 explain select count(*) from t1, t2 where t1.p = t2.i;
1313 id select_type table type possible_keys key key_len ref rows Extra
1314 1 SIMPLE t1 index PRIMARY PRIMARY 4 NULL 2 Using index
1315-1 SIMPLE t2 ref k1 k1 5 test.t1.p 2 Using where; Using index
1316+1 SIMPLE t2 ref k1 k1 5 test.t1.p 1 Using where; Using index
1317 select count(*) from t1, t2 where t1.p = t2.i;
1318 count(*)
1319 3
1320
1321=== modified file 'test/mysql-test/r/key_diff.result'
1322--- test/mysql-test/r/key_diff.result 2008-03-10 11:36:34 +0000
1323+++ test/mysql-test/r/key_diff.result 2009-04-03 19:39:12 +0000
1324@@ -36,7 +36,7 @@
1325 explain select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B;
1326 id select_type table type possible_keys key key_len ref rows Extra
1327 1 SIMPLE t1 ALL a NULL NULL NULL 5
1328-1 SIMPLE t2 ALL b NULL NULL NULL 5 Using where; Using join buffer
1329+1 SIMPLE t2 ref b b 4 test.t1.a 1 Using where
1330 select t1.*,t2.* from t1,t1 as t2 where t1.A=t2.B order by binary t1.a,t2.a;
1331 a b a b
1332 A B a a
1333
1334=== modified file 'test/mysql-test/r/myisam.result'
1335--- test/mysql-test/r/myisam.result 2009-03-27 20:05:34 +0000
1336+++ test/mysql-test/r/myisam.result 2009-04-03 19:39:12 +0000
1337@@ -42,16 +42,16 @@
1338 test.t1 optimize status OK
1339 show index from t1;
1340 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1341-t1 0 PRIMARY 1 a NULL 5 NULL NULL BTREE
1342-t1 1 b 1 b NULL NULL NULL NULL BTREE
1343+t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
1344+t1 1 b 1 b A 5 NULL NULL BTREE
1345 optimize table t1;
1346 Table Op Msg_type Msg_text
1347 test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
1348 test.t1 optimize status OK
1349 show index from t1;
1350 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1351-t1 0 PRIMARY 1 a NULL 5 NULL NULL BTREE
1352-t1 1 b 1 b NULL NULL NULL NULL BTREE
1353+t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
1354+t1 1 b 1 b A 5 NULL NULL BTREE
1355 drop table t1;
1356 create table t1 (a int not null, b int not null, c int not null, primary key (a),key(b)) engine=pbxt;
1357 insert into t1 values (3,3,3),(1,1,1),(2,2,2),(4,4,4);
1358@@ -344,12 +344,12 @@
1359 test.t1 optimize status OK
1360 show index from t1;
1361 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1362-t1 1 b 1 b NULL NULL NULL NULL YES BTREE
1363-t1 1 c 1 c NULL NULL NULL NULL YES BTREE
1364-t1 1 a 1 a NULL NULL NULL NULL BTREE
1365-t1 1 a 2 b NULL NULL NULL NULL YES BTREE
1366-t1 1 c_2 1 c NULL NULL NULL NULL YES BTREE
1367-t1 1 c_2 2 a NULL NULL NULL NULL BTREE
1368+t1 1 b 1 b A 5 NULL NULL YES BTREE
1369+t1 1 c 1 c A 5 NULL NULL YES BTREE
1370+t1 1 a 1 a A 5 NULL NULL BTREE
1371+t1 1 a 2 b A 5 NULL NULL YES BTREE
1372+t1 1 c_2 1 c A 5 NULL NULL YES BTREE
1373+t1 1 c_2 2 a A 5 NULL NULL BTREE
1374 explain select * from t1,t2 where t1.a=t2.a;
1375 id select_type table type possible_keys key key_len ref rows Extra
1376 1 SIMPLE t2 ALL a NULL NULL NULL 2
1377@@ -365,7 +365,7 @@
1378 explain select * from t1,t2 where t1.b=t2.b;
1379 id select_type table type possible_keys key key_len ref rows Extra
1380 1 SIMPLE t2 ALL b NULL NULL NULL 2
1381-1 SIMPLE t1 ALL b NULL NULL NULL 5 Using where; Using join buffer
1382+1 SIMPLE t1 ref b b 5 test.t2.b 1 Using where
1383 explain select * from t1,t2 force index(c) where t1.a=t2.a;
1384 id select_type table type possible_keys key key_len ref rows Extra
1385 1 SIMPLE t2 ALL NULL NULL NULL NULL 2
1386@@ -584,25 +584,25 @@
1387 create table t1 (a int, key (a));
1388 show keys from t1;
1389 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1390-t1 1 a 1 a A NULL NULL NULL YES BTREE
1391+t1 1 a 1 a A 0 NULL NULL YES BTREE
1392 alter table t1 disable keys;
1393 Warnings:
1394 Note 1031 Table storage engine for 't1' doesn't have this option
1395 show keys from t1;
1396 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1397-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
1398+t1 1 a 1 a A 0 NULL NULL YES BTREE
1399 create table t2 (a int);
1400 set @@rand_seed1=31415926,@@rand_seed2=2718281828;
1401 insert t1 select * from t2;
1402 show keys from t1;
1403 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1404-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
1405+t1 1 a 1 a A 1000 NULL NULL YES BTREE
1406 alter table t1 enable keys;
1407 Warnings:
1408 Note 1031 Table storage engine for 't1' doesn't have this option
1409 show keys from t1;
1410 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1411-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
1412+t1 1 a 1 a A 1000 NULL NULL YES BTREE
1413 alter table t1 engine=heap;
1414 alter table t1 disable keys;
1415 Warnings:
1416@@ -670,7 +670,7 @@
1417 test.t1 analyze status OK
1418 show index from t1;
1419 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1420-t1 1 a 1 a A NULL NULL NULL YES BTREE
1421+t1 1 a 1 a A 10 NULL NULL YES BTREE
1422 insert into t1 values (11);
1423 delete from t1 where a=11;
1424 check table t1;
1425@@ -678,7 +678,7 @@
1426 test.t1 check status OK
1427 show index from t1;
1428 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1429-t1 1 a 1 a A NULL NULL NULL YES BTREE
1430+t1 1 a 1 a A 11 NULL NULL YES BTREE
1431 set myisam_stats_method=nulls_equal;
1432 show variables like 'myisam_stats_method';
1433 Variable_name Value
1434@@ -690,7 +690,7 @@
1435 test.t1 analyze status OK
1436 show index from t1;
1437 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1438-t1 1 a 1 a A NULL NULL NULL YES BTREE
1439+t1 1 a 1 a A 10 NULL NULL YES BTREE
1440 insert into t1 values (11);
1441 delete from t1 where a=11;
1442 check table t1;
1443@@ -698,7 +698,7 @@
1444 test.t1 check status OK
1445 show index from t1;
1446 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1447-t1 1 a 1 a A NULL NULL NULL YES BTREE
1448+t1 1 a 1 a A 11 NULL NULL YES BTREE
1449 set myisam_stats_method=DEFAULT;
1450 show variables like 'myisam_stats_method';
1451 Variable_name Value
1452@@ -710,7 +710,7 @@
1453 test.t1 analyze status OK
1454 show index from t1;
1455 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1456-t1 1 a 1 a A NULL NULL NULL YES BTREE
1457+t1 1 a 1 a A 10 NULL NULL YES BTREE
1458 insert into t1 values (11);
1459 delete from t1 where a=11;
1460 check table t1;
1461@@ -718,7 +718,7 @@
1462 test.t1 check status OK
1463 show index from t1;
1464 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1465-t1 1 a 1 a A NULL NULL NULL YES BTREE
1466+t1 1 a 1 a A 11 NULL NULL YES BTREE
1467 drop table t1;
1468 set myisam_stats_method=nulls_ignored;
1469 show variables like 'myisam_stats_method';
1470@@ -737,20 +737,20 @@
1471 test.t1 analyze status OK
1472 show index from t1;
1473 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1474-t1 1 a 1 a A NULL NULL NULL YES BTREE
1475-t1 1 a 2 b A NULL NULL NULL YES BTREE
1476-t1 1 a 3 c A NULL NULL NULL YES BTREE
1477-t1 1 a 4 d A NULL NULL NULL YES BTREE
1478+t1 1 a 1 a A 4 NULL NULL YES BTREE
1479+t1 1 a 2 b A 4 NULL NULL YES BTREE
1480+t1 1 a 3 c A 4 NULL NULL YES BTREE
1481+t1 1 a 4 d A 4 NULL NULL YES BTREE
1482 delete from t1;
1483 analyze table t1;
1484 Table Op Msg_type Msg_text
1485 test.t1 analyze status OK
1486 show index from t1;
1487 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1488-t1 1 a 1 a A NULL NULL NULL YES BTREE
1489-t1 1 a 2 b A NULL NULL NULL YES BTREE
1490-t1 1 a 3 c A NULL NULL NULL YES BTREE
1491-t1 1 a 4 d A NULL NULL NULL YES BTREE
1492+t1 1 a 1 a A 0 NULL NULL YES BTREE
1493+t1 1 a 2 b A 0 NULL NULL YES BTREE
1494+t1 1 a 3 c A 0 NULL NULL YES BTREE
1495+t1 1 a 4 d A 0 NULL NULL YES BTREE
1496 set myisam_stats_method=DEFAULT;
1497 drop table t1;
1498 create table t1(
1499@@ -1788,7 +1788,7 @@
1500 test.t1 analyze status OK
1501 show keys from t1;
1502 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1503-t1 1 a 1 a A NULL NULL NULL YES BTREE
1504+t1 1 a 1 a A 8 NULL NULL YES BTREE
1505 alter table t1 disable keys;
1506 Warnings:
1507 Note 1031 Table storage engine for 't1' doesn't have this option
1508@@ -1797,7 +1797,7 @@
1509 Note 1031 Table storage engine for 't1' doesn't have this option
1510 show keys from t1;
1511 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1512-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
1513+t1 1 a 1 a A 8 NULL NULL YES BTREE
1514 drop table t1;
1515 create table t1 (c1 int) engine=myisam pack_keys=0;
1516 create table t2 (c1 int) engine=myisam pack_keys=1;
1517
1518=== modified file 'test/mysql-test/r/mysqldump.result'
1519--- test/mysql-test/r/mysqldump.result 2008-12-04 13:27:22 +0000
1520+++ test/mysql-test/r/mysqldump.result 2009-04-03 19:39:12 +0000
1521@@ -10,7 +10,7 @@
1522 <database name="test">
1523 <table_structure name="t1">
1524 <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" />
1525- <key Table="t1" Non_unique="1" Key_name="a" Seq_in_index="1" Column_name="a" Collation="A" Null="YES" Index_type="BTREE" Comment="" />
1526+ <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="" />
1527 </table_structure>
1528 <table_data name="t1">
1529 <row>
1530
1531=== modified file 'test/mysql-test/r/ndb_alter_table3.result'
1532--- test/mysql-test/r/ndb_alter_table3.result 2008-05-21 12:07:14 +0000
1533+++ test/mysql-test/r/ndb_alter_table3.result 2009-04-03 19:39:12 +0000
1534@@ -5,8 +5,8 @@
1535 show indexes from t1;
1536 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1537 t1 0 PRIMARY 1 a A 3 NULL NULL BTREE
1538-t1 1 b 1 b A NULL NULL NULL YES BTREE
1539-t1 1 c 1 c A NULL NULL NULL YES BTREE
1540+t1 1 b 1 b A 3 NULL NULL YES BTREE
1541+t1 1 c 1 c A 3 NULL NULL YES BTREE
1542 select * from t1 where c = 'two';
1543 a b c
1544 2 two two
1545@@ -14,7 +14,7 @@
1546 show indexes from t1;
1547 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1548 t1 0 PRIMARY 1 a A 3 NULL NULL BTREE
1549-t1 1 b 1 b A NULL NULL NULL YES BTREE
1550+t1 1 b 1 b A 3 NULL NULL YES BTREE
1551 select * from t1 where c = 'two';
1552 a b c
1553 2 two two
1554
1555=== modified file 'test/mysql-test/r/ndb_basic.result'
1556--- test/mysql-test/r/ndb_basic.result 2008-12-11 01:07:22 +0000
1557+++ test/mysql-test/r/ndb_basic.result 2009-04-03 19:39:12 +0000
1558@@ -12,7 +12,7 @@
1559 INSERT INTO t1 VALUES (9410,9412, NULL, '9412'), (9411,9413, 17, '9413');
1560 SHOW INDEX FROM t1;
1561 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1562-t1 0 PRIMARY 1 pk1 NULL 2 NULL NULL BTREE
1563+t1 0 PRIMARY 1 pk1 A 2 NULL NULL BTREE
1564 SELECT pk1 FROM t1 ORDER BY pk1;
1565 pk1
1566 9410
1567
1568=== modified file 'test/mysql-test/r/null_key.result'
1569--- test/mysql-test/r/null_key.result 2007-03-13 19:06:47 +0000
1570+++ test/mysql-test/r/null_key.result 2009-04-03 19:39:12 +0000
1571@@ -407,8 +407,8 @@
1572 LEFT JOIN t3 ON t2.b=t3.b;
1573 id select_type table type possible_keys key key_len ref rows Extra
1574 1 SIMPLE t1 ALL NULL NULL NULL NULL 4
1575-1 SIMPLE t2 ref idx idx 5 test.t1.a 2
1576-1 SIMPLE t3 ref idx idx 5 test.t2.b 186 Using index
1577+1 SIMPLE t2 ref idx idx 5 test.t1.a 1
1578+1 SIMPLE t3 ref idx idx 5 test.t2.b 1 Using index
1579 FLUSH STATUS ;
1580 SELECT SQL_CALC_FOUND_ROWS * FROM t1 LEFT JOIN t2 ON t1.a=t2.a
1581 LEFT JOIN t3 ON t2.b=t3.b;
1582
1583=== modified file 'test/mysql-test/r/partition_pruning.result'
1584--- test/mysql-test/r/partition_pruning.result 2009-03-27 20:05:34 +0000
1585+++ test/mysql-test/r/partition_pruning.result 2009-04-03 19:39:12 +0000
1586@@ -338,12 +338,12 @@
1587 where X.b = Y.b and (X.a=1 or X.a=2) and (Y.a=2 or Y.a=3);
1588 id select_type table partitions type possible_keys key key_len ref rows Extra
1589 1 SIMPLE X p1,p2 ALL a,b NULL NULL NULL 2 Using where
1590-1 SIMPLE Y p2,p3 ref a,b b 4 test.X.b 2 Using where
1591+1 SIMPLE Y p2,p3 ref a,b b 4 test.X.b 1 Using where
1592 explain partitions
1593 select * from t1 X, t1 Y where X.a = Y.a and (X.a=1 or X.a=2);
1594 id select_type table partitions type possible_keys key key_len ref rows Extra
1595 1 SIMPLE X p1,p2 ALL a NULL NULL NULL 4 Using where
1596-1 SIMPLE Y p1,p2 ref a a 4 test.X.a 2
1597+1 SIMPLE Y p1,p2 ref a a 4 test.X.a 1
1598 drop table t1;
1599 create table t1 (a int) partition by hash(a) partitions 20;
1600 insert into t1 values (1),(2),(3);
1601
1602=== modified file 'test/mysql-test/r/ps_1general.result'
1603--- test/mysql-test/r/ps_1general.result 2008-09-17 07:41:28 +0000
1604+++ test/mysql-test/r/ps_1general.result 2009-04-03 19:39:12 +0000
1605@@ -288,7 +288,7 @@
1606 execute stmt4;
1607 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1608 t2 0 PRIMARY 1 a A 0 NULL NULL BTREE
1609-t2 1 t2_idx 1 b A NULL NULL NULL YES BTREE
1610+t2 1 t2_idx 1 b A 0 NULL NULL YES BTREE
1611 prepare stmt4 from ' show table status from test like ''t2%'' ';
1612 execute stmt4;
1613 Name 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
1614
1615=== modified file 'test/mysql-test/r/range.result'
1616--- test/mysql-test/r/range.result 2009-03-27 20:05:34 +0000
1617+++ test/mysql-test/r/range.result 2009-04-03 19:39:12 +0000
1618@@ -423,19 +423,19 @@
1619 explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
1620 id select_type table type possible_keys key key_len ref rows Extra
1621 1 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where
1622-1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12
1623+1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
1624 explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid > 0;
1625 id select_type table type possible_keys key key_len ref rows Extra
1626 1 SIMPLE t1 range uid_index uid_index 4 NULL 1 Using where
1627-1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12
1628+1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
1629 explain select * from t1, t2 where t1.uid=t2.uid AND t1.uid != 0;
1630 id select_type table type possible_keys key key_len ref rows Extra
1631 1 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where
1632-1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12
1633+1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
1634 explain select * from t1, t2 where t1.uid=t2.uid AND t2.uid != 0;
1635 id select_type table type possible_keys key key_len ref rows Extra
1636 1 SIMPLE t1 range uid_index uid_index 4 NULL 2 Using where
1637-1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 12
1638+1 SIMPLE t2 ref uid_index uid_index 4 test.t1.uid 1
1639 select * from t1, t2 where t1.uid=t2.uid AND t1.uid > 0;
1640 id name uid id name uid
1641 1001 A 1 1001 A 1
1642
1643=== modified file 'test/mysql-test/r/repair.result'
1644--- test/mysql-test/r/repair.result 2008-11-20 09:17:23 +0000
1645+++ test/mysql-test/r/repair.result 2009-04-03 19:39:12 +0000
1646@@ -48,7 +48,7 @@
1647 test.t1 repair status OK
1648 SHOW INDEX FROM t1;
1649 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1650-t1 1 a 1 a NULL NULL NULL NULL YES BTREE
1651+t1 1 a 1 a A 5 NULL NULL YES BTREE
1652 SET myisam_repair_threads=@@global.myisam_repair_threads;
1653 DROP TABLE t1;
1654 CREATE TABLE t1(a INT) engine = myisam;
1655
1656=== modified file 'test/mysql-test/r/select.result'
1657--- test/mysql-test/r/select.result 2009-03-27 20:05:34 +0000
1658+++ test/mysql-test/r/select.result 2009-04-03 19:39:12 +0000
1659@@ -604,15 +604,15 @@
1660 explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
1661 id select_type table type possible_keys key key_len ref rows Extra
1662 1 SIMPLE t1 ALL period NULL NULL NULL 41810 Using temporary; Using filesort
1663-1 SIMPLE t3 ref period period 4 test.t1.period 18
1664+1 SIMPLE t3 ref period period 4 test.t1.period 1
1665 explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
1666 id select_type table type possible_keys key key_len ref rows Extra
1667-1 SIMPLE t3 index period period 4 NULL 1
1668-1 SIMPLE t1 ref period period 4 test.t3.period 18
1669+1 SIMPLE t3 index period period 4 NULL 10
1670+1 SIMPLE t1 ref period period 4 test.t3.period 1
1671 explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
1672 id select_type table type possible_keys key key_len ref rows Extra
1673-1 SIMPLE t1 index period period 4 NULL 1
1674-1 SIMPLE t3 ref period period 4 test.t1.period 18
1675+1 SIMPLE t1 index period period 4 NULL 10
1676+1 SIMPLE t3 ref period period 4 test.t1.period 1
1677 select period from t1;
1678 period
1679 9410
1680@@ -2095,7 +2095,7 @@
1681 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1682 t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
1683 t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
1684-t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
1685+t2 1 fld3 1 fld3 A 1199 NULL NULL BTREE
1686 drop table t4, t3, t2, t1;
1687 DO 1;
1688 DO benchmark(100,1+1),1,1;
1689@@ -2369,7 +2369,7 @@
1690 explain select * from t1 left join t2 on a=c where d in (4);
1691 id select_type table type possible_keys key key_len ref rows Extra
1692 1 SIMPLE t2 ref c,d d 5 const 1 Using where
1693-1 SIMPLE t1 ref a a 5 test.t2.c 2 Using where
1694+1 SIMPLE t1 ref a a 5 test.t2.c 1 Using where
1695 select * from t1 left join t2 on a=c where d in (4);
1696 a b c d
1697 3 2 3 4
1698@@ -2377,7 +2377,7 @@
1699 explain select * from t1 left join t2 on a=c where d = 4;
1700 id select_type table type possible_keys key key_len ref rows Extra
1701 1 SIMPLE t2 ref c,d d 5 const 1 Using where
1702-1 SIMPLE t1 ref a a 5 test.t2.c 2 Using where
1703+1 SIMPLE t1 ref a a 5 test.t2.c 1 Using where
1704 select * from t1 left join t2 on a=c where d = 4;
1705 a b c d
1706 3 2 3 4
1707@@ -2403,11 +2403,11 @@
1708 EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
1709 id select_type table type possible_keys key key_len ref rows Extra
1710 1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1711-1 SIMPLE t2 ref a a 23 test.t1.a 2
1712+1 SIMPLE t2 ref a a 23 test.t1.a 1
1713 EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
1714 id select_type table type possible_keys key key_len ref rows Extra
1715 1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1716-1 SIMPLE t2 ref a a 23 test.t1.a 2
1717+1 SIMPLE t2 ref a a 23 test.t1.a 1
1718 DROP TABLE t1, t2;
1719 CREATE TABLE t1 ( city char(30) );
1720 INSERT INTO t1 VALUES ('London');
1721@@ -3454,7 +3454,7 @@
1722 and B.a=5 and B.b=A.e and (B.b =1 or B.b = 3 or B.b=5);
1723 id select_type table type possible_keys key key_len ref rows Extra
1724 1 SIMPLE A range PRIMARY PRIMARY 12 NULL 1 Using where
1725-1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 11
1726+1 SIMPLE B ref PRIMARY PRIMARY 8 const,test.A.e 1
1727 drop table t1, t2;
1728 CREATE TABLE t1 (a int PRIMARY KEY, b int, INDEX(b));
1729 INSERT INTO t1 VALUES (1, 3), (9,4), (7,5), (4,5), (6,2),
1730@@ -3468,12 +3468,12 @@
1731 SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6;
1732 id select_type table type possible_keys key key_len ref rows Extra
1733 1 SIMPLE t1 range PRIMARY,b b 5 NULL 1 Using where
1734-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
1735+1 SIMPLE t2 ref c c 5 test.t1.a 1 Using where
1736 EXPLAIN
1737 SELECT a, c, d, f FROM t1,t2 WHERE a=c AND b BETWEEN 4 AND 6 AND a > 0;
1738 id select_type table type possible_keys key key_len ref rows Extra
1739 1 SIMPLE t1 range PRIMARY,b PRIMARY 4 NULL 1 Using where
1740-1 SIMPLE t2 ref c c 5 test.t1.a 2 Using where
1741+1 SIMPLE t2 ref c c 5 test.t1.a 1 Using where
1742 DROP TABLE t1, t2;
1743 create table t1 (
1744 a int unsigned not null auto_increment primary key,
1745
1746=== modified file 'test/mysql-test/r/select_safe.result'
1747--- test/mysql-test/r/select_safe.result 2006-10-23 09:14:04 +0000
1748+++ test/mysql-test/r/select_safe.result 2009-04-03 19:39:12 +0000
1749@@ -70,12 +70,12 @@
1750 explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
1751 id select_type table type possible_keys key key_len ref rows Extra
1752 1 SIMPLE t1 ALL b NULL NULL NULL 21
1753-1 SIMPLE t2 ref b b 21 test.t1.b 2 Using where
1754+1 SIMPLE t2 ref b b 21 test.t1.b 1 Using where
1755 set MAX_SEEKS_FOR_KEY=1;
1756 explain select STRAIGHT_JOIN * from t1,t1 as t2 where t1.b=t2.b;
1757 id select_type table type possible_keys key key_len ref rows Extra
1758 1 SIMPLE t1 ALL b NULL NULL NULL 21
1759-1 SIMPLE t2 ref b b 21 test.t1.b 2 Using where
1760+1 SIMPLE t2 ref b b 21 test.t1.b 1 Using where
1761 SET MAX_SEEKS_FOR_KEY=DEFAULT;
1762 drop table t1;
1763 create table t1 (a int);
1764
1765=== modified file 'test/mysql-test/r/subselect.result'
1766--- test/mysql-test/r/subselect.result 2008-12-11 01:07:22 +0000
1767+++ test/mysql-test/r/subselect.result 2009-04-03 19:39:12 +0000
1768@@ -1333,7 +1333,7 @@
1769 explain extended select * from t2 where t2.a in (select a from t1);
1770 id select_type table type possible_keys key key_len ref rows filtered Extra
1771 1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
1772-2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
1773+2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1 100.00 Using index; Using where
1774 Warnings:
1775 Note 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`))))
1776 select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
1777@@ -1343,7 +1343,7 @@
1778 explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
1779 id select_type table type possible_keys key key_len ref rows filtered Extra
1780 1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
1781-2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
1782+2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1 100.00 Using index; Using where
1783 Warnings:
1784 Note 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`)))))
1785 select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
1786@@ -1353,8 +1353,8 @@
1787 explain extended select * from t2 where t2.a in (select t1.a from t1,t3 where t1.b=t3.a);
1788 id select_type table type possible_keys key key_len ref rows filtered Extra
1789 1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
1790-2 DEPENDENT SUBQUERY t1 ref a a 5 func 1001 100.00 Using where; Using index
1791-2 DEPENDENT SUBQUERY t3 index a a 5 NULL 3 100.00 Using where; Using index; Using join buffer
1792+2 DEPENDENT SUBQUERY t1 ref a a 5 func 1 100.00 Using where; Using index
1793+2 DEPENDENT SUBQUERY t3 ref a a 5 test.t1.b 1 100.00 Using where; Using index
1794 Warnings:
1795 Note 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`))))
1796 insert into t1 values (3,31);
1797@@ -1370,7 +1370,7 @@
1798 explain extended select * from t2 where t2.a in (select a from t1 where t1.b <> 30);
1799 id select_type table type possible_keys key key_len ref rows filtered Extra
1800 1 PRIMARY t2 index NULL a 5 NULL 4 100.00 Using where; Using index
1801-2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1001 100.00 Using index; Using where
1802+2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 1 100.00 Using index; Using where
1803 Warnings:
1804 Note 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`)))))
1805 drop table t1, t2, t3;
1806@@ -3546,7 +3546,7 @@
1807 id select_type table type possible_keys key key_len ref rows Extra
1808 1 PRIMARY t2 ALL NULL NULL NULL NULL 1
1809 1 PRIMARY t1 index NULL PRIMARY 16 NULL 11 Using where; Using index; Using join buffer
1810-2 DEPENDENT SUBQUERY t1 ref PRIMARY PRIMARY 8 test.t2.i1,const 2 Using where; Using index; Using filesort
1811+2 DEPENDENT SUBQUERY t1 ref PRIMARY PRIMARY 8 test.t2.i1,const 1 Using where; Using index; Using filesort
1812 SELECT * FROM t1,t2
1813 WHERE t1.t = (SELECT t1.t FROM t1
1814 WHERE t1.t < t2.t AND t1.i2=1 AND t2.i1=t1.i1
1815@@ -4214,7 +4214,7 @@
1816 EXPLAIN SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
1817 id select_type table type possible_keys key key_len ref rows Extra
1818 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
1819-2 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 2 Using index; Using where
1820+2 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 1 Using index; Using where
1821 SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1);
1822 a b
1823 CREATE TABLE t2 (a VARCHAR(1), b VARCHAR(10));
1824@@ -4224,14 +4224,14 @@
1825 EXPLAIN SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
1826 id select_type table type possible_keys key key_len ref rows Extra
1827 1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using where
1828-2 DEPENDENT SUBQUERY t2 index_subquery I1 I1 4 func 2 Using index; Using where
1829+2 DEPENDENT SUBQUERY t2 index_subquery I1 I1 4 func 1 Using index; Using where
1830 SELECT a,b FROM t2 WHERE b IN (SELECT a FROM t2);
1831 a b
1832 EXPLAIN
1833 SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
1834 id select_type table type possible_keys key key_len ref rows Extra
1835 1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
1836-2 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 2 Using index; Using where
1837+2 DEPENDENT SUBQUERY t1 index_subquery I1 I1 2 func 1 Using index; Using where
1838 SELECT a,b FROM t1 WHERE b IN (SELECT a FROM t1 WHERE LENGTH(a)<500);
1839 a b
1840 DROP TABLE t1,t2;
1841
1842=== modified file 'test/mysql-test/r/type_ranges.result'
1843--- test/mysql-test/r/type_ranges.result 2008-03-11 16:31:13 +0000
1844+++ test/mysql-test/r/type_ranges.result 2009-04-03 19:39:12 +0000
1845@@ -70,19 +70,19 @@
1846 show keys from t1;
1847 Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
1848 t1 0 PRIMARY 1 auto A 0 NULL NULL BTREE
1849-t1 1 utiny 1 utiny A NULL NULL NULL BTREE
1850-t1 1 tiny 1 tiny A NULL NULL NULL BTREE
1851-t1 1 short 1 short A NULL NULL NULL BTREE
1852-t1 1 any_name 1 medium A NULL NULL NULL BTREE
1853-t1 1 longlong 1 longlong A NULL NULL NULL BTREE
1854-t1 1 real_float 1 real_float A NULL NULL NULL BTREE
1855-t1 1 ushort 1 ushort A NULL NULL NULL BTREE
1856-t1 1 umedium 1 umedium A NULL NULL NULL BTREE
1857-t1 1 ulong 1 ulong A NULL NULL NULL BTREE
1858-t1 1 ulonglong 1 ulonglong A NULL NULL NULL BTREE
1859-t1 1 ulonglong 2 ulong A NULL NULL NULL BTREE
1860-t1 1 options 1 options A NULL NULL NULL BTREE
1861-t1 1 options 2 flags A NULL NULL NULL BTREE
1862+t1 1 utiny 1 utiny A 0 NULL NULL BTREE
1863+t1 1 tiny 1 tiny A 0 NULL NULL BTREE
1864+t1 1 short 1 short A 0 NULL NULL BTREE
1865+t1 1 any_name 1 medium A 0 NULL NULL BTREE
1866+t1 1 longlong 1 longlong A 0 NULL NULL BTREE
1867+t1 1 real_float 1 real_float A 0 NULL NULL BTREE
1868+t1 1 ushort 1 ushort A 0 NULL NULL BTREE
1869+t1 1 umedium 1 umedium A 0 NULL NULL BTREE
1870+t1 1 ulong 1 ulong A 0 NULL NULL BTREE
1871+t1 1 ulonglong 1 ulonglong A 0 NULL NULL BTREE
1872+t1 1 ulonglong 2 ulong A 0 NULL NULL BTREE
1873+t1 1 options 1 options A 0 NULL NULL BTREE
1874+t1 1 options 2 flags A 0 NULL NULL BTREE
1875 CREATE UNIQUE INDEX test on t1 ( auto ) ;
1876 CREATE INDEX test2 on t1 ( ulonglong,ulong) ;
1877 CREATE INDEX test3 on t1 ( medium ) ;
1878
1879=== modified file 'test/mysql-test/t/query_cache.test'
1880--- test/mysql-test/t/query_cache.test 2008-11-14 12:08:22 +0000
1881+++ test/mysql-test/t/query_cache.test 2009-04-03 19:39:12 +0000
1882@@ -1240,6 +1240,7 @@
1883 --disable_result_log
1884 --reap
1885 --enable_result_log
1886+--sleep 2
1887 --echo Next select should contain 4 rows, as the insert is long finished.
1888 select *, (select count(*) from t2) from t1;
1889 reset query cache;

Subscribers

People subscribed via source and target branches