summaryrefslogtreecommitdiff
path: root/innobase/row
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-11-04 18:25:48 +0200
committerunknown <marko@hundin.mysql.fi>2004-11-04 18:25:48 +0200
commit60e90ca052400f1f8a95a732266a6e05f65562c3 (patch)
treeb3376d8f0d638212a626b4abc7eddd67a1c1ab7b /innobase/row
parent02af97cc3431075b1b81826e6933251cf61cfb8e (diff)
parentf2be61f5b708a72ea22d773e46d1d42f8b2884a9 (diff)
downloadmariadb-git-60e90ca052400f1f8a95a732266a6e05f65562c3.tar.gz
Merge marko@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/marko/j/mysql-4.1 innobase/row/row0mysql.c: Auto merged
Diffstat (limited to 'innobase/row')
-rw-r--r--innobase/row/row0mysql.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/innobase/row/row0mysql.c b/innobase/row/row0mysql.c
index f356ef8081e..17747ae2a8e 100644
--- a/innobase/row/row0mysql.c
+++ b/innobase/row/row0mysql.c
@@ -779,8 +779,12 @@ int
row_lock_table_for_mysql(
/*=====================*/
/* out: error code or DB_SUCCESS */
- row_prebuilt_t* prebuilt) /* in: prebuilt struct in the MySQL
+ row_prebuilt_t* prebuilt, /* in: prebuilt struct in the MySQL
table handle */
+ dict_table_t* table) /* in: table to LOCK_IX, or NULL
+ if prebuilt->table should be
+ locked as LOCK_TABLE_EXP |
+ prebuilt->select_lock_type */
{
trx_t* trx = prebuilt->trx;
que_thr_t* thr;
@@ -813,8 +817,12 @@ run_again:
trx_start_if_not_started(trx);
- err = lock_table(LOCK_TABLE_EXP, prebuilt->table,
- prebuilt->select_lock_type, thr);
+ if (table) {
+ err = lock_table(0, table, LOCK_IX, thr);
+ } else {
+ err = lock_table(LOCK_TABLE_EXP, prebuilt->table,
+ prebuilt->select_lock_type, thr);
+ }
trx->error_state = err;