Commit ca417a74 authored by unknown's avatar unknown

WL#2645 (CHECK FOR UPGRADE)

5.1-related fixes


BitKeeper/etc/ignore:
  Added scripts/mysql_upgrade to the ignore list
sql/ha_partition.cc:
  ha_check and ha_repair now to be called
sql/handler.cc:
  code modified to be 5.1 compliant
parent 53cf5e60
...@@ -1613,3 +1613,4 @@ vio/viotest-sslconnect.cpp ...@@ -1613,3 +1613,4 @@ vio/viotest-sslconnect.cpp
vio/viotest.cpp vio/viotest.cpp
zlib/*.ds? zlib/*.ds?
zlib/*.vcproj zlib/*.vcproj
scripts/mysql_upgrade
...@@ -1078,9 +1078,9 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, ...@@ -1078,9 +1078,9 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt,
else if (flag == ANALYZE_PARTS) else if (flag == ANALYZE_PARTS)
error= file->analyze(thd, check_opt); error= file->analyze(thd, check_opt);
else if (flag == CHECK_PARTS) else if (flag == CHECK_PARTS)
error= file->check(thd, check_opt); error= file->ha_check(thd, check_opt);
else if (flag == REPAIR_PARTS) else if (flag == REPAIR_PARTS)
error= file->repair(thd, check_opt); error= file->ha_repair(thd, check_opt);
else else
{ {
DBUG_ASSERT(FALSE); DBUG_ASSERT(FALSE);
......
...@@ -2081,10 +2081,7 @@ static bool update_frm_version(TABLE *table, bool needs_lock) ...@@ -2081,10 +2081,7 @@ static bool update_frm_version(TABLE *table, bool needs_lock)
if (table->s->mysql_version != MYSQL_VERSION_ID) if (table->s->mysql_version != MYSQL_VERSION_ID)
DBUG_RETURN(0); DBUG_RETURN(0);
strxnmov(path, sizeof(path)-1, mysql_data_home, "/", table->s->db, "/", strxmov(path, table->s->normalized_path.str, reg_ext, NullS);
table->s->table_name, reg_ext, NullS);
if (!unpack_filename(path, path))
DBUG_RETURN(1);
if (needs_lock) if (needs_lock)
pthread_mutex_lock(&LOCK_open); pthread_mutex_lock(&LOCK_open);
...@@ -2092,8 +2089,8 @@ static bool update_frm_version(TABLE *table, bool needs_lock) ...@@ -2092,8 +2089,8 @@ static bool update_frm_version(TABLE *table, bool needs_lock)
if ((file= my_open(path, O_RDWR|O_BINARY, MYF(MY_WME))) >= 0) if ((file= my_open(path, O_RDWR|O_BINARY, MYF(MY_WME))) >= 0)
{ {
uchar version[4]; uchar version[4];
char *key= table->s->table_cache_key; char *key= table->s->table_cache_key.str;
uint key_length= table->s->key_length; uint key_length= table->s->table_cache_key.length;
TABLE *entry; TABLE *entry;
HASH_SEARCH_STATE state; HASH_SEARCH_STATE state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment