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