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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
5214ed48
Commit
5214ed48
authored
Nov 02, 2006
by
baker@bk-internal.mysql.com
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-arch
parents
0d27df6f
25409dbd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
24 deletions
+17
-24
sql/handler.cc
sql/handler.cc
+15
-23
sql/handler.h
sql/handler.h
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-1
No files found.
sql/handler.cc
View file @
5214ed48
...
@@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
...
@@ -376,11 +376,12 @@ int ha_finalize_handlerton(st_plugin_int *plugin)
case
SHOW_OPTION_YES
:
case
SHOW_OPTION_YES
:
if
(
installed_htons
[
hton
->
db_type
]
==
hton
)
if
(
installed_htons
[
hton
->
db_type
]
==
hton
)
installed_htons
[
hton
->
db_type
]
=
NULL
;
installed_htons
[
hton
->
db_type
]
=
NULL
;
if
(
hton
->
panic
&&
hton
->
panic
(
hton
,
HA_PANIC_CLOSE
))
DBUG_RETURN
(
1
);
break
;
break
;
};
};
if
(
hton
->
panic
)
hton
->
panic
(
hton
,
HA_PANIC_CLOSE
);
if
(
plugin
->
plugin
->
deinit
)
if
(
plugin
->
plugin
->
deinit
)
{
{
/*
/*
...
@@ -509,31 +510,22 @@ int ha_init()
...
@@ -509,31 +510,22 @@ int ha_init()
DBUG_RETURN
(
error
);
DBUG_RETURN
(
error
);
}
}
/*
int
ha_end
()
close, flush or restart databases
Ignore this for other databases than ours
*/
static
my_bool
panic_handlerton
(
THD
*
unused1
,
st_plugin_int
*
plugin
,
void
*
arg
)
{
{
handlerton
*
hton
=
(
handlerton
*
)
plugin
->
data
;
int
error
=
0
;
if
(
hton
->
state
==
SHOW_OPTION_YES
&&
hton
->
panic
)
DBUG_ENTER
(
"ha_end"
);
((
int
*
)
arg
)[
0
]
|=
hton
->
panic
(
hton
,
(
enum
ha_panic_function
)((
int
*
)
arg
)[
1
]);
return
FALSE
;
}
int
ha_panic
(
enum
ha_panic_function
flag
)
{
int
error
[
2
];
error
[
0
]
=
0
;
error
[
1
]
=
(
int
)
flag
;
/*
plugin_foreach
(
NULL
,
panic_handlerton
,
MYSQL_STORAGE_ENGINE_PLUGIN
,
error
);
This should be eventualy based on the graceful shutdown flag.
So if flag is equal to HA_PANIC_CLOSE, the deallocate
the errors.
*/
if
(
ha_finish_errors
())
error
=
1
;
if
(
flag
==
HA_PANIC_CLOSE
&&
ha_finish_errors
())
DBUG_RETURN
(
error
);
error
[
0
]
=
1
;
}
return
error
[
0
];
}
/* ha_panic */
static
my_bool
dropdb_handlerton
(
THD
*
unused1
,
st_plugin_int
*
plugin
,
static
my_bool
dropdb_handlerton
(
THD
*
unused1
,
st_plugin_int
*
plugin
,
void
*
path
)
void
*
path
)
...
...
sql/handler.h
View file @
5214ed48
...
@@ -1654,6 +1654,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
...
@@ -1654,6 +1654,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type)
/* basic stuff */
/* basic stuff */
int
ha_init
(
void
);
int
ha_init
(
void
);
int
ha_end
(
void
);
int
ha_initialize_handlerton
(
st_plugin_int
*
plugin
);
int
ha_initialize_handlerton
(
st_plugin_int
*
plugin
);
int
ha_finalize_handlerton
(
st_plugin_int
*
plugin
);
int
ha_finalize_handlerton
(
st_plugin_int
*
plugin
);
...
...
sql/mysqld.cc
View file @
5214ed48
...
@@ -1186,7 +1186,6 @@ void clean_up(bool print_message)
...
@@ -1186,7 +1186,6 @@ void clean_up(bool print_message)
lex_free
();
/* Free some memory */
lex_free
();
/* Free some memory */
set_var_free
();
set_var_free
();
free_charsets
();
free_charsets
();
(
void
)
ha_panic
(
HA_PANIC_CLOSE
);
/* close all tables and logs */
if
(
!
opt_noacl
)
if
(
!
opt_noacl
)
{
{
#ifdef HAVE_DLOPEN
#ifdef HAVE_DLOPEN
...
@@ -1194,6 +1193,7 @@ void clean_up(bool print_message)
...
@@ -1194,6 +1193,7 @@ void clean_up(bool print_message)
#endif
#endif
}
}
plugin_shutdown
();
plugin_shutdown
();
ha_end
();
if
(
tc_log
)
if
(
tc_log
)
tc_log
->
close
();
tc_log
->
close
();
xid_cache_free
();
xid_cache_free
();
...
...
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