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
cff9c1df
Commit
cff9c1df
authored
Sep 20, 2002
by
heikki@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ha_innodb.cc, ha_innodb.h:
Fix assertion when a temporary table is created and used inside LOCK TABLES
parent
12bf4a08
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
2 deletions
+38
-2
sql/ha_innodb.cc
sql/ha_innodb.cc
+36
-2
sql/ha_innodb.h
sql/ha_innodb.h
+2
-0
No files found.
sql/ha_innodb.cc
View file @
cff9c1df
...
@@ -3638,10 +3638,43 @@ ha_innobase::reset(void)
...
@@ -3638,10 +3638,43 @@ ha_innobase::reset(void)
return
(
0
);
return
(
0
);
}
}
/**********************************************************************
When we create a temporary table inside MySQL LOCK TABLES, MySQL will
not call external_lock for the temporary table when it uses it. Instead,
it will call this function. */
int
start_stmt
(
/*=======*/
/* out: 0 or error code */
THD
*
thd
)
/* in: handle to the user thread */
{
row_prebuilt_t
*
prebuilt
=
(
row_prebuilt_t
*
)
innobase_prebuilt
;
trx_t
*
trx
;
DBUG_ENTER
(
"ha_innobase::external_lock"
);
update_thd
(
thd
);
trx
=
prebuilt
->
trx
;
innobase_release_stat_resources
(
trx
);
trx_mark_sql_stat_end
(
trx
);
auto_inc_counter_for_this_stat
=
0
;
prebuilt
->
sql_stat_start
=
TRUE
;
prebuilt
->
hint_no_need_to_fetch_extra_cols
=
TRUE
;
prebuilt
->
read_just_key
=
0
;
prebuilt
->
select_lock_type
=
LOCK_NONE
;
thd
->
transaction
.
all
.
innodb_active_trans
=
1
;
}
/**********************************************************************
/**********************************************************************
As MySQL will execute an external lock for every new table it uses when it
As MySQL will execute an external lock for every new table it uses when it
starts to process an SQL statement, we can use this function to store the
starts to process an SQL statement (an exception is when MySQL calls
pointer to the THD in the handle. We will also use this function to communicate
start_stmt for the handle) we can use this function to store the pointer to
the THD in the handle. We will also use this function to communicate
to InnoDB that a new SQL statement has started and that we must store a
to InnoDB that a new SQL statement has started and that we must store a
savepoint to our transaction handle, so that we are able to roll back
savepoint to our transaction handle, so that we are able to roll back
the SQL statement in case of an error. */
the SQL statement in case of an error. */
...
@@ -3649,6 +3682,7 @@ the SQL statement in case of an error. */
...
@@ -3649,6 +3682,7 @@ the SQL statement in case of an error. */
int
int
ha_innobase
::
external_lock
(
ha_innobase
::
external_lock
(
/*=======================*/
/*=======================*/
/* out: 0 or error code */
THD
*
thd
,
/* in: handle to the user thread */
THD
*
thd
,
/* in: handle to the user thread */
int
lock_type
)
/* in: lock type */
int
lock_type
)
/* in: lock type */
{
{
...
...
sql/ha_innodb.h
View file @
cff9c1df
...
@@ -146,6 +146,8 @@ class ha_innobase: public handler
...
@@ -146,6 +146,8 @@ class ha_innobase: public handler
int
extra
(
enum
ha_extra_function
operation
);
int
extra
(
enum
ha_extra_function
operation
);
int
reset
(
void
);
int
reset
(
void
);
int
external_lock
(
THD
*
thd
,
int
lock_type
);
int
external_lock
(
THD
*
thd
,
int
lock_type
);
int
start_stmt
(
THD
*
thd
);
void
position
(
byte
*
record
);
void
position
(
byte
*
record
);
ha_rows
records_in_range
(
int
inx
,
ha_rows
records_in_range
(
int
inx
,
const
byte
*
start_key
,
uint
start_key_len
,
const
byte
*
start_key
,
uint
start_key_len
,
...
...
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