| 3990 | } |
| 3991 | |
| 3992 | int handler::ha_close(void) |
| 3993 | { |
| 3994 | DBUG_ENTER("ha_close"); |
| 3995 | /* |
| 3996 | Increment global statistics for temporary tables. |
| 3997 | In_use is 0 for tables that was closed from the table cache. |
| 3998 | */ |
| 3999 | if (table->in_use) |
| 4000 | status_var_add(table->in_use->status_var.rows_tmp_read, |
| 4001 | rows_stats.tmp_read); |
| 4002 | PSI_CALL_close_table(table_share, m_psi); |
| 4003 | m_psi= NULL; /* instrumentation handle, invalid after close_table() */ |
| 4004 | DBUG_ASSERT(m_psi_batch_mode == PSI_BATCH_MODE_NONE); |
| 4005 | DBUG_ASSERT(m_psi_locker == NULL); |
| 4006 | |
| 4007 | /* Detach from ANALYZE tracker */ |
| 4008 | tracker= NULL; |
| 4009 | /* We use ref as way to check that open succeded */ |
| 4010 | ref= 0; |
| 4011 | |
| 4012 | DBUG_ASSERT(m_lock_type == F_UNLCK); |
| 4013 | DBUG_ASSERT(inited == NONE); |
| 4014 | DBUG_RETURN(close()); |
| 4015 | } |
| 4016 | |
| 4017 | void handler::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share) |
| 4018 | { |
no outgoing calls
no test coverage detected