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

merging bug 28701 to 5.1-opt

This commit is contained in:
gkodinov/kgeorge@macbook.local
2007-09-24 13:02:59 +02:00
parent eb00940207
commit fae74579e4
2 changed files with 6 additions and 9 deletions

View File

@ -953,12 +953,9 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
DBUG_RETURN(0);
}
if (table->use_index || table->ignore_index)
if (table->index_hints && table->index_hints->elements)
{
my_error(ER_WRONG_USAGE, MYF(0),
table->ignore_index ? "IGNORE INDEX" :
(table->force_index ? "FORCE INDEX" : "USE INDEX"),
"VIEW");
my_error(ER_WRONG_USAGE, MYF(0), "index hints", "VIEW");
DBUG_RETURN(TRUE);
}