~percona-dev/percona-server/release-5.1.52-12-build

« back to all changes in this revision

Viewing changes to innodb_show_enhancements.patch

  • Committer: kinoyasu
  • Date: 2010-04-30 10:17:55 UTC
  • Revision ID: kinoyasu@gauntlet3-20100430101755-h27x25t4uax76lv4
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -ruN a/storage/innodb_plugin/Makefile.am b/storage/innodb_plugin/Makefile.am
 
2
--- a/storage/innodb_plugin/Makefile.am 2010-04-06 23:07:11.000000000 +0900
 
3
+++ b/storage/innodb_plugin/Makefile.am 2010-04-29 15:22:39.000000000 +0900
 
4
@@ -226,6 +226,7 @@
 
5
                        include/ut0vec.h        \
 
6
                        include/ut0vec.ic       \
 
7
                        include/ut0wqueue.h     \
 
8
+                       handler/innodb_patch_info.h     \
 
9
                        mem/mem0dbg.c
 
10
 
 
11
 EXTRA_LIBRARIES=       libinnobase.a
 
12
diff -ruN a/storage/innodb_plugin/Makefile.in b/storage/innodb_plugin/Makefile.in
 
13
--- a/storage/innodb_plugin/Makefile.in 2010-04-06 23:12:58.000000000 +0900
 
14
+++ b/storage/innodb_plugin/Makefile.in 2010-04-29 15:22:39.000000000 +0900
 
15
@@ -782,6 +782,7 @@
 
16
                        include/ut0vec.h        \
 
17
                        include/ut0vec.ic       \
 
18
                        include/ut0wqueue.h     \
 
19
+                       handler/innodb_patch_info.h     \
 
20
                        mem/mem0dbg.c
 
21
 
 
22
 EXTRA_LIBRARIES = libinnobase.a
 
23
diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 
24
--- a/storage/innodb_plugin/handler/ha_innodb.cc        2010-04-06 23:07:12.000000000 +0900
 
25
+++ b/storage/innodb_plugin/handler/ha_innodb.cc        2010-04-29 15:22:39.000000000 +0900
 
26
@@ -10814,7 +10814,8 @@
 
27
 i_s_innodb_cmp,
 
28
 i_s_innodb_cmp_reset,
 
29
 i_s_innodb_cmpmem,
 
30
-i_s_innodb_cmpmem_reset
 
31
+i_s_innodb_cmpmem_reset,
 
32
+i_s_innodb_patches
 
33
 mysql_declare_plugin_end;
 
34
 
 
35
 /** @brief Initialize the default value of innodb_commit_concurrency.
 
36
diff -ruN a/storage/innodb_plugin/handler/i_s.cc b/storage/innodb_plugin/handler/i_s.cc
 
37
--- a/storage/innodb_plugin/handler/i_s.cc      2010-04-06 23:07:12.000000000 +0900
 
38
+++ b/storage/innodb_plugin/handler/i_s.cc      2010-04-29 15:22:39.000000000 +0900
 
39
@@ -32,6 +32,7 @@
 
40
 #include <mysys_err.h>
 
41
 #include <my_sys.h>
 
42
 #include "i_s.h"
 
43
+#include "innodb_patch_info.h"
 
44
 #include <mysql/plugin.h>
 
45
 
 
46
 extern "C" {
 
47
@@ -217,6 +218,168 @@
 
48
        return(ret);
 
49
 }
 
50
 
 
51
+/* Fields of the dynamic table INFORMATION_SCHEMA.innodb_patches */
 
52
+static ST_FIELD_INFO   innodb_patches_fields_info[] =
 
