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
a3c60017
Commit
a3c60017
authored
Aug 31, 2006
by
heikki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug #21784 of a crash in DROP TABLE with concurrent queries on the table
parent
799b0638
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
+20
-13
handler/ha_innodb.cc
handler/ha_innodb.cc
+20
-13
No files found.
handler/ha_innodb.cc
View file @
a3c60017
...
@@ -6789,19 +6789,17 @@ ha_innobase::store_lock(
...
@@ -6789,19 +6789,17 @@ ha_innobase::store_lock(
row_prebuilt_t
*
prebuilt
=
(
row_prebuilt_t
*
)
innobase_prebuilt
;
row_prebuilt_t
*
prebuilt
=
(
row_prebuilt_t
*
)
innobase_prebuilt
;
trx_t
*
trx
;
trx_t
*
trx
;
/*
Call update_thd() to update prebuilt->trx to point to the
trx
/*
Note that trx in this function is NOT necessarily prebuilt->
trx
object of thd! Failure to do this caused a serious memory
because we call update_thd() later, in ::external_lock()! Failure to
corruption bug in 5.1.11. */
understand this caused a serious memory
corruption bug in 5.1.11. */
update_thd
(
thd
);
trx
=
check_trx_exists
(
thd
);
trx
=
prebuilt
->
trx
;
/* NOTE: MySQL can call this function with lock 'type' TL_IGNORE!
/* NOTE: MySQL can call this function with lock 'type' TL_IGNORE!
Be careful to ignore TL_IGNORE if we are going to do something with
Be careful to ignore TL_IGNORE if we are going to do something with
only 'real' locks! */
only 'real' locks! */
/* If no MySQL table
s is use we need to set
isolation level
/* If no MySQL table
is in use, we need to set the
isolation level
of the transaction. */
of the transaction. */
if
(
lock_type
!=
TL_IGNORE
if
(
lock_type
!=
TL_IGNORE
...
@@ -6811,7 +6809,13 @@ ha_innobase::store_lock(
...
@@ -6811,7 +6809,13 @@ ha_innobase::store_lock(
thd
->
variables
.
tx_isolation
);
thd
->
variables
.
tx_isolation
);
}
}
if
((
lock_type
==
TL_READ
&&
thd
->
in_lock_tables
)
||
if
(
thd
->
lex
->
sql_command
==
SQLCOM_DROP_TABLE
)
{
/* MySQL calls this function in DROP TABLE though this table
handle may belong to another thd that is running a query. Let
us in that case skip any changes to the prebuilt struct. */
}
else
if
((
lock_type
==
TL_READ
&&
thd
->
in_lock_tables
)
||
(
lock_type
==
TL_READ_HIGH_PRIORITY
&&
thd
->
in_lock_tables
)
||
(
lock_type
==
TL_READ_HIGH_PRIORITY
&&
thd
->
in_lock_tables
)
||
lock_type
==
TL_READ_WITH_SHARED_LOCKS
||
lock_type
==
TL_READ_WITH_SHARED_LOCKS
||
lock_type
==
TL_READ_NO_INSERT
||
lock_type
==
TL_READ_NO_INSERT
||
...
@@ -7071,8 +7075,11 @@ ha_innobase::innobase_read_and_init_auto_inc(
...
@@ -7071,8 +7075,11 @@ ha_innobase::innobase_read_and_init_auto_inc(
in table.h says that 'next_number_field' is set when it is
in table.h says that 'next_number_field' is set when it is
'active'. */
'active'. */
my_bitmap_map
*
old_map
;
old_map
=
dbug_tmp_use_all_columns
(
table
,
table
->
read_set
);
auto_inc
=
(
longlong
)
table
->
found_next_number_field
->
auto_inc
=
(
longlong
)
table
->
found_next_number_field
->
val_int_offset
(
table
->
s
->
rec_buff_length
)
+
1
;
val_int_offset
(
table
->
s
->
rec_buff_length
)
+
1
;
dbug_tmp_restore_column_map
(
table
->
read_set
,
old_map
);
}
}
dict_table_autoinc_initialize
(
prebuilt
->
table
,
auto_inc
);
dict_table_autoinc_initialize
(
prebuilt
->
table
,
auto_inc
);
...
...
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