mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
Merge branch '11.8' into 12.0
main/statistics_json.result is updated forf8ba5ced55(MDEV-36099) The test uses 'delete from t1' in many places and then populates the table again. The natural order of rows in a MyISAM table is well defined and the test was implicitly relying on that. beforef8ba5ced55delete was deleting rows one by one, using ha_myisam::delete_row() because the connection was stuck in rbr mode. This caused rows to be shown in the reverse insertion order (because of the delete link list). MDEV-36099 fixes this bug and the server now correctly uses ha_myisam::delete_all_rows(). This makes rows to be shown in the insertion order as expected.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "sql_test.h" // mysql_print_status
|
||||
#include "sql_select.h" // handle_select, mysql_select,
|
||||
// mysql_explain_union
|
||||
#include "sql_cursor.h" // Select_materialzie
|
||||
#include "sql_load.h" // mysql_load
|
||||
#include "sql_servers.h" // create_servers, alter_servers,
|
||||
// drop_servers, servers_reload
|
||||
@@ -3042,11 +3043,6 @@ static bool do_execute_sp(THD *thd, sp_head *sp)
|
||||
ha_rows select_limit= thd->variables.select_limit;
|
||||
thd->variables.select_limit= HA_POS_ERROR;
|
||||
|
||||
/*
|
||||
Reset current_select as it may point to random data as a
|
||||
result of previous parsing.
|
||||
*/
|
||||
thd->lex->current_select= NULL;
|
||||
thd->lex->in_sum_func= 0; // For Item_field::fix_fields()
|
||||
|
||||
/*
|
||||
@@ -5967,6 +5963,9 @@ finish:
|
||||
one of storage engines (e.g. due to deadlock). Rollback transaction in
|
||||
all storage engines including binary log.
|
||||
*/
|
||||
auto &xid_state= thd->transaction->xid_state;
|
||||
if (xid_state.is_explicit_XA())
|
||||
xid_state.set_rollback_only();
|
||||
trans_rollback_implicit(thd);
|
||||
thd->release_transactional_locks();
|
||||
}
|
||||
@@ -6183,7 +6182,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables)
|
||||
}
|
||||
}
|
||||
/* Count number of empty select queries */
|
||||
if (!thd->get_sent_row_count() && !res)
|
||||
if (!thd->is_cursor_execution() && !thd->get_sent_row_count() && !res)
|
||||
status_var_increment(thd->status_var.empty_queries);
|
||||
else
|
||||
status_var_add(thd->status_var.rows_sent, thd->get_sent_row_count());
|
||||
|
||||
Reference in New Issue
Block a user