Merge lp:~posulliv/drizzle/info-schema-plugin into lp:~drizzle-trunk/drizzle/development
- info-schema-plugin
- Merge into development
Proposed by
Padraig O'Sullivan
Status: | Merged |
---|---|
Approved by: | Jay Pipes |
Approved revision: | no longer in the revision history of the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~posulliv/drizzle/info-schema-plugin |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~posulliv/drizzle/info-schema-plugin |
Related bugs: | |
Related blueprints: |
Extract current I_S to plugins
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jay Pipes (community) | Approve | ||
Review via email: mp+8249@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Padraig O'Sullivan (posulliv) wrote : | # |
- 1090. By Brian Aker <brian@gaz>
-
Merge from Monty
- 1091. By Brian Aker <brian@gaz>
-
Collection of patches from new-cleanup (includes asserts for field in debug)
- 1092. By Brian Aker <brian@gaz>
-
Merge Monty
- 1093. By Brian Aker <brian@gaz>
-
Merge Brian
- 1094. By Brian Aker <brian@gaz>
-
Merge Stewart
- 1095. By Brian Aker <brian@gaz>
-
Merge Jay
- 1096. By Brian Aker <brian@gaz>
-
Merge Monty
- 1097. By Brian Aker <brian@gaz>
-
Merge Jay
- 1098. By Brian Aker <brian@gaz>
-
Merge Jay
Revision history for this message
Jay Pipes (jaypipes) wrote : | # |
Merged into my captain branch...all tests pass. Looks good.
review:
Approve
- 1099. By Brian Aker <brian@gaz>
-
Mege Jay
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'drizzled/info_schema.h' | |||
2 | --- drizzled/info_schema.h 2009-07-01 03:36:14 +0000 | |||
3 | +++ drizzled/info_schema.h 2009-07-05 17:44:13 +0000 | |||
4 | @@ -199,22 +199,6 @@ | |||
5 | 199 | InfoSchemaTable *schema_table) const; | 199 | InfoSchemaTable *schema_table) const; |
6 | 200 | }; | 200 | }; |
7 | 201 | 201 | ||
8 | 202 | class StatusISMethods : public InfoSchemaMethods | ||
9 | 203 | { | ||
10 | 204 | public: | ||
11 | 205 | virtual int fillTable(Session *session, | ||
12 | 206 | TableList *tables, | ||
13 | 207 | COND *cond); | ||
14 | 208 | }; | ||
15 | 209 | |||
16 | 210 | class VariablesISMethods : public InfoSchemaMethods | ||
17 | 211 | { | ||
18 | 212 | public: | ||
19 | 213 | virtual int fillTable(Session *session, | ||
20 | 214 | TableList *tables, | ||
21 | 215 | COND *cond); | ||
22 | 216 | }; | ||
23 | 217 | |||
24 | 218 | /** | 202 | /** |
25 | 219 | * @class InfoSchemaTable | 203 | * @class InfoSchemaTable |
26 | 220 | * @brief | 204 | * @brief |
27 | 221 | 205 | ||
28 | === modified file 'drizzled/show.cc' | |||
29 | --- drizzled/show.cc 2009-07-03 19:45:58 +0000 | |||
30 | +++ drizzled/show.cc 2009-07-05 17:44:13 +0000 | |||
31 | @@ -1005,6 +1005,11 @@ | |||
32 | 1005 | } | 1005 | } |
33 | 1006 | }; | 1006 | }; |
34 | 1007 | 1007 | ||
35 | 1008 | SHOW_VAR *getFrontOfStatusVars() | ||
36 | 1009 | { | ||
37 | 1010 | return all_status_vars.front(); | ||
38 | 1011 | } | ||
39 | 1012 | |||
40 | 1008 | /* | 1013 | /* |
41 | 1009 | Adds an array of SHOW_VAR entries to the output of SHOW STATUS | 1014 | Adds an array of SHOW_VAR entries to the output of SHOW STATUS |
42 | 1010 | 1015 | ||
43 | @@ -1143,172 +1148,6 @@ | |||
44 | 1143 | } | 1148 | } |
45 | 1144 | } | 1149 | } |
46 | 1145 | 1150 | ||
47 | 1146 | inline void make_upper(char *buf) | ||
48 | 1147 | { | ||
49 | 1148 | for (; *buf; buf++) | ||
50 | 1149 | *buf= my_toupper(system_charset_info, *buf); | ||
51 | 1150 | } | ||
52 | 1151 | |||
53 | 1152 | static bool show_status_array(Session *session, const char *wild, | ||
54 | 1153 | SHOW_VAR *variables, | ||
55 | 1154 | enum enum_var_type value_type, | ||
56 | 1155 | struct system_status_var *status_var, | ||
57 | 1156 | const char *prefix, Table *table, | ||
58 | 1157 | bool ucase_names) | ||
59 | 1158 | { | ||
60 | 1159 | MY_ALIGNED_BYTE_ARRAY(buff_data, SHOW_VAR_FUNC_BUFF_SIZE, int64_t); | ||
61 | 1160 | char * const buff= (char *) &buff_data; | ||
62 | 1161 | char *prefix_end; | ||
63 | 1162 | /* the variable name should not be longer than 64 characters */ | ||
64 | 1163 | char name_buffer[64]; | ||
65 | 1164 | int len; | ||
66 | 1165 | SHOW_VAR tmp, *var; | ||
67 | 1166 | |||
68 | 1167 | prefix_end= strncpy(name_buffer, prefix, sizeof(name_buffer)-1); | ||
69 | 1168 | prefix_end+= strlen(prefix); | ||
70 | 1169 | |||
71 | 1170 | if (*prefix) | ||
72 | 1171 | *prefix_end++= '_'; | ||
73 | 1172 | len=name_buffer + sizeof(name_buffer) - prefix_end; | ||
74 | 1173 | |||
75 | 1174 | for (; variables->name; variables++) | ||
76 | 1175 | { | ||
77 | 1176 | strncpy(prefix_end, variables->name, len); | ||
78 | 1177 | name_buffer[sizeof(name_buffer)-1]=0; /* Safety */ | ||
79 | 1178 | if (ucase_names) | ||
80 | 1179 | make_upper(name_buffer); | ||
81 | 1180 | |||
82 | 1181 | /* | ||
83 | 1182 | if var->type is SHOW_FUNC, call the function. | ||
84 | 1183 | Repeat as necessary, if new var is again SHOW_FUNC | ||
85 | 1184 | */ | ||
86 | 1185 | for (var=variables; var->type == SHOW_FUNC; var= &tmp) | ||
87 | 1186 | ((mysql_show_var_func)((st_show_var_func_container *)var->value)->func)(&tmp, buff); | ||
88 | 1187 | |||
89 | 1188 | SHOW_TYPE show_type=var->type; | ||
90 | 1189 | if (show_type == SHOW_ARRAY) | ||
91 | 1190 | { | ||
92 | 1191 | show_status_array(session, wild, (SHOW_VAR *) var->value, value_type, | ||
93 | 1192 | status_var, name_buffer, table, ucase_names); | ||
94 | 1193 | } | ||
95 | 1194 | else | ||
96 | 1195 | { | ||
97 | 1196 | if (!(wild && wild[0] && wild_case_compare(system_charset_info, | ||
98 | 1197 | name_buffer, wild))) | ||
99 | 1198 | { | ||
100 | 1199 | char *value=var->value; | ||
101 | 1200 | const char *pos, *end; // We assign a lot of const's | ||
102 | 1201 | pthread_mutex_lock(&LOCK_global_system_variables); | ||
103 | 1202 | |||
104 | 1203 | if (show_type == SHOW_SYS) | ||
105 | 1204 | { | ||
106 | 1205 | show_type= ((sys_var*) value)->show_type(); | ||
107 | 1206 | value= (char*) ((sys_var*) value)->value_ptr(session, value_type, | ||
108 | 1207 | &null_lex_str); | ||
109 | 1208 | } | ||
110 | 1209 | |||
111 | 1210 | pos= end= buff; | ||
112 | 1211 | /* | ||
113 | 1212 | note that value may be == buff. All SHOW_xxx code below | ||
114 | 1213 | should still work in this case | ||
115 | 1214 | */ | ||
116 | 1215 | switch (show_type) { | ||
117 | 1216 | case SHOW_DOUBLE_STATUS: | ||
118 | 1217 | value= ((char *) status_var + (ulong) value); | ||
119 | 1218 | /* fall through */ | ||
120 | 1219 | case SHOW_DOUBLE: | ||
121 | 1220 | /* 6 is the default precision for '%f' in sprintf() */ | ||
122 | 1221 | end= buff + my_fcvt(*(double *) value, 6, buff, NULL); | ||
123 | 1222 | break; | ||
124 | 1223 | case SHOW_LONG_STATUS: | ||
125 | 1224 | value= ((char *) status_var + (ulong) value); | ||
126 | 1225 | /* fall through */ | ||
127 | 1226 | case SHOW_LONG: | ||
128 | 1227 | end= int10_to_str(*(long*) value, buff, 10); | ||
129 | 1228 | break; | ||
130 | 1229 | case SHOW_LONGLONG_STATUS: | ||
131 | 1230 | value= ((char *) status_var + (uint64_t) value); | ||
132 | 1231 | /* fall through */ | ||
133 | 1232 | case SHOW_LONGLONG: | ||
134 | 1233 | end= int64_t10_to_str(*(int64_t*) value, buff, 10); | ||
135 | 1234 | break; | ||
136 | 1235 | case SHOW_SIZE: | ||
137 | 1236 | { | ||
138 | 1237 | stringstream ss (stringstream::in); | ||
139 | 1238 | ss << *(size_t*) value; | ||
140 | 1239 | |||
141 | 1240 | string str= ss.str(); | ||
142 | 1241 | strncpy(buff, str.c_str(), str.length()); | ||
143 | 1242 | end= buff+ str.length(); | ||
144 | 1243 | } | ||
145 | 1244 | break; | ||
146 | 1245 | case SHOW_HA_ROWS: | ||
147 | 1246 | end= int64_t10_to_str((int64_t) *(ha_rows*) value, buff, 10); | ||
148 | 1247 | break; | ||
149 | 1248 | case SHOW_BOOL: | ||
150 | 1249 | end+= sprintf(buff,"%s", *(bool*) value ? "ON" : "OFF"); | ||
151 | 1250 | break; | ||
152 | 1251 | case SHOW_MY_BOOL: | ||
153 | 1252 | end+= sprintf(buff,"%s", *(bool*) value ? "ON" : "OFF"); | ||
154 | 1253 | break; | ||
155 | 1254 | case SHOW_INT: | ||
156 | 1255 | case SHOW_INT_NOFLUSH: // the difference lies in refresh_status() | ||
157 | 1256 | end= int10_to_str((long) *(uint32_t*) value, buff, 10); | ||
158 | 1257 | break; | ||
159 | 1258 | case SHOW_HAVE: | ||
160 | 1259 | { | ||
161 | 1260 | SHOW_COMP_OPTION tmp_option= *(SHOW_COMP_OPTION *)value; | ||
162 | 1261 | pos= show_comp_option_name[(int) tmp_option]; | ||
163 | 1262 | end= strchr(pos, '\0'); | ||
164 | 1263 | break; | ||
165 | 1264 | } | ||
166 | 1265 | case SHOW_CHAR: | ||
167 | 1266 | { | ||
168 | 1267 | if (!(pos= value)) | ||
169 | 1268 | pos= ""; | ||
170 | 1269 | end= strchr(pos, '\0'); | ||
171 | 1270 | break; | ||
172 | 1271 | } | ||
173 | 1272 | case SHOW_CHAR_PTR: | ||
174 | 1273 | { | ||
175 | 1274 | if (!(pos= *(char**) value)) | ||
176 | 1275 | pos= ""; | ||
177 | 1276 | end= strchr(pos, '\0'); | ||
178 | 1277 | break; | ||
179 | 1278 | } | ||
180 | 1279 | case SHOW_KEY_CACHE_LONG: | ||
181 | 1280 | value= (char*) dflt_key_cache + (ulong)value; | ||
182 | 1281 | end= int10_to_str(*(long*) value, buff, 10); | ||
183 | 1282 | break; | ||
184 | 1283 | case SHOW_KEY_CACHE_LONGLONG: | ||
185 | 1284 | value= (char*) dflt_key_cache + (ulong)value; | ||
186 | 1285 | end= int64_t10_to_str(*(int64_t*) value, buff, 10); | ||
187 | 1286 | break; | ||
188 | 1287 | case SHOW_UNDEF: | ||
189 | 1288 | break; // Return empty string | ||
190 | 1289 | case SHOW_SYS: // Cannot happen | ||
191 | 1290 | default: | ||
192 | 1291 | assert(0); | ||
193 | 1292 | break; | ||
194 | 1293 | } | ||
195 | 1294 | table->restoreRecordAsDefault(); | ||
196 | 1295 | table->field[0]->store(name_buffer, strlen(name_buffer), | ||
197 | 1296 | system_charset_info); | ||
198 | 1297 | table->field[1]->store(pos, (uint32_t) (end - pos), system_charset_info); | ||
199 | 1298 | table->field[1]->set_notnull(); | ||
200 | 1299 | |||
201 | 1300 | pthread_mutex_unlock(&LOCK_global_system_variables); | ||
202 | 1301 | |||
203 | 1302 | if (schema_table_store_record(session, table)) | ||
204 | 1303 | return true; | ||
205 | 1304 | } | ||
206 | 1305 | } | ||
207 | 1306 | } | ||
208 | 1307 | |||
209 | 1308 | return false; | ||
210 | 1309 | } | ||
211 | 1310 | |||
212 | 1311 | |||
213 | 1312 | /* collect status for all running threads */ | 1151 | /* collect status for all running threads */ |
214 | 1313 | 1152 | ||
215 | 1314 | void calc_sum_of_all_status(STATUS_VAR *to) | 1153 | void calc_sum_of_all_status(STATUS_VAR *to) |
216 | @@ -1329,10 +1168,6 @@ | |||
217 | 1329 | return; | 1168 | return; |
218 | 1330 | } | 1169 | } |
219 | 1331 | 1170 | ||
220 | 1332 | |||
221 | 1333 | /* This is only used internally, but we need it here as a forward reference */ | ||
222 | 1334 | extern InfoSchemaTable schema_tables[]; | ||
223 | 1335 | |||
224 | 1336 | /* | 1171 | /* |
225 | 1337 | Store record to I_S table, convert HEAP table | 1172 | Store record to I_S table, convert HEAP table |
226 | 1338 | to MyISAM if necessary | 1173 | to MyISAM if necessary |
227 | @@ -1773,39 +1608,14 @@ | |||
228 | 1773 | 1608 | ||
229 | 1774 | int schema_tables_add(Session *session, vector<LEX_STRING*> &files, const char *wild) | 1609 | int schema_tables_add(Session *session, vector<LEX_STRING*> &files, const char *wild) |
230 | 1775 | { | 1610 | { |
231 | 1776 | InfoSchemaTable *tmp_schema_table= schema_tables; | ||
232 | 1777 | |||
233 | 1778 | for (; tmp_schema_table->getTableName().length() != 0; tmp_schema_table++) | ||
234 | 1779 | { | ||
235 | 1780 | if (tmp_schema_table->isHidden()) | ||
236 | 1781 | { | ||
237 | 1782 | continue; | ||
238 | 1783 | } | ||
239 | 1784 | |||
240 | 1785 | const string &schema_table_name= tmp_schema_table->getTableName(); | ||
241 | 1786 | |||
242 | 1787 | if (wild && wild_case_compare(files_charset_info, schema_table_name.c_str(), wild)) | ||
243 | 1788 | { | ||
244 | 1789 | continue; | ||
245 | 1790 | } | ||
246 | 1791 | |||
247 | 1792 | LEX_STRING *file_name= 0; | ||
248 | 1793 | file_name= session->make_lex_string(file_name, schema_table_name.c_str(), | ||
249 | 1794 | schema_table_name.length(), true); | ||
250 | 1795 | if (file_name == NULL) | ||
251 | 1796 | { | ||
252 | 1797 | return 1; | ||
253 | 1798 | } | ||
254 | 1799 | |||
255 | 1800 | files.push_back(file_name); | ||
256 | 1801 | } | ||
257 | 1802 | |||
258 | 1803 | vector<InfoSchemaTable *>::iterator iter= find_if(all_schema_tables.begin(), | 1611 | vector<InfoSchemaTable *>::iterator iter= find_if(all_schema_tables.begin(), |
259 | 1804 | all_schema_tables.end(), | 1612 | all_schema_tables.end(), |
260 | 1805 | AddSchemaTable(session, files, wild)); | 1613 | AddSchemaTable(session, files, wild)); |
261 | 1806 | 1614 | ||
262 | 1807 | if (iter != all_schema_tables.end()) | 1615 | if (iter != all_schema_tables.end()) |
263 | 1616 | { | ||
264 | 1808 | return 1; | 1617 | return 1; |
265 | 1618 | } | ||
266 | 1809 | 1619 | ||
267 | 1810 | return 0; | 1620 | return 0; |
268 | 1811 | } | 1621 | } |
269 | @@ -2576,71 +2386,6 @@ | |||
270 | 2576 | } | 2386 | } |
271 | 2577 | 2387 | ||
272 | 2578 | 2388 | ||
273 | 2579 | int VariablesISMethods::fillTable(Session *session, TableList *tables, COND *) | ||
274 | 2580 | { | ||
275 | 2581 | int res= 0; | ||
276 | 2582 | LEX *lex= session->lex; | ||
277 | 2583 | const char *wild= lex->wild ? lex->wild->ptr() : NULL; | ||
278 | 2584 | const string schema_table_name= tables->schema_table->getTableName(); | ||
279 | 2585 | enum enum_var_type option_type= OPT_SESSION; | ||
280 | 2586 | bool upper_case_names= (schema_table_name.compare("VARIABLES") != 0); | ||
281 | 2587 | bool sorted_vars= (schema_table_name.compare("VARIABLES") == 0); | ||
282 | 2588 | |||
283 | 2589 | if (lex->option_type == OPT_GLOBAL || | ||
284 | 2590 | schema_table_name.compare("GLOBAL_VARIABLES") == 0) | ||
285 | 2591 | { | ||
286 | 2592 | option_type= OPT_GLOBAL; | ||
287 | 2593 | } | ||
288 | 2594 | |||
289 | 2595 | pthread_rwlock_rdlock(&LOCK_system_variables_hash); | ||
290 | 2596 | res= show_status_array(session, wild, enumerate_sys_vars(session, sorted_vars), | ||
291 | 2597 | option_type, NULL, "", tables->table, upper_case_names); | ||
292 | 2598 | pthread_rwlock_unlock(&LOCK_system_variables_hash); | ||
293 | 2599 | return(res); | ||
294 | 2600 | } | ||
295 | 2601 | |||
296 | 2602 | |||
297 | 2603 | int StatusISMethods::fillTable(Session *session, TableList *tables, COND *) | ||
298 | 2604 | { | ||
299 | 2605 | LEX *lex= session->lex; | ||
300 | 2606 | const char *wild= lex->wild ? lex->wild->ptr() : NULL; | ||
301 | 2607 | int res= 0; | ||
302 | 2608 | STATUS_VAR *tmp1, tmp; | ||
303 | 2609 | const string schema_table_name= tables->schema_table->getTableName(); | ||
304 | 2610 | enum enum_var_type option_type; | ||
305 | 2611 | bool upper_case_names= (schema_table_name.compare("STATUS") != 0); | ||
306 | 2612 | |||
307 | 2613 | if (schema_table_name.compare("STATUS") == 0) | ||
308 | 2614 | { | ||
309 | 2615 | option_type= lex->option_type; | ||
310 | 2616 | if (option_type == OPT_GLOBAL) | ||
311 | 2617 | tmp1= &tmp; | ||
312 | 2618 | else | ||
313 | 2619 | tmp1= session->initial_status_var; | ||
314 | 2620 | } | ||
315 | 2621 | else if (schema_table_name.compare("GLOBAL_STATUS") == 0) | ||
316 | 2622 | { | ||
317 | 2623 | option_type= OPT_GLOBAL; | ||
318 | 2624 | tmp1= &tmp; | ||
319 | 2625 | } | ||
320 | 2626 | else | ||
321 | 2627 | { | ||
322 | 2628 | option_type= OPT_SESSION; | ||
323 | 2629 | tmp1= &session->status_var; | ||
324 | 2630 | } | ||
325 | 2631 | |||
326 | 2632 | pthread_mutex_lock(&LOCK_status); | ||
327 | 2633 | if (option_type == OPT_GLOBAL) | ||
328 | 2634 | calc_sum_of_all_status(&tmp); | ||
329 | 2635 | res= show_status_array(session, wild, | ||
330 | 2636 | (SHOW_VAR *) all_status_vars.front(), | ||
331 | 2637 | option_type, tmp1, "", tables->table, | ||
332 | 2638 | upper_case_names); | ||
333 | 2639 | pthread_mutex_unlock(&LOCK_status); | ||
334 | 2640 | return(res); | ||
335 | 2641 | } | ||
336 | 2642 | |||
337 | 2643 | |||
338 | 2644 | class FindSchemaTableByName : public unary_function<InfoSchemaTable *, bool> | 2389 | class FindSchemaTableByName : public unary_function<InfoSchemaTable *, bool> |
339 | 2645 | { | 2390 | { |
340 | 2646 | const char *table_name; | 2391 | const char *table_name; |
341 | @@ -2670,21 +2415,14 @@ | |||
342 | 2670 | 2415 | ||
343 | 2671 | InfoSchemaTable *find_schema_table(const char* table_name) | 2416 | InfoSchemaTable *find_schema_table(const char* table_name) |
344 | 2672 | { | 2417 | { |
345 | 2673 | InfoSchemaTable *schema_table= schema_tables; | ||
346 | 2674 | |||
347 | 2675 | for (; schema_table->getTableName().length() != 0; schema_table++) | ||
348 | 2676 | { | ||
349 | 2677 | if (! my_strcasecmp(system_charset_info, | ||
350 | 2678 | schema_table->getTableName().c_str(), | ||
351 | 2679 | table_name)) | ||
352 | 2680 | return(schema_table); | ||
353 | 2681 | } | ||
354 | 2682 | |||
355 | 2683 | vector<InfoSchemaTable *>::iterator iter= | 2418 | vector<InfoSchemaTable *>::iterator iter= |
356 | 2684 | find_if(all_schema_tables.begin(), all_schema_tables.end(), | 2419 | find_if(all_schema_tables.begin(), all_schema_tables.end(), |
357 | 2685 | FindSchemaTableByName(table_name)); | 2420 | FindSchemaTableByName(table_name)); |
358 | 2686 | if (iter != all_schema_tables.end()) | 2421 | if (iter != all_schema_tables.end()) |
359 | 2422 | { | ||
360 | 2687 | return *iter; | 2423 | return *iter; |
361 | 2424 | } | ||
362 | 2425 | |||
363 | 2688 | return NULL; | 2426 | return NULL; |
364 | 2689 | } | 2427 | } |
365 | 2690 | 2428 | ||
366 | @@ -2997,51 +2735,3 @@ | |||
367 | 2997 | session->no_warnings_for_error= 0; | 2735 | session->no_warnings_for_error= 0; |
368 | 2998 | return(result); | 2736 | return(result); |
369 | 2999 | } | 2737 | } |
370 | 3000 | |||
371 | 3001 | ColumnInfo variables_fields_info[]= | ||
372 | 3002 | { | ||
373 | 3003 | ColumnInfo("VARIABLE_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, "Variable_name", | ||
374 | 3004 | SKIP_OPEN_TABLE), | ||
375 | 3005 | ColumnInfo("VARIABLE_VALUE", 16300, DRIZZLE_TYPE_VARCHAR, 0, 1, "Value", SKIP_OPEN_TABLE), | ||
376 | 3006 | ColumnInfo() | ||
377 | 3007 | }; | ||
378 | 3008 | |||
379 | 3009 | |||
380 | 3010 | static StatusISMethods status_methods; | ||
381 | 3011 | static VariablesISMethods variables_methods; | ||
382 | 3012 | |||
383 | 3013 | static InfoSchemaTable global_stat_table("GLOBAL_STATUS", | ||
384 | 3014 | variables_fields_info, | ||
385 | 3015 | -1, -1, false, false, 0, | ||
386 | 3016 | &status_methods); | ||
387 | 3017 | static InfoSchemaTable global_var_table("GLOBAL_VARIABLES", | ||
388 | 3018 | variables_fields_info, | ||
389 | 3019 | -1, -1, false, false, 0, | ||
390 | 3020 | &variables_methods); | ||
391 | 3021 | static InfoSchemaTable sess_stat_table("SESSION_STATUS", | ||
392 | 3022 | variables_fields_info, | ||
393 | 3023 | -1, -1, false, false, 0, | ||
394 | 3024 | &status_methods); | ||
395 | 3025 | static InfoSchemaTable sess_var_table("SESSION_VARIABLES", | ||
396 | 3026 | variables_fields_info, | ||
397 | 3027 | -1, -1, false, false, 0, | ||
398 | 3028 | &variables_methods); | ||
399 | 3029 | static InfoSchemaTable status_table("STATUS", | ||
400 | 3030 | variables_fields_info, | ||
401 | 3031 | -1, -1, true, false, 0, | ||
402 | 3032 | &status_methods); | ||
403 | 3033 | static InfoSchemaTable var_table("VARIABLES", | ||
404 | 3034 | variables_fields_info, | ||
405 | 3035 | -1, -1, true, false, 0, | ||
406 | 3036 | &variables_methods); | ||
407 | 3037 | |||
408 | 3038 | InfoSchemaTable schema_tables[]= | ||
409 | 3039 | { | ||
410 | 3040 | global_stat_table, | ||
411 | 3041 | global_var_table, | ||
412 | 3042 | sess_stat_table, | ||
413 | 3043 | sess_var_table, | ||
414 | 3044 | status_table, | ||
415 | 3045 | var_table, | ||
416 | 3046 | InfoSchemaTable() | ||
417 | 3047 | }; | ||
418 | 3048 | 2738 | ||
419 | === modified file 'drizzled/show.h' | |||
420 | --- drizzled/show.h 2009-07-02 06:54:37 +0000 | |||
421 | +++ drizzled/show.h 2009-07-05 17:44:13 +0000 | |||
422 | @@ -65,6 +65,7 @@ | |||
423 | 65 | LOOKUP_FIELD_VALUES *lookup_field_values); | 65 | LOOKUP_FIELD_VALUES *lookup_field_values); |
424 | 66 | int make_db_list(Session *session, std::vector<LEX_STRING*> &files, | 66 | int make_db_list(Session *session, std::vector<LEX_STRING*> &files, |
425 | 67 | LOOKUP_FIELD_VALUES *lookup_field_vals, bool *with_i_schema); | 67 | LOOKUP_FIELD_VALUES *lookup_field_vals, bool *with_i_schema); |
426 | 68 | SHOW_VAR *getFrontOfStatusVars(); | ||
427 | 68 | 69 | ||
428 | 69 | int store_create_info(TableList *table_list, String *packet, HA_CREATE_INFO *create_info_arg); | 70 | int store_create_info(TableList *table_list, String *packet, HA_CREATE_INFO *create_info_arg); |
429 | 70 | bool store_db_create_info(const char *dbname, String *buffer, HA_CREATE_INFO *create_info); | 71 | bool store_db_create_info(const char *dbname, String *buffer, HA_CREATE_INFO *create_info); |
430 | 71 | 72 | ||
431 | === modified file 'plugin/info_schema/info_schema.cc' | |||
432 | --- plugin/info_schema/info_schema.cc 2009-07-01 03:36:14 +0000 | |||
433 | +++ plugin/info_schema/info_schema.cc 2009-07-05 17:44:13 +0000 | |||
434 | @@ -48,6 +48,7 @@ | |||
435 | 48 | static vector<const ColumnInfo *> ref_constraint_columns; | 48 | static vector<const ColumnInfo *> ref_constraint_columns; |
436 | 49 | static vector<const ColumnInfo *> schemata_columns; | 49 | static vector<const ColumnInfo *> schemata_columns; |
437 | 50 | static vector<const ColumnInfo *> stats_columns; | 50 | static vector<const ColumnInfo *> stats_columns; |
438 | 51 | static vector<const ColumnInfo *> status_columns; | ||
439 | 51 | static vector<const ColumnInfo *> tab_constraints_columns; | 52 | static vector<const ColumnInfo *> tab_constraints_columns; |
440 | 52 | static vector<const ColumnInfo *> tables_columns; | 53 | static vector<const ColumnInfo *> tables_columns; |
441 | 53 | static vector<const ColumnInfo *> tab_names_columns; | 54 | static vector<const ColumnInfo *> tab_names_columns; |
442 | @@ -66,9 +67,11 @@ | |||
443 | 66 | static InfoSchemaMethods *ref_constraint_methods= NULL; | 67 | static InfoSchemaMethods *ref_constraint_methods= NULL; |
444 | 67 | static InfoSchemaMethods *schemata_methods= NULL; | 68 | static InfoSchemaMethods *schemata_methods= NULL; |
445 | 68 | static InfoSchemaMethods *stats_methods= NULL; | 69 | static InfoSchemaMethods *stats_methods= NULL; |
446 | 70 | static InfoSchemaMethods *status_methods= NULL; | ||
447 | 69 | static InfoSchemaMethods *tab_constraints_methods= NULL; | 71 | static InfoSchemaMethods *tab_constraints_methods= NULL; |
448 | 70 | static InfoSchemaMethods *tables_methods= NULL; | 72 | static InfoSchemaMethods *tables_methods= NULL; |
449 | 71 | static InfoSchemaMethods *tab_names_methods= NULL; | 73 | static InfoSchemaMethods *tab_names_methods= NULL; |
450 | 74 | static InfoSchemaMethods *variables_methods= NULL; | ||
451 | 72 | 75 | ||
452 | 73 | /* | 76 | /* |
453 | 74 | * I_S tables. | 77 | * I_S tables. |
454 | @@ -78,15 +81,21 @@ | |||
455 | 78 | static InfoSchemaTable *coll_char_set_table= NULL; | 81 | static InfoSchemaTable *coll_char_set_table= NULL; |
456 | 79 | static InfoSchemaTable *columns_table= NULL; | 82 | static InfoSchemaTable *columns_table= NULL; |
457 | 80 | static InfoSchemaTable *key_col_usage_table= NULL; | 83 | static InfoSchemaTable *key_col_usage_table= NULL; |
458 | 84 | static InfoSchemaTable *global_stat_table= NULL; | ||
459 | 85 | static InfoSchemaTable *global_var_table= NULL; | ||
460 | 81 | static InfoSchemaTable *open_tab_table= NULL; | 86 | static InfoSchemaTable *open_tab_table= NULL; |
461 | 82 | static InfoSchemaTable *plugins_table= NULL; | 87 | static InfoSchemaTable *plugins_table= NULL; |
462 | 83 | static InfoSchemaTable *processlist_table= NULL; | 88 | static InfoSchemaTable *processlist_table= NULL; |
463 | 84 | static InfoSchemaTable *ref_constraint_table= NULL; | 89 | static InfoSchemaTable *ref_constraint_table= NULL; |
464 | 85 | static InfoSchemaTable *schemata_table= NULL; | 90 | static InfoSchemaTable *schemata_table= NULL; |
465 | 91 | static InfoSchemaTable *sess_stat_table= NULL; | ||
466 | 92 | static InfoSchemaTable *sess_var_table= NULL; | ||
467 | 86 | static InfoSchemaTable *stats_table= NULL; | 93 | static InfoSchemaTable *stats_table= NULL; |
468 | 94 | static InfoSchemaTable *status_table= NULL; | ||
469 | 87 | static InfoSchemaTable *tab_constraints_table= NULL; | 95 | static InfoSchemaTable *tab_constraints_table= NULL; |
470 | 88 | static InfoSchemaTable *tables_table= NULL; | 96 | static InfoSchemaTable *tables_table= NULL; |
471 | 89 | static InfoSchemaTable *tab_names_table= NULL; | 97 | static InfoSchemaTable *tab_names_table= NULL; |
472 | 98 | static InfoSchemaTable *var_table= NULL; | ||
473 | 90 | 99 | ||
474 | 91 | /** | 100 | /** |
475 | 92 | * Populate the vectors of columns for each I_S table. | 101 | * Populate the vectors of columns for each I_S table. |
476 | @@ -152,6 +161,11 @@ | |||
477 | 152 | return true; | 161 | return true; |
478 | 153 | } | 162 | } |
479 | 154 | 163 | ||
480 | 164 | if ((retval= createStatusColumns(status_columns)) == true) | ||
481 | 165 | { | ||
482 | 166 | return true; | ||
483 | 167 | } | ||
484 | 168 | |||
485 | 155 | if ((retval= createTabConstraintsColumns(tab_constraints_columns)) == true) | 169 | if ((retval= createTabConstraintsColumns(tab_constraints_columns)) == true) |
486 | 156 | { | 170 | { |
487 | 157 | return true; | 171 | return true; |
488 | @@ -186,6 +200,7 @@ | |||
489 | 186 | clearColumns(ref_constraint_columns); | 200 | clearColumns(ref_constraint_columns); |
490 | 187 | clearColumns(schemata_columns); | 201 | clearColumns(schemata_columns); |
491 | 188 | clearColumns(stats_columns); | 202 | clearColumns(stats_columns); |
492 | 203 | clearColumns(status_columns); | ||
493 | 189 | clearColumns(tab_constraints_columns); | 204 | clearColumns(tab_constraints_columns); |
494 | 190 | clearColumns(tables_columns); | 205 | clearColumns(tables_columns); |
495 | 191 | clearColumns(tab_names_columns); | 206 | clearColumns(tab_names_columns); |
496 | @@ -253,6 +268,11 @@ | |||
497 | 253 | return true; | 268 | return true; |
498 | 254 | } | 269 | } |
499 | 255 | 270 | ||
500 | 271 | if ((status_methods= new(std::nothrow) StatusISMethods()) == NULL) | ||
501 | 272 | { | ||
502 | 273 | return true; | ||
503 | 274 | } | ||
504 | 275 | |||
505 | 256 | if ((tab_constraints_methods= new(std::nothrow) TabConstraintsISMethods()) == NULL) | 276 | if ((tab_constraints_methods= new(std::nothrow) TabConstraintsISMethods()) == NULL) |
506 | 257 | { | 277 | { |
507 | 258 | return true; | 278 | return true; |
508 | @@ -268,6 +288,11 @@ | |||
509 | 268 | return true; | 288 | return true; |
510 | 269 | } | 289 | } |
511 | 270 | 290 | ||
512 | 291 | if ((variables_methods= new(std::nothrow) VariablesISMethods()) == NULL) | ||
513 | 292 | { | ||
514 | 293 | return true; | ||
515 | 294 | } | ||
516 | 295 | |||
517 | 271 | return false; | 296 | return false; |
518 | 272 | } | 297 | } |
519 | 273 | 298 | ||
520 | @@ -287,9 +312,11 @@ | |||
521 | 287 | delete ref_constraint_methods; | 312 | delete ref_constraint_methods; |
522 | 288 | delete schemata_methods; | 313 | delete schemata_methods; |
523 | 289 | delete stats_methods; | 314 | delete stats_methods; |
524 | 315 | delete status_methods; | ||
525 | 290 | delete tab_constraints_methods; | 316 | delete tab_constraints_methods; |
526 | 291 | delete tables_methods; | 317 | delete tables_methods; |
527 | 292 | delete tab_names_methods; | 318 | delete tab_names_methods; |
528 | 319 | delete variables_methods; | ||
529 | 293 | } | 320 | } |
530 | 294 | 321 | ||
531 | 295 | /** | 322 | /** |
532 | @@ -347,6 +374,24 @@ | |||
533 | 347 | return true; | 374 | return true; |
534 | 348 | } | 375 | } |
535 | 349 | 376 | ||
536 | 377 | global_stat_table= new(std::nothrow) InfoSchemaTable("GLOBAL_STATUS", | ||
537 | 378 | status_columns, | ||
538 | 379 | -1, -1, false, false, | ||
539 | 380 | 0, status_methods); | ||
540 | 381 | if (global_stat_table == NULL) | ||
541 | 382 | { | ||
542 | 383 | return true; | ||
543 | 384 | } | ||
544 | 385 | |||
545 | 386 | global_var_table= new(std::nothrow) InfoSchemaTable("GLOBAL_VARIABLES", | ||
546 | 387 | status_columns, | ||
547 | 388 | -1, -1, false, false, | ||
548 | 389 | 0, variables_methods); | ||
549 | 390 | if (global_var_table == NULL) | ||
550 | 391 | { | ||
551 | 392 | return true; | ||
552 | 393 | } | ||
553 | 394 | |||
554 | 350 | open_tab_table= new(std::nothrow) InfoSchemaTable("OPEN_TABLES", | 395 | open_tab_table= new(std::nothrow) InfoSchemaTable("OPEN_TABLES", |
555 | 351 | open_tab_columns, | 396 | open_tab_columns, |
556 | 352 | -1, -1, true, false, 0, | 397 | -1, -1, true, false, 0, |
557 | @@ -393,6 +438,24 @@ | |||
558 | 393 | return true; | 438 | return true; |
559 | 394 | } | 439 | } |
560 | 395 | 440 | ||
561 | 441 | sess_stat_table= new(std::nothrow) InfoSchemaTable("SESSION_STATUS", | ||
562 | 442 | status_columns, | ||
563 | 443 | -1, -1, false, false, | ||
564 | 444 | 0, status_methods); | ||
565 | 445 | if (sess_stat_table == NULL) | ||
566 | 446 | { | ||
567 | 447 | return true; | ||
568 | 448 | } | ||
569 | 449 | |||
570 | 450 | sess_var_table= new(std::nothrow) InfoSchemaTable("SESSION_VARIABLES", | ||
571 | 451 | status_columns, | ||
572 | 452 | -1, -1, false, false, 0, | ||
573 | 453 | variables_methods); | ||
574 | 454 | if (sess_var_table == NULL) | ||
575 | 455 | { | ||
576 | 456 | return true; | ||
577 | 457 | } | ||
578 | 458 | |||
579 | 396 | stats_table= new(std::nothrow) InfoSchemaTable("STATISTICS", | 459 | stats_table= new(std::nothrow) InfoSchemaTable("STATISTICS", |
580 | 397 | stats_columns, | 460 | stats_columns, |
581 | 398 | 1, 2, false, true, | 461 | 1, 2, false, true, |
582 | @@ -403,6 +466,15 @@ | |||
583 | 403 | return true; | 466 | return true; |
584 | 404 | } | 467 | } |
585 | 405 | 468 | ||
586 | 469 | status_table= new(std::nothrow) InfoSchemaTable("STATUS", | ||
587 | 470 | status_columns, | ||
588 | 471 | -1, -1, true, false, 0, | ||
589 | 472 | status_methods); | ||
590 | 473 | if (status_table == NULL) | ||
591 | 474 | { | ||
592 | 475 | return true; | ||
593 | 476 | } | ||
594 | 477 | |||
595 | 406 | tab_constraints_table= new(std::nothrow) InfoSchemaTable("TABLE_CONSTRAINTS", | 478 | tab_constraints_table= new(std::nothrow) InfoSchemaTable("TABLE_CONSTRAINTS", |
596 | 407 | tab_constraints_columns, | 479 | tab_constraints_columns, |
597 | 408 | 3, 4, false, true, | 480 | 3, 4, false, true, |
598 | @@ -432,6 +504,15 @@ | |||
599 | 432 | return true; | 504 | return true; |
600 | 433 | } | 505 | } |
601 | 434 | 506 | ||
602 | 507 | var_table= new(std::nothrow) InfoSchemaTable("VARIABLES", | ||
603 | 508 | status_columns, | ||
604 | 509 | -1, -1, true, false, 0, | ||
605 | 510 | variables_methods); | ||
606 | 511 | if (var_table == NULL) | ||
607 | 512 | { | ||
608 | 513 | return true; | ||
609 | 514 | } | ||
610 | 515 | |||
611 | 435 | return false; | 516 | return false; |
612 | 436 | } | 517 | } |
613 | 437 | 518 | ||
614 | @@ -445,15 +526,21 @@ | |||
615 | 445 | delete coll_char_set_table; | 526 | delete coll_char_set_table; |
616 | 446 | delete columns_table; | 527 | delete columns_table; |
617 | 447 | delete key_col_usage_table; | 528 | delete key_col_usage_table; |
618 | 529 | delete global_stat_table; | ||
619 | 530 | delete global_var_table; | ||
620 | 448 | delete open_tab_table; | 531 | delete open_tab_table; |
621 | 449 | delete plugins_table; | 532 | delete plugins_table; |
622 | 450 | delete processlist_table; | 533 | delete processlist_table; |
623 | 451 | delete ref_constraint_table; | 534 | delete ref_constraint_table; |
624 | 452 | delete schemata_table; | 535 | delete schemata_table; |
625 | 536 | delete sess_stat_table; | ||
626 | 537 | delete sess_var_table; | ||
627 | 453 | delete stats_table; | 538 | delete stats_table; |
628 | 539 | delete status_table; | ||
629 | 454 | delete tab_constraints_table; | 540 | delete tab_constraints_table; |
630 | 455 | delete tables_table; | 541 | delete tables_table; |
631 | 456 | delete tab_names_table; | 542 | delete tab_names_table; |
632 | 543 | delete var_table; | ||
633 | 457 | } | 544 | } |
634 | 458 | 545 | ||
635 | 459 | /** | 546 | /** |
636 | @@ -486,15 +573,21 @@ | |||
637 | 486 | registry.add(coll_char_set_table); | 573 | registry.add(coll_char_set_table); |
638 | 487 | registry.add(columns_table); | 574 | registry.add(columns_table); |
639 | 488 | registry.add(key_col_usage_table); | 575 | registry.add(key_col_usage_table); |
640 | 576 | registry.add(global_stat_table); | ||
641 | 577 | registry.add(global_var_table); | ||
642 | 489 | registry.add(open_tab_table); | 578 | registry.add(open_tab_table); |
643 | 490 | registry.add(plugins_table); | 579 | registry.add(plugins_table); |
644 | 491 | registry.add(processlist_table); | 580 | registry.add(processlist_table); |
645 | 492 | registry.add(ref_constraint_table); | 581 | registry.add(ref_constraint_table); |
646 | 493 | registry.add(schemata_table); | 582 | registry.add(schemata_table); |
647 | 583 | registry.add(sess_stat_table); | ||
648 | 584 | registry.add(sess_var_table); | ||
649 | 494 | registry.add(stats_table); | 585 | registry.add(stats_table); |
650 | 586 | registry.add(status_table); | ||
651 | 495 | registry.add(tab_constraints_table); | 587 | registry.add(tab_constraints_table); |
652 | 496 | registry.add(tables_table); | 588 | registry.add(tables_table); |
653 | 497 | registry.add(tab_names_table); | 589 | registry.add(tab_names_table); |
654 | 590 | registry.add(var_table); | ||
655 | 498 | 591 | ||
656 | 499 | return 0; | 592 | return 0; |
657 | 500 | } | 593 | } |
658 | @@ -512,15 +605,21 @@ | |||
659 | 512 | registry.remove(coll_char_set_table); | 605 | registry.remove(coll_char_set_table); |
660 | 513 | registry.remove(columns_table); | 606 | registry.remove(columns_table); |
661 | 514 | registry.remove(key_col_usage_table); | 607 | registry.remove(key_col_usage_table); |
662 | 608 | registry.remove(global_stat_table); | ||
663 | 609 | registry.remove(global_var_table); | ||
664 | 515 | registry.remove(open_tab_table); | 610 | registry.remove(open_tab_table); |
665 | 516 | registry.remove(plugins_table); | 611 | registry.remove(plugins_table); |
666 | 517 | registry.remove(processlist_table); | 612 | registry.remove(processlist_table); |
667 | 518 | registry.remove(ref_constraint_table); | 613 | registry.remove(ref_constraint_table); |
668 | 519 | registry.remove(schemata_table); | 614 | registry.remove(schemata_table); |
669 | 615 | registry.remove(sess_stat_table); | ||
670 | 616 | registry.remove(sess_var_table); | ||
671 | 520 | registry.remove(stats_table); | 617 | registry.remove(stats_table); |
672 | 618 | registry.remove(status_table); | ||
673 | 521 | registry.remove(tab_constraints_table); | 619 | registry.remove(tab_constraints_table); |
674 | 522 | registry.remove(tables_table); | 620 | registry.remove(tables_table); |
675 | 523 | registry.remove(tab_names_table); | 621 | registry.remove(tab_names_table); |
676 | 622 | registry.remove(var_table); | ||
677 | 524 | 623 | ||
678 | 525 | cleanupTableMethods(); | 624 | cleanupTableMethods(); |
679 | 526 | cleanupTableColumns(); | 625 | cleanupTableColumns(); |
680 | 527 | 626 | ||
681 | === modified file 'plugin/info_schema/info_schema_columns.cc' | |||
682 | --- plugin/info_schema/info_schema_columns.cc 2009-07-01 03:36:14 +0000 | |||
683 | +++ plugin/info_schema/info_schema_columns.cc 2009-07-05 17:26:20 +0000 | |||
684 | @@ -1384,6 +1384,38 @@ | |||
685 | 1384 | return false; | 1384 | return false; |
686 | 1385 | } | 1385 | } |
687 | 1386 | 1386 | ||
688 | 1387 | bool createStatusColumns(vector<const ColumnInfo *>& cols) | ||
689 | 1388 | { | ||
690 | 1389 | const ColumnInfo *name= new(std::nothrow) ColumnInfo("VARIABLE_NAME", | ||
691 | 1390 | 64, | ||
692 | 1391 | DRIZZLE_TYPE_VARCHAR, | ||
693 | 1392 | 0, | ||
694 | 1393 | 0, | ||
695 | 1394 | "Variable_name", | ||
696 | 1395 | SKIP_OPEN_TABLE); | ||
697 | 1396 | if (name == NULL) | ||
698 | 1397 | { | ||
699 | 1398 | return true; | ||
700 | 1399 | } | ||
701 | 1400 | |||
702 | 1401 | const ColumnInfo *value= new(std::nothrow) ColumnInfo("VARIABLE_VALUE", | ||
703 | 1402 | 16300, | ||
704 | 1403 | DRIZZLE_TYPE_VARCHAR, | ||
705 | 1404 | 0, | ||
706 | 1405 | 1, | ||
707 | 1406 | "Value", | ||
708 | 1407 | SKIP_OPEN_TABLE); | ||
709 | 1408 | if (value == NULL) | ||
710 | 1409 | { | ||
711 | 1410 | return true; | ||
712 | 1411 | } | ||
713 | 1412 | |||
714 | 1413 | cols.push_back(name); | ||
715 | 1414 | cols.push_back(value); | ||
716 | 1415 | |||
717 | 1416 | return false; | ||
718 | 1417 | } | ||
719 | 1418 | |||
720 | 1387 | bool createTabConstraintsColumns(vector<const ColumnInfo *>& cols) | 1419 | bool createTabConstraintsColumns(vector<const ColumnInfo *>& cols) |
721 | 1388 | { | 1420 | { |
722 | 1389 | const ColumnInfo *cat= new(std::nothrow) ColumnInfo("CONSTRAINT_CATALOG", | 1421 | const ColumnInfo *cat= new(std::nothrow) ColumnInfo("CONSTRAINT_CATALOG", |
723 | 1390 | 1422 | ||
724 | === modified file 'plugin/info_schema/info_schema_columns.h' | |||
725 | --- plugin/info_schema/info_schema_columns.h 2009-07-01 03:36:14 +0000 | |||
726 | +++ plugin/info_schema/info_schema_columns.h 2009-07-05 17:26:20 +0000 | |||
727 | @@ -130,6 +130,15 @@ | |||
728 | 130 | bool createStatsColumns(std::vector<const ColumnInfo *>& cols); | 130 | bool createStatsColumns(std::vector<const ColumnInfo *>& cols); |
729 | 131 | 131 | ||
730 | 132 | /** | 132 | /** |
731 | 133 | * Create the various volumns for numerous I_S tables | ||
732 | 134 | * and add them to the std::vector of columns for these table. | ||
733 | 135 | * | ||
734 | 136 | * @param[out] cols vector to add columns to | ||
735 | 137 | * @return false on success; true on failure | ||
736 | 138 | */ | ||
737 | 139 | bool createStatusColumns(std::vector<const ColumnInfo *>& cols); | ||
738 | 140 | |||
739 | 141 | /** | ||
740 | 133 | * Create the various volumns for the TABLE_CONSTRAINTS I_S table | 142 | * Create the various volumns for the TABLE_CONSTRAINTS I_S table |
741 | 134 | * and add them to the std::vector of columns for this table. | 143 | * and add them to the std::vector of columns for this table. |
742 | 135 | * | 144 | * |
743 | 136 | 145 | ||
744 | === modified file 'plugin/info_schema/info_schema_methods.cc' | |||
745 | --- plugin/info_schema/info_schema_methods.cc 2009-07-02 06:54:37 +0000 | |||
746 | +++ plugin/info_schema/info_schema_methods.cc 2009-07-05 17:44:13 +0000 | |||
747 | @@ -36,6 +36,171 @@ | |||
748 | 36 | 36 | ||
749 | 37 | using namespace std; | 37 | using namespace std; |
750 | 38 | 38 | ||
751 | 39 | static inline void make_upper(char *buf) | ||
752 | 40 | { | ||
753 | 41 | for (; *buf; buf++) | ||
754 | 42 | *buf= my_toupper(system_charset_info, *buf); | ||
755 | 43 | } | ||
756 | 44 | |||
757 | 45 | static bool show_status_array(Session *session, const char *wild, | ||
758 | 46 | SHOW_VAR *variables, | ||
759 | 47 | enum enum_var_type value_type, | ||
760 | 48 | struct system_status_var *status_var, | ||
761 | 49 | const char *prefix, Table *table, | ||
762 | 50 | bool ucase_names) | ||
763 | 51 | { | ||
764 | 52 | MY_ALIGNED_BYTE_ARRAY(buff_data, SHOW_VAR_FUNC_BUFF_SIZE, int64_t); | ||
765 | 53 | char * const buff= (char *) &buff_data; | ||
766 | 54 | char *prefix_end; | ||
767 | 55 | /* the variable name should not be longer than 64 characters */ | ||
768 | 56 | char name_buffer[64]; | ||
769 | 57 | int len; | ||
770 | 58 | SHOW_VAR tmp, *var; | ||
771 | 59 | |||
772 | 60 | prefix_end= strncpy(name_buffer, prefix, sizeof(name_buffer)-1); | ||
773 | 61 | prefix_end+= strlen(prefix); | ||
774 | 62 | |||
775 | 63 | if (*prefix) | ||
776 | 64 | *prefix_end++= '_'; | ||
777 | 65 | len=name_buffer + sizeof(name_buffer) - prefix_end; | ||
778 | 66 | |||
779 | 67 | for (; variables->name; variables++) | ||
780 | 68 | { | ||
781 | 69 | strncpy(prefix_end, variables->name, len); | ||
782 | 70 | name_buffer[sizeof(name_buffer)-1]=0; /* Safety */ | ||
783 | 71 | if (ucase_names) | ||
784 | 72 | make_upper(name_buffer); | ||
785 | 73 | |||
786 | 74 | /* | ||
787 | 75 | if var->type is SHOW_FUNC, call the function. | ||
788 | 76 | Repeat as necessary, if new var is again SHOW_FUNC | ||
789 | 77 | */ | ||
790 | 78 | for (var=variables; var->type == SHOW_FUNC; var= &tmp) | ||
791 | 79 | ((mysql_show_var_func)((st_show_var_func_container *)var->value)->func)(&tmp, buff); | ||
792 | 80 | |||
793 | 81 | SHOW_TYPE show_type=var->type; | ||
794 | 82 | if (show_type == SHOW_ARRAY) | ||
795 | 83 | { | ||
796 | 84 | show_status_array(session, wild, (SHOW_VAR *) var->value, value_type, | ||
797 | 85 | status_var, name_buffer, table, ucase_names); | ||
798 | 86 | } | ||
799 | 87 | else | ||
800 | 88 | { | ||
801 | 89 | if (!(wild && wild[0] && wild_case_compare(system_charset_info, | ||
802 | 90 | name_buffer, wild))) | ||
803 | 91 | { | ||
804 | 92 | char *value=var->value; | ||
805 | 93 | const char *pos, *end; // We assign a lot of const's | ||
806 | 94 | pthread_mutex_lock(&LOCK_global_system_variables); | ||
807 | 95 | |||
808 | 96 | if (show_type == SHOW_SYS) | ||
809 | 97 | { | ||
810 | 98 | show_type= ((sys_var*) value)->show_type(); | ||
811 | 99 | value= (char*) ((sys_var*) value)->value_ptr(session, value_type, | ||
812 | 100 | &null_lex_str); | ||
813 | 101 | } | ||
814 | 102 | |||
815 | 103 | pos= end= buff; | ||
816 | 104 | /* | ||
817 | 105 | note that value may be == buff. All SHOW_xxx code below | ||
818 | 106 | should still work in this case | ||
819 | 107 | */ | ||
820 | 108 | switch (show_type) { | ||
821 | 109 | case SHOW_DOUBLE_STATUS: | ||
822 | 110 | value= ((char *) status_var + (ulong) value); | ||
823 | 111 | /* fall through */ | ||
824 | 112 | case SHOW_DOUBLE: | ||
825 | 113 | /* 6 is the default precision for '%f' in sprintf() */ | ||
826 | 114 | end= buff + my_fcvt(*(double *) value, 6, buff, NULL); | ||
827 | 115 | break; | ||
828 | 116 | case SHOW_LONG_STATUS: | ||
829 | 117 | value= ((char *) status_var + (ulong) value); | ||
830 | 118 | /* fall through */ | ||
831 | 119 | case SHOW_LONG: | ||
832 | 120 | end= int10_to_str(*(long*) value, buff, 10); | ||
833 | 121 | break; | ||
834 | 122 | case SHOW_LONGLONG_STATUS: | ||
835 | 123 | value= ((char *) status_var + (uint64_t) value); | ||
836 | 124 | /* fall through */ | ||
837 | 125 | case SHOW_LONGLONG: | ||
838 | 126 | end= int64_t10_to_str(*(int64_t*) value, buff, 10); | ||
839 | 127 | break; | ||
840 | 128 | case SHOW_SIZE: | ||
841 | 129 | { | ||
842 | 130 | stringstream ss (stringstream::in); | ||
843 | 131 | ss << *(size_t*) value; | ||
844 | 132 | |||
845 | 133 | string str= ss.str(); | ||
846 | 134 | strncpy(buff, str.c_str(), str.length()); | ||
847 | 135 | end= buff+ str.length(); | ||
848 | 136 | } | ||
849 | 137 | break; | ||
850 | 138 | case SHOW_HA_ROWS: | ||
851 | 139 | end= int64_t10_to_str((int64_t) *(ha_rows*) value, buff, 10); | ||
852 | 140 | break; | ||
853 | 141 | case SHOW_BOOL: | ||
854 | 142 | end+= sprintf(buff,"%s", *(bool*) value ? "ON" : "OFF"); | ||
855 | 143 | break; | ||
856 | 144 | case SHOW_MY_BOOL: | ||
857 | 145 | end+= sprintf(buff,"%s", *(bool*) value ? "ON" : "OFF"); | ||
858 | 146 | break; | ||
859 | 147 | case SHOW_INT: | ||
860 | 148 | case SHOW_INT_NOFLUSH: // the difference lies in refresh_status() | ||
861 | 149 | end= int10_to_str((long) *(uint32_t*) value, buff, 10); | ||
862 | 150 | break; | ||
863 | 151 | case SHOW_HAVE: | ||
864 | 152 | { | ||
865 | 153 | SHOW_COMP_OPTION tmp_option= *(SHOW_COMP_OPTION *)value; | ||
866 | 154 | pos= show_comp_option_name[(int) tmp_option]; | ||
867 | 155 | end= strchr(pos, '\0'); | ||
868 | 156 | break; | ||
869 | 157 | } | ||
870 | 158 | case SHOW_CHAR: | ||
871 | 159 | { | ||
872 | 160 | if (!(pos= value)) | ||
873 | 161 | pos= ""; | ||
874 | 162 | end= strchr(pos, '\0'); | ||
875 | 163 | break; | ||
876 | 164 | } | ||
877 | 165 | case SHOW_CHAR_PTR: | ||
878 | 166 | { | ||
879 | 167 | if (!(pos= *(char**) value)) | ||
880 | 168 | pos= ""; | ||
881 | 169 | end= strchr(pos, '\0'); | ||
882 | 170 | break; | ||
883 | 171 | } | ||
884 | 172 | case SHOW_KEY_CACHE_LONG: | ||
885 | 173 | value= (char*) dflt_key_cache + (ulong)value; | ||
886 | 174 | end= int10_to_str(*(long*) value, buff, 10); | ||
887 | 175 | break; | ||
888 | 176 | case SHOW_KEY_CACHE_LONGLONG: | ||
889 | 177 | value= (char*) dflt_key_cache + (ulong)value; | ||
890 | 178 | end= int64_t10_to_str(*(int64_t*) value, buff, 10); | ||
891 | 179 | break; | ||
892 | 180 | case SHOW_UNDEF: | ||
893 | 181 | break; // Return empty string | ||
894 | 182 | case SHOW_SYS: // Cannot happen | ||
895 | 183 | default: | ||
896 | 184 | assert(0); | ||
897 | 185 | break; | ||
898 | 186 | } | ||
899 | 187 | table->restoreRecordAsDefault(); | ||
900 | 188 | table->field[0]->store(name_buffer, strlen(name_buffer), | ||
901 | 189 | system_charset_info); | ||
902 | 190 | table->field[1]->store(pos, (uint32_t) (end - pos), system_charset_info); | ||
903 | 191 | table->field[1]->set_notnull(); | ||
904 | 192 | |||
905 | 193 | pthread_mutex_unlock(&LOCK_global_system_variables); | ||
906 | 194 | |||
907 | 195 | if (schema_table_store_record(session, table)) | ||
908 | 196 | return true; | ||
909 | 197 | } | ||
910 | 198 | } | ||
911 | 199 | } | ||
912 | 200 | |||
913 | 201 | return false; | ||
914 | 202 | } | ||
915 | 203 | |||
916 | 39 | int CharSetISMethods::fillTable(Session *session, TableList *tables, COND *) | 204 | int CharSetISMethods::fillTable(Session *session, TableList *tables, COND *) |
917 | 40 | { | 205 | { |
918 | 41 | CHARSET_INFO **cs; | 206 | CHARSET_INFO **cs; |
919 | @@ -786,6 +951,46 @@ | |||
920 | 786 | return(res); | 951 | return(res); |
921 | 787 | } | 952 | } |
922 | 788 | 953 | ||
923 | 954 | int StatusISMethods::fillTable(Session *session, TableList *tables, COND *) | ||
924 | 955 | { | ||
925 | 956 | LEX *lex= session->lex; | ||
926 | 957 | const char *wild= lex->wild ? lex->wild->ptr() : NULL; | ||
927 | 958 | int res= 0; | ||
928 | 959 | STATUS_VAR *tmp1, tmp; | ||
929 | 960 | const string schema_table_name= tables->schema_table->getTableName(); | ||
930 | 961 | enum enum_var_type option_type; | ||
931 | 962 | bool upper_case_names= (schema_table_name.compare("STATUS") != 0); | ||
932 | 963 | |||
933 | 964 | if (schema_table_name.compare("STATUS") == 0) | ||
934 | 965 | { | ||
935 | 966 | option_type= lex->option_type; | ||
936 | 967 | if (option_type == OPT_GLOBAL) | ||
937 | 968 | tmp1= &tmp; | ||
938 | 969 | else | ||
939 | 970 | tmp1= session->initial_status_var; | ||
940 | 971 | } | ||
941 | 972 | else if (schema_table_name.compare("GLOBAL_STATUS") == 0) | ||
942 | 973 | { | ||
943 | 974 | option_type= OPT_GLOBAL; | ||
944 | 975 | tmp1= &tmp; | ||
945 | 976 | } | ||
946 | 977 | else | ||
947 | 978 | { | ||
948 | 979 | option_type= OPT_SESSION; | ||
949 | 980 | tmp1= &session->status_var; | ||
950 | 981 | } | ||
951 | 982 | |||
952 | 983 | pthread_mutex_lock(&LOCK_status); | ||
953 | 984 | if (option_type == OPT_GLOBAL) | ||
954 | 985 | calc_sum_of_all_status(&tmp); | ||
955 | 986 | res= show_status_array(session, wild, | ||
956 | 987 | getFrontOfStatusVars(), | ||
957 | 988 | option_type, tmp1, "", tables->table, | ||
958 | 989 | upper_case_names); | ||
959 | 990 | pthread_mutex_unlock(&LOCK_status); | ||
960 | 991 | return(res); | ||
961 | 992 | } | ||
962 | 993 | |||
963 | 789 | static bool store_constraints(Session *session, Table *table, LEX_STRING *db_name, | 994 | static bool store_constraints(Session *session, Table *table, LEX_STRING *db_name, |
964 | 790 | LEX_STRING *table_name, const char *key_name, | 995 | LEX_STRING *table_name, const char *key_name, |
965 | 791 | uint32_t key_len, const char *con_type, uint32_t con_len) | 996 | uint32_t key_len, const char *con_type, uint32_t con_len) |
966 | @@ -1118,3 +1323,27 @@ | |||
967 | 1118 | } | 1323 | } |
968 | 1119 | return 0; | 1324 | return 0; |
969 | 1120 | } | 1325 | } |
970 | 1326 | |||
971 | 1327 | int VariablesISMethods::fillTable(Session *session, TableList *tables, COND *) | ||
972 | 1328 | { | ||
973 | 1329 | int res= 0; | ||
974 | 1330 | LEX *lex= session->lex; | ||
975 | 1331 | const char *wild= lex->wild ? lex->wild->ptr() : NULL; | ||
976 | 1332 | const string schema_table_name= tables->schema_table->getTableName(); | ||
977 | 1333 | enum enum_var_type option_type= OPT_SESSION; | ||
978 | 1334 | bool upper_case_names= (schema_table_name.compare("VARIABLES") != 0); | ||
979 | 1335 | bool sorted_vars= (schema_table_name.compare("VARIABLES") == 0); | ||
980 | 1336 | |||
981 | 1337 | if (lex->option_type == OPT_GLOBAL || | ||
982 | 1338 | schema_table_name.compare("GLOBAL_VARIABLES") == 0) | ||
983 | 1339 | { | ||
984 | 1340 | option_type= OPT_GLOBAL; | ||
985 | 1341 | } | ||
986 | 1342 | |||
987 | 1343 | pthread_rwlock_rdlock(&LOCK_system_variables_hash); | ||
988 | 1344 | res= show_status_array(session, wild, enumerate_sys_vars(session, sorted_vars), | ||
989 | 1345 | option_type, NULL, "", tables->table, upper_case_names); | ||
990 | 1346 | pthread_rwlock_unlock(&LOCK_system_variables_hash); | ||
991 | 1347 | return(res); | ||
992 | 1348 | } | ||
993 | 1349 | |||
994 | 1121 | 1350 | ||
995 | === modified file 'plugin/info_schema/info_schema_methods.h' | |||
996 | --- plugin/info_schema/info_schema_methods.h 2009-07-01 03:36:14 +0000 | |||
997 | +++ plugin/info_schema/info_schema_methods.h 2009-07-05 17:44:13 +0000 | |||
998 | @@ -192,6 +192,20 @@ | |||
999 | 192 | }; | 192 | }; |
1000 | 193 | 193 | ||
1001 | 194 | /** | 194 | /** |
1002 | 195 | * @class StatusISMethods | ||
1003 | 196 | * @brief | ||
1004 | 197 | * Class which implements any methods that the STATUS | ||
1005 | 198 | * I_S table needs besides the default methods | ||
1006 | 199 | */ | ||
1007 | 200 | class StatusISMethods : public InfoSchemaMethods | ||
1008 | 201 | { | ||
1009 | 202 | public: | ||
1010 | 203 | virtual int fillTable(Session *session, | ||
1011 | 204 | TableList *tables, | ||
1012 | 205 | COND *cond); | ||
1013 | 206 | }; | ||
1014 | 207 | |||
1015 | 208 | /** | ||
1016 | 195 | * @class TabConstraintsISMethods | 209 | * @class TabConstraintsISMethods |
1017 | 196 | * @brief | 210 | * @brief |
1018 | 197 | * Class which implements any methods that the TABLE_CONSTRAINTS | 211 | * Class which implements any methods that the TABLE_CONSTRAINTS |
1019 | @@ -231,4 +245,18 @@ | |||
1020 | 231 | virtual int oldFormat(Session *session, InfoSchemaTable *schema_table) const; | 245 | virtual int oldFormat(Session *session, InfoSchemaTable *schema_table) const; |
1021 | 232 | }; | 246 | }; |
1022 | 233 | 247 | ||
1023 | 248 | /** | ||
1024 | 249 | * @class VariablesISMethods | ||
1025 | 250 | * @brief | ||
1026 | 251 | * Class which implements any methods that the VARIABLES | ||
1027 | 252 | * I_S table needs besides the default methods | ||
1028 | 253 | */ | ||
1029 | 254 | class VariablesISMethods : public InfoSchemaMethods | ||
1030 | 255 | { | ||
1031 | 256 | public: | ||
1032 | 257 | virtual int fillTable(Session *session, | ||
1033 | 258 | TableList *tables, | ||
1034 | 259 | COND *cond); | ||
1035 | 260 | }; | ||
1036 | 261 | |||
1037 | 234 | #endif /* DRIZZLE_INFO_SCHEMA_METHODS_H */ | 262 | #endif /* DRIZZLE_INFO_SCHEMA_METHODS_H */ |
1038 | 235 | 263 | ||
1039 | === modified file 'tests/r/information_schema.result' | |||
1040 | --- tests/r/information_schema.result 2009-07-01 03:38:19 +0000 | |||
1041 | +++ tests/r/information_schema.result 2009-07-05 18:46:45 +0000 | |||
1042 | @@ -244,10 +244,6 @@ | |||
1043 | 244 | ) | 244 | ) |
1044 | 245 | AND t.table_name NOT LIKE 'falcon%'; | 245 | AND t.table_name NOT LIKE 'falcon%'; |
1045 | 246 | table_name column_name | 246 | table_name column_name |
1046 | 247 | GLOBAL_STATUS VARIABLE_NAME | ||
1047 | 248 | GLOBAL_VARIABLES VARIABLE_NAME | ||
1048 | 249 | SESSION_STATUS VARIABLE_NAME | ||
1049 | 250 | SESSION_VARIABLES VARIABLE_NAME | ||
1050 | 251 | INNODB_TRX trx_id | 247 | INNODB_TRX trx_id |
1051 | 252 | INNODB_LOCKS lock_id | 248 | INNODB_LOCKS lock_id |
1052 | 253 | INNODB_LOCK_WAITS requesting_trx_id | 249 | INNODB_LOCK_WAITS requesting_trx_id |
1053 | @@ -260,10 +256,14 @@ | |||
1054 | 260 | COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME | 256 | COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME |
1055 | 261 | COLUMNS TABLE_SCHEMA | 257 | COLUMNS TABLE_SCHEMA |
1056 | 262 | KEY_COLUMN_USAGE CONSTRAINT_SCHEMA | 258 | KEY_COLUMN_USAGE CONSTRAINT_SCHEMA |
1057 | 259 | GLOBAL_STATUS VARIABLE_NAME | ||
1058 | 260 | GLOBAL_VARIABLES VARIABLE_NAME | ||
1059 | 263 | PLUGINS PLUGIN_NAME | 261 | PLUGINS PLUGIN_NAME |
1060 | 264 | PROCESSLIST ID | 262 | PROCESSLIST ID |
1061 | 265 | REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA | 263 | REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA |
1062 | 266 | SCHEMATA SCHEMA_NAME | 264 | SCHEMATA SCHEMA_NAME |
1063 | 265 | SESSION_STATUS VARIABLE_NAME | ||
1064 | 266 | SESSION_VARIABLES VARIABLE_NAME | ||
1065 | 267 | STATISTICS TABLE_SCHEMA | 267 | STATISTICS TABLE_SCHEMA |
1066 | 268 | TABLE_CONSTRAINTS CONSTRAINT_SCHEMA | 268 | TABLE_CONSTRAINTS CONSTRAINT_SCHEMA |
1067 | 269 | TABLES TABLE_SCHEMA | 269 | TABLES TABLE_SCHEMA |
1068 | @@ -283,10 +283,6 @@ | |||
1069 | 283 | ) | 283 | ) |
1070 | 284 | AND t.table_name NOT LIKE 'falcon%'; | 284 | AND t.table_name NOT LIKE 'falcon%'; |
1071 | 285 | table_name column_name | 285 | table_name column_name |
1072 | 286 | GLOBAL_STATUS VARIABLE_NAME | ||
1073 | 287 | GLOBAL_VARIABLES VARIABLE_NAME | ||
1074 | 288 | SESSION_STATUS VARIABLE_NAME | ||
1075 | 289 | SESSION_VARIABLES VARIABLE_NAME | ||
1076 | 290 | INNODB_TRX trx_id | 286 | INNODB_TRX trx_id |
1077 | 291 | INNODB_LOCKS lock_id | 287 | INNODB_LOCKS lock_id |
1078 | 292 | INNODB_LOCK_WAITS requesting_trx_id | 288 | INNODB_LOCK_WAITS requesting_trx_id |
1079 | @@ -299,10 +295,14 @@ | |||
1080 | 299 | COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME | 295 | COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME |
1081 | 300 | COLUMNS TABLE_SCHEMA | 296 | COLUMNS TABLE_SCHEMA |
1082 | 301 | KEY_COLUMN_USAGE CONSTRAINT_SCHEMA | 297 | KEY_COLUMN_USAGE CONSTRAINT_SCHEMA |
1083 | 298 | GLOBAL_STATUS VARIABLE_NAME | ||
1084 | 299 | GLOBAL_VARIABLES VARIABLE_NAME | ||
1085 | 302 | PLUGINS PLUGIN_NAME | 300 | PLUGINS PLUGIN_NAME |
1086 | 303 | PROCESSLIST ID | 301 | PROCESSLIST ID |
1087 | 304 | REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA | 302 | REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA |
1088 | 305 | SCHEMATA SCHEMA_NAME | 303 | SCHEMATA SCHEMA_NAME |
1089 | 304 | SESSION_STATUS VARIABLE_NAME | ||
1090 | 305 | SESSION_VARIABLES VARIABLE_NAME | ||
1091 | 306 | STATISTICS TABLE_SCHEMA | 306 | STATISTICS TABLE_SCHEMA |
1092 | 307 | TABLE_CONSTRAINTS CONSTRAINT_SCHEMA | 307 | TABLE_CONSTRAINTS CONSTRAINT_SCHEMA |
1093 | 308 | TABLES TABLE_SCHEMA | 308 | TABLES TABLE_SCHEMA |
1094 | @@ -465,151 +465,156 @@ | |||
1095 | 465 | FROM information_schema.processlist | 465 | FROM information_schema.processlist |
1096 | 466 | WHERE id = CONNECTION_ID() Query test | 466 | WHERE id = CONNECTION_ID() Query test |
1097 | 467 | SELECT * | 467 | SELECT * |
1099 | 468 | FROM information_schema.character_sets; | 468 | FROM information_schema.character_sets |
1100 | 469 | ORDER BY character_set_name; | ||
1101 | 469 | CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN | 470 | CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN |
1102 | 471 | binary binary 1 | ||
1103 | 470 | utf8 utf8_general_ci UTF-8 Unicode 4 | 472 | utf8 utf8_general_ci UTF-8 Unicode 4 |
1104 | 471 | binary binary 1 | ||
1105 | 472 | SELECT * | 473 | SELECT * |
1107 | 473 | FROM information_schema.collations; | 474 | FROM information_schema.collations |
1108 | 475 | ORDER BY collation_name; | ||
1109 | 474 | COLLATION_NAME CHARACTER_SET_NAME DESCRIPTION ID IS_DEFAULT IS_COMPILED SORTLEN | 476 | COLLATION_NAME CHARACTER_SET_NAME DESCRIPTION ID IS_DEFAULT IS_COMPILED SORTLEN |
1110 | 477 | binary binary 63 0 Yes 1 0 | ||
1111 | 478 | utf8_bin utf8 46 0 Yes 1 0 | ||
1112 | 479 | utf8_czech_ci utf8 234 0 Yes 8 0 | ||
1113 | 480 | utf8_danish_ci utf8 235 0 Yes 8 0 | ||
1114 | 481 | utf8_esperanto_ci utf8 241 0 Yes 8 0 | ||
1115 | 482 | utf8_estonian_ci utf8 230 0 Yes 8 0 | ||
1116 | 475 | utf8_general_ci utf8 45 0 Yes 1 0 | 483 | utf8_general_ci utf8 45 0 Yes 1 0 |
1119 | 476 | utf8_bin utf8 46 0 Yes 1 0 | 484 | utf8_hungarian_ci utf8 242 0 Yes 8 0 |
1118 | 477 | utf8_unicode_ci utf8 224 0 Yes 8 0 | ||
1120 | 478 | utf8_icelandic_ci utf8 225 0 Yes 8 0 | 485 | utf8_icelandic_ci utf8 225 0 Yes 8 0 |
1121 | 479 | utf8_latvian_ci utf8 226 0 Yes 8 0 | 486 | utf8_latvian_ci utf8 226 0 Yes 8 0 |
1122 | 487 | utf8_lithuanian_ci utf8 236 0 Yes 8 0 | ||
1123 | 488 | utf8_persian_ci utf8 240 0 Yes 8 0 | ||
1124 | 489 | utf8_polish_ci utf8 229 0 Yes 8 0 | ||
1125 | 480 | utf8_romanian_ci utf8 227 0 Yes 8 0 | 490 | utf8_romanian_ci utf8 227 0 Yes 8 0 |
1126 | 491 | utf8_roman_ci utf8 239 0 Yes 8 0 | ||
1127 | 492 | utf8_sinhala_ci utf8 243 0 Yes 8 0 | ||
1128 | 493 | utf8_slovak_ci utf8 237 0 Yes 8 0 | ||
1129 | 481 | utf8_slovenian_ci utf8 228 0 Yes 8 0 | 494 | utf8_slovenian_ci utf8 228 0 Yes 8 0 |
1132 | 482 | utf8_polish_ci utf8 229 0 Yes 8 0 | 495 | utf8_spanish2_ci utf8 238 0 Yes 8 0 |
1131 | 483 | utf8_estonian_ci utf8 230 0 Yes 8 0 | ||
1133 | 484 | utf8_spanish_ci utf8 231 0 Yes 8 0 | 496 | utf8_spanish_ci utf8 231 0 Yes 8 0 |
1134 | 485 | utf8_swedish_ci utf8 232 0 Yes 8 0 | 497 | utf8_swedish_ci utf8 232 0 Yes 8 0 |
1135 | 486 | utf8_turkish_ci utf8 233 0 Yes 8 0 | 498 | utf8_turkish_ci utf8 233 0 Yes 8 0 |
1147 | 487 | utf8_czech_ci utf8 234 0 Yes 8 0 | 499 | utf8_unicode_ci utf8 224 0 Yes 8 0 |
1137 | 488 | utf8_danish_ci utf8 235 0 Yes 8 0 | ||
1138 | 489 | utf8_lithuanian_ci utf8 236 0 Yes 8 0 | ||
1139 | 490 | utf8_slovak_ci utf8 237 0 Yes 8 0 | ||
1140 | 491 | utf8_spanish2_ci utf8 238 0 Yes 8 0 | ||
1141 | 492 | utf8_roman_ci utf8 239 0 Yes 8 0 | ||
1142 | 493 | utf8_persian_ci utf8 240 0 Yes 8 0 | ||
1143 | 494 | utf8_esperanto_ci utf8 241 0 Yes 8 0 | ||
1144 | 495 | utf8_hungarian_ci utf8 242 0 Yes 8 0 | ||
1145 | 496 | utf8_sinhala_ci utf8 243 0 Yes 8 0 | ||
1146 | 497 | binary binary 63 0 Yes 1 0 | ||
1148 | 498 | SELECT * | 500 | SELECT * |
1150 | 499 | FROM information_schema.collation_character_set_applicability; | 501 | FROM information_schema.collation_character_set_applicability |
1151 | 502 | ORDER BY collation_name; | ||
1152 | 500 | COLLATION_NAME CHARACTER_SET_NAME | 503 | COLLATION_NAME CHARACTER_SET_NAME |
1153 | 504 | binary binary | ||
1154 | 505 | utf8_bin utf8 | ||
1155 | 506 | utf8_czech_ci utf8 | ||
1156 | 507 | utf8_danish_ci utf8 | ||
1157 | 508 | utf8_esperanto_ci utf8 | ||
1158 | 509 | utf8_estonian_ci utf8 | ||
1159 | 501 | utf8_general_ci utf8 | 510 | utf8_general_ci utf8 |
1162 | 502 | utf8_bin utf8 | 511 | utf8_hungarian_ci utf8 |
1161 | 503 | utf8_unicode_ci utf8 | ||
1163 | 504 | utf8_icelandic_ci utf8 | 512 | utf8_icelandic_ci utf8 |
1164 | 505 | utf8_latvian_ci utf8 | 513 | utf8_latvian_ci utf8 |
1165 | 514 | utf8_lithuanian_ci utf8 | ||
1166 | 515 | utf8_persian_ci utf8 | ||
1167 | 516 | utf8_polish_ci utf8 | ||
1168 | 506 | utf8_romanian_ci utf8 | 517 | utf8_romanian_ci utf8 |
1169 | 518 | utf8_roman_ci utf8 | ||
1170 | 519 | utf8_sinhala_ci utf8 | ||
1171 | 520 | utf8_slovak_ci utf8 | ||
1172 | 507 | utf8_slovenian_ci utf8 | 521 | utf8_slovenian_ci utf8 |
1175 | 508 | utf8_polish_ci utf8 | 522 | utf8_spanish2_ci utf8 |
1174 | 509 | utf8_estonian_ci utf8 | ||
1176 | 510 | utf8_spanish_ci utf8 | 523 | utf8_spanish_ci utf8 |
1177 | 511 | utf8_swedish_ci utf8 | 524 | utf8_swedish_ci utf8 |
1178 | 512 | utf8_turkish_ci utf8 | 525 | utf8_turkish_ci utf8 |
1190 | 513 | utf8_czech_ci utf8 | 526 | utf8_unicode_ci utf8 |
1180 | 514 | utf8_danish_ci utf8 | ||
1181 | 515 | utf8_lithuanian_ci utf8 | ||
1182 | 516 | utf8_slovak_ci utf8 | ||
1183 | 517 | utf8_spanish2_ci utf8 | ||
1184 | 518 | utf8_roman_ci utf8 | ||
1185 | 519 | utf8_persian_ci utf8 | ||
1186 | 520 | utf8_esperanto_ci utf8 | ||
1187 | 521 | utf8_hungarian_ci utf8 | ||
1188 | 522 | utf8_sinhala_ci utf8 | ||
1189 | 523 | binary binary | ||
1191 | 524 | SELECT table_name, column_name | 527 | SELECT table_name, column_name |
1193 | 525 | FROM information_schema.columns; | 528 | FROM information_schema.columns |
1194 | 529 | ORDER BY table_name; | ||
1195 | 526 | table_name column_name | 530 | table_name column_name |
1249 | 527 | GLOBAL_STATUS VARIABLE_NAME | 531 | CHARACTER_SETS MAXLEN |
1250 | 528 | GLOBAL_STATUS VARIABLE_VALUE | 532 | CHARACTER_SETS DESCRIPTION |
1198 | 529 | GLOBAL_VARIABLES VARIABLE_NAME | ||
1199 | 530 | GLOBAL_VARIABLES VARIABLE_VALUE | ||
1200 | 531 | SESSION_STATUS VARIABLE_NAME | ||
1201 | 532 | SESSION_STATUS VARIABLE_VALUE | ||
1202 | 533 | SESSION_VARIABLES VARIABLE_NAME | ||
1203 | 534 | SESSION_VARIABLES VARIABLE_VALUE | ||
1204 | 535 | INNODB_TRX trx_id | ||
1205 | 536 | INNODB_TRX trx_state | ||
1206 | 537 | INNODB_TRX trx_started | ||
1207 | 538 | INNODB_TRX trx_requested_lock_id | ||
1208 | 539 | INNODB_TRX trx_wait_started | ||
1209 | 540 | INNODB_TRX trx_weight | ||
1210 | 541 | INNODB_TRX trx_mysql_thread_id | ||
1211 | 542 | INNODB_TRX trx_query | ||
1212 | 543 | INNODB_LOCKS lock_id | ||
1213 | 544 | INNODB_LOCKS lock_trx_id | ||
1214 | 545 | INNODB_LOCKS lock_mode | ||
1215 | 546 | INNODB_LOCKS lock_type | ||
1216 | 547 | INNODB_LOCKS lock_table | ||
1217 | 548 | INNODB_LOCKS lock_index | ||
1218 | 549 | INNODB_LOCKS lock_space | ||
1219 | 550 | INNODB_LOCKS lock_page | ||
1220 | 551 | INNODB_LOCKS lock_rec | ||
1221 | 552 | INNODB_LOCKS lock_data | ||
1222 | 553 | INNODB_LOCK_WAITS requesting_trx_id | ||
1223 | 554 | INNODB_LOCK_WAITS requested_lock_id | ||
1224 | 555 | INNODB_LOCK_WAITS blocking_trx_id | ||
1225 | 556 | INNODB_LOCK_WAITS blocking_lock_id | ||
1226 | 557 | INNODB_CMP page_size | ||
1227 | 558 | INNODB_CMP compress_ops | ||
1228 | 559 | INNODB_CMP compress_ops_ok | ||
1229 | 560 | INNODB_CMP compress_time | ||
1230 | 561 | INNODB_CMP uncompress_ops | ||
1231 | 562 | INNODB_CMP uncompress_time | ||
1232 | 563 | INNODB_CMP_RESET page_size | ||
1233 | 564 | INNODB_CMP_RESET compress_ops | ||
1234 | 565 | INNODB_CMP_RESET compress_ops_ok | ||
1235 | 566 | INNODB_CMP_RESET compress_time | ||
1236 | 567 | INNODB_CMP_RESET uncompress_ops | ||
1237 | 568 | INNODB_CMP_RESET uncompress_time | ||
1238 | 569 | INNODB_CMPMEM page_size | ||
1239 | 570 | INNODB_CMPMEM pages_used | ||
1240 | 571 | INNODB_CMPMEM pages_free | ||
1241 | 572 | INNODB_CMPMEM relocation_ops | ||
1242 | 573 | INNODB_CMPMEM relocation_time | ||
1243 | 574 | INNODB_CMPMEM_RESET page_size | ||
1244 | 575 | INNODB_CMPMEM_RESET pages_used | ||
1245 | 576 | INNODB_CMPMEM_RESET pages_free | ||
1246 | 577 | INNODB_CMPMEM_RESET relocation_ops | ||
1247 | 578 | INNODB_CMPMEM_RESET relocation_time | ||
1248 | 579 | CHARACTER_SETS CHARACTER_SET_NAME | ||
1251 | 580 | CHARACTER_SETS DEFAULT_COLLATE_NAME | 533 | CHARACTER_SETS DEFAULT_COLLATE_NAME |
1259 | 581 | CHARACTER_SETS DESCRIPTION | 534 | CHARACTER_SETS CHARACTER_SET_NAME |
1253 | 582 | CHARACTER_SETS MAXLEN | ||
1254 | 583 | COLLATIONS COLLATION_NAME | ||
1255 | 584 | COLLATIONS CHARACTER_SET_NAME | ||
1256 | 585 | COLLATIONS DESCRIPTION | ||
1257 | 586 | COLLATIONS ID | ||
1258 | 587 | COLLATIONS IS_DEFAULT | ||
1260 | 588 | COLLATIONS IS_COMPILED | 535 | COLLATIONS IS_COMPILED |
1261 | 536 | COLLATIONS COLLATION_NAME | ||
1262 | 589 | COLLATIONS SORTLEN | 537 | COLLATIONS SORTLEN |
1264 | 590 | COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME | 538 | COLLATIONS IS_DEFAULT |
1265 | 539 | COLLATIONS ID | ||
1266 | 540 | COLLATIONS DESCRIPTION | ||
1267 | 541 | COLLATIONS CHARACTER_SET_NAME | ||
1268 | 591 | COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME | 542 | COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME |
1269 | 543 | COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME | ||
1270 | 544 | COLUMNS PRIVILEGES | ||
1271 | 545 | COLUMNS TABLE_SCHEMA | ||
1272 | 546 | COLUMNS TABLE_NAME | ||
1273 | 592 | COLUMNS TABLE_CATALOG | 547 | COLUMNS TABLE_CATALOG |
1274 | 593 | COLUMNS TABLE_SCHEMA | ||
1275 | 594 | COLUMNS TABLE_NAME | ||
1276 | 595 | COLUMNS COLUMN_NAME | 548 | COLUMNS COLUMN_NAME |
1277 | 596 | COLUMNS ORDINAL_POSITION | 549 | COLUMNS ORDINAL_POSITION |
1278 | 597 | COLUMNS COLUMN_DEFAULT | 550 | COLUMNS COLUMN_DEFAULT |
1279 | 598 | COLUMNS IS_NULLABLE | 551 | COLUMNS IS_NULLABLE |
1285 | 599 | COLUMNS DATA_TYPE | 552 | COLUMNS FORMAT |
1286 | 600 | COLUMNS CHARACTER_MAXIMUM_LENGTH | 553 | COLUMNS COLLATION_NAME |
1282 | 601 | COLUMNS CHARACTER_OCTET_LENGTH | ||
1283 | 602 | COLUMNS NUMERIC_PRECISION | ||
1284 | 603 | COLUMNS NUMERIC_SCALE | ||
1287 | 604 | COLUMNS CHARACTER_SET_NAME | 554 | COLUMNS CHARACTER_SET_NAME |
1289 | 605 | COLUMNS COLLATION_NAME | 555 | COLUMNS COLUMN_COMMENT |
1290 | 606 | COLUMNS COLUMN_TYPE | 556 | COLUMNS COLUMN_TYPE |
1291 | 607 | COLUMNS COLUMN_KEY | 557 | COLUMNS COLUMN_KEY |
1292 | 608 | COLUMNS EXTRA | 558 | COLUMNS EXTRA |
1293 | 609 | COLUMNS PRIVILEGES | ||
1294 | 610 | COLUMNS COLUMN_COMMENT | ||
1295 | 611 | COLUMNS STORAGE | 559 | COLUMNS STORAGE |
1297 | 612 | COLUMNS FORMAT | 560 | COLUMNS NUMERIC_SCALE |
1298 | 561 | COLUMNS NUMERIC_PRECISION | ||
1299 | 562 | COLUMNS CHARACTER_OCTET_LENGTH | ||
1300 | 563 | COLUMNS DATA_TYPE | ||
1301 | 564 | COLUMNS CHARACTER_MAXIMUM_LENGTH | ||
1302 | 565 | GLOBAL_STATUS VARIABLE_NAME | ||
1303 | 566 | GLOBAL_STATUS VARIABLE_VALUE | ||
1304 | 567 | GLOBAL_VARIABLES VARIABLE_VALUE | ||
1305 | 568 | GLOBAL_VARIABLES VARIABLE_NAME | ||
1306 | 569 | INNODB_CMP compress_time | ||
1307 | 570 | INNODB_CMP uncompress_ops | ||
1308 | 571 | INNODB_CMP compress_ops | ||
1309 | 572 | INNODB_CMP page_size | ||
1310 | 573 | INNODB_CMP uncompress_time | ||
1311 | 574 | INNODB_CMP compress_ops_ok | ||
1312 | 575 | INNODB_CMPMEM relocation_time | ||
1313 | 576 | INNODB_CMPMEM relocation_ops | ||
1314 | 577 | INNODB_CMPMEM pages_used | ||
1315 | 578 | INNODB_CMPMEM page_size | ||
1316 | 579 | INNODB_CMPMEM pages_free | ||
1317 | 580 | INNODB_CMPMEM_RESET relocation_time | ||
1318 | 581 | INNODB_CMPMEM_RESET relocation_ops | ||
1319 | 582 | INNODB_CMPMEM_RESET pages_free | ||
1320 | 583 | INNODB_CMPMEM_RESET pages_used | ||
1321 | 584 | INNODB_CMPMEM_RESET page_size | ||
1322 | 585 | INNODB_CMP_RESET page_size | ||
1323 | 586 | INNODB_CMP_RESET compress_ops | ||
1324 | 587 | INNODB_CMP_RESET compress_ops_ok | ||
1325 | 588 | INNODB_CMP_RESET compress_time | ||
1326 | 589 | INNODB_CMP_RESET uncompress_ops | ||
1327 | 590 | INNODB_CMP_RESET uncompress_time | ||
1328 | 591 | INNODB_LOCKS lock_index | ||
1329 | 592 | INNODB_LOCKS lock_table | ||
1330 | 593 | INNODB_LOCKS lock_type | ||
1331 | 594 | INNODB_LOCKS lock_trx_id | ||
1332 | 595 | INNODB_LOCKS lock_id | ||
1333 | 596 | INNODB_LOCKS lock_mode | ||
1334 | 597 | INNODB_LOCKS lock_space | ||
1335 | 598 | INNODB_LOCKS lock_page | ||
1336 | 599 | INNODB_LOCKS lock_rec | ||
1337 | 600 | INNODB_LOCKS lock_data | ||
1338 | 601 | INNODB_LOCK_WAITS blocking_lock_id | ||
1339 | 602 | INNODB_LOCK_WAITS blocking_trx_id | ||
1340 | 603 | INNODB_LOCK_WAITS requested_lock_id | ||
1341 | 604 | INNODB_LOCK_WAITS requesting_trx_id | ||
1342 | 605 | INNODB_TRX trx_id | ||
1343 | 606 | INNODB_TRX trx_state | ||
1344 | 607 | INNODB_TRX trx_started | ||
1345 | 608 | INNODB_TRX trx_requested_lock_id | ||
1346 | 609 | INNODB_TRX trx_wait_started | ||
1347 | 610 | INNODB_TRX trx_weight | ||
1348 | 611 | INNODB_TRX trx_mysql_thread_id | ||
1349 | 612 | INNODB_TRX trx_query | ||
1350 | 613 | KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME | ||
1351 | 614 | KEY_COLUMN_USAGE REFERENCED_TABLE_NAME | ||
1352 | 615 | KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA | ||
1353 | 616 | KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT | ||
1354 | 617 | KEY_COLUMN_USAGE ORDINAL_POSITION | ||
1355 | 613 | KEY_COLUMN_USAGE CONSTRAINT_CATALOG | 618 | KEY_COLUMN_USAGE CONSTRAINT_CATALOG |
1356 | 614 | KEY_COLUMN_USAGE CONSTRAINT_SCHEMA | 619 | KEY_COLUMN_USAGE CONSTRAINT_SCHEMA |
1357 | 615 | KEY_COLUMN_USAGE CONSTRAINT_NAME | 620 | KEY_COLUMN_USAGE CONSTRAINT_NAME |
1358 | @@ -617,50 +622,40 @@ | |||
1359 | 617 | KEY_COLUMN_USAGE TABLE_SCHEMA | 622 | KEY_COLUMN_USAGE TABLE_SCHEMA |
1360 | 618 | KEY_COLUMN_USAGE TABLE_NAME | 623 | KEY_COLUMN_USAGE TABLE_NAME |
1361 | 619 | KEY_COLUMN_USAGE COLUMN_NAME | 624 | KEY_COLUMN_USAGE COLUMN_NAME |
1368 | 620 | KEY_COLUMN_USAGE ORDINAL_POSITION | 625 | PLUGINS PLUGIN_LICENSE |
1369 | 621 | KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT | 626 | PLUGINS PLUGIN_DESCRIPTION |
1370 | 622 | KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA | 627 | PLUGINS PLUGIN_AUTHOR |
1371 | 623 | KEY_COLUMN_USAGE REFERENCED_TABLE_NAME | 628 | PLUGINS PLUGIN_STATUS |
1366 | 624 | KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME | ||
1367 | 625 | PLUGINS PLUGIN_NAME | ||
1372 | 626 | PLUGINS PLUGIN_VERSION | 629 | PLUGINS PLUGIN_VERSION |
1378 | 627 | PLUGINS PLUGIN_STATUS | 630 | PLUGINS PLUGIN_NAME |
1379 | 628 | PLUGINS PLUGIN_AUTHOR | 631 | PROCESSLIST INFO |
1380 | 629 | PLUGINS PLUGIN_DESCRIPTION | 632 | PROCESSLIST STATE |
1381 | 630 | PLUGINS PLUGIN_LICENSE | 633 | PROCESSLIST TIME |
1382 | 631 | PROCESSLIST ID | 634 | PROCESSLIST COMMAND |
1383 | 635 | PROCESSLIST DB | ||
1384 | 636 | PROCESSLIST HOST | ||
1385 | 632 | PROCESSLIST USER | 637 | PROCESSLIST USER |
1392 | 633 | PROCESSLIST HOST | 638 | PROCESSLIST ID |
1393 | 634 | PROCESSLIST DB | 639 | REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME |
1394 | 635 | PROCESSLIST COMMAND | 640 | REFERENTIAL_CONSTRAINTS TABLE_NAME |
1395 | 636 | PROCESSLIST TIME | 641 | REFERENTIAL_CONSTRAINTS DELETE_RULE |
1396 | 637 | PROCESSLIST STATE | 642 | REFERENTIAL_CONSTRAINTS UPDATE_RULE |
1397 | 638 | PROCESSLIST INFO | 643 | REFERENTIAL_CONSTRAINTS MATCH_OPTION |
1398 | 644 | REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME | ||
1399 | 645 | REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA | ||
1400 | 646 | REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG | ||
1401 | 647 | REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME | ||
1402 | 648 | REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA | ||
1403 | 639 | REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG | 649 | REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG |
1414 | 640 | REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA | 650 | SCHEMATA SQL_PATH |
1415 | 641 | REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME | 651 | SCHEMATA DEFAULT_COLLATION_NAME |
1416 | 642 | REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG | 652 | SCHEMATA DEFAULT_CHARACTER_SET_NAME |
1417 | 643 | REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA | 653 | SCHEMATA SCHEMA_NAME |
1408 | 644 | REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME | ||
1409 | 645 | REFERENTIAL_CONSTRAINTS MATCH_OPTION | ||
1410 | 646 | REFERENTIAL_CONSTRAINTS UPDATE_RULE | ||
1411 | 647 | REFERENTIAL_CONSTRAINTS DELETE_RULE | ||
1412 | 648 | REFERENTIAL_CONSTRAINTS TABLE_NAME | ||
1413 | 649 | REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME | ||
1418 | 650 | SCHEMATA CATALOG_NAME | 654 | SCHEMATA CATALOG_NAME |
1432 | 651 | SCHEMATA SCHEMA_NAME | 655 | SESSION_STATUS VARIABLE_VALUE |
1433 | 652 | SCHEMATA DEFAULT_CHARACTER_SET_NAME | 656 | SESSION_STATUS VARIABLE_NAME |
1434 | 653 | SCHEMATA DEFAULT_COLLATION_NAME | 657 | SESSION_VARIABLES VARIABLE_NAME |
1435 | 654 | SCHEMATA SQL_PATH | 658 | SESSION_VARIABLES VARIABLE_VALUE |
1423 | 655 | STATISTICS TABLE_CATALOG | ||
1424 | 656 | STATISTICS TABLE_SCHEMA | ||
1425 | 657 | STATISTICS TABLE_NAME | ||
1426 | 658 | STATISTICS NON_UNIQUE | ||
1427 | 659 | STATISTICS INDEX_SCHEMA | ||
1428 | 660 | STATISTICS INDEX_NAME | ||
1429 | 661 | STATISTICS SEQ_IN_INDEX | ||
1430 | 662 | STATISTICS COLUMN_NAME | ||
1431 | 663 | STATISTICS COLLATION | ||
1436 | 664 | STATISTICS CARDINALITY | 659 | STATISTICS CARDINALITY |
1437 | 665 | STATISTICS SUB_PART | 660 | STATISTICS SUB_PART |
1438 | 666 | STATISTICS PACKED | 661 | STATISTICS PACKED |
1439 | @@ -668,20 +663,15 @@ | |||
1440 | 668 | STATISTICS INDEX_TYPE | 663 | STATISTICS INDEX_TYPE |
1441 | 669 | STATISTICS COMMENT | 664 | STATISTICS COMMENT |
1442 | 670 | STATISTICS INDEX_COMMENT | 665 | STATISTICS INDEX_COMMENT |
1457 | 671 | TABLE_CONSTRAINTS CONSTRAINT_CATALOG | 666 | STATISTICS COLLATION |
1458 | 672 | TABLE_CONSTRAINTS CONSTRAINT_SCHEMA | 667 | STATISTICS COLUMN_NAME |
1459 | 673 | TABLE_CONSTRAINTS CONSTRAINT_NAME | 668 | STATISTICS TABLE_CATALOG |
1460 | 674 | TABLE_CONSTRAINTS TABLE_SCHEMA | 669 | STATISTICS TABLE_SCHEMA |
1461 | 675 | TABLE_CONSTRAINTS TABLE_NAME | 670 | STATISTICS TABLE_NAME |
1462 | 676 | TABLE_CONSTRAINTS CONSTRAINT_TYPE | 671 | STATISTICS NON_UNIQUE |
1463 | 677 | TABLES TABLE_CATALOG | 672 | STATISTICS INDEX_SCHEMA |
1464 | 678 | TABLES TABLE_SCHEMA | 673 | STATISTICS INDEX_NAME |
1465 | 679 | TABLES TABLE_NAME | 674 | STATISTICS SEQ_IN_INDEX |
1452 | 680 | TABLES TABLE_TYPE | ||
1453 | 681 | TABLES ENGINE | ||
1454 | 682 | TABLES VERSION | ||
1455 | 683 | TABLES ROW_FORMAT | ||
1456 | 684 | TABLES TABLE_ROWS | ||
1466 | 685 | TABLES AVG_ROW_LENGTH | 675 | TABLES AVG_ROW_LENGTH |
1467 | 686 | TABLES DATA_LENGTH | 676 | TABLES DATA_LENGTH |
1468 | 687 | TABLES MAX_DATA_LENGTH | 677 | TABLES MAX_DATA_LENGTH |
1469 | @@ -694,7 +684,21 @@ | |||
1470 | 694 | TABLES TABLE_COLLATION | 684 | TABLES TABLE_COLLATION |
1471 | 695 | TABLES CHECKSUM | 685 | TABLES CHECKSUM |
1472 | 696 | TABLES CREATE_OPTIONS | 686 | TABLES CREATE_OPTIONS |
1473 | 687 | TABLES TABLE_ROWS | ||
1474 | 688 | TABLES ROW_FORMAT | ||
1475 | 697 | TABLES TABLE_COMMENT | 689 | TABLES TABLE_COMMENT |
1476 | 690 | TABLES TABLE_CATALOG | ||
1477 | 691 | TABLES TABLE_SCHEMA | ||
1478 | 692 | TABLES TABLE_NAME | ||
1479 | 693 | TABLES TABLE_TYPE | ||
1480 | 694 | TABLES ENGINE | ||
1481 | 695 | TABLES VERSION | ||
1482 | 696 | TABLE_CONSTRAINTS TABLE_NAME | ||
1483 | 697 | TABLE_CONSTRAINTS TABLE_SCHEMA | ||
1484 | 698 | TABLE_CONSTRAINTS CONSTRAINT_NAME | ||
1485 | 699 | TABLE_CONSTRAINTS CONSTRAINT_SCHEMA | ||
1486 | 700 | TABLE_CONSTRAINTS CONSTRAINT_CATALOG | ||
1487 | 701 | TABLE_CONSTRAINTS CONSTRAINT_TYPE | ||
1488 | 698 | SELECT * | 702 | SELECT * |
1489 | 699 | FROM information_schema.key_column_usage; | 703 | FROM information_schema.key_column_usage; |
1490 | 700 | CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME | 704 | CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME |
1491 | @@ -702,37 +706,373 @@ | |||
1492 | 702 | FROM information_schema.referential_constraints; | 706 | FROM information_schema.referential_constraints; |
1493 | 703 | CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME | 707 | CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME |
1494 | 704 | SELECT catalog_name, schema_name | 708 | SELECT catalog_name, schema_name |
1496 | 705 | FROM information_schema.schemata; | 709 | FROM information_schema.schemata |
1497 | 710 | ORDER BY schema_name; | ||
1498 | 706 | catalog_name schema_name | 711 | catalog_name schema_name |
1499 | 707 | NULL information_schema | 712 | NULL information_schema |
1500 | 708 | NULL mysql | 713 | NULL mysql |
1501 | 709 | NULL test | 714 | NULL test |
1502 | 710 | SELECT * | 715 | SELECT * |
1503 | 716 | FROM information_schema.session_status | ||
1504 | 717 | ORDER BY variable_name; | ||
1505 | 718 | VARIABLE_NAME VARIABLE_VALUE | ||
1506 | 719 | # # | ||
1507 | 720 | # # | ||
1508 | 721 | # # | ||
1509 | 722 | # # | ||
1510 | 723 | # # | ||
1511 | 724 | # # | ||
1512 | 725 | # # | ||
1513 | 726 | # # | ||
1514 | 727 | # # | ||
1515 | 728 | # # | ||
1516 | 729 | # # | ||
1517 | 730 | # # | ||
1518 | 731 | # # | ||
1519 | 732 | # # | ||
1520 | 733 | # # | ||
1521 | 734 | # # | ||
1522 | 735 | # # | ||
1523 | 736 | # # | ||
1524 | 737 | # # | ||
1525 | 738 | # # | ||
1526 | 739 | # # | ||
1527 | 740 | # # | ||
1528 | 741 | # # | ||
1529 | 742 | # # | ||
1530 | 743 | # # | ||
1531 | 744 | # # | ||
1532 | 745 | # # | ||
1533 | 746 | # # | ||
1534 | 747 | # # | ||
1535 | 748 | # # | ||
1536 | 749 | # # | ||
1537 | 750 | # # | ||
1538 | 751 | # # | ||
1539 | 752 | # # | ||
1540 | 753 | # # | ||
1541 | 754 | # # | ||
1542 | 755 | # # | ||
1543 | 756 | # # | ||
1544 | 757 | # # | ||
1545 | 758 | # # | ||
1546 | 759 | # # | ||
1547 | 760 | # # | ||
1548 | 761 | # # | ||
1549 | 762 | # # | ||
1550 | 763 | # # | ||
1551 | 764 | # # | ||
1552 | 765 | # # | ||
1553 | 766 | # # | ||
1554 | 767 | # # | ||
1555 | 768 | # # | ||
1556 | 769 | # # | ||
1557 | 770 | # # | ||
1558 | 771 | # # | ||
1559 | 772 | # # | ||
1560 | 773 | # # | ||
1561 | 774 | # # | ||
1562 | 775 | # # | ||
1563 | 776 | # # | ||
1564 | 777 | # # | ||
1565 | 778 | # # | ||
1566 | 779 | # # | ||
1567 | 780 | # # | ||
1568 | 781 | # # | ||
1569 | 782 | # # | ||
1570 | 783 | # # | ||
1571 | 784 | # # | ||
1572 | 785 | # # | ||
1573 | 786 | # # | ||
1574 | 787 | # # | ||
1575 | 788 | # # | ||
1576 | 789 | # # | ||
1577 | 790 | # # | ||
1578 | 791 | # # | ||
1579 | 792 | # # | ||
1580 | 793 | # # | ||
1581 | 794 | # # | ||
1582 | 795 | # # | ||
1583 | 796 | # # | ||
1584 | 797 | # # | ||
1585 | 798 | # # | ||
1586 | 799 | # # | ||
1587 | 800 | # # | ||
1588 | 801 | # # | ||
1589 | 802 | # # | ||
1590 | 803 | # # | ||
1591 | 804 | # # | ||
1592 | 805 | # # | ||
1593 | 806 | # # | ||
1594 | 807 | # # | ||
1595 | 808 | # # | ||
1596 | 809 | # # | ||
1597 | 810 | # # | ||
1598 | 811 | # # | ||
1599 | 812 | # # | ||
1600 | 813 | # # | ||
1601 | 814 | # # | ||
1602 | 815 | # # | ||
1603 | 816 | # # | ||
1604 | 817 | # # | ||
1605 | 818 | # # | ||
1606 | 819 | # # | ||
1607 | 820 | # # | ||
1608 | 821 | # # | ||
1609 | 822 | # # | ||
1610 | 823 | # # | ||
1611 | 824 | # # | ||
1612 | 825 | # # | ||
1613 | 826 | # # | ||
1614 | 827 | SHOW STATUS; | ||
1615 | 828 | Variable_name Value | ||
1616 | 829 | # # | ||
1617 | 830 | # # | ||
1618 | 831 | # # | ||
1619 | 832 | # # | ||
1620 | 833 | # # | ||
1621 | 834 | # # | ||
1622 | 835 | # # | ||
1623 | 836 | # # | ||
1624 | 837 | # # | ||
1625 | 838 | # # | ||
1626 | 839 | # # | ||
1627 | 840 | # # | ||
1628 | 841 | # # | ||
1629 | 842 | # # | ||
1630 | 843 | # # | ||
1631 | 844 | # # | ||
1632 | 845 | # # | ||
1633 | 846 | # # | ||
1634 | 847 | # # | ||
1635 | 848 | # # | ||
1636 | 849 | # # | ||
1637 | 850 | # # | ||
1638 | 851 | # # | ||
1639 | 852 | # # | ||
1640 | 853 | # # | ||
1641 | 854 | # # | ||
1642 | 855 | # # | ||
1643 | 856 | # # | ||
1644 | 857 | # # | ||
1645 | 858 | # # | ||
1646 | 859 | # # | ||
1647 | 860 | # # | ||
1648 | 861 | # # | ||
1649 | 862 | # # | ||
1650 | 863 | # # | ||
1651 | 864 | # # | ||
1652 | 865 | # # | ||
1653 | 866 | # # | ||
1654 | 867 | # # | ||
1655 | 868 | # # | ||
1656 | 869 | # # | ||
1657 | 870 | # # | ||
1658 | 871 | # # | ||
1659 | 872 | # # | ||
1660 | 873 | # # | ||
1661 | 874 | # # | ||
1662 | 875 | # # | ||
1663 | 876 | # # | ||
1664 | 877 | # # | ||
1665 | 878 | # # | ||
1666 | 879 | # # | ||
1667 | 880 | # # | ||
1668 | 881 | # # | ||
1669 | 882 | # # | ||
1670 | 883 | # # | ||
1671 | 884 | # # | ||
1672 | 885 | # # | ||
1673 | 886 | # # | ||
1674 | 887 | # # | ||
1675 | 888 | # # | ||
1676 | 889 | # # | ||
1677 | 890 | # # | ||
1678 | 891 | # # | ||
1679 | 892 | # # | ||
1680 | 893 | # # | ||
1681 | 894 | # # | ||
1682 | 895 | # # | ||
1683 | 896 | # # | ||
1684 | 897 | # # | ||
1685 | 898 | # # | ||
1686 | 899 | # # | ||
1687 | 900 | # # | ||
1688 | 901 | # # | ||
1689 | 902 | # # | ||
1690 | 903 | # # | ||
1691 | 904 | # # | ||
1692 | 905 | # # | ||
1693 | 906 | # # | ||
1694 | 907 | # # | ||
1695 | 908 | # # | ||
1696 | 909 | # # | ||
1697 | 910 | # # | ||
1698 | 911 | # # | ||
1699 | 912 | # # | ||
1700 | 913 | # # | ||
1701 | 914 | # # | ||
1702 | 915 | # # | ||
1703 | 916 | # # | ||
1704 | 917 | # # | ||
1705 | 918 | # # | ||
1706 | 919 | # # | ||
1707 | 920 | # # | ||
1708 | 921 | # # | ||
1709 | 922 | # # | ||
1710 | 923 | # # | ||
1711 | 924 | # # | ||
1712 | 925 | # # | ||
1713 | 926 | # # | ||
1714 | 927 | # # | ||
1715 | 928 | # # | ||
1716 | 929 | # # | ||
1717 | 930 | # # | ||
1718 | 931 | # # | ||
1719 | 932 | # # | ||
1720 | 933 | # # | ||
1721 | 934 | # # | ||
1722 | 935 | # # | ||
1723 | 936 | # # | ||
1724 | 937 | SELECT * | ||
1725 | 938 | FROM information_schema.global_status | ||
1726 | 939 | ORDER BY variable_name; | ||
1727 | 940 | VARIABLE_NAME VARIABLE_VALUE | ||
1728 | 941 | # # | ||
1729 | 942 | # # | ||
1730 | 943 | # # | ||
1731 | 944 | # # | ||
1732 | 945 | # # | ||
1733 | 946 | # # | ||
1734 | 947 | # # | ||
1735 | 948 | # # | ||
1736 | 949 | # # | ||
1737 | 950 | # # | ||
1738 | 951 | # # | ||
1739 | 952 | # # | ||
1740 | 953 | # # | ||
1741 | 954 | # # | ||
1742 | 955 | # # | ||
1743 | 956 | # # | ||
1744 | 957 | # # | ||
1745 | 958 | # # | ||
1746 | 959 | # # | ||
1747 | 960 | # # | ||
1748 | 961 | # # | ||
1749 | 962 | # # | ||
1750 | 963 | # # | ||
1751 | 964 | # # | ||
1752 | 965 | # # | ||
1753 | 966 | # # | ||
1754 | 967 | # # | ||
1755 | 968 | # # | ||
1756 | 969 | # # | ||
1757 | 970 | # # | ||
1758 | 971 | # # | ||
1759 | 972 | # # | ||
1760 | 973 | # # | ||
1761 | 974 | # # | ||
1762 | 975 | # # | ||
1763 | 976 | # # | ||
1764 | 977 | # # | ||
1765 | 978 | # # | ||
1766 | 979 | # # | ||
1767 | 980 | # # | ||
1768 | 981 | # # | ||
1769 | 982 | # # | ||
1770 | 983 | # # | ||
1771 | 984 | # # | ||
1772 | 985 | # # | ||
1773 | 986 | # # | ||
1774 | 987 | # # | ||
1775 | 988 | # # | ||
1776 | 989 | # # | ||
1777 | 990 | # # | ||
1778 | 991 | # # | ||
1779 | 992 | # # | ||
1780 | 993 | # # | ||
1781 | 994 | # # | ||
1782 | 995 | # # | ||
1783 | 996 | # # | ||
1784 | 997 | # # | ||
1785 | 998 | # # | ||
1786 | 999 | # # | ||
1787 | 1000 | # # | ||
1788 | 1001 | # # | ||
1789 | 1002 | # # | ||
1790 | 1003 | # # | ||
1791 | 1004 | # # | ||
1792 | 1005 | # # | ||
1793 | 1006 | # # | ||
1794 | 1007 | # # | ||
1795 | 1008 | # # | ||
1796 | 1009 | # # | ||
1797 | 1010 | # # | ||
1798 | 1011 | # # | ||
1799 | 1012 | # # | ||
1800 | 1013 | # # | ||
1801 | 1014 | # # | ||
1802 | 1015 | # # | ||
1803 | 1016 | # # | ||
1804 | 1017 | # # | ||
1805 | 1018 | # # | ||
1806 | 1019 | # # | ||
1807 | 1020 | # # | ||
1808 | 1021 | # # | ||
1809 | 1022 | # # | ||
1810 | 1023 | # # | ||
1811 | 1024 | # # | ||
1812 | 1025 | # # | ||
1813 | 1026 | # # | ||
1814 | 1027 | # # | ||
1815 | 1028 | # # | ||
1816 | 1029 | # # | ||
1817 | 1030 | # # | ||
1818 | 1031 | # # | ||
1819 | 1032 | # # | ||
1820 | 1033 | # # | ||
1821 | 1034 | # # | ||
1822 | 1035 | # # | ||
1823 | 1036 | # # | ||
1824 | 1037 | # # | ||
1825 | 1038 | # # | ||
1826 | 1039 | # # | ||
1827 | 1040 | # # | ||
1828 | 1041 | # # | ||
1829 | 1042 | # # | ||
1830 | 1043 | # # | ||
1831 | 1044 | # # | ||
1832 | 1045 | # # | ||
1833 | 1046 | # # | ||
1834 | 1047 | # # | ||
1835 | 1048 | # # | ||
1836 | 1049 | SELECT * | ||
1837 | 711 | FROM information_schema.table_constraints; | 1050 | FROM information_schema.table_constraints; |
1838 | 712 | CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE | 1051 | CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE |
1839 | 713 | SELECT table_schema, table_name | 1052 | SELECT table_schema, table_name |
1841 | 714 | FROM information_schema.tables; | 1053 | FROM information_schema.tables |
1842 | 1054 | ORDER BY table_name; | ||
1843 | 715 | table_schema table_name | 1055 | table_schema table_name |
1844 | 1056 | information_schema CHARACTER_SETS | ||
1845 | 1057 | information_schema COLLATIONS | ||
1846 | 1058 | information_schema COLLATION_CHARACTER_SET_APPLICABILITY | ||
1847 | 1059 | information_schema COLUMNS | ||
1848 | 716 | information_schema GLOBAL_STATUS | 1060 | information_schema GLOBAL_STATUS |
1849 | 717 | information_schema GLOBAL_VARIABLES | 1061 | information_schema GLOBAL_VARIABLES |
1850 | 718 | information_schema SESSION_STATUS | ||
1851 | 719 | information_schema SESSION_VARIABLES | ||
1852 | 720 | information_schema INNODB_TRX | ||
1853 | 721 | information_schema INNODB_LOCKS | ||
1854 | 722 | information_schema INNODB_LOCK_WAITS | ||
1855 | 723 | information_schema INNODB_CMP | 1062 | information_schema INNODB_CMP |
1856 | 724 | information_schema INNODB_CMP_RESET | ||
1857 | 725 | information_schema INNODB_CMPMEM | 1063 | information_schema INNODB_CMPMEM |
1858 | 726 | information_schema INNODB_CMPMEM_RESET | 1064 | information_schema INNODB_CMPMEM_RESET |
1863 | 727 | information_schema CHARACTER_SETS | 1065 | information_schema INNODB_CMP_RESET |
1864 | 728 | information_schema COLLATIONS | 1066 | information_schema INNODB_LOCKS |
1865 | 729 | information_schema COLLATION_CHARACTER_SET_APPLICABILITY | 1067 | information_schema INNODB_LOCK_WAITS |
1866 | 730 | information_schema COLUMNS | 1068 | information_schema INNODB_TRX |
1867 | 731 | information_schema KEY_COLUMN_USAGE | 1069 | information_schema KEY_COLUMN_USAGE |
1868 | 732 | information_schema PLUGINS | 1070 | information_schema PLUGINS |
1869 | 733 | information_schema PROCESSLIST | 1071 | information_schema PROCESSLIST |
1870 | 734 | information_schema REFERENTIAL_CONSTRAINTS | 1072 | information_schema REFERENTIAL_CONSTRAINTS |
1871 | 735 | information_schema SCHEMATA | 1073 | information_schema SCHEMATA |
1872 | 1074 | information_schema SESSION_STATUS | ||
1873 | 1075 | information_schema SESSION_VARIABLES | ||
1874 | 736 | information_schema STATISTICS | 1076 | information_schema STATISTICS |
1875 | 1077 | information_schema TABLES | ||
1876 | 737 | information_schema TABLE_CONSTRAINTS | 1078 | information_schema TABLE_CONSTRAINTS |
1877 | 738 | information_schema TABLES | ||
1878 | 739 | 1079 | ||
1879 | === modified file 'tests/t/information_schema.test' | |||
1880 | --- tests/t/information_schema.test 2009-07-01 02:05:39 +0000 | |||
1881 | +++ tests/t/information_schema.test 2009-07-05 18:46:45 +0000 | |||
1882 | @@ -412,25 +412,29 @@ | |||
1883 | 412 | # do a query on the CHARACTER_SET table in I_S | 412 | # do a query on the CHARACTER_SET table in I_S |
1884 | 413 | # | 413 | # |
1885 | 414 | SELECT * | 414 | SELECT * |
1887 | 415 | FROM information_schema.character_sets; | 415 | FROM information_schema.character_sets |
1888 | 416 | ORDER BY character_set_name; | ||
1889 | 416 | 417 | ||
1890 | 417 | # | 418 | # |
1891 | 418 | # perform a query on the COLLATIONS table | 419 | # perform a query on the COLLATIONS table |
1892 | 419 | # | 420 | # |
1893 | 420 | SELECT * | 421 | SELECT * |
1895 | 421 | FROM information_schema.collations; | 422 | FROM information_schema.collations |
1896 | 423 | ORDER BY collation_name; | ||
1897 | 422 | 424 | ||
1898 | 423 | # | 425 | # |
1899 | 424 | # perform a query on COLLATION_CHARACTER_SET_APPLICABILITY | 426 | # perform a query on COLLATION_CHARACTER_SET_APPLICABILITY |
1900 | 425 | # | 427 | # |
1901 | 426 | SELECT * | 428 | SELECT * |
1903 | 427 | FROM information_schema.collation_character_set_applicability; | 429 | FROM information_schema.collation_character_set_applicability |
1904 | 430 | ORDER BY collation_name; | ||
1905 | 428 | 431 | ||
1906 | 429 | # | 432 | # |
1907 | 430 | # perform a query on COLUMNS | 433 | # perform a query on COLUMNS |
1908 | 431 | # | 434 | # |
1909 | 432 | SELECT table_name, column_name | 435 | SELECT table_name, column_name |
1911 | 433 | FROM information_schema.columns; | 436 | FROM information_schema.columns |
1912 | 437 | ORDER BY table_name; | ||
1913 | 434 | 438 | ||
1914 | 435 | # | 439 | # |
1915 | 436 | # perform a query on KEY_COLUMN_USAGE | 440 | # perform a query on KEY_COLUMN_USAGE |
1916 | @@ -448,7 +452,38 @@ | |||
1917 | 448 | # query the SCHEMATA table | 452 | # query the SCHEMATA table |
1918 | 449 | # | 453 | # |
1919 | 450 | SELECT catalog_name, schema_name | 454 | SELECT catalog_name, schema_name |
1921 | 451 | FROM information_schema.schemata; | 455 | FROM information_schema.schemata |
1922 | 456 | ORDER BY schema_name; | ||
1923 | 457 | |||
1924 | 458 | # | ||
1925 | 459 | # Query the STATUS and VARIABLES related | ||
1926 | 460 | # I_S related tables. | ||
1927 | 461 | # | ||
1928 | 462 | --replace_column 1 # 2 # | ||
1929 | 463 | SELECT * | ||
1930 | 464 | FROM information_schema.session_status | ||
1931 | 465 | ORDER BY variable_name; | ||
1932 | 466 | |||
1933 | 467 | --replace_column 1 # 2 # | ||
1934 | 468 | SHOW STATUS; | ||
1935 | 469 | |||
1936 | 470 | #--replace_column 1 # 2 # | ||
1937 | 471 | #SELECT * | ||
1938 | 472 | #FROM information_schema.session_variables | ||
1939 | 473 | #ORDER BY variable_name; | ||
1940 | 474 | |||
1941 | 475 | #--replace_column 1 # 2 # | ||
1942 | 476 | #SHOW VARIABLES; | ||
1943 | 477 | |||
1944 | 478 | --replace_column 1 # 2 # | ||
1945 | 479 | SELECT * | ||
1946 | 480 | FROM information_schema.global_status | ||
1947 | 481 | ORDER BY variable_name; | ||
1948 | 482 | |||
1949 | 483 | #--replace_column 1 # 2 # | ||
1950 | 484 | #SELECT * | ||
1951 | 485 | #FROM information_schema.global_variables | ||
1952 | 486 | #ORDER BY variable_name; | ||
1953 | 452 | 487 | ||
1954 | 453 | # | 488 | # |
1955 | 454 | # query TABLE_CONSTRAINTS table | 489 | # query TABLE_CONSTRAINTS table |
1956 | @@ -460,7 +495,8 @@ | |||
1957 | 460 | # query TABLES | 495 | # query TABLES |
1958 | 461 | # | 496 | # |
1959 | 462 | SELECT table_schema, table_name | 497 | SELECT table_schema, table_name |
1961 | 463 | FROM information_schema.tables; | 498 | FROM information_schema.tables |
1962 | 499 | ORDER BY table_name; | ||
1963 | 464 | 500 | ||
1964 | 465 | # | 501 | # |
1965 | 466 | # do a query on the PLUGINS table in I_S to ensure it works correctly | 502 | # do a query on the PLUGINS table in I_S to ensure it works correctly |
This patch completes the work on extracting the current I_S into a plugin by extracting the final 6 I_S tables into the I_S plugin. No I_S tables are created in show.cc anymore.
-Padraig