1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Bug#35428 When selecting from INFORMATION_SCHEMA tables, incomplete metadata

backport to Betony
This commit is contained in:
Sergey Glukhov
2009-10-23 14:19:54 +05:00
parent 0a0f50e4ab
commit 676c12e2d4
9 changed files with 221 additions and 195 deletions

View File

@ -7750,26 +7750,26 @@ static void test_explain_bug()
verify_prepare_field(result, 0, "Field", "COLUMN_NAME",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
0, 0, "", 64, 0);
0, 0, "information_schema", 64, 0);
verify_prepare_field(result, 1, "Type", "COLUMN_TYPE", MYSQL_TYPE_BLOB,
0, 0, "", 0, 0);
0, 0, "information_schema", 0, 0);
verify_prepare_field(result, 2, "Null", "IS_NULLABLE",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
0, 0, "", 3, 0);
0, 0, "information_schema", 3, 0);
verify_prepare_field(result, 3, "Key", "COLUMN_KEY",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
0, 0, "", 3, 0);
0, 0, "information_schema", 3, 0);
if ( mysql_get_server_version(mysql) >= 50027 )
{
/* The patch for bug#23037 changes column type of DEAULT to blob */
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
MYSQL_TYPE_BLOB, 0, 0, "", 0, 0);
MYSQL_TYPE_BLOB, 0, 0, "information_schema", 0, 0);
}
else
{
@ -7778,14 +7778,14 @@ static void test_explain_bug()
MYSQL_TYPE_BLOB :
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
0, 0, "",
0, 0, "information_schema",
mysql_get_server_version(mysql) >= 50027 ? 0 :64, 0);
}
verify_prepare_field(result, 5, "Extra", "EXTRA",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
0, 0, "", 27, 0);
0, 0, "information_schema", 27, 0);
mysql_free_result(result);
mysql_stmt_close(stmt);