Skip to content

Commit

Permalink
Plugin API: increase SHOW_VAR_FUNC_BUFF_SIZE for 64-bit CPUs
Browse files Browse the repository at this point in the history
instead of having it 1K everywhere, make it 1K on 32-bit and 2K on 64-bit.
As the latter has larger pointers (and larger sizeof(SHOW_VAR),
it needs a larger buffer to store the same amount of SHOW_VARs
  • Loading branch information
vuvova committed Oct 10, 2014
1 parent 03ec351 commit 3d9aa6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/mysql/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ typedef struct st_mysql_xid MYSQL_XID;
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0104

/* MariaDB plugin interface version */
#define MARIA_PLUGIN_INTERFACE_VERSION 0x0109
#define MARIA_PLUGIN_INTERFACE_VERSION 0x010a

/*
The allowable types of plugins
Expand Down Expand Up @@ -186,7 +186,7 @@ struct st_mysql_show_var {
enum enum_mysql_show_type type;
};

#define SHOW_VAR_FUNC_BUFF_SIZE 1024
#define SHOW_VAR_FUNC_BUFF_SIZE (256 * sizeof(void*))
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *);


Expand Down
2 changes: 1 addition & 1 deletion mysql-test/r/handlersocket.result
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugin_version 1.0
plugin_status ACTIVE
plugin_type DAEMON
plugin_library handlersocket.so
plugin_library_version 1.9
plugin_library_version 1.10
plugin_author higuchi dot akira at dena dot jp
plugin_description Direct access into InnoDB
plugin_license BSD
Expand Down
6 changes: 3 additions & 3 deletions mysql-test/r/plugin.result
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
PLUGIN_LIBRARY_VERSION 1.9
PLUGIN_LIBRARY_VERSION 1.10
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
Expand All @@ -28,7 +28,7 @@ PLUGIN_STATUS ACTIVE
PLUGIN_TYPE DAEMON
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
PLUGIN_LIBRARY_VERSION 1.9
PLUGIN_LIBRARY_VERSION 1.10
PLUGIN_AUTHOR Sergei Golubchik
PLUGIN_DESCRIPTION Unusable Daemon
PLUGIN_LICENSE GPL
Expand Down Expand Up @@ -67,7 +67,7 @@ PLUGIN_STATUS DELETED
PLUGIN_TYPE STORAGE ENGINE
PLUGIN_TYPE_VERSION #
PLUGIN_LIBRARY ha_example.so
PLUGIN_LIBRARY_VERSION 1.9
PLUGIN_LIBRARY_VERSION 1.10
PLUGIN_AUTHOR Brian Aker, MySQL AB
PLUGIN_DESCRIPTION Example storage engine
PLUGIN_LICENSE GPL
Expand Down
4 changes: 2 additions & 2 deletions mysql-test/suite/plugins/r/show_all_plugins.result
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Variable_name Value
Opened_plugin_libraries 0
select * from information_schema.all_plugins where plugin_library='ha_example.so';
PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE LOAD_OPTION PLUGIN_MATURITY PLUGIN_AUTH_VERSION
EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.9 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.9 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.10 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.10 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
show status like '%libraries%';
Variable_name Value
Opened_plugin_libraries 1
Expand Down

0 comments on commit 3d9aa6c

Please sign in to comment.