summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-05-23 23:47:08 +0300
committerunknown <monty@donna.mysql.fi>2001-05-23 23:47:08 +0300
commita542f858bf9f14da04f58223933b992749922d32 (patch)
treed871d522f4bdb89a0c46ec4f8d1428c0bafdbcc2 /sql/sql_handler.cc
parent4b799725034bd5f2d7cda76d8a5bcb3b42cb88f3 (diff)
downloadmariadb-git-a542f858bf9f14da04f58223933b992749922d32.tar.gz
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.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc12
1 files changed, 7 insertions, 5 deletions
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)