Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e57307f7
Commit
e57307f7
authored
Sep 11, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-kt
parents
965ae0f7
08348339
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
169 additions
and
145 deletions
+169
-145
include/errmsg.h
include/errmsg.h
+1
-1
include/mysql/plugin.h
include/mysql/plugin.h
+1
-5
libmysqld/Makefile.am
libmysqld/Makefile.am
+1
-1
plugin/fulltext/plugin_example.c
plugin/fulltext/plugin_example.c
+4
-0
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-1
sql/Makefile.am
sql/Makefile.am
+1
-2
sql/authors.h
sql/authors.h
+2
-0
sql/handler.h
sql/handler.h
+6
-1
sql/share/errmsg.txt
sql/share/errmsg.txt
+26
-0
sql/sql_plugin.cc
sql/sql_plugin.cc
+80
-96
storage/archive/azio.c
storage/archive/azio.c
+2
-2
storage/federated/ha_federated.cc
storage/federated/ha_federated.cc
+3
-5
storage/innobase/CMakeLists.txt
storage/innobase/CMakeLists.txt
+7
-1
storage/innobase/Makefile.am
storage/innobase/Makefile.am
+3
-0
storage/innobase/handler/Makefile.am
storage/innobase/handler/Makefile.am
+29
-0
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+1
-30
storage/innobase/handler/ha_innodb.h
storage/innobase/handler/ha_innodb.h
+0
-0
storage/innobase/plug.in
storage/innobase/plug.in
+1
-0
No files found.
include/errmsg.h
View file @
e57307f7
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/* Error messages for MySQL clients */
/* Error messages for MySQL clients */
/* (Error messages for the daemon are in s
hare/language/errmsg.sys
) */
/* (Error messages for the daemon are in s
ql/share/errmsg.txt
) */
#ifdef __cplusplus
#ifdef __cplusplus
extern
"C"
{
extern
"C"
{
...
...
include/mysql/plugin.h
View file @
e57307f7
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
Plugin API. Common for all plugin types.
Plugin API. Common for all plugin types.
*/
*/
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x000
1
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x000
2
/*
/*
The allowable types of plugins
The allowable types of plugins
...
@@ -31,10 +31,6 @@
...
@@ -31,10 +31,6 @@
#define MYSQL_FTPARSER_PLUGIN 2
/* Full-text parser plugin */
#define MYSQL_FTPARSER_PLUGIN 2
/* Full-text parser plugin */
#define MYSQL_MAX_PLUGIN_TYPE_NUM 3
/* The number of plugin types */
#define MYSQL_MAX_PLUGIN_TYPE_NUM 3
/* The number of plugin types */
#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
#define __attribute__(A)
#endif
/*
/*
Macros for beginning and ending plugin declarations. Between
Macros for beginning and ending plugin declarations. Between
mysql_declare_plugin and mysql_declare_plugin_end there should
mysql_declare_plugin and mysql_declare_plugin_end there should
...
...
libmysqld/Makefile.am
View file @
e57307f7
...
@@ -44,7 +44,7 @@ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
...
@@ -44,7 +44,7 @@ libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \
noinst_HEADERS
=
embedded_priv.h emb_qcache.h
noinst_HEADERS
=
embedded_priv.h emb_qcache.h
sqlsources
=
derror.cc field.cc field_conv.cc strfunc.cc filesort.cc
\
sqlsources
=
derror.cc field.cc field_conv.cc strfunc.cc filesort.cc
\
ha_innodb.cc
ha_ndbcluster.cc
\
ha_ndbcluster.cc
\
ha_ndbcluster_binlog.cc ha_partition.cc
\
ha_ndbcluster_binlog.cc ha_partition.cc
\
handler.cc sql_handler.cc
\
handler.cc sql_handler.cc
\
hostname.cc init.cc password.c
\
hostname.cc init.cc password.c
\
...
...
plugin/fulltext/plugin_example.c
View file @
e57307f7
...
@@ -17,6 +17,10 @@
...
@@ -17,6 +17,10 @@
#include <ctype.h>
#include <ctype.h>
#include <mysql/plugin.h>
#include <mysql/plugin.h>
#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__) || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
#define __attribute__(A)
#endif
static
long
number_of_calls
=
0
;
/* for SHOW STATUS, see below */
static
long
number_of_calls
=
0
;
/* for SHOW STATUS, see below */
/*
/*
...
...
sql/CMakeLists.txt
View file @
e57307f7
...
@@ -28,7 +28,7 @@ ADD_DEFINITIONS(-DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER
...
@@ -28,7 +28,7 @@ ADD_DEFINITIONS(-DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER
ADD_EXECUTABLE
(
mysqld ../sql-common/client.c derror.cc des_key_file.cc
ADD_EXECUTABLE
(
mysqld ../sql-common/client.c derror.cc des_key_file.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
filesort.cc gstream.cc
filesort.cc gstream.cc
ha_
innodb.cc ha_
partition.cc
ha_partition.cc
handler.cc hash_filo.cc hash_filo.h
handler.cc hash_filo.cc hash_filo.h
hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc
hostname.cc init.cc item.cc item_buff.cc item_cmpfunc.cc
item_create.cc item_func.cc item_geofunc.cc item_row.cc
item_create.cc item_func.cc item_geofunc.cc item_row.cc
...
...
sql/Makefile.am
View file @
e57307f7
...
@@ -50,7 +50,6 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
...
@@ -50,7 +50,6 @@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \
sql_map.h sql_string.h unireg.h
\
sql_map.h sql_string.h unireg.h
\
sql_error.h field.h handler.h mysqld_suffix.h
\
sql_error.h field.h handler.h mysqld_suffix.h
\
ha_partition.h
\
ha_partition.h
\
ha_innodb.h
\
ha_ndbcluster.h ha_ndbcluster_binlog.h
\
ha_ndbcluster.h ha_ndbcluster_binlog.h
\
ha_ndbcluster_tables.h
\
ha_ndbcluster_tables.h
\
opt_range.h protocol.h rpl_tblmap.h
\
opt_range.h protocol.h rpl_tblmap.h
\
...
@@ -87,7 +86,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
...
@@ -87,7 +86,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc sql_partition.cc \
unireg.cc des_key_file.cc
\
unireg.cc des_key_file.cc
\
discover.cc time.cc opt_range.cc opt_sum.cc
\
discover.cc time.cc opt_range.cc opt_sum.cc
\
records.cc filesort.cc handler.cc
\
records.cc filesort.cc handler.cc
\
ha_partition.cc
ha_innodb.cc
\
ha_partition.cc
\
ha_ndbcluster.cc ha_ndbcluster_binlog.cc
\
ha_ndbcluster.cc ha_ndbcluster_binlog.cc
\
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc
\
sql_db.cc sql_table.cc sql_rename.cc sql_crypt.cc
\
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc
\
sql_load.cc mf_iocache.cc field_conv.cc sql_show.cc
\
...
...
sql/authors.h
View file @
e57307f7
...
@@ -85,6 +85,8 @@ struct show_table_authors_st show_table_authors[]= {
...
@@ -85,6 +85,8 @@ struct show_table_authors_st show_table_authors[]= {
{
"Matthias Leich"
,
"Berlin, Germany"
,
"Testing - Server"
},
{
"Matthias Leich"
,
"Berlin, Germany"
,
"Testing - Server"
},
{
"Dmitri Lenev"
,
"Moscow, Russia"
,
{
"Dmitri Lenev"
,
"Moscow, Russia"
,
"Time zones support (4.1), Triggers (5.0)"
},
"Time zones support (4.1), Triggers (5.0)"
},
{
"Arjen Lentz"
,
"Brisbane, Australia"
,
"Documentation (2001-2004), Dutch error messages, LOG2()"
},
{
"Marc Liyanage"
,
""
,
"Created Mac OS X packages"
},
{
"Marc Liyanage"
,
""
,
"Created Mac OS X packages"
},
{
"Zarko Mocnik"
,
""
,
"Sorting for Slovenian language"
},
{
"Zarko Mocnik"
,
""
,
"Sorting for Slovenian language"
},
{
"Per-Erik Martin"
,
"Uppsala, Sweden"
,
"Stored Procedures (5.0)"
},
{
"Per-Erik Martin"
,
"Uppsala, Sweden"
,
"Stored Procedures (5.0)"
},
...
...
sql/handler.h
View file @
e57307f7
...
@@ -255,7 +255,12 @@ enum legacy_db_type
...
@@ -255,7 +255,12 @@ enum legacy_db_type
DB_TYPE_BLACKHOLE_DB
,
DB_TYPE_BLACKHOLE_DB
,
DB_TYPE_PARTITION_DB
,
DB_TYPE_PARTITION_DB
,
DB_TYPE_BINLOG
,
DB_TYPE_BINLOG
,
DB_TYPE_FIRST_DYNAMIC
=
32
,
DB_TYPE_SOLID
,
DB_TYPE_PBXT
,
DB_TYPE_TABLE_FUNCTION
,
DB_TYPE_MEMCACHE
,
DB_TYPE_FALCON
,
DB_TYPE_FIRST_DYNAMIC
=
42
,
DB_TYPE_DEFAULT
=
127
// Must be last
DB_TYPE_DEFAULT
=
127
// Must be last
};
};
...
...
sql/share/errmsg.txt
View file @
e57307f7
This diff is collapsed.
Click to expand it.
sql/sql_plugin.cc
View file @
e57307f7
...
@@ -35,12 +35,17 @@ plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
...
@@ -35,12 +35,17 @@ plugin_type_init plugin_type_initialize[MYSQL_MAX_PLUGIN_TYPE_NUM]=
0
,
ha_initialize_handlerton
,
0
0
,
ha_initialize_handlerton
,
0
};
};
plugin_type_init
plugin_type_deinitialize
[
MYSQL_MAX_PLUGIN_TYPE_NUM
]
=
{
0
,
ha_finalize_handlerton
,
0
};
static
const
char
*
plugin_interface_version_sym
=
static
const
char
*
plugin_interface_version_sym
=
"_mysql_plugin_interface_version_"
;
"_mysql_plugin_interface_version_"
;
static
const
char
*
sizeof_st_plugin_sym
=
static
const
char
*
sizeof_st_plugin_sym
=
"_mysql_sizeof_struct_st_plugin_"
;
"_mysql_sizeof_struct_st_plugin_"
;
static
const
char
*
plugin_declarations_sym
=
"_mysql_plugin_declarations_"
;
static
const
char
*
plugin_declarations_sym
=
"_mysql_plugin_declarations_"
;
static
int
min_plugin_interface_version
=
0x0000
;
static
int
min_plugin_interface_version
=
MYSQL_PLUGIN_INTERFACE_VERSION
&
~
0xFF
;
/* Note that 'int version' must be the first field of every plugin
/* Note that 'int version' must be the first field of every plugin
sub-structure (plugin->info).
sub-structure (plugin->info).
*/
*/
...
@@ -469,50 +474,68 @@ static my_bool plugin_add(const LEX_STRING *name, const LEX_STRING *dl, int repo
...
@@ -469,50 +474,68 @@ static my_bool plugin_add(const LEX_STRING *name, const LEX_STRING *dl, int repo
}
}
void
plugin_deinitialize
r
(
struct
st_plugin_int
*
plugin
)
void
plugin_deinitialize
(
struct
st_plugin_int
*
plugin
)
{
{
if
(
plugin
->
plugin
->
status_vars
)
{
SHOW_VAR
array
[
2
]
=
{
{
plugin
->
plugin
->
name
,
(
char
*
)
plugin
->
plugin
->
status_vars
,
SHOW_ARRAY
},
{
0
,
0
,
SHOW_UNDEF
}
};
remove_status_vars
(
array
);
}
if
(
plugin
->
state
==
PLUGIN_IS_READY
)
if
(
plugin_type_deinitialize
[
plugin
->
plugin
->
type
]
&&
(
*
plugin_type_deinitialize
[
plugin
->
plugin
->
type
])(
plugin
))
{
sql_print_error
(
"Plugin '%s' of type %s failed deinitialization"
,
plugin
->
name
.
str
,
plugin_type_names
[
plugin
->
plugin
->
type
]);
}
if
(
plugin
->
plugin
->
status_vars
)
{
#ifdef FIX_LATER
/*
We have a problem right now where we can not prepend without
breaking backwards compatibility. We will fix this shortly so
that engines have "use names" and we wil use those for
CREATE TABLE, and use the plugin name then for adding automatic
variable names.
*/
SHOW_VAR
array
[
2
]
=
{
{
plugin
->
plugin
->
name
,
(
char
*
)
plugin
->
plugin
->
status_vars
,
SHOW_ARRAY
},
{
0
,
0
,
SHOW_UNDEF
}
};
remove_status_vars
(
array
);
#else
remove_status_vars
(
plugin
->
plugin
->
status_vars
);
#endif
/* FIX_LATER */
}
if
(
plugin
->
plugin
->
deinit
)
{
DBUG_PRINT
(
"info"
,
(
"Deinitializing plugin: '%s'"
,
plugin
->
name
.
str
));
if
(
plugin
->
plugin
->
deinit
())
{
{
if
(
plugin
->
plugin
->
deinit
)
DBUG_PRINT
(
"warning"
,
(
"Plugin '%s' deinit function returned error."
,
{
plugin
->
name
.
str
));
DBUG_PRINT
(
"info"
,
(
"Deinitializing plugin: '%s'"
,
plugin
->
name
.
str
));
if
(
plugin
->
plugin
->
deinit
())
{
DBUG_PRINT
(
"warning"
,
(
"Plugin '%s' deinit function returned error."
,
plugin
->
name
.
str
));
}
}
plugin
->
state
=
PLUGIN_IS_UNINITIALIZED
;
}
}
}
plugin
->
state
=
PLUGIN_IS_UNINITIALIZED
;
}
}
static
void
plugin_del
(
struct
st_plugin_int
*
plugin
)
{
DBUG_ENTER
(
"plugin_del(plugin)"
);
hash_delete
(
&
plugin_hash
[
plugin
->
plugin
->
type
],
(
byte
*
)
plugin
);
plugin_dl_del
(
&
plugin
->
plugin_dl
->
dl
);
plugin
->
state
=
PLUGIN_IS_FREED
;
plugin_array_version
++
;
DBUG_VOID_RETURN
;
}
static
void
plugin_del
(
const
LEX_STRING
*
name
)
static
void
plugin_del
(
const
LEX_STRING
*
name
)
{
{
uint
i
;
struct
st_plugin_int
*
plugin
;
struct
st_plugin_int
*
plugin
;
DBUG_ENTER
(
"plugin_del"
);
DBUG_ENTER
(
"plugin_del
(name)
"
);
if
((
plugin
=
plugin_find_internal
(
name
,
MYSQL_ANY_PLUGIN
)))
if
((
plugin
=
plugin_find_internal
(
name
,
MYSQL_ANY_PLUGIN
)))
{
plugin_del
(
plugin
);
plugin_deinitializer
(
plugin
);
hash_delete
(
&
plugin_hash
[
plugin
->
plugin
->
type
],
(
byte
*
)
plugin
);
plugin_dl_del
(
&
plugin
->
plugin_dl
->
dl
);
plugin
->
state
=
PLUGIN_IS_FREED
;
plugin_array_version
++
;
}
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
void
plugin_unlock
(
struct
st_plugin_int
*
plugin
)
void
plugin_unlock
(
struct
st_plugin_int
*
plugin
)
{
{
DBUG_ENTER
(
"plugin_unlock"
);
DBUG_ENTER
(
"plugin_unlock"
);
...
@@ -521,9 +544,8 @@ void plugin_unlock(struct st_plugin_int *plugin)
...
@@ -521,9 +544,8 @@ void plugin_unlock(struct st_plugin_int *plugin)
plugin
->
ref_count
--
;
plugin
->
ref_count
--
;
if
(
plugin
->
state
==
PLUGIN_IS_DELETED
&&
!
plugin
->
ref_count
)
if
(
plugin
->
state
==
PLUGIN_IS_DELETED
&&
!
plugin
->
ref_count
)
{
{
if
(
plugin
->
plugin
->
deinit
)
plugin_deinitialize
(
plugin
);
plugin
->
plugin
->
deinit
();
plugin_del
(
plugin
);
plugin_del
(
&
plugin
->
name
);
}
}
rw_unlock
(
&
THR_LOCK_plugin
);
rw_unlock
(
&
THR_LOCK_plugin
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
@@ -537,15 +559,15 @@ static int plugin_initialize(struct st_plugin_int *plugin)
...
@@ -537,15 +559,15 @@ static int plugin_initialize(struct st_plugin_int *plugin)
if
(
plugin
->
plugin
->
status_vars
)
if
(
plugin
->
plugin
->
status_vars
)
{
{
#ifdef FIX_LATER
#ifdef FIX_LATER
/*
/*
We have a problem right now where we can not prepend without
We have a problem right now where we can not prepend without
breaking backwards compatibility. We will fix this shortly so
breaking backwards compatibility. We will fix this shortly so
that engines have "use names" and we wil use those for
that engines have "use names" and we wil use those for
CREATE TABLE, and use the plugin name then for adding automatic
CREATE TABLE, and use the plugin name then for adding automatic
variable names.
variable names.
*/
*/
SHOW_VAR
array
[
2
]
=
{
SHOW_VAR
array
[
2
]
=
{
{
plugin
->
name
,
(
char
*
)
plugin
->
status_vars
,
SHOW_ARRAY
},
{
plugin
->
plugin
->
name
,
(
char
*
)
plugin
->
plugin
->
status_vars
,
SHOW_ARRAY
},
{
0
,
0
,
SHOW_UNDEF
}
{
0
,
0
,
SHOW_UNDEF
}
};
};
if
(
add_status_vars
(
array
))
// add_status_vars makes a copy
if
(
add_status_vars
(
array
))
// add_status_vars makes a copy
...
@@ -578,53 +600,6 @@ static int plugin_initialize(struct st_plugin_int *plugin)
...
@@ -578,53 +600,6 @@ static int plugin_initialize(struct st_plugin_int *plugin)
DBUG_RETURN
(
1
);
DBUG_RETURN
(
1
);
}
}
static
int
plugin_finalize
(
THD
*
thd
,
struct
st_plugin_int
*
plugin
)
{
int
rc
;
DBUG_ENTER
(
"plugin_finalize"
);
if
(
plugin
->
ref_count
)
{
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"Plugin is busy and will be uninstalled on shutdown"
);
goto
err
;
}
switch
(
plugin
->
plugin
->
type
)
{
case
MYSQL_STORAGE_ENGINE_PLUGIN
:
if
(
ha_finalize_handlerton
(
plugin
))
{
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"Storage engine shutdown failed. "
"It will be uninstalled on shutdown"
);
sql_print_warning
(
"Storage engine '%s' shutdown failed. "
"It will be uninstalled on shutdown"
,
plugin
->
name
.
str
);
goto
err
;
}
break
;
default:
break
;
}
if
(
plugin
->
plugin
->
deinit
)
{
if
((
rc
=
plugin
->
plugin
->
deinit
()))
{
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"Plugin deinit failed. "
"It will be uninstalled on shutdown"
);
sql_print_warning
(
"Plugin '%s' deinit failed. "
"It will be uninstalled on shutdown"
,
plugin
->
name
.
str
);
goto
err
;
}
}
DBUG_RETURN
(
0
);
err:
DBUG_RETURN
(
1
);
}
static
byte
*
get_hash_key
(
const
byte
*
buff
,
uint
*
length
,
static
byte
*
get_hash_key
(
const
byte
*
buff
,
uint
*
length
,
my_bool
not_used
__attribute__
((
unused
)))
my_bool
not_used
__attribute__
((
unused
)))
{
{
...
@@ -637,7 +612,7 @@ static byte *get_hash_key(const byte *buff, uint *length,
...
@@ -637,7 +612,7 @@ static byte *get_hash_key(const byte *buff, uint *length,
/*
/*
The logic is that we first load and initialize all compiled in plugins.
The logic is that we first load and initialize all compiled in plugins.
From there we load up the dynamic types (assuming we have not been told to
From there we load up the dynamic types (assuming we have not been told to
skip this part).
skip this part).
Finally we inializie everything, aka the dynamic that have yet to initialize.
Finally we inializie everything, aka the dynamic that have yet to initialize.
*/
*/
...
@@ -666,7 +641,7 @@ int plugin_init(int skip_dynamic_loading)
...
@@ -666,7 +641,7 @@ int plugin_init(int skip_dynamic_loading)
goto
err
;
goto
err
;
}
}
/*
/*
First we register builtin plugins
First we register builtin plugins
*/
*/
for
(
builtins
=
mysqld_builtins
;
*
builtins
;
builtins
++
)
for
(
builtins
=
mysqld_builtins
;
*
builtins
;
builtins
++
)
...
@@ -702,7 +677,10 @@ int plugin_init(int skip_dynamic_loading)
...
@@ -702,7 +677,10 @@ int plugin_init(int skip_dynamic_loading)
if
(
tmp
->
state
==
PLUGIN_IS_UNINITIALIZED
)
if
(
tmp
->
state
==
PLUGIN_IS_UNINITIALIZED
)
{
{
if
(
plugin_initialize
(
tmp
))
if
(
plugin_initialize
(
tmp
))
plugin_del
(
&
tmp
->
name
);
{
plugin_deinitialize
(
tmp
);
plugin_del
(
tmp
);
}
}
}
}
}
...
@@ -812,7 +790,7 @@ void plugin_shutdown(void)
...
@@ -812,7 +790,7 @@ void plugin_shutdown(void)
{
{
struct
st_plugin_int
*
tmp
=
dynamic_element
(
&
plugin_array
,
i
,
struct
st_plugin_int
*
tmp
=
dynamic_element
(
&
plugin_array
,
i
,
struct
st_plugin_int
*
);
struct
st_plugin_int
*
);
plugin_deinitialize
r
(
tmp
);
plugin_deinitialize
(
tmp
);
}
}
...
@@ -862,7 +840,7 @@ my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING
...
@@ -862,7 +840,7 @@ my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING
{
{
my_error
(
ER_CANT_INITIALIZE_UDF
,
MYF
(
0
),
name
->
str
,
my_error
(
ER_CANT_INITIALIZE_UDF
,
MYF
(
0
),
name
->
str
,
"Plugin initialization function failed."
);
"Plugin initialization function failed."
);
goto
err
;
goto
deinit
;
}
}
table
->
use_all_columns
();
table
->
use_all_columns
();
...
@@ -879,10 +857,9 @@ my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING
...
@@ -879,10 +857,9 @@ my_bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING
rw_unlock
(
&
THR_LOCK_plugin
);
rw_unlock
(
&
THR_LOCK_plugin
);
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
deinit:
deinit:
if
(
tmp
->
plugin
->
deinit
)
plugin_deinitialize
(
tmp
);
tmp
->
plugin
->
deinit
();
err:
err:
plugin_del
(
name
);
plugin_del
(
tmp
);
rw_unlock
(
&
THR_LOCK_plugin
);
rw_unlock
(
&
THR_LOCK_plugin
);
DBUG_RETURN
(
TRUE
);
DBUG_RETURN
(
TRUE
);
}
}
...
@@ -917,10 +894,17 @@ my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
...
@@ -917,10 +894,17 @@ my_bool mysql_uninstall_plugin(THD *thd, const LEX_STRING *name)
goto
err
;
goto
err
;
}
}
if
(
!
plugin_finalize
(
thd
,
plugin
))
if
(
plugin
->
ref_count
)
plugin_del
(
name
);
{
else
push_warning
(
thd
,
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
0
,
"Plugin is busy and will be uninstalled on shutdown"
);
plugin
->
state
=
PLUGIN_IS_DELETED
;
plugin
->
state
=
PLUGIN_IS_DELETED
;
}
else
{
plugin_deinitialize
(
plugin
);
plugin_del
(
plugin
);
}
table
->
use_all_columns
();
table
->
use_all_columns
();
table
->
field
[
0
]
->
store
(
name
->
str
,
name
->
length
,
system_charset_info
);
table
->
field
[
0
]
->
store
(
name
->
str
,
name
->
length
,
system_charset_info
);
...
@@ -983,7 +967,6 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
...
@@ -983,7 +967,6 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
for
(
idx
=
0
;
idx
<
total
;
idx
++
)
for
(
idx
=
0
;
idx
<
total
;
idx
++
)
{
{
plugin
=
plugins
[
idx
];
if
(
unlikely
(
version
!=
plugin_array_version
))
if
(
unlikely
(
version
!=
plugin_array_version
))
{
{
rw_rdlock
(
&
THR_LOCK_plugin
);
rw_rdlock
(
&
THR_LOCK_plugin
);
...
@@ -992,6 +975,7 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
...
@@ -992,6 +975,7 @@ my_bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func,
plugins
[
i
]
=
0
;
plugins
[
i
]
=
0
;
rw_unlock
(
&
THR_LOCK_plugin
);
rw_unlock
(
&
THR_LOCK_plugin
);
}
}
plugin
=
plugins
[
idx
];
if
(
plugin
&&
func
(
thd
,
plugin
,
arg
))
if
(
plugin
&&
func
(
thd
,
plugin
,
arg
))
goto
err
;
goto
err
;
}
}
...
...
storage/archive/azio.c
View file @
e57307f7
...
@@ -125,7 +125,7 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
...
@@ -125,7 +125,7 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
buffer
[
8
]
=
0
/*xflags*/
;
buffer
[
8
]
=
0
/*xflags*/
;
buffer
[
9
]
=
0x03
;
buffer
[
9
]
=
0x03
;
s
->
start
=
10L
;
s
->
start
=
10L
;
my_write
(
s
->
file
,
buffer
,
s
->
start
,
MYF
(
0
));
my_write
(
s
->
file
,
buffer
,
(
uint
)
s
->
start
,
MYF
(
0
));
/* We use 10L instead of ftell(s->file) to because ftell causes an
/* We use 10L instead of ftell(s->file) to because ftell causes an
* fflush on some systems. This version of the library doesn't use
* fflush on some systems. This version of the library doesn't use
* start anyway in write mode, so this initialization is not
* start anyway in write mode, so this initialization is not
...
@@ -503,7 +503,7 @@ int azrewind (s)
...
@@ -503,7 +503,7 @@ int azrewind (s)
if
(
!
s
->
transparent
)
(
void
)
inflateReset
(
&
s
->
stream
);
if
(
!
s
->
transparent
)
(
void
)
inflateReset
(
&
s
->
stream
);
s
->
in
=
0
;
s
->
in
=
0
;
s
->
out
=
0
;
s
->
out
=
0
;
return
my_seek
(
s
->
file
,
s
->
start
,
MY_SEEK_SET
,
MYF
(
0
));
return
my_seek
(
s
->
file
,
(
int
)
s
->
start
,
MY_SEEK_SET
,
MYF
(
0
));
}
}
/* ===========================================================================
/* ===========================================================================
...
...
storage/federated/ha_federated.cc
View file @
e57307f7
...
@@ -1263,7 +1263,6 @@ bool ha_federated::create_where_from_key(String *to,
...
@@ -1263,7 +1263,6 @@ bool ha_federated::create_where_from_key(String *to,
if
(
tmp
.
append
(
STRING_WITH_LEN
(
") "
)))
if
(
tmp
.
append
(
STRING_WITH_LEN
(
") "
)))
goto
err
;
goto
err
;
next_loop:
if
(
store_length
>=
length
)
if
(
store_length
>=
length
)
break
;
break
;
DBUG_PRINT
(
"info"
,
(
"remainder %d"
,
remainder
));
DBUG_PRINT
(
"info"
,
(
"remainder %d"
,
remainder
));
...
@@ -2016,8 +2015,8 @@ int ha_federated::delete_row(const byte *buf)
...
@@ -2016,8 +2015,8 @@ int ha_federated::delete_row(const byte *buf)
{
{
DBUG_RETURN
(
stash_remote_error
());
DBUG_RETURN
(
stash_remote_error
());
}
}
stats
.
deleted
+=
mysql
->
affected_rows
;
stats
.
deleted
+=
(
ha_rows
)
mysql
->
affected_rows
;
stats
.
records
-=
mysql
->
affected_rows
;
stats
.
records
-=
(
ha_rows
)
mysql
->
affected_rows
;
DBUG_PRINT
(
"info"
,
DBUG_PRINT
(
"info"
,
(
"rows deleted %d rows deleted for all time %d"
,
(
"rows deleted %d rows deleted for all time %d"
,
int
(
mysql
->
affected_rows
),
stats
.
deleted
));
int
(
mysql
->
affected_rows
),
stats
.
deleted
));
...
@@ -2373,7 +2372,6 @@ int ha_federated::rnd_next(byte *buf)
...
@@ -2373,7 +2372,6 @@ int ha_federated::rnd_next(byte *buf)
int
ha_federated
::
read_next
(
byte
*
buf
,
MYSQL_RES
*
result
)
int
ha_federated
::
read_next
(
byte
*
buf
,
MYSQL_RES
*
result
)
{
{
int
retval
;
int
retval
;
my_ulonglong
num_rows
;
MYSQL_ROW
row
;
MYSQL_ROW
row
;
DBUG_ENTER
(
"ha_federated::read_next"
);
DBUG_ENTER
(
"ha_federated::read_next"
);
...
@@ -2867,7 +2865,7 @@ int ha_federated::connection_autocommit(bool state)
...
@@ -2867,7 +2865,7 @@ int ha_federated::connection_autocommit(bool state)
{
{
const
char
*
text
;
const
char
*
text
;
DBUG_ENTER
(
"ha_federated::connection_autocommit"
);
DBUG_ENTER
(
"ha_federated::connection_autocommit"
);
text
=
(
state
==
true
)
?
"SET AUTOCOMMIT=1"
:
"SET AUTOCOMMIT=0"
;
text
=
(
state
==
TRUE
)
?
"SET AUTOCOMMIT=1"
:
"SET AUTOCOMMIT=0"
;
DBUG_RETURN
(
execute_simple_query
(
text
,
16
));
DBUG_RETURN
(
execute_simple_query
(
text
,
16
));
}
}
...
...
storage/innobase/CMakeLists.txt
View file @
e57307f7
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
#SET(CMAKE_C_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX")
#SET(CMAKE_C_FLAGS_DEBUG "-DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS
(
-DMYSQL_SERVER -D_WIN32 -DWIN32 -D_LIB
)
ADD_DEFINITIONS
(
-DMYSQL_SERVER -D_WIN32 -DWIN32 -D_LIB
)
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include include
)
INCLUDE_DIRECTORIES
(
${
CMAKE_SOURCE_DIR
}
/include
${
CMAKE_SOURCE_DIR
}
/zlib
include
handler
${
CMAKE_SOURCE_DIR
}
/sql
${
CMAKE_SOURCE_DIR
}
/regex
${
CMAKE_SOURCE_DIR
}
/extra/yassl/include
)
ADD_LIBRARY
(
innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
ADD_LIBRARY
(
innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
data/data0data.c data/data0type.c
data/data0data.c data/data0type.c
...
@@ -23,6 +28,7 @@ ADD_LIBRARY(innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
...
@@ -23,6 +28,7 @@ ADD_LIBRARY(innobase btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c
os/os0file.c os/os0proc.c os/os0sync.c os/os0thread.c
page/page0cur.c page/page0page.c
page/page0cur.c page/page0page.c
que/que0que.c
que/que0que.c
handler/ha_innodb.cc
read/read0read.c
read/read0read.c
rem/rem0cmp.c rem/rem0rec.c
rem/rem0cmp.c rem/rem0rec.c
row/row0ins.c row/row0mysql.c row/row0purge.c row/row0row.c row/row0sel.c row/row0uins.c
row/row0ins.c row/row0mysql.c row/row0purge.c row/row0row.c row/row0sel.c row/row0uins.c
...
...
storage/innobase/Makefile.am
View file @
e57307f7
...
@@ -34,6 +34,7 @@ noinst_HEADERS =
...
@@ -34,6 +34,7 @@ noinst_HEADERS =
SUBDIRS
=
os ut btr buf data dict dyn
eval
fil fsp fut
\
SUBDIRS
=
os ut btr buf data dict dyn
eval
fil fsp fut
\
ha ibuf lock log mach mem mtr page
\
ha ibuf lock log mach mem mtr page
\
handler
\
pars que
read
rem row srv
sync
thr trx usr
pars que
read
rem row srv
sync
thr trx usr
EXTRA_DIST
=
include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr0cur.ic
\
EXTRA_DIST
=
include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr0cur.ic
\
...
@@ -86,6 +87,7 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr
...
@@ -86,6 +87,7 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr
include/univ.i include/usr0sess.h include/usr0sess.ic include/usr0types.h
\
include/univ.i include/usr0sess.h include/usr0sess.ic include/usr0types.h
\
include/ut0byte.h include/ut0byte.ic include/ut0dbg.h include/ut0lst.h
\
include/ut0byte.h include/ut0byte.ic include/ut0dbg.h include/ut0lst.h
\
include/ut0mem.h include/ut0mem.ic include/ut0rnd.h include/ut0rnd.ic
\
include/ut0mem.h include/ut0mem.ic include/ut0rnd.h include/ut0rnd.ic
\
handler/ha_innodb.h
\
include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h
\
include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h
\
include/ut0list.h include/ut0list.ic
\
include/ut0list.h include/ut0list.ic
\
include/ut0wqueue.h
\
include/ut0wqueue.h
\
...
@@ -102,6 +104,7 @@ libinnobase_a_LIBADD = usr/libusr.a srv/libsrv.a dict/libdict.a \
...
@@ -102,6 +104,7 @@ libinnobase_a_LIBADD = usr/libusr.a srv/libsrv.a dict/libdict.a \
page/libpage.a rem/librem.a thr/libthr.a
\
page/libpage.a rem/librem.a thr/libthr.a
\
sync
/libsync.a data/libdata.a mach/libmach.a
\
sync
/libsync.a data/libdata.a mach/libmach.a
\
ha/libha.a dyn/libdyn.a mem/libmem.a
\
ha/libha.a dyn/libdyn.a mem/libmem.a
\
handler/libhandler.a
\
ut/libut.a os/libos.a ut/libut.a
ut/libut.a os/libos.a ut/libut.a
libinnobase_a_SOURCES
=
libinnobase_a_SOURCES
=
...
...
storage/innobase/handler/Makefile.am
0 → 100644
View file @
e57307f7
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
# & Innobase Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
include
../include/Makefile.i
DEFS
=
-DMYSQL_SERVER
@DEFS@
noinst_LIBRARIES
=
libhandler.a
libhandler_a_SOURCES
=
ha_innodb.cc
EXTRA_PROGRAMS
=
# Don't update the files from bitkeeper
%
::
SCCS/s.%
s
ql
/ha_innodb.cc
→
s
torage/innobase/handler
/ha_innodb.cc
View file @
e57307f7
...
@@ -31,8 +31,7 @@ have disables the InnoDB inlining in this file. */
...
@@ -31,8 +31,7 @@ have disables the InnoDB inlining in this file. */
#pragma implementation // gcc: Class implementation
#pragma implementation // gcc: Class implementation
#endif
#endif
#include "mysql_priv.h"
#include <mysql_priv.h>
#include "slave.h"
#include <m_ctype.h>
#include <m_ctype.h>
#include <hash.h>
#include <hash.h>
...
@@ -1600,21 +1599,6 @@ innobase_init(void)
...
@@ -1600,21 +1599,6 @@ innobase_init(void)
pthread_cond_init
(
&
commit_cond
,
NULL
);
pthread_cond_init
(
&
commit_cond
,
NULL
);
innodb_inited
=
1
;
innodb_inited
=
1
;
/* If this is a replication slave and we needed to do a crash recovery,
set the master binlog position to what InnoDB internally knew about
how far we got transactions durable inside InnoDB. There is a
problem here: if the user used also MyISAM tables, InnoDB might not
know the right position for them.
THIS DOES NOT WORK CURRENTLY because replication seems to initialize
glob_mi also after innobase_init. */
/* if (trx_sys_mysql_master_log_pos != -1) {
ut_memcpy(glob_mi.log_file_name, trx_sys_mysql_master_log_name,
1 + ut_strlen(trx_sys_mysql_master_log_name));
glob_mi.pos = trx_sys_mysql_master_log_pos;
}
*/
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
error:
error:
have_innodb
=
SHOW_OPTION_DISABLED
;
// If we couldn't use handler
have_innodb
=
SHOW_OPTION_DISABLED
;
// If we couldn't use handler
...
@@ -1689,19 +1673,6 @@ innobase_commit_low(
...
@@ -1689,19 +1673,6 @@ innobase_commit_low(
return
;
return
;
}
}
#ifdef HAVE_REPLICATION
THD
*
thd
=
current_thd
;
if
(
thd
&&
thd
->
slave_thread
)
{
/* Update the replication position info inside InnoDB */
trx
->
mysql_master_log_file_name
=
active_mi
->
rli
.
group_master_log_name
;
trx
->
mysql_master_log_pos
=
((
ib_longlong
)
active_mi
->
rli
.
future_group_master_log_pos
);
}
#endif
/* HAVE_REPLICATION */
trx_commit_for_mysql
(
trx
);
trx_commit_for_mysql
(
trx
);
}
}
...
...
s
ql
/ha_innodb.h
→
s
torage/innobase/handler
/ha_innodb.h
View file @
e57307f7
File moved
storage/innobase/plug.in
View file @
e57307f7
...
@@ -65,6 +65,7 @@ MYSQL_PLUGIN_ACTIONS(innobase, [
...
@@ -65,6 +65,7 @@ MYSQL_PLUGIN_ACTIONS(innobase, [
storage/innobase/sync/Makefile
storage/innobase/sync/Makefile
storage/innobase/thr/Makefile
storage/innobase/thr/Makefile
storage/innobase/trx/Makefile
storage/innobase/trx/Makefile
storage/innobase/handler/Makefile
storage/innobase/usr/Makefile)
storage/innobase/usr/Makefile)
])
])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment