Commit 0e1e0ddf authored by unknown's avatar unknown

mysqladmin extended-status now displays global status

Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part


client/mysqladmin.cc:
  Show GLOBAL status
myisam/mi_key.c:
  Fixed problem with NULL in VARCHAR/BLOB keys for multi-part keys where VARCHAR/BLOB is first part
  (Ramil will soon push test cases)
sql/handler.cc:
  Indentation fix
tests/mysql_client_test.c:
  Portability fixes
parent 81e8630e
...@@ -727,7 +727,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv) ...@@ -727,7 +727,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
void (*func) (MYSQL_RES*, MYSQL_ROW, uint); void (*func) (MYSQL_RES*, MYSQL_ROW, uint);
new_line = 1; new_line = 1;
if (mysql_query(mysql, "show status") || if (mysql_query(mysql, "show /*!50002 GLOBAL */ status") ||
!(res = mysql_store_result(mysql))) !(res = mysql_store_result(mysql)))
{ {
my_printf_error(0, "unable to show status; error: '%s'", MYF(ME_BELL), my_printf_error(0, "unable to show status; error: '%s'", MYF(ME_BELL),
......
...@@ -242,7 +242,10 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old, ...@@ -242,7 +242,10 @@ uint _mi_pack_key(register MI_INFO *info, uint keynr, uchar *key, uchar *old,
{ {
k_length-=length; k_length-=length;
if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART)) if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
{
k_length-=2; /* Skip length */ k_length-=2; /* Skip length */
old+= 2;
}
continue; /* Found NULL */ continue; /* Found NULL */
} }
} }
......
...@@ -175,9 +175,10 @@ enum db_type ha_checktype(enum db_type database_type) ...@@ -175,9 +175,10 @@ enum db_type ha_checktype(enum db_type database_type)
return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ? return ((enum db_type) thd->variables.table_type != DB_TYPE_UNKNOWN ?
(enum db_type) thd->variables.table_type : (enum db_type) thd->variables.table_type :
(enum db_type) global_system_variables.table_type != ((enum db_type) global_system_variables.table_type !=
DB_TYPE_UNKNOWN ? DB_TYPE_UNKNOWN ?
(enum db_type) global_system_variables.table_type : DB_TYPE_MYISAM); (enum db_type) global_system_variables.table_type : DB_TYPE_MYISAM)
);
} /* ha_checktype */ } /* ha_checktype */
......
...@@ -7046,6 +7046,7 @@ static void test_set_option() ...@@ -7046,6 +7046,7 @@ static void test_set_option()
bug #89 (reported by mark@mysql.com) bug #89 (reported by mark@mysql.com)
*/ */
#ifndef EMBEDDED_LIBRARY
static void test_prepare_grant() static void test_prepare_grant()
{ {
int rc; int rc;
...@@ -7138,7 +7139,7 @@ static void test_prepare_grant() ...@@ -7138,7 +7139,7 @@ static void test_prepare_grant()
} }
} }
#endif
/* /*
Test a crash when invalid/corrupted .frm is used in the Test a crash when invalid/corrupted .frm is used in the
...@@ -12598,7 +12599,7 @@ static void test_bug8330() ...@@ -12598,7 +12599,7 @@ static void test_bug8330()
const char *stmt_text; const char *stmt_text;
MYSQL_STMT *stmt[2]; MYSQL_STMT *stmt[2];
int i, rc; int i, rc;
char *query= "select a,b from t1 where a=?"; const char *query= "select a,b from t1 where a=?";
MYSQL_BIND bind[2]; MYSQL_BIND bind[2];
long lval[2]; long lval[2];
...@@ -12789,7 +12790,7 @@ static void test_bug8722() ...@@ -12789,7 +12790,7 @@ static void test_bug8722()
} }
MYSQL_STMT *open_cursor(char *query) MYSQL_STMT *open_cursor(const char *query)
{ {
int rc; int rc;
const ulong type= (ulong)CURSOR_TYPE_READ_ONLY; const ulong type= (ulong)CURSOR_TYPE_READ_ONLY;
......
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