53
+{
 
54
+#define IDX_PATCH_NAME         0
 
55
+       {STRUCT_FLD(field_name,         "name"),
 
56
+        STRUCT_FLD(field_length,       255),
 
57
+        STRUCT_FLD(field_type,         MYSQL_TYPE_STRING),
 
58
+        STRUCT_FLD(value,              0),
 
59
+        STRUCT_FLD(field_flags,        0),
 
60
+        STRUCT_FLD(old_name,           ""),
 
61
+        STRUCT_FLD(open_method,        SKIP_OPEN_TABLE)},
 
62
+
 
63
+#define IDX_PATCH_DESCR                1
 
64
+       {STRUCT_FLD(field_name,         "description"),
 
65
+        STRUCT_FLD(field_length,       255),
 
66
+        STRUCT_FLD(field_type,         MYSQL_TYPE_STRING),
 
67
+        STRUCT_FLD(value,              0),
 
68
+        STRUCT_FLD(field_flags,        0),
 
69
+        STRUCT_FLD(old_name,           ""),
 
70
+        STRUCT_FLD(open_method,        SKIP_OPEN_TABLE)},
 
71
+
 
72
+#define IDX_PATCH_COMMENT              2
 
73
+       {STRUCT_FLD(field_name,         "comment"),
 
74
+        STRUCT_FLD(field_length,       100),
 
75
+        STRUCT_FLD(field_type,         MYSQL_TYPE_STRING),
 
76
+        STRUCT_FLD(value,              0),
 
77
+        STRUCT_FLD(field_flags,        0),
 
78
+        STRUCT_FLD(old_name,           ""),
 
79
+        STRUCT_FLD(open_method,        SKIP_OPEN_TABLE)},
 
80
+
 
81
+#define IDX_PATCH_LINK                 3
 
82
+       {STRUCT_FLD(field_name,         "link"),
 
83
+        STRUCT_FLD(field_length,       255),
 
84
+        STRUCT_FLD(field_type,         MYSQL_TYPE_STRING),
 
85
+        STRUCT_FLD(value,              0),
 
86
+        STRUCT_FLD(field_flags,        0),
 
87
+        STRUCT_FLD(old_name,           ""),
 
88
+        STRUCT_FLD(open_method,        SKIP_OPEN_TABLE)},
 
89
+
 
90
+       END_OF_ST_FIELD_INFO
 
91
+};
 
92
+
 
93
+static struct st_mysql_information_schema      i_s_info =
 
94
+{
 
95
+       MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
 
96
+};
 
97
+
 
98
+/***********************************************************************
 
99
+Fill the dynamic table information_schema.innodb_patches */
 
100
+static
 
101
+int
 
102
+innodb_patches_fill(
 
103
+/*=============*/
 
104
+                               /* out: 0 on success, 1 on failure */
 
105
+       THD*            thd,    /* in: thread */
 
106
+       TABLE_LIST*     tables, /* in/out: tables to fill */
 
107
+       COND*           cond)   /* in: condition (ignored) */
 
108
+{
 
109
+       TABLE*  table   = (TABLE *) tables->table;
 
110
+       int     status  = 0;
 
111
+       int     i;
 
112
+       Field** fields;
 
113
+
 
114
+
 
115
+       DBUG_ENTER("innodb_patches_fill");
 
116
+       fields = table->field;
 
117
+
 
118
+       /* deny access to non-superusers */
 
119
+       if (check_global_access(thd, PROCESS_ACL)) {
 
120
+
 
121
+               DBUG_RETURN(0);
 
122
+       }
 
123
+
 
124
+       RETURN_IF_INNODB_NOT_STARTED(tables->schema_table_name);
 
125
+       
 
126
+       for (i = 0; innodb_enhancements[i].file; i++) {
 
127
+
 
128
+       field_store_string(fields[0],innodb_enhancements[i].file);
 
129
+       field_store_string(fields[1],innodb_enhancements[i].name);
 
130
+       field_store_string(fields[2],innodb_enhancements[i].comment);
 
131
+       field_store_string(fields[3],innodb_enhancements[i].link);
 
132
+
 
133
+       if (schema_table_store_record(thd, table)) {
 
134
+               status = 1;
 
135
+               break;
 
136
+       }
 
137
+
 
138
+       }
 
139
+
 
140
+
 
141
+       DBUG_RETURN(status);
 
142
+}
 
143
+
 
144
+/***********************************************************************
 
145
+Bind the dynamic table information_schema.innodb_patches. */
 
146
+static
 
147
+int
 
148
+innodb_patches_init(
 
149
+/*=========*/
 
150
+                       /* out: 0 on success */
 
151
+       void*   p)      /* in/out: table schema object */
 
152
+{
 
153
+       DBUG_ENTER("innodb_patches_init");
 
154
+       ST_SCHEMA_TABLE* schema = (ST_SCHEMA_TABLE*) p;
 
155
+
 
156
+       schema->fields_info = innodb_patches_fields_info;
 
157
+       schema->fill_table = innodb_patches_fill;
 
158
+
 
159
+       DBUG_RETURN(0);
 
160
+}
 
161
+
 
162
+
 
163
+UNIV_INTERN struct st_mysql_plugin      i_s_innodb_patches =
 
