From a542f858bf9f14da04f58223933b992749922d32 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 May 2001 23:47:08 +0300 Subject: Added Unique class to be used for duplicate removal in multi-table delete. mysys/ptr_cmp.c: Removed old comments pstack/bucomm.c: Change to use mkstemp. sql/Makefile.am: Added Unique class sql/filesort.cc: Changes to let the Unique class use the old filesort code. sql/sql_class.h: Added Unique class sql/sql_handler.cc: Removed warning. sql/sql_select.cc: Cleaned up typo. --- sql/sql_handler.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sql/sql_handler.cc') diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 3da9b96786d..a605984aef7 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -43,7 +43,8 @@ thd->open_tables=thd->handler_tables; \ thd->handler_tables=tmp; } -static TABLE **find_table_ptr_by_name(THD *thd, char *db, char *table_name); +static TABLE **find_table_ptr_by_name(THD *thd, const char *db, + const char *table_name); int mysql_ha_open(THD *thd, TABLE_LIST *tables) { @@ -231,14 +232,15 @@ err: /* Note: this function differs from find_locked_table() because we're looking here for alias, not real table name */ -static TABLE **find_table_ptr_by_name(THD *thd, char *db, char *table_name) +static TABLE **find_table_ptr_by_name(THD *thd, const char *db, + const char *table_name) { int dblen; TABLE **ptr; - if (!db || ! *db) db=thd->db; - if (!db || ! *db) db=""; - dblen=strlen(db); + if (!db || ! *db) + db= thd->db ? thd->db : ""; + dblen=strlen(db)+1; ptr=&(thd->handler_tables); for (TABLE *table=*ptr; table ; table=*ptr) -- cgit v1.2.1