Commit cb8580a2 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi
Browse files

Changed table_list->name -> table_list->alias to find places where we where...

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.
parent 76d7ab0a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -701,6 +701,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
    opt_mysql_unix_port= my_strdup(MYSQL_NAMEDPIPE, MYF(0));
#endif
    break;
#include <sslopt-case.h>
  case 'V':
    usage(1);
    exit(0);
+2 −2
Original line number Diff line number Diff line
@@ -470,7 +470,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
  DBUG_ENTER("lock_table_name");
  safe_mutex_assert_owner(&LOCK_open);

  key_length=(uint) (strmov(strmov(key,table_list->db)+1,table_list->name)
  key_length=(uint) (strmov(strmov(key,table_list->db)+1,table_list->real_name)
		     -key)+ 1;

  /* Only insert the table if we haven't insert it already */
@@ -499,7 +499,7 @@ int lock_table_name(THD *thd, TABLE_LIST *table_list)
    my_free((gptr) table,MYF(0));
    DBUG_RETURN(-1);
  }
  if (remove_table_from_cache(thd, table_list->db, table_list->name))
  if (remove_table_from_cache(thd, table_list->db, table_list->real_name))
    DBUG_RETURN(1);					// Table is in use
  DBUG_RETURN(0);
}
+1 −1
Original line number Diff line number Diff line
@@ -1718,7 +1718,7 @@ int Load_log_event::exec_event(NET* net, struct st_relay_log_info* rli)
    TABLE_LIST tables;
    bzero((char*) &tables,sizeof(tables));
    tables.db = thd->db;
    tables.name = tables.real_name = (char*)table_name;
    tables.alias = tables.real_name = (char*)table_name;
    tables.lock_type = TL_WRITE;
    // the table will be opened in mysql_load    
    if (table_rules_on && !tables_ok(thd, &tables))
+1 −3
Original line number Diff line number Diff line
@@ -1884,9 +1884,6 @@ int main(int argc, char **argv)
  charsets_list = list_charsets(MYF(MY_COMPILED_SETS|MY_CONFIG_SETS));

#ifdef HAVE_OPENSSL
  if (opt_ssl_key || opt_ssl_cert || opt_ssl_ca || opt_ssl_capath ||
      opt_ssl_cipher)
    opt_use_ssl= 1;
  if (opt_use_ssl)
  {
    /* having ssl_acceptor_fd != 0 signals the use of SSL */
@@ -3969,6 +3966,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
    net_buffer_length=  atoi(argument);
    break;
#endif
#include <sslopt-case.h>
  case 'v':
  case 'V':
    print_version();
+1 −1
Original line number Diff line number Diff line
@@ -913,7 +913,7 @@ static int create_table_from_dump(THD* thd, NET* net, const char* db,

  bzero((char*) &tables,sizeof(tables));
  tables.db = (char*)db;
  tables.name = tables.real_name = (char*)table_name;
  tables.alias= tables.real_name= (char*)table_name;
  tables.lock_type = TL_WRITE;
  thd->proc_info = "Opening master dump table";
  if (!open_ltable(thd, &tables, TL_WRITE))
Loading