164
+{
 
165
+        /* the plugin type (a MYSQL_XXX_PLUGIN value) */
 
166
+        /* int */
 
167
+        STRUCT_FLD(type, MYSQL_INFORMATION_SCHEMA_PLUGIN),
 
168
+
 
169
+        /* pointer to type-specific plugin descriptor */
 
170
+        /* void* */
 
171
+        STRUCT_FLD(info, &i_s_info),
 
172
+
 
173
+        /* plugin name */
 
174
+        /* const char* */
 
175
+        STRUCT_FLD(name, "XTRADB_ENHANCEMENTS"),
 
176
+
 
177
+        /* plugin author (for SHOW PLUGINS) */
 
178
+        /* const char* */
 
179
+        STRUCT_FLD(author, "Percona"),
 
180
+
 
181
+        /* general descriptive text (for SHOW PLUGINS) */
 
182
+        /* const char* */
 
183
+        STRUCT_FLD(descr, "Enhancements applied to InnoDB plugin"),
 
184
+
 
185
+        /* the plugin license (PLUGIN_LICENSE_XXX) */
 
186
+        /* int */
 
187
+        STRUCT_FLD(license, PLUGIN_LICENSE_GPL),
 
188
+
 
189
+        /* the function to invoke when plugin is loaded */
 
190
+        /* int (*)(void*); */
 
191
+        STRUCT_FLD(init, innodb_patches_init),
 
192
+
 
193
+        /* the function to invoke when plugin is unloaded */
 
194
+        /* int (*)(void*); */
 
195
+        STRUCT_FLD(deinit, i_s_common_deinit),
 
196
+
 
197
+        /* plugin version (for SHOW PLUGINS) */
 
198
+        /* unsigned int */
 
199
+        STRUCT_FLD(version, INNODB_VERSION_SHORT),
 
200
+
 
201
+        /* struct st_mysql_show_var* */
 
202
+        STRUCT_FLD(status_vars, NULL),
 
203
+
 
204
+        /* struct st_mysql_sys_var** */
 
205
+        STRUCT_FLD(system_vars, NULL),
 
206
+
 
207
+        /* reserved for dependency checking */
 
208
+        /* void* */
 
209
+        STRUCT_FLD(__reserved1, NULL)
 
210
+};
 
211
+
 
212
+
 
213
 /* Fields of the dynamic table INFORMATION_SCHEMA.innodb_trx */
 
214
 static ST_FIELD_INFO   innodb_trx_fields_info[] =
 
215
 {
 
216
@@ -401,10 +564,6 @@
 
217
        DBUG_RETURN(0);
 
218
 }
 
219
 
 
220
-static struct st_mysql_information_schema      i_s_info =
 
221
-{
 
222
-       MYSQL_INFORMATION_SCHEMA_INTERFACE_VERSION
 
223
-};
 
224
 
 
225
 UNIV_INTERN struct st_mysql_plugin     i_s_innodb_trx =
 
226
 {
 
227
diff -ruN a/storage/innodb_plugin/handler/i_s.h b/storage/innodb_plugin/handler/i_s.h
 
228
--- a/storage/innodb_plugin/handler/i_s.h       2010-04-06 23:07:12.000000000 +0900
 
229
+++ b/storage/innodb_plugin/handler/i_s.h       2010-04-29 15:22:39.000000000 +0900
 
230
@@ -33,5 +33,6 @@
 
231
 extern struct st_mysql_plugin  i_s_innodb_cmp_reset;
 
232
 extern struct st_mysql_plugin  i_s_innodb_cmpmem;
 
233
 extern struct st_mysql_plugin  i_s_innodb_cmpmem_reset;
 
234
+extern struct st_mysql_plugin  i_s_innodb_patches;
 
235
 
 
236
 #endif /* i_s_h */
 
237
diff -ruN a/storage/innodb_plugin/handler/innodb_patch_info.h b/storage/innodb_plugin/handler/innodb_patch_info.h
 
238
--- /dev/null   1970-01-01 09:00:00.000000000 +0900
 
239
+++ b/storage/innodb_plugin/handler/innodb_patch_info.h 2010-04-29 15:22:39.000000000 +0900
 
240
@@ -0,0 +1,28 @@
 
241
+/* Copyright (C) 2002-2006 MySQL AB
 
242
+  
 
243
+   This program is free software; you can redistribute it and/or modify
 
244
+   it under the terms of the GNU General Public License as published by
 
245
+   the Free Software Foundation; version 2 of the License.
 
246
+  
 
247
+   This program is distributed in the hope that it will be useful,
 
248
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
249
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
250
+   GNU General Public License for more details.
 
251
+
 
252
+   You should have received a copy of the GNU General Public License
 
253
+   along with this program; if not, write to the Free Software
 
254
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
255
+
 
256
+#ifdef USE_PRAGMA_INTERFACE
 
257
+#pragma interface                      /* gcc class implementation */
 
258
+#endif
 
259
+
 
260
+struct innodb_enhancement {
 
261
+       const char *file;
 
262
+       const char *name;
 
263
+       const char *comment;
 
264
+       const char *link;
 
265
+}innodb_enhancements[] = {
 
266
+{"xtradb_show_enhancements","I_S.XTRADB_ENHANCEMENTS","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
267
+{NULL, NULL, NULL, NULL}
 
268
+};