summaryrefslogtreecommitdiff
path: root/sql/sql_handler.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2002-09-20 14:05:18 +0300
committerunknown <monty@mashka.mysql.fi>2002-09-20 14:05:18 +0300
commitf631f93ed8faa99c5bb0fdc4526a50a7e8efd839 (patch)
treed4c1c24287ff9b73015dccba9705de179966318b /sql/sql_handler.cc
parent79538703466b4800a85a3340b40afe145b8fe1d1 (diff)
downloadmariadb-git-f631f93ed8faa99c5bb0fdc4526a50a7e8efd839.tar.gz
Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name.
This should fix some issues where --lower-case-table-names doesn't work properly under windows. client/mysql.cc: Added missing sslopt-case.h sql/lock.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/log_event.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/mysqld.cc: Fixed that --ssl and --skip-ssl works sql/slave.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_acl.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_base.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_cache.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_handler.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_insert.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_parse.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_show.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_table.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_udf.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_union.cc: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/sql_yacc.yy: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name. sql/table.h: Changed table_list->name -> table_list->alias to find places where we where using alias instead of table_name.
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r--sql/sql_handler.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc
index 046ab87d18b..ea02c46c0f4 100644
--- a/sql/sql_handler.cc
+++ b/sql/sql_handler.cc
@@ -57,7 +57,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
// there can be only one table in *tables
if (!(tables->table->file->table_flags() & HA_CAN_SQL_HANDLER))
{
- my_printf_error(ER_ILLEGAL_HA,ER(ER_ILLEGAL_HA),MYF(0), tables->name);
+ my_printf_error(ER_ILLEGAL_HA,ER(ER_ILLEGAL_HA),MYF(0), tables->alias);
mysql_ha_close(thd, tables,1);
return -1;
}
@@ -68,7 +68,7 @@ int mysql_ha_open(THD *thd, TABLE_LIST *tables)
int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
{
- TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->name);
+ TABLE **ptr=find_table_ptr_by_name(thd, tables->db, tables->alias);
if (*ptr)
{
@@ -79,7 +79,7 @@ int mysql_ha_close(THD *thd, TABLE_LIST *tables, bool dont_send_ok)
else
{
my_printf_error(ER_UNKNOWN_TABLE,ER(ER_UNKNOWN_TABLE),MYF(0),
- tables->name,"HANDLER");
+ tables->alias, "HANDLER");
return -1;
}
if (!dont_send_ok)
@@ -97,11 +97,11 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
ha_rows select_limit,ha_rows offset_limit)
{
int err, keyno=-1;
- TABLE *table=*find_table_ptr_by_name(thd, tables->db, tables->name);
+ TABLE *table=*find_table_ptr_by_name(thd, tables->db, tables->alias);
if (!table)
{
my_printf_error(ER_UNKNOWN_TABLE,ER(ER_UNKNOWN_TABLE),MYF(0),
- tables->name,"HANDLER");
+ tables->alias,"HANDLER");
return -1;
}
tables->table=table;
@@ -114,7 +114,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
if ((keyno=find_type(keyname, &table->keynames, 1+2)-1)<0)
{
my_printf_error(ER_KEY_DOES_NOT_EXITS,ER(ER_KEY_DOES_NOT_EXITS),MYF(0),
- keyname,tables->name);
+ keyname,tables->alias);
return -1;
}
table->file->index_init(keyno);
@@ -126,7 +126,7 @@ int mysql_ha_read(THD *thd, TABLE_LIST *tables,
uint num_rows;
it++;
- insert_fields(thd,tables,tables->db,tables->name,&it);
+ insert_fields(thd,tables,tables->db,tables->alias,&it);
table->file->init_table_handle_for_HANDLER(); // Only InnoDB requires it
@@ -258,7 +258,7 @@ err0:
here for alias, not real table name
*/
static TABLE **find_table_ptr_by_name(THD *thd, const char *db,
- const char *table_name)
+ const char *alias)
{
int dblen;
TABLE **ptr;
@@ -271,7 +271,7 @@ static TABLE **find_table_ptr_by_name(THD *thd, const char *db,
for (TABLE *table=*ptr; table ; table=*ptr)
{
if (!memcmp(table->table_cache_key, db, dblen) &&
- !my_strcasecmp(table->table_name,table_name))
+ !my_strcasecmp(table->table_name,alias))
break;
ptr=&(table->next);
}