102.1.1
by kinoyasu
add header and rule, as the first step of the reordering patch for separate release |
1 |
# name : show_temp_51.patch |
2 |
# introduced : 11 or before |
|
3 |
# maintainer : Yasufumi |
|
4 |
# |
|
5 |
#!!! notice !!! |
|
6 |
# Any small change to this file in the main branch |
|
7 |
# should be done or reviewed by the maintainer! |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
8 |
diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
|
9 |
--- a/sql/mysqld.cc 2010-08-27 15:24:41.663411604 +0900
|
|
10 |
+++ b/sql/mysqld.cc 2010-08-27 15:30:36.942106886 +0900
|
|
208
by Yasufumi Kinoshita
Yasufumi patches and several are ported to 5.1.56; Note: option innodb_stats_method was removed from innodb_stats.patch, because implemented officially. And, bug733317 should be fixed before release |
11 |
@@ -3238,6 +3238,7 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
12 |
{"show_table_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLE_STATUS]), SHOW_LONG_STATUS}, |
13 |
{"show_tables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLES]), SHOW_LONG_STATUS}, |
|
14 |
{"show_thread_statistics",(char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_THREAD_STATS]), SHOW_LONG_STATUS}, |
|
15 |
+ {"show_temporary_tables",(char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TEMPORARY_TABLES]), SHOW_LONG_STATUS},
|
|
16 |
{"show_triggers", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TRIGGERS]), SHOW_LONG_STATUS}, |
|
17 |
{"show_user_statistics", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_USER_STATS]), SHOW_LONG_STATUS}, |
|
18 |
{"show_variables", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_VARIABLES]), SHOW_LONG_STATUS}, |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
19 |
diff -ruN a/sql/sql_lex.h b/sql/sql_lex.h
|
20 |
--- a/sql/sql_lex.h 2010-08-27 15:19:09.940989847 +0900
|
|
21 |
+++ b/sql/sql_lex.h 2010-08-27 15:30:36.942106886 +0900
|
|
35.2.1
by Aleksandr Kuzminsky
Fixed Bug #590625 |
22 |
@@ -116,7 +116,7 @@
|
23 |
SQLCOM_CREATE_EVENT, SQLCOM_ALTER_EVENT, SQLCOM_DROP_EVENT, |
|
24 |
SQLCOM_SHOW_CREATE_EVENT, SQLCOM_SHOW_EVENTS, |
|
25 |
SQLCOM_SHOW_CREATE_TRIGGER, |
|
26 |
- SQLCOM_ALTER_DB_UPGRADE,
|
|
27 |
+ SQLCOM_ALTER_DB_UPGRADE, SQLCOM_SHOW_TEMPORARY_TABLES,
|
|
28 |
SQLCOM_SHOW_PROFILE, SQLCOM_SHOW_PROFILES, |
|
42
by kinoyasu
adjust fuzzy patch |
29 |
SQLCOM_SHOW_PATCHES, |
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
30 |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
31 |
diff -ruN a/sql/sql_parse.cc b/sql/sql_parse.cc
|
32 |
--- a/sql/sql_parse.cc 2010-08-27 15:19:09.944990047 +0900
|
|
33 |
+++ b/sql/sql_parse.cc 2010-08-27 15:30:36.949020748 +0900
|
|
149
by kinoyasu
ported Yasufumi patches for 5.1.53 |
34 |
@@ -339,6 +339,9 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
35 |
sql_command_flags[SQLCOM_SHOW_TABLES]= (CF_STATUS_COMMAND | |
36 |
CF_SHOW_TABLE_COMMAND | |
|
37 |
CF_REEXECUTION_FRAGILE); |
|
38 |
+ sql_command_flags[SQLCOM_SHOW_TEMPORARY_TABLES]= (CF_STATUS_COMMAND |
|
|
39 |
+ CF_SHOW_TABLE_COMMAND |
|
|
40 |
+ CF_REEXECUTION_FRAGILE);
|
|
41 |
sql_command_flags[SQLCOM_SHOW_TABLE_STATUS]= (CF_STATUS_COMMAND | |
|
42 |
CF_SHOW_TABLE_COMMAND | |
|
43 |
CF_REEXECUTION_FRAGILE); |
|
149
by kinoyasu
ported Yasufumi patches for 5.1.53 |
44 |
@@ -1819,6 +1822,8 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
45 |
|
46 |
case SCH_TABLE_NAMES: |
|
47 |
case SCH_TABLES: |
|
48 |
+ case SCH_TEMPORARY_TABLES:
|
|
49 |
+ case SCH_GLOBAL_TEMPORARY_TABLES:
|
|
50 |
case SCH_VIEWS: |
|
51 |
case SCH_TRIGGERS: |
|
52 |
case SCH_EVENTS: |
|
190
by Alexey Kopytov
This patch fixes compiler warnings introduced by Percona patches in the |
53 |
@@ -2318,6 +2323,7 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
54 |
} |
55 |
case SQLCOM_SHOW_DATABASES: |
|
56 |
case SQLCOM_SHOW_TABLES: |
|
57 |
+ case SQLCOM_SHOW_TEMPORARY_TABLES:
|
|
58 |
case SQLCOM_SHOW_TRIGGERS: |
|
59 |
case SQLCOM_SHOW_TABLE_STATUS: |
|
60 |
case SQLCOM_SHOW_OPEN_TABLES: |
|
197
by kinoyasu
port Yasufumi patches to 5.1.55 |
61 |
@@ -5472,6 +5478,8 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
62 |
|
63 |
case SCH_TABLE_NAMES: |
|
64 |
case SCH_TABLES: |
|
65 |
+ case SCH_TEMPORARY_TABLES:
|
|
66 |
+ case SCH_GLOBAL_TEMPORARY_TABLES:
|
|
67 |
case SCH_VIEWS: |
|
68 |
case SCH_TRIGGERS: |
|
69 |
case SCH_EVENTS: |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
70 |
diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
|
71 |
--- a/sql/sql_show.cc 2010-08-27 15:19:09.955989654 +0900
|
|
72 |
+++ b/sql/sql_show.cc 2010-08-27 15:30:36.959020753 +0900
|
|
175
by kinoyasu
Yasufumi patches are ported to 5.1.54 |
73 |
@@ -3032,6 +3032,7 @@
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
74 |
break; |
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
75 |
case SQLCOM_SHOW_TABLES: |
76 |
case SQLCOM_SHOW_TABLE_STATUS: |
|
77 |
+ case SQLCOM_SHOW_TEMPORARY_TABLES:
|
|
78 |
case SQLCOM_SHOW_TRIGGERS: |
|
79 |
case SQLCOM_SHOW_EVENTS: |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
80 |
thd->make_lex_string(&lookup_field_values->db_value, |
175
by kinoyasu
Yasufumi patches are ported to 5.1.54 |
81 |
@@ -3508,6 +3509,228 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
82 |
return (uint) OPEN_FULL_TABLE; |
83 |
} |
|
84 |
||
85 |
+/**
|
|
86 |
+ @brief Change I_S table item list for SHOW [GLOBAL] TEMPORARY TABLES [FROM/IN db]
|
|
87 |
+
|
|
88 |
+ @param[in] thd thread handler
|
|
89 |
+ @param[in] schema_table I_S table
|
|
90 |
+
|
|
91 |
+ @return Operation status
|
|
92 |
+ @retval 0 success
|
|
93 |
+ @retval 1 error
|
|
94 |
+*/
|
|
95 |
+int make_temporary_tables_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
|
|
96 |
+{
|
|
97 |
+ char tmp[128];
|
|
98 |
+ String buffer(tmp,sizeof(tmp), thd->charset());
|
|
99 |
+ LEX *lex= thd->lex;
|
|
100 |
+ Name_resolution_context *context= &lex->select_lex.context;
|
|
101 |
+
|
|
102 |
+ if (thd->lex->option_type == OPT_GLOBAL) {
|
|
103 |
+ ST_FIELD_INFO *field_info= &schema_table->fields_info[0];
|
|
104 |
+ Item_field *field= new Item_field(context, NullS, NullS, field_info->field_name);
|
|
105 |
+ if (add_item_to_list(thd, field))
|
|
106 |
+ return 1;
|
|
107 |
+ field->set_name(field_info->old_name, strlen(field_info->old_name), system_charset_info);
|
|
108 |
+ }
|
|
109 |
+
|
|
110 |
+ ST_FIELD_INFO *field_info= &schema_table->fields_info[2];
|
|
111 |
+ buffer.length(0);
|
|
112 |
+ buffer.append(field_info->old_name);
|
|
113 |
+ buffer.append(lex->select_lex.db);
|
|
114 |
+
|
|
115 |
+ if (lex->wild && lex->wild->ptr())
|
|
116 |
+ {
|
|
117 |
+ buffer.append(STRING_WITH_LEN(" ("));
|
|
118 |
+ buffer.append(lex->wild->ptr());
|
|
119 |
+ buffer.append(')');
|
|
120 |
+ }
|
|
121 |
+
|
|
122 |
+ Item_field *field= new Item_field(context, NullS, NullS, field_info->field_name);
|
|
123 |
+ if (add_item_to_list(thd, field))
|
|
124 |
+ return 1;
|
|
125 |
+
|
|
126 |
+ field->set_name(buffer.ptr(), buffer.length(), system_charset_info);
|
|
127 |
+ return 0;
|
|
128 |
+}
|
|
129 |
+
|
|
130 |
+/**
|
|
131 |
+ @brief Fill records for temporary tables by reading info from table object
|
|
132 |
+
|
|
133 |
+ @param[in] thd thread handler
|
|
134 |
+ @param[in] table I_S table
|
|
135 |
+ @param[in] tmp_table temporary table
|
|
136 |
+ @param[in] db database name
|
|
137 |
+
|
|
138 |
+ @return Operation status
|
|
139 |
+ @retval 0 success
|
|
140 |
+ @retval 1 error
|
|
141 |
+*/
|
|
142 |
+
|
|
143 |
+static int store_temporary_table_record(THD *thd, TABLE *table, TABLE *tmp_table, const char *db, bool table_name_only)
|
|
144 |
+{
|
|
145 |
+ CHARSET_INFO *cs= system_charset_info;
|
|
146 |
+ DBUG_ENTER("store_temporary_table_record");
|
|
147 |
+
|
|
148 |
+ if (db && my_strcasecmp(cs, db, tmp_table->s->db.str))
|
|
149 |
+ DBUG_RETURN(0);
|
|
150 |
+
|
|
151 |
+ restore_record(table, s->default_values);
|
|
152 |
+
|
|
153 |
+ //session_id
|
|
154 |
+ table->field[0]->store((longlong) thd->thread_id, TRUE);
|
|
155 |
+
|
|
156 |
+ //database
|
|
157 |
+ table->field[1]->store(tmp_table->s->db.str, tmp_table->s->db.length, cs);
|
|
158 |
+
|
|
159 |
+ //table
|
|
160 |
+ table->field[2]->store(tmp_table->s->table_name.str, tmp_table->s->table_name.length, cs);
|
|
161 |
+
|
|
162 |
+ if (table_name_only)
|
|
163 |
+ DBUG_RETURN(schema_table_store_record(thd, table));
|
|
164 |
+
|
|
165 |
+ //engine
|
|
166 |
+ handler *handle= tmp_table->file;
|
|
167 |
+ char *engineType = (char *)(handle ? handle->table_type() : "UNKNOWN");
|
|
168 |
+ table->field[3]->store(engineType, strlen(engineType), cs);
|
|
169 |
+
|
|
170 |
+ //name
|
|
171 |
+ if (tmp_table->s->path.str) {
|
|
172 |
+ char *p=strstr(tmp_table->s->path.str, "#sql");
|
|
173 |
+ int len=tmp_table->s->path.length-(p-tmp_table->s->path.str);
|
|
174 |
+ table->field[4]->store(p, min(FN_REFLEN, len), cs);
|
|
175 |
+ }
|
|
176 |
+
|
|
177 |
+ // file stats
|
|
178 |
+ handler *file= tmp_table->file;
|
|
179 |
+
|
|
180 |
+ if (file) {
|
|
181 |
+
|
|
182 |
+ MYSQL_TIME time;
|
|
183 |
+
|
|
184 |
+ /**
|
|
185 |
+ TODO: InnoDB stat(file) checks file on short names within data dictionary
|
|
186 |
+ rather than using full path, because of that, temp files created in
|
|
187 |
+ TMPDIR will not have access/create time as it will not find the file
|
|
188 |
+
|
|
189 |
+ The fix is to patch InnoDB to use full path
|
|
190 |
+ */
|
|
191 |
+ file->info(HA_STATUS_VARIABLE | HA_STATUS_TIME | HA_STATUS_NO_LOCK);
|
|
192 |
+
|
|
193 |
+ table->field[5]->store((longlong) file->stats.records, TRUE);
|
|
194 |
+ table->field[5]->set_notnull();
|
|
195 |
+
|
|
196 |
+ table->field[6]->store((longlong) file->stats.mean_rec_length, TRUE);
|
|
197 |
+ table->field[7]->store((longlong) file->stats.data_file_length, TRUE);
|
|
198 |
+ table->field[8]->store((longlong) file->stats.index_file_length, TRUE);
|
|
199 |
+ if (file->stats.create_time)
|
|
200 |
+ {
|
|
201 |
+ thd->variables.time_zone->gmt_sec_to_TIME(&time,
|
|
202 |
+ (my_time_t) file->stats.create_time);
|
|
203 |
+ table->field[9]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
|
|
204 |
+ table->field[9]->set_notnull();
|
|
205 |
+ }
|
|
206 |
+ if (file->stats.update_time)
|
|
207 |
+ {
|
|
208 |
+ thd->variables.time_zone->gmt_sec_to_TIME(&time,
|
|
209 |
+ (my_time_t) file->stats.update_time);
|
|
210 |
+ table->field[10]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
|
|
211 |
+ table->field[10]->set_notnull();
|
|
212 |
+ }
|
|
213 |
+ }
|
|
214 |
+
|
|
215 |
+ DBUG_RETURN(schema_table_store_record(thd, table));
|
|
216 |
+}
|
|
217 |
+
|
|
218 |
+/**
|
|
219 |
+ @brief Fill I_S tables with global temporary tables
|
|
220 |
+
|
|
221 |
+ @param[in] thd thread handler
|
|
222 |
+ @param[in] tables I_S table
|
|
223 |
+ @param[in] cond 'WHERE' condition
|
|
224 |
+
|
|
225 |
+ @return Operation status
|
|
226 |
+ @retval 0 success
|
|
227 |
+ @retval 1 error
|
|
228 |
+*/
|
|
229 |
+
|
|
230 |
+static int fill_global_temporary_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|
231 |
+{
|
|
232 |
+ DBUG_ENTER("fill_global_temporary_tables");
|
|
233 |
+
|
|
234 |
+ pthread_mutex_lock(&LOCK_thread_count);
|
|
235 |
+
|
|
236 |
+ bool table_names_only= (thd->lex->sql_command == SQLCOM_SHOW_TEMPORARY_TABLES) ? 1 : 0;
|
|
237 |
+ I_List_iterator<THD> it(threads);
|
|
238 |
+ THD *thd_item;
|
|
239 |
+ TABLE *tmp;
|
|
240 |
+
|
|
241 |
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
242 |
+ Security_context *sctx= thd->security_ctx;
|
|
243 |
+ uint db_access;
|
|
244 |
+#endif
|
|
245 |
+
|
|
246 |
+ while ((thd_item=it++)) {
|
|
247 |
+ for (tmp=thd_item->temporary_tables; tmp; tmp=tmp->next) {
|
|
248 |
+
|
|
249 |
+#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
250 |
+ if (test_all_bits(sctx->master_access, DB_ACLS))
|
|
251 |
+ db_access=DB_ACLS;
|
|
252 |
+ else
|
|
253 |
+ db_access= (acl_get(sctx->host, sctx->ip, sctx->priv_user, tmp->s->db.str, 0) | sctx->master_access);
|
|
254 |
+
|
|
255 |
+ if (!(db_access & DB_ACLS) && check_grant_db(thd,tmp->s->db.str)) {
|
|
256 |
+ //no access for temp tables within this db for user
|
|
257 |
+ continue;
|
|
258 |
+ }
|
|
259 |
+#endif
|
|
260 |
+
|
|
261 |
+ THD *t= tmp->in_use;
|
|
262 |
+ tmp->in_use= thd;
|
|
263 |
+
|
|
264 |
+ if (store_temporary_table_record(thd_item, tables->table, tmp, thd->lex->select_lex.db, table_names_only)) {
|
|
265 |
+ tmp->in_use= t;
|
|
266 |
+ pthread_mutex_unlock(&LOCK_thread_count);
|
|
267 |
+ DBUG_RETURN(1);
|
|
268 |
+ }
|
|
269 |
+
|
|
270 |
+ tmp->in_use= t;
|
|
271 |
+ }
|
|
272 |
+ }
|
|
273 |
+
|
|
274 |
+ pthread_mutex_unlock(&LOCK_thread_count);
|
|
275 |
+ DBUG_RETURN(0);
|
|
276 |
+}
|
|
277 |
+
|
|
278 |
+/**
|
|
279 |
+ @brief Fill I_S tables with session temporary tables
|
|
280 |
+
|
|
281 |
+ @param[in] thd thread handler
|
|
282 |
+ @param[in] tables I_S table
|
|
283 |
+ @param[in] cond 'WHERE' condition
|
|
284 |
+
|
|
285 |
+ @return Operation status
|
|
286 |
+ @retval 0 success
|
|
287 |
+ @retval 1 error
|
|
288 |
+*/
|
|
289 |
+
|
|
290 |
+int fill_temporary_tables(THD *thd, TABLE_LIST *tables, COND *cond)
|
|
291 |
+{
|
|
292 |
+ DBUG_ENTER("fill_temporary_tables");
|
|
293 |
+
|
|
294 |
+ if (thd->lex->option_type == OPT_GLOBAL)
|
|
295 |
+ DBUG_RETURN(fill_global_temporary_tables(thd, tables, cond));
|
|
296 |
+
|
|
297 |
+ bool table_names_only= (thd->lex->sql_command == SQLCOM_SHOW_TEMPORARY_TABLES) ? 1 : 0;
|
|
298 |
+ TABLE *tmp;
|
|
299 |
+
|
|
300 |
+ for (tmp=thd->temporary_tables; tmp; tmp=tmp->next) {
|
|
301 |
+ if (store_temporary_table_record(thd, tables->table, tmp, thd->lex->select_lex.db, table_names_only)) {
|
|
302 |
+ DBUG_RETURN(1);
|
|
303 |
+ }
|
|
304 |
+ }
|
|
305 |
+ DBUG_RETURN(0);
|
|
306 |
+}
|
|
307 |
||
308 |
/** |
|
309 |
@brief Fill I_S table with data from FRM file only |
|
197
by kinoyasu
port Yasufumi patches to 5.1.55 |
310 |
@@ -6616,6 +6839,25 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
311 |
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE} |
312 |
}; |
|
313 |
||
314 |
+ST_FIELD_INFO temporary_table_fields_info[]=
|
|
315 |
+{
|
|
316 |
+ {"SESSION_ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Session", SKIP_OPEN_TABLE},
|
|
317 |
+ {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Db", SKIP_OPEN_TABLE},
|
|
318 |
+ {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Temp_tables_in_", SKIP_OPEN_TABLE},
|
|
319 |
+ {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Engine", OPEN_FRM_ONLY},
|
|
320 |
+ {"NAME", FN_REFLEN, MYSQL_TYPE_STRING, 0, 0, "Name", SKIP_OPEN_TABLE},
|
|
321 |
+ {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
|
|
322 |
+ MY_I_S_UNSIGNED, "Rows", OPEN_FULL_TABLE},
|
|
323 |
+ {"AVG_ROW_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
|
|
324 |
+ MY_I_S_UNSIGNED, "Avg Row", OPEN_FULL_TABLE},
|
|
325 |
+ {"DATA_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
|
|
326 |
+ MY_I_S_UNSIGNED, "Data Length", OPEN_FULL_TABLE},
|
|
327 |
+ {"INDEX_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
|
|
328 |
+ MY_I_S_UNSIGNED, "Index Size", OPEN_FULL_TABLE},
|
|
329 |
+ {"CREATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Create Time", OPEN_FULL_TABLE},
|
|
330 |
+ {"UPDATE_TIME", 0, MYSQL_TYPE_DATETIME, 0, 1, "Update Time", OPEN_FULL_TABLE},
|
|
331 |
+ {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
|
|
332 |
+};
|
|
333 |
||
334 |
ST_FIELD_INFO columns_fields_info[]= |
|
335 |
{ |
|
197
by kinoyasu
port Yasufumi patches to 5.1.55 |
336 |
@@ -7276,6 +7518,9 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
337 |
fill_schema_files, 0, 0, -1, -1, 0, 0}, |
338 |
{"GLOBAL_STATUS", variables_fields_info, create_schema_table, |
|
339 |
fill_status, make_old_format, 0, 0, -1, 0, 0}, |
|
340 |
+ {"GLOBAL_TEMPORARY_TABLES", temporary_table_fields_info, create_schema_table,
|
|
341 |
+ fill_global_temporary_tables, make_temporary_tables_old_format, 0, 2, 3, 0,
|
|
342 |
+ OPEN_TABLE_ONLY|OPTIMIZE_I_S_TABLE},
|
|
343 |
{"GLOBAL_VARIABLES", variables_fields_info, create_schema_table, |
|
344 |
fill_variables, make_old_format, 0, 0, -1, 0, 0}, |
|
345 |
{"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table, |
|
197
by kinoyasu
port Yasufumi patches to 5.1.55 |
346 |
@@ -7319,6 +7564,9 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
347 |
get_all_tables, make_table_names_old_format, 0, 1, 2, 1, 0}, |
348 |
{"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table, |
|
349 |
fill_schema_table_privileges, 0, 0, -1, -1, 0, 0}, |
|
350 |
+ {"TEMPORARY_TABLES", temporary_table_fields_info, create_schema_table,
|
|
351 |
+ fill_temporary_tables, make_temporary_tables_old_format, 0, 2, 3, 0,
|
|
352 |
+ OPEN_TABLE_ONLY|OPTIMIZE_I_S_TABLE},
|
|
353 |
{"TABLE_STATISTICS", table_stats_fields_info, create_schema_table, |
|
354 |
fill_schema_table_stats, make_old_format, 0, -1, -1, 0, 0}, |
|
355 |
{"THREAD_STATISTICS", thread_stats_fields_info, create_schema_table, |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
356 |
diff -ruN a/sql/sql_yacc.yy b/sql/sql_yacc.yy
|
357 |
--- a/sql/sql_yacc.yy 2010-08-27 15:19:09.976059692 +0900
|
|
358 |
+++ b/sql/sql_yacc.yy 2010-08-27 15:30:36.971993050 +0900
|
|
127
by kinoyasu
port maintainer-Yasufumi patches for 5.1.51 |
359 |
@@ -10096,6 +10096,15 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
360 |
if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES)) |
361 |
MYSQL_YYABORT; |
|
362 |
} |
|
363 |
+ | opt_var_type TEMPORARY TABLES opt_db
|
|
364 |
+ {
|
|
365 |
+ LEX *lex= Lex;
|
|
366 |
+ lex->sql_command= SQLCOM_SHOW_TEMPORARY_TABLES;
|
|
367 |
+ lex->option_type= $1;
|
|
368 |
+ lex->select_lex.db= $4;
|
|
369 |
+ if (prepare_schema_table(YYTHD, lex, 0, SCH_TEMPORARY_TABLES))
|
|
370 |
+ MYSQL_YYABORT;
|
|
371 |
+ }
|
|
372 |
| opt_full TRIGGERS_SYM opt_db wild_and_where |
|
373 |
{ |
|
374 |
LEX *lex= Lex; |
|
106
by kinoyasu
Port Yasufumi maintaining patches to 5.1.50: |
375 |
diff -ruN a/sql/table.h b/sql/table.h
|
376 |
--- a/sql/table.h 2010-08-27 15:19:09.988989663 +0900
|
|
377 |
+++ b/sql/table.h 2010-08-27 15:30:36.987021191 +0900
|
|
133
by kinoyasu
port maintainer-Yasufumi patches for 5.1.52 |
378 |
@@ -954,6 +954,7 @@
|
3
by kinoyasu
fix bug573100 and bug573104, and fix show_temp_51.patch and add to use, adjust mysql-test.diff, etc. |
379 |
SCH_EVENTS, |
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
380 |
SCH_FILES, |
381 |
SCH_GLOBAL_STATUS, |
|
3
by kinoyasu
fix bug573100 and bug573104, and fix show_temp_51.patch and add to use, adjust mysql-test.diff, etc. |
382 |
+ SCH_GLOBAL_TEMPORARY_TABLES,
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
383 |
SCH_GLOBAL_VARIABLES, |
384 |
SCH_KEY_COLUMN_USAGE, |
|
385 |
SCH_OPEN_TABLES, |
|
133
by kinoyasu
port maintainer-Yasufumi patches for 5.1.52 |
386 |
@@ -973,6 +974,7 @@
|
2
by kinoyasu
merge 5.1.45 rev 36: but I cannot accept show_temp_51.patch because of mysql-test problem. At least, it means this patch affects something to unrelated SQL. The patch seems to break something and removed from "series" file. I do not allow to include this patch until it pass mysql-test script without any edit to mysql-test scripts. |
387 |
SCH_TABLE_CONSTRAINTS, |
388 |
SCH_TABLE_NAMES, |
|
389 |
SCH_TABLE_PRIVILEGES, |
|
390 |
+ SCH_TEMPORARY_TABLES,
|
|
391 |
SCH_TABLE_STATS, |
|
392 |
SCH_THREAD_STATS, |
|
393 |
SCH_TRIGGERS, |