Set the current database; use shallow copy of C-string. @param new_db a pointer to the new database name. @param new_db_len length of the new database name. @note This operation just sets {db, db_length}. Switching the current database usually involves other actions, like switching other database attributes including security context. In the future, this operation wil
| 2610 | will be made private and more convenient interface will be provided. |
| 2611 | */ |
| 2612 | void reset_db(char *new_db, size_t new_db_len) |
| 2613 | { |
| 2614 | db= new_db; |
| 2615 | db_length= new_db_len; |
| 2616 | #ifdef HAVE_PSI_THREAD_INTERFACE |
| 2617 | PSI_THREAD_CALL(set_thread_db)(new_db, static_cast<int>(new_db_len)); |
| 2618 | #endif |
| 2619 | } |
| 2620 | /* |
| 2621 | Copy the current database to the argument. Use the current arena to |
| 2622 | allocate memory for a deep copy: current database may be freed after |