MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / copy_db_to

Method copy_db_to

sql/sql_class.h:2625–2635  ·  view source on GitHub ↗

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. */

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

my_messageFunction · 0.85
strmakeFunction · 0.85

Tested by

no test coverage detected