Commit 0379a691 authored by Otto Kekäläinen's avatar Otto Kekäläinen
Browse files

Update upstream source from tag 'upstream/5.5.64'

Update to upstream version '5.5.64'
with Debian dir b7957bbeb847da5eea7ad7ce27dbb476ae08d867
parents cbc39f88 b9a9fe5c
...@@ -1208,6 +1208,9 @@ int mysql_multi_update_prepare(THD *thd) ...@@ -1208,6 +1208,9 @@ int mysql_multi_update_prepare(THD *thd)
List<Item> *fields= &lex->select_lex.item_list; List<Item> *fields= &lex->select_lex.item_list;
table_map tables_for_update; table_map tables_for_update;
bool update_view= 0; bool update_view= 0;
DML_prelocking_strategy prelocking_strategy;
bool has_prelocking_list= thd->lex->requires_prelocking();
/* /*
if this multi-update was converted from usual update, here is table if this multi-update was converted from usual update, here is table
counter else junk will be assigned here, but then replaced with real counter else junk will be assigned here, but then replaced with real
...@@ -1228,10 +1231,10 @@ int mysql_multi_update_prepare(THD *thd) ...@@ -1228,10 +1231,10 @@ int mysql_multi_update_prepare(THD *thd)
keep prepare of multi-UPDATE compatible with concurrent LOCK TABLES WRITE keep prepare of multi-UPDATE compatible with concurrent LOCK TABLES WRITE
and global read lock. and global read lock.
*/ */
if ((original_multiupdate && if ((original_multiupdate && open_tables(thd, &table_list, &table_count,
open_tables(thd, &table_list, &table_count, thd->stmt_arena->is_stmt_prepare()
(thd->stmt_arena->is_stmt_prepare() ? ? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
MYSQL_OPEN_FORCE_SHARED_MDL : 0))) || &prelocking_strategy)) ||
mysql_handle_derived(lex, DT_INIT)) mysql_handle_derived(lex, DT_INIT))
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
/* /*
...@@ -1278,6 +1281,9 @@ int mysql_multi_update_prepare(THD *thd) ...@@ -1278,6 +1281,9 @@ int mysql_multi_update_prepare(THD *thd)
if (unsafe_key_update(lex->select_lex.leaf_tables, tables_for_update)) if (unsafe_key_update(lex->select_lex.leaf_tables, tables_for_update))
DBUG_RETURN(true); DBUG_RETURN(true);
TABLE_LIST **new_tables= lex->query_tables_last;
DBUG_ASSERT(*new_tables== NULL);
/* /*
Setup timestamp handling and locking mode Setup timestamp handling and locking mode
*/ */
...@@ -1305,6 +1311,11 @@ int mysql_multi_update_prepare(THD *thd) ...@@ -1305,6 +1311,11 @@ int mysql_multi_update_prepare(THD *thd)
If table will be updated we should not downgrade lock for it and If table will be updated we should not downgrade lock for it and
leave it as is. leave it as is.
*/ */
tl->updating= 1;
if (tl->belong_to_view)
tl->belong_to_view->updating= 1;
if (extend_table_list(thd, tl, &prelocking_strategy, has_prelocking_list))
DBUG_RETURN(TRUE);
} }
else else
{ {
...@@ -1323,9 +1334,21 @@ int mysql_multi_update_prepare(THD *thd) ...@@ -1323,9 +1334,21 @@ int mysql_multi_update_prepare(THD *thd)
tl->lock_type= read_lock_type_for_table(thd, lex, tl); tl->lock_type= read_lock_type_for_table(thd, lex, tl);
else else
tl->set_lock_type(thd, read_lock_type_for_table(thd, lex, tl)); tl->set_lock_type(thd, read_lock_type_for_table(thd, lex, tl));
tl->updating= 0;
} }
} }
uint addon_table_count= 0;
if (*new_tables)
{
Sroutine_hash_entry **new_routines= thd->lex->sroutines_list.next;
DBUG_ASSERT(*new_routines == NULL);
if (open_tables(thd, new_tables, &addon_table_count, new_routines,
thd->stmt_arena->is_stmt_prepare()
? MYSQL_OPEN_FORCE_SHARED_MDL : 0,
&prelocking_strategy))
DBUG_RETURN(TRUE);
}
for (tl= table_list; tl; tl= tl->next_local) for (tl= table_list; tl; tl= tl->next_local)
{ {
/* Check access privileges for table */ /* Check access privileges for table */
...@@ -1358,7 +1381,7 @@ int mysql_multi_update_prepare(THD *thd) ...@@ -1358,7 +1381,7 @@ int mysql_multi_update_prepare(THD *thd)
/* now lock and fill tables */ /* now lock and fill tables */
if (!thd->stmt_arena->is_stmt_prepare() && if (!thd->stmt_arena->is_stmt_prepare() &&
lock_tables(thd, table_list, table_count, 0)) lock_tables(thd, table_list, table_count + addon_table_count, 0))
{ {
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
......
...@@ -1511,6 +1511,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, ...@@ -1511,6 +1511,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
tbl->lock_type= table->lock_type; tbl->lock_type= table->lock_type;
tbl->mdl_request.set_type((tbl->lock_type >= TL_WRITE_ALLOW_WRITE) ? tbl->mdl_request.set_type((tbl->lock_type >= TL_WRITE_ALLOW_WRITE) ?
MDL_SHARED_WRITE : MDL_SHARED_READ); MDL_SHARED_WRITE : MDL_SHARED_READ);
tbl->updating= table->updating;
} }
/* /*
If the view is mergeable, we might want to If the view is mergeable, we might want to
......
This diff is collapsed.
...@@ -7676,14 +7676,14 @@ select_lock_type: ...@@ -7676,14 +7676,14 @@ select_lock_type:
| FOR_SYM UPDATE_SYM | FOR_SYM UPDATE_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->current_select->set_lock_for_tables(TL_WRITE); lex->current_select->set_lock_for_tables(TL_WRITE, false);
lex->safe_to_cache_query=0; lex->safe_to_cache_query=0;
} }
| LOCK_SYM IN_SYM SHARE_SYM MODE_SYM | LOCK_SYM IN_SYM SHARE_SYM MODE_SYM
{ {
LEX *lex=Lex; LEX *lex=Lex;
lex->current_select-> lex->current_select->
set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS); set_lock_for_tables(TL_READ_WITH_SHARED_LOCKS, false);
lex->safe_to_cache_query=0; lex->safe_to_cache_query=0;
} }
; ;
...@@ -10966,7 +10966,7 @@ insert: ...@@ -10966,7 +10966,7 @@ insert:
insert_lock_option insert_lock_option
opt_ignore insert2 opt_ignore insert2
{ {
Select->set_lock_for_tables($3); Select->set_lock_for_tables($3, true);
Lex->current_select= &Lex->select_lex; Lex->current_select= &Lex->select_lex;
} }
insert_field_spec opt_insert_update insert_field_spec opt_insert_update
...@@ -10983,7 +10983,7 @@ replace: ...@@ -10983,7 +10983,7 @@ replace:
} }
replace_lock_option insert2 replace_lock_option insert2
{ {
Select->set_lock_for_tables($3); Select->set_lock_for_tables($3, true);
Lex->current_select= &Lex->select_lex; Lex->current_select= &Lex->select_lex;
} }
insert_field_spec insert_field_spec
...@@ -11159,14 +11159,14 @@ update: ...@@ -11159,14 +11159,14 @@ update:
opt_low_priority opt_ignore join_table_list opt_low_priority opt_ignore join_table_list
SET update_list SET update_list
{ {
LEX *lex= Lex; SELECT_LEX *slex= &Lex->select_lex;
if (lex->select_lex.table_list.elements > 1) if (slex->table_list.elements > 1)
lex->sql_command= SQLCOM_UPDATE_MULTI; Lex->sql_command= SQLCOM_UPDATE_MULTI;
else if (lex->select_lex.get_table_list()->derived) else if (slex->get_table_list()->derived)
{ {
/* it is single table update and it is update of derived table */ /* it is single table update and it is update of derived table */
my_error(ER_NON_UPDATABLE_TABLE, MYF(0), my_error(ER_NON_UPDATABLE_TABLE, MYF(0),
lex->select_lex.get_table_list()->alias, "UPDATE"); slex->get_table_list()->alias, "UPDATE");
MYSQL_YYABORT; MYSQL_YYABORT;
} }
/* /*
...@@ -11174,7 +11174,7 @@ update: ...@@ -11174,7 +11174,7 @@ update:
be too pessimistic. We will decrease lock level if possible in be too pessimistic. We will decrease lock level if possible in
mysql_multi_update(). mysql_multi_update().
*/ */
Select->set_lock_for_tables($3); slex->set_lock_for_tables($3, slex->table_list.elements == 1);
} }
where_clause opt_order_clause delete_limit_clause {} where_clause opt_order_clause delete_limit_clause {}
; ;
...@@ -13834,13 +13834,16 @@ table_lock: ...@@ -13834,13 +13834,16 @@ table_lock:
table_ident opt_table_alias lock_option table_ident opt_table_alias lock_option
{ {
thr_lock_type lock_type= (thr_lock_type) $3; thr_lock_type lock_type= (thr_lock_type) $3;
bool lock_for_write= (lock_type >= TL_WRITE_ALLOW_WRITE); bool lock_for_write= lock_type >= TL_WRITE_ALLOW_WRITE;
if (!Select->add_table_to_list(thd, $1, $2, 0, lock_type, ulong table_options= lock_for_write ? TL_OPTION_UPDATING : 0;
(lock_for_write ? enum_mdl_type mdl_type= !lock_for_write
lock_type == TL_WRITE_CONCURRENT_INSERT ? ? MDL_SHARED_READ
MDL_SHARED_WRITE : : lock_type == TL_WRITE_CONCURRENT_INSERT
MDL_SHARED_NO_READ_WRITE : ? MDL_SHARED_WRITE
MDL_SHARED_READ))) : MDL_SHARED_NO_READ_WRITE;
if (!Select->add_table_to_list(thd, $1, $2, table_options,
lock_type, mdl_type))
MYSQL_YYABORT; MYSQL_YYABORT;
} }
; ;
......
...@@ -5373,7 +5373,8 @@ const char *Field_iterator_table_ref::get_table_name() ...@@ -5373,7 +5373,8 @@ const char *Field_iterator_table_ref::get_table_name()
return natural_join_it.column_ref()->table_name(); return natural_join_it.column_ref()->table_name();
DBUG_ASSERT(!strcmp(table_ref->table_name, DBUG_ASSERT(!strcmp(table_ref->table_name,
table_ref->table->s->table_name.str)); table_ref->table->s->table_name.str) ||
table_ref->schema_table);
return table_ref->table_name; return table_ref->table_name;
} }
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -3787,6 +3788,9 @@ dict_create_foreign_constraints_low( ...@@ -3787,6 +3788,9 @@ dict_create_foreign_constraints_low(
} }
goto loop; goto loop;
} else {
strncpy(create_name, name, sizeof create_name);
create_name[(sizeof create_name) - 1] = '\0';
} }
if (table == NULL) { if (table == NULL) {
...@@ -3811,11 +3815,20 @@ dict_create_foreign_constraints_low( ...@@ -3811,11 +3815,20 @@ dict_create_foreign_constraints_low(
goto loop; goto loop;
} }
ptr = dict_accept(cs, ptr, "TABLE", &success); orig = ptr;
for (;;) {
if (!success) { ptr = dict_accept(cs, ptr, "TABLE", &success);
if (success) {
goto loop; break;
}
ptr = dict_accept(cs, ptr, "ONLINE", &success);
if (success) {
continue;
}
ptr = dict_accept(cs, ptr, "IGNORE", &success);
if (!success) {
goto loop;
}
} }
/* We are doing an ALTER TABLE: scan the table name we are altering */ /* We are doing an ALTER TABLE: scan the table name we are altering */
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1996, 2011, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -353,10 +354,13 @@ trx_is_active( ...@@ -353,10 +354,13 @@ trx_is_active(
} }
trx = trx_get_on_id(trx_id); trx = trx_get_on_id(trx_id);
if (trx && (trx->conc_state == TRX_ACTIVE if (trx) {
|| trx->conc_state == TRX_PREPARED)) { switch (trx->conc_state) {
case TRX_ACTIVE:
return(TRUE); case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
return(TRUE);
}
} }
return(FALSE); return(FALSE);
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved. Copyright (c) 1996, 2010, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -741,6 +742,8 @@ struct trx_struct{ ...@@ -741,6 +742,8 @@ struct trx_struct{
#define TRX_ACTIVE 1 #define TRX_ACTIVE 1
#define TRX_COMMITTED_IN_MEMORY 2 #define TRX_COMMITTED_IN_MEMORY 2
#define TRX_PREPARED 3 /* Support for 2PC/XA */ #define TRX_PREPARED 3 /* Support for 2PC/XA */
#define TRX_PREPARED_RECOVERED 4 /* XA PREPARE transaction that
was returned to ha_recover() */
/* Transaction execution states when trx->conc_state == TRX_ACTIVE */ /* Transaction execution states when trx->conc_state == TRX_ACTIVE */
#define TRX_QUE_RUNNING 0 /* transaction is running */ #define TRX_QUE_RUNNING 0 /* transaction is running */
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -4782,6 +4783,22 @@ lock_print_info_all_transactions( ...@@ -4782,6 +4783,22 @@ lock_print_info_all_transactions(
} }
#ifdef UNIV_DEBUG #ifdef UNIV_DEBUG
/** Validate the state of a transaction that holds locks */
static void lock_trx_state_validate(const trx_t* trx)
{
switch (trx->conc_state) {
case TRX_NOT_STARTED:
break;
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
case TRX_COMMITTED_IN_MEMORY:
return;
}
ut_ad(!"wrong state");
}
/*********************************************************************//** /*********************************************************************//**
Validates the lock queue on a table. Validates the lock queue on a table.
@return TRUE if ok */ @return TRUE if ok */
...@@ -4798,9 +4815,7 @@ lock_table_queue_validate( ...@@ -4798,9 +4815,7 @@ lock_table_queue_validate(
lock = UT_LIST_GET_FIRST(table->locks); lock = UT_LIST_GET_FIRST(table->locks);
while (lock) { while (lock) {
ut_a(((lock->trx)->conc_state == TRX_ACTIVE) ut_d(lock_trx_state_validate(lock->trx));
|| ((lock->trx)->conc_state == TRX_PREPARED)
|| ((lock->trx)->conc_state == TRX_COMMITTED_IN_MEMORY));
if (!lock_get_wait(lock)) { if (!lock_get_wait(lock)) {
...@@ -4848,15 +4863,7 @@ lock_rec_queue_validate( ...@@ -4848,15 +4863,7 @@ lock_rec_queue_validate(
lock = lock_rec_get_first(block, heap_no); lock = lock_rec_get_first(block, heap_no);
while (lock) { while (lock) {
switch(lock->trx->conc_state) { ut_d(lock_trx_state_validate(lock->trx));
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_COMMITTED_IN_MEMORY:
break;
default:
ut_error;
}
ut_a(trx_in_trx_list(lock->trx)); ut_a(trx_in_trx_list(lock->trx));
if (lock_get_wait(lock)) { if (lock_get_wait(lock)) {
...@@ -4935,9 +4942,7 @@ lock_rec_queue_validate( ...@@ -4935,9 +4942,7 @@ lock_rec_queue_validate(
lock = lock_rec_get_first(block, heap_no); lock = lock_rec_get_first(block, heap_no);
while (lock) { while (lock) {
ut_a(lock->trx->conc_state == TRX_ACTIVE ut_d(lock_trx_state_validate(lock->trx));
|| lock->trx->conc_state == TRX_PREPARED
|| lock->trx->conc_state == TRX_COMMITTED_IN_MEMORY);
ut_a(trx_in_trx_list(lock->trx)); ut_a(trx_in_trx_list(lock->trx));
if (index) { if (index) {
...@@ -5014,10 +5019,8 @@ lock_rec_validate_page( ...@@ -5014,10 +5019,8 @@ lock_rec_validate_page(
} }
} }
ut_d(lock_trx_state_validate(lock->trx));
ut_a(trx_in_trx_list(lock->trx)); ut_a(trx_in_trx_list(lock->trx));
ut_a(lock->trx->conc_state == TRX_ACTIVE
|| lock->trx->conc_state == TRX_PREPARED
|| lock->trx->conc_state == TRX_COMMITTED_IN_MEMORY);
# ifdef UNIV_SYNC_DEBUG # ifdef UNIV_SYNC_DEBUG
/* Only validate the record queues when this thread is not /* Only validate the record queues when this thread is not
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
-INSERT INTO t1 (a) VALUES (1),(2); -INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4); -INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings: -Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1; -SELECT a,b FROM t1;
-a b -a b
-1 2 -1 2
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
-INSERT INTO t1 (a) VALUES (1),(2); -INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4); -INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings: -Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1; -SELECT a,b FROM t1;
-a b -a b
-1 2 -1 2
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
-INSERT INTO t1 (a) VALUES (1),(2); -INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4); -INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings: -Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1; -SELECT a,b FROM t1;
-a b -a b
-1 2 -1 2
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
-INSERT INTO t1 (a) VALUES (1),(2); -INSERT INTO t1 (a) VALUES (1),(2);
-INSERT INTO t1 (a,b) VALUES (3,3),(4,4); -INSERT INTO t1 (a,b) VALUES (3,3),(4,4);
-Warnings: -Warnings:
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-Warning 1906 The value specified for computed column 'b' in table 't1' ignored -Warning 1906 The value specified for computed column 'b' in table 't1' has been ignored
-SELECT a,b FROM t1; -SELECT a,b FROM t1;
-a b -a b
-1 2 -1 2
......
/***************************************************************************** /*****************************************************************************
Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved. Copyright (c) 1997, 2009, Innobase Oy. All Rights Reserved.
Copyright (c) 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -272,15 +273,19 @@ read_view_open_now( ...@@ -272,15 +273,19 @@ read_view_open_now(
view->low_limit_id = view->low_limit_no; view->low_limit_id = view->low_limit_no;
n = 0; n = 0;
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
/* No active transaction should be visible, except cr_trx */ /* No active transaction should be visible, except cr_trx */
while (trx) { for (trx = UT_LIST_GET_FIRST(trx_sys->trx_list); trx;
if (trx->id != cr_trx_id trx = UT_LIST_GET_NEXT(trx_list, trx)) {
&& (trx->conc_state == TRX_ACTIVE if (trx->id == cr_trx_id) {
|| trx->conc_state == TRX_PREPARED)) { continue;
}
switch (trx->conc_state) {
case TRX_ACTIVE:
case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
read_view_set_nth_trx_id(view, n, trx->id); read_view_set_nth_trx_id(view, n, trx->id);
n++; n++;
...@@ -296,8 +301,6 @@ read_view_open_now( ...@@ -296,8 +301,6 @@ read_view_open_now(
view->low_limit_no = trx->no; view->low_limit_no = trx->no;
} }
} }
trx = UT_LIST_GET_NEXT(trx_list, trx);
} }
view->n_trx_ids = n; view->n_trx_ids = n;
...@@ -437,18 +440,15 @@ read_cursor_view_create_for_mysql( ...@@ -437,18 +440,15 @@ read_cursor_view_create_for_mysql(
view->low_limit_id = view->low_limit_no; view->low_limit_id = view->low_limit_no;
n = 0; n = 0;
trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
/* No active transaction should be visible */ /* No active transaction should be visible */
for (trx = UT_LIST_GET_FIRST(trx_sys->trx_list); trx;
while (trx) { trx = UT_LIST_GET_NEXT(trx_list, trx)) {
switch (trx->conc_state) {
if (trx->conc_state == TRX_ACTIVE case TRX_ACTIVE:
|| trx->conc_state == TRX_PREPARED) { case TRX_PREPARED:
case TRX_PREPARED_RECOVERED:
read_view_set_nth_trx_id(view, n, trx->id); read_view_set_nth_trx_id(view, n++, trx->id);
n++;
/* NOTE that a transaction whose trx number is < /* NOTE that a transaction whose trx number is <
trx_sys->max_trx_id can still be active, if it is trx_sys->max_trx_id can still be active, if it is
...@@ -461,8 +461,6 @@ read_cursor_view_create_for_mysql( ...@@ -461,8 +461,6 @@ read_cursor_view_create_for_mysql(
view->low_limit_no = trx->no; view->low_limit_no = trx->no;
} }
} }
trx = UT_LIST_GET_NEXT(trx_list, trx);
} }
view->n_trx_ids = n; view->n_trx_ids = n;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment