Copy the current database to the argument. Use the current arena to allocate memory for a deep copy: current database may be freed after a statement is parsed but before it's executed. */
| 2623 | a statement is parsed but before it's executed. |
| 2624 | */ |
| 2625 | bool copy_db_to(char **p_db, size_t *p_db_length) |
| 2626 | { |
| 2627 | if (db == NULL) |
| 2628 | { |
| 2629 | my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); |
| 2630 | return TRUE; |
| 2631 | } |
| 2632 | *p_db= strmake(db, db_length); |
| 2633 | *p_db_length= db_length; |
| 2634 | return FALSE; |
| 2635 | } |
| 2636 | |
| 2637 | /* Returns string as 'IP:port' for the client-side |
| 2638 | of the connnection represented |
nothing calls this directly
no test coverage detected