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
22f908db
Commit
22f908db
authored
May 08, 2006
by
marko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge changes by MySQL AB to ha_innodb.cc:
WL#2257 REFERENTIAL_CONSTRAINTS view WL#3201 pluggable storage engines
parent
e8b80a5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
32 deletions
+74
-32
handler/ha_innodb.cc
handler/ha_innodb.cc
+74
-32
No files found.
handler/ha_innodb.cc
View file @
22f908db
...
@@ -42,6 +42,7 @@ have disables the InnoDB inlining in this file. */
...
@@ -42,6 +42,7 @@ have disables the InnoDB inlining in this file. */
#define MAX_ULONG_BIT ((ulong) 1 << (sizeof(ulong)*8-1))
#define MAX_ULONG_BIT ((ulong) 1 << (sizeof(ulong)*8-1))
#ifdef WITH_INNOBASE_STORAGE_ENGINE
#include "ha_innodb.h"
#include "ha_innodb.h"
pthread_mutex_t
innobase_share_mutex
,
/* to protect innobase_open_files */
pthread_mutex_t
innobase_share_mutex
,
/* to protect innobase_open_files */
...
@@ -204,11 +205,15 @@ static int innobase_savepoint(THD* thd, void *savepoint);
...
@@ -204,11 +205,15 @@ static int innobase_savepoint(THD* thd, void *savepoint);
static
int
innobase_release_savepoint
(
THD
*
thd
,
void
*
savepoint
);
static
int
innobase_release_savepoint
(
THD
*
thd
,
void
*
savepoint
);
static
handler
*
innobase_create_handler
(
TABLE_SHARE
*
table
);
static
handler
*
innobase_create_handler
(
TABLE_SHARE
*
table
);
static
const
char
innobase_hton_name
[]
=
"InnoDB"
;
static
const
char
innobase_hton_comment
[]
=
"Supports transactions, row-level locking, and foreign keys"
;
handlerton
innobase_hton
=
{
handlerton
innobase_hton
=
{
MYSQL_HANDLERTON_INTERFACE_VERSION
,
MYSQL_HANDLERTON_INTERFACE_VERSION
,
"InnoDB"
,
innobase_hton_name
,
SHOW_OPTION_YES
,
SHOW_OPTION_YES
,
"Supports transactions, row-level locking, and foreign keys"
,
innobase_hton_comment
,
DB_TYPE_INNODB
,
DB_TYPE_INNODB
,
innobase_init
,
innobase_init
,
0
,
/* slot */
0
,
/* slot */
...
@@ -238,7 +243,7 @@ handlerton innobase_hton = {
...
@@ -238,7 +243,7 @@ handlerton innobase_hton = {
NULL
,
/* Fill FILES table */
NULL
,
/* Fill FILES table */
HTON_NO_FLAGS
,
HTON_NO_FLAGS
,
NULL
,
/* binlog_func */
NULL
,
/* binlog_func */
NULL
,
/* binlog_log_query */
NULL
,
/* binlog_log_query */
innobase_release_temporary_latches
innobase_release_temporary_latches
};
};
...
@@ -1840,7 +1845,6 @@ innobase_commit_complete(
...
@@ -1840,7 +1845,6 @@ innobase_commit_complete(
return
(
0
);
return
(
0
);
}
}
/*********************************************************************
/*********************************************************************
Rolls back a transaction or the latest SQL statement. */
Rolls back a transaction or the latest SQL statement. */
...
@@ -5827,34 +5831,55 @@ ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
...
@@ -5827,34 +5831,55 @@ ha_innobase::get_foreign_key_list(THD *thd, List<FOREIGN_KEY_INFO> *f_key_list)
break
;
break
;
}
}
ulong
length
=
0
;
ulong
length
;
if
(
foreign
->
type
==
DICT_FOREIGN_ON_DELETE_CASCADE
)
{
if
(
foreign
->
type
&
DICT_FOREIGN_ON_DELETE_CASCADE
)
length
=
17
;
{
tmp_buff
=
"ON DELETE CASCADE"
;
length
=
7
;
}
tmp_buff
=
"CASCADE"
;
else
if
(
foreign
->
type
==
DICT_FOREIGN_ON_DELETE_SET_NULL
)
{
}
length
=
18
;
else
if
(
foreign
->
type
&
DICT_FOREIGN_ON_DELETE_SET_NULL
)
tmp_buff
=
"ON DELETE SET NULL"
;
{
}
length
=
8
;
else
if
(
foreign
->
type
==
DICT_FOREIGN_ON_DELETE_NO_ACTION
)
{
tmp_buff
=
"SET NULL"
;
length
=
19
;
}
tmp_buff
=
"ON DELETE NO ACTION"
;
else
if
(
foreign
->
type
&
DICT_FOREIGN_ON_DELETE_NO_ACTION
)
}
{
else
if
(
foreign
->
type
==
DICT_FOREIGN_ON_UPDATE_CASCADE
)
{
length
=
9
;
length
=
17
;
tmp_buff
=
"NO ACTION"
;
tmp_buff
=
"ON UPDATE CASCADE"
;
}
}
else
else
if
(
foreign
->
type
==
DICT_FOREIGN_ON_UPDATE_SET_NULL
)
{
{
length
=
18
;
length
=
8
;
tmp_buff
=
"ON UPDATE SET NULL"
;
tmp_buff
=
"RESTRICT"
;
}
}
else
if
(
foreign
->
type
==
DICT_FOREIGN_ON_UPDATE_NO_ACTION
)
{
f_key_info
.
delete_method
=
make_lex_string
(
thd
,
f_key_info
.
delete_method
,
length
=
19
;
tmp_buff
,
length
,
1
);
tmp_buff
=
"ON UPDATE NO ACTION"
;
}
f_key_info
.
constraint_method
=
make_lex_string
(
thd
,
if
(
foreign
->
type
&
DICT_FOREIGN_ON_UPDATE_CASCADE
)
f_key_info
.
constraint_method
,
{
tmp_buff
,
length
,
1
);
length
=
7
;
tmp_buff
=
"CASCADE"
;
}
else
if
(
foreign
->
type
&
DICT_FOREIGN_ON_UPDATE_SET_NULL
)
{
length
=
8
;
tmp_buff
=
"SET NULL"
;
}
else
if
(
foreign
->
type
&
DICT_FOREIGN_ON_UPDATE_NO_ACTION
)
{
length
=
9
;
tmp_buff
=
"NO ACTION"
;
}
else
{
length
=
8
;
tmp_buff
=
"RESTRICT"
;
}
f_key_info
.
update_method
=
make_lex_string
(
thd
,
f_key_info
.
update_method
,
tmp_buff
,
length
,
1
);
FOREIGN_KEY_INFO
*
pf_key_info
=
((
FOREIGN_KEY_INFO
*
)
FOREIGN_KEY_INFO
*
pf_key_info
=
((
FOREIGN_KEY_INFO
*
)
thd
->
memdup
((
gptr
)
&
f_key_info
,
thd
->
memdup
((
gptr
)
&
f_key_info
,
...
@@ -7432,3 +7457,20 @@ bool ha_innobase::check_if_incompatible_data(
...
@@ -7432,3 +7457,20 @@ bool ha_innobase::check_if_incompatible_data(
return
COMPATIBLE_DATA_YES
;
return
COMPATIBLE_DATA_YES
;
}
}
mysql_declare_plugin
(
innobase
)
{
MYSQL_STORAGE_ENGINE_PLUGIN
,
&
innobase_hton
,
innobase_hton_name
,
"Innobase OY"
,
innobase_hton_comment
,
NULL
,
/* Plugin Init */
NULL
,
/* Plugin Deinit */
0x0100
/* 1.0 */
,
0
}
mysql_declare_plugin_end
;
#endif
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