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
3af839f4
Commit
3af839f4
authored
Jun 15, 2004
by
marko@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB bug fix (row0mysql.c): make reserved table names innodb_* special again
parent
1dd88002
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
17 deletions
+33
-17
innobase/row/row0mysql.c
innobase/row/row0mysql.c
+33
-17
No files found.
innobase/row/row0mysql.c
View file @
3af839f4
...
@@ -1394,7 +1394,8 @@ row_create_table_for_mysql(
...
@@ -1394,7 +1394,8 @@ row_create_table_for_mysql(
tab_node_t
*
node
;
tab_node_t
*
node
;
mem_heap_t
*
heap
;
mem_heap_t
*
heap
;
que_thr_t
*
thr
;
que_thr_t
*
thr
;
ulint
namelen
;
const
char
*
table_name
;
ulint
table_name_len
;
ulint
err
;
ulint
err
;
ut_ad
(
trx
->
mysql_thread_id
==
os_thread_get_curr_id
());
ut_ad
(
trx
->
mysql_thread_id
==
os_thread_get_curr_id
());
...
@@ -1446,10 +1447,17 @@ row_create_table_for_mysql(
...
@@ -1446,10 +1447,17 @@ row_create_table_for_mysql(
return
(
row_mysql_recover_tmp_table
(
table
,
trx
));
return
(
row_mysql_recover_tmp_table
(
table
,
trx
));
}
}
namelen
=
strlen
(
table
->
name
)
+
1
;
/* The table name is prefixed with the database name and a '/'.
Certain table names starting with 'innodb_' have their special
meaning regardless of the database name. Thus, we need to
ignore the database name prefix in the comparisons. */
table_name
=
strchr
(
table
->
name
,
'/'
);
ut_a
(
table_name
);
table_name
++
;
table_name_len
=
strlen
(
table_name
)
+
1
;
if
(
name
len
==
sizeof
S_innodb_monitor
if
(
table_name_
len
==
sizeof
S_innodb_monitor
&&
!
memcmp
(
table
->
name
,
S_innodb_monitor
,
&&
!
memcmp
(
table
_
name
,
S_innodb_monitor
,
sizeof
S_innodb_monitor
))
{
sizeof
S_innodb_monitor
))
{
/* Table equals "innodb_monitor":
/* Table equals "innodb_monitor":
...
@@ -1461,27 +1469,27 @@ row_create_table_for_mysql(
...
@@ -1461,27 +1469,27 @@ row_create_table_for_mysql(
of InnoDB monitor prints */
of InnoDB monitor prints */
os_event_set
(
srv_lock_timeout_thread_event
);
os_event_set
(
srv_lock_timeout_thread_event
);
}
else
if
(
name
len
==
sizeof
S_innodb_lock_monitor
}
else
if
(
table_name_
len
==
sizeof
S_innodb_lock_monitor
&&
!
memcmp
(
table
->
name
,
S_innodb_lock_monitor
,
&&
!
memcmp
(
table
_
name
,
S_innodb_lock_monitor
,
sizeof
S_innodb_lock_monitor
))
{
sizeof
S_innodb_lock_monitor
))
{
srv_print_innodb_monitor
=
TRUE
;
srv_print_innodb_monitor
=
TRUE
;
srv_print_innodb_lock_monitor
=
TRUE
;
srv_print_innodb_lock_monitor
=
TRUE
;
os_event_set
(
srv_lock_timeout_thread_event
);
os_event_set
(
srv_lock_timeout_thread_event
);
}
else
if
(
name
len
==
sizeof
S_innodb_tablespace_monitor
}
else
if
(
table_name_
len
==
sizeof
S_innodb_tablespace_monitor
&&
!
memcmp
(
table
->
name
,
S_innodb_tablespace_monitor
,
&&
!
memcmp
(
table
_
name
,
S_innodb_tablespace_monitor
,
sizeof
S_innodb_tablespace_monitor
))
{
sizeof
S_innodb_tablespace_monitor
))
{
srv_print_innodb_tablespace_monitor
=
TRUE
;
srv_print_innodb_tablespace_monitor
=
TRUE
;
os_event_set
(
srv_lock_timeout_thread_event
);
os_event_set
(
srv_lock_timeout_thread_event
);
}
else
if
(
name
len
==
sizeof
S_innodb_table_monitor
}
else
if
(
table_name_
len
==
sizeof
S_innodb_table_monitor
&&
!
memcmp
(
table
->
name
,
S_innodb_table_monitor
,
&&
!
memcmp
(
table
_
name
,
S_innodb_table_monitor
,
sizeof
S_innodb_table_monitor
))
{
sizeof
S_innodb_table_monitor
))
{
srv_print_innodb_table_monitor
=
TRUE
;
srv_print_innodb_table_monitor
=
TRUE
;
os_event_set
(
srv_lock_timeout_thread_event
);
os_event_set
(
srv_lock_timeout_thread_event
);
}
else
if
(
name
len
==
sizeof
S_innodb_mem_validate
}
else
if
(
table_name_
len
==
sizeof
S_innodb_mem_validate
&&
!
memcmp
(
table
->
name
,
S_innodb_mem_validate
,
&&
!
memcmp
(
table
_
name
,
S_innodb_mem_validate
,
sizeof
S_innodb_mem_validate
))
{
sizeof
S_innodb_mem_validate
))
{
/* We define here a debugging feature intended for
/* We define here a debugging feature intended for
developers */
developers */
...
@@ -1909,6 +1917,7 @@ row_drop_table_for_mysql(
...
@@ -1909,6 +1917,7 @@ row_drop_table_for_mysql(
que_thr_t
*
thr
;
que_thr_t
*
thr
;
que_t
*
graph
;
que_t
*
graph
;
ulint
err
;
ulint
err
;
const
char
*
table_name
;
ulint
namelen
;
ulint
namelen
;
ibool
locked_dictionary
=
FALSE
;
ibool
locked_dictionary
=
FALSE
;
char
*
quoted_name
;
char
*
quoted_name
;
...
@@ -1997,10 +2006,17 @@ row_drop_table_for_mysql(
...
@@ -1997,10 +2006,17 @@ row_drop_table_for_mysql(
trx_start_if_not_started
(
trx
);
trx_start_if_not_started
(
trx
);
namelen
=
strlen
(
name
)
+
1
;
/* The table name is prefixed with the database name and a '/'.
Certain table names starting with 'innodb_' have their special
meaning regardless of the database name. Thus, we need to
ignore the database name prefix in the comparisons. */
table_name
=
strchr
(
name
,
'/'
);
ut_a
(
table_name
);
table_name
++
;
namelen
=
strlen
(
table_name
)
+
1
;
if
(
namelen
==
sizeof
S_innodb_monitor
if
(
namelen
==
sizeof
S_innodb_monitor
&&
!
memcmp
(
name
,
S_innodb_monitor
,
&&
!
memcmp
(
table_
name
,
S_innodb_monitor
,
sizeof
S_innodb_monitor
))
{
sizeof
S_innodb_monitor
))
{
/* Table name equals "innodb_monitor":
/* Table name equals "innodb_monitor":
...
@@ -2009,18 +2025,18 @@ row_drop_table_for_mysql(
...
@@ -2009,18 +2025,18 @@ row_drop_table_for_mysql(
srv_print_innodb_monitor
=
FALSE
;
srv_print_innodb_monitor
=
FALSE
;
srv_print_innodb_lock_monitor
=
FALSE
;
srv_print_innodb_lock_monitor
=
FALSE
;
}
else
if
(
namelen
==
sizeof
S_innodb_lock_monitor
}
else
if
(
namelen
==
sizeof
S_innodb_lock_monitor
&&
!
memcmp
(
name
,
S_innodb_lock_monitor
,
&&
!
memcmp
(
table_
name
,
S_innodb_lock_monitor
,
sizeof
S_innodb_lock_monitor
))
{
sizeof
S_innodb_lock_monitor
))
{
srv_print_innodb_monitor
=
FALSE
;
srv_print_innodb_monitor
=
FALSE
;
srv_print_innodb_lock_monitor
=
FALSE
;
srv_print_innodb_lock_monitor
=
FALSE
;
}
else
if
(
namelen
==
sizeof
S_innodb_tablespace_monitor
}
else
if
(
namelen
==
sizeof
S_innodb_tablespace_monitor
&&
!
memcmp
(
name
,
S_innodb_tablespace_monitor
,
&&
!
memcmp
(
table_
name
,
S_innodb_tablespace_monitor
,
sizeof
S_innodb_tablespace_monitor
))
{
sizeof
S_innodb_tablespace_monitor
))
{
srv_print_innodb_tablespace_monitor
=
FALSE
;
srv_print_innodb_tablespace_monitor
=
FALSE
;
}
else
if
(
namelen
==
sizeof
S_innodb_table_monitor
}
else
if
(
namelen
==
sizeof
S_innodb_table_monitor
&&
!
memcmp
(
name
,
S_innodb_table_monitor
,
&&
!
memcmp
(
table_
name
,
S_innodb_table_monitor
,
sizeof
S_innodb_table_monitor
))
{
sizeof
S_innodb_table_monitor
))
{
srv_print_innodb_table_monitor
=
FALSE
;
srv_print_innodb_table_monitor
=
FALSE
;
...
...
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