Commit 16c07b16 authored by gluh@eagle.(none)'s avatar gluh@eagle.(none)

Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt

into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
parents 009d8b60 ce2430bc
......@@ -80,6 +80,6 @@ enum options_client
OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID,
OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT,
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
OPT_DUMP_DATE,
OPT_WRITE_BINLOG, OPT_MAX_CLIENT_OPTION
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
OPT_MAX_CLIENT_OPTION
};
......@@ -1470,6 +1470,10 @@ f7 datetime NO NULL
f8 datetime YES 2006-01-01 00:00:00
drop table t1;
End of 5.0 tests.
show fields from information_schema.TABLE_NAMES;
ERROR 42S02: Unknown table 'TABLE_NAMES' in information_schema
show keys from information_schema.TABLE_NAMES;
ERROR 42S02: Unknown table 'TABLE_NAMES' in information_schema
select * from information_schema.engines WHERE ENGINE="MyISAM";
ENGINE SUPPORT COMMENT TRANSACTIONS XA SAVEPOINTS
MyISAM DEFAULT Default engine as of MySQL 3.23 with great performance NO NO NO
......
......@@ -715,3 +715,14 @@ a SUM(a)
4 4
NULL 14
DROP TABLE t1;
#
# Bug#31095: Unexpected NULL constant caused server crash.
#
create table t1(a int);
insert into t1 values (1),(2),(3);
select count(a) from t1 group by null with rollup;
count(a)
3
3
drop table t1;
##############################################################
......@@ -1090,6 +1090,15 @@ show columns from t1;
drop table t1;
--echo End of 5.0 tests.
#
# Bug#30079 A check for "hidden" I_S tables is flawed
#
--error 1109
show fields from information_schema.TABLE_NAMES;
--error 1109
show keys from information_schema.TABLE_NAMES;
#
# Show engines
#
......
......@@ -358,3 +358,12 @@ SELECT * FROM (SELECT a, SUM(a) FROM t1 GROUP BY a WITH ROLLUP) as t;
DROP TABLE t1;
--echo #
--echo # Bug#31095: Unexpected NULL constant caused server crash.
--echo #
create table t1(a int);
insert into t1 values (1),(2),(3);
select count(a) from t1 group by null with rollup;
drop table t1;
--echo ##############################################################
......@@ -756,6 +756,8 @@ public:
collation= args[0]->collation;
max_length= args[0]->max_length;
decimals=args[0]->decimals;
/* The item could be a NULL constant. */
null_value= args[0]->null_value;
}
};
......
......@@ -5766,7 +5766,12 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd,
ST_SCHEMA_TABLE *schema_table= find_schema_table(thd, ptr->table_name);
if (!schema_table ||
(schema_table->hidden &&
(sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0))
((sql_command_flags[lex->sql_command] & CF_STATUS_COMMAND) == 0 ||
/*
this check is used for show columns|keys from I_S hidden table
*/
lex->sql_command == SQLCOM_SHOW_FIELDS ||
lex->sql_command == SQLCOM_SHOW_KEYS)))
{
my_error(ER_UNKNOWN_TABLE, MYF(0),
ptr->table_name, INFORMATION_SCHEMA_NAME.str);
......
......@@ -16034,12 +16034,14 @@ static void test_bug21635()
for (i= 0; i < field_count; ++i)
{
field= mysql_fetch_field_direct(result, i);
if (!opt_silent)
if (!opt_silent)
printf("%s -> %s ... ", expr[i * 2], field->name);
fflush(stdout);
DIE_UNLESS(field->db[0] == 0 && field->org_table[0] == 0 &&
field->table[0] == 0 && field->org_name[0] == 0);
DIE_UNLESS(strcmp(field->name, expr[i * 2 + 1]) == 0);
if (!opt_silent)
if (!opt_silent)
puts("OK");
}
......
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