2556
2555
(void) pthread_mutex_unlock(&LOCK_thread_count);
2561
Reset Session part responsible for command processing state.
2563
This needs to be called before execution of every statement
2564
(prepared or conventional).
2565
It is not called by substatements of routines.
2568
Make it a method of Session and align its name with the rest of
2569
reset/end/start/init methods.
2571
Call it after we use Session for queries, not before.
2574
void Session::reset_for_next_command()
2579
Those two lines below are theoretically unneeded as
2580
Session::cleanup_after_query() should take care of this already.
2582
auto_inc_intervals_in_cur_stmt_for_binlog.empty();
2585
server_status&= ~ (SERVER_MORE_RESULTS_EXISTS |
2586
SERVER_QUERY_NO_INDEX_USED |
2587
SERVER_QUERY_NO_GOOD_INDEX_USED);
2589
If in autocommit mode and not in a transaction, reset
2590
OPTION_STATUS_NO_TRANS_UPDATE | OPTION_KEEP_LOG to not get warnings
2591
in ha_rollback_trans() about some tables couldn't be rolled back.
2593
if (!(options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)))
2595
options&= ~OPTION_KEEP_LOG;
2596
transaction.all.modified_non_trans_table= false;
2598
thread_specific_used= false;
2602
reset_dynamic(&user_var_events);
2603
user_var_events_alloc= mem_root;
2606
main_da.reset_diagnostics_area();
2607
total_warn_count=0; // Warnings for this query
2608
sent_row_count= examined_row_count= 0;