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
886b8603
Commit
886b8603
authored
Apr 15, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-9815
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
77f6f5b1
6632ed5c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
sql/handler.cc
sql/handler.cc
+14
-0
sql/handler.h
sql/handler.h
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+12
-0
No files found.
sql/handler.cc
View file @
886b8603
...
...
@@ -145,6 +145,20 @@ const char *ha_get_storage_engine(enum db_type db_type)
return
"none"
;
}
my_bool
ha_storage_engine_is_enabled
(
enum
db_type
database_type
)
{
show_table_type_st
*
types
;
for
(
types
=
sys_table_types
;
types
->
type
;
types
++
)
{
if
((
database_type
==
types
->
db_type
)
&&
(
*
types
->
value
==
SHOW_OPTION_YES
))
return
TRUE
;
}
return
FALSE
;
}
/* Use other database handler if databasehandler is not incompiled */
enum
db_type
ha_checktype
(
enum
db_type
database_type
)
...
...
sql/handler.h
View file @
886b8603
...
...
@@ -542,6 +542,7 @@ int ha_init(void);
int
ha_panic
(
enum
ha_panic_function
flag
);
void
ha_close_connection
(
THD
*
thd
);
enum
db_type
ha_checktype
(
enum
db_type
database_type
);
my_bool
ha_storage_engine_is_enabled
(
enum
db_type
database_type
);
int
ha_create_table
(
const
char
*
name
,
HA_CREATE_INFO
*
create_info
,
bool
update_create_info
);
int
ha_create_table_from_engine
(
THD
*
thd
,
const
char
*
db
,
const
char
*
name
,
...
...
sql/mysqld.cc
View file @
886b8603
...
...
@@ -6435,6 +6435,18 @@ static void get_options(int argc,char **argv)
sql_print_warning
(
"this binary does not contain BDB storage engine"
);
#endif
/*
Check that the default storage engine is actually available.
*/
if
(
!
ha_storage_engine_is_enabled
((
enum
db_type
)
global_system_variables
.
table_type
))
{
sql_print_error
(
"Default storage engine (%s) is not available"
,
ha_get_storage_engine
((
enum
db_type
)
global_system_variables
.
table_type
));
exit
(
1
);
}
if
(
argc
>
0
)
{
fprintf
(
stderr
,
"%s: Too many arguments (first extra is '%s').
\n
Use --help to get a list of available options
\n
"
,
my_progname
,
*
argv
);
...
...
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