diff options
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index b5cd3ac9e9a..cd40af5a46d 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2004 MySQL AB, 2008-2009 Sun Microsystems, Inc +/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -613,7 +613,8 @@ retry: if (keyname) { - if ((keyno=find_type(keyname, &table->s->keynames, 1+2)-1)<0) + if ((keyno= find_type(keyname, &table->s->keynames, + FIND_TYPE_NO_PREFIX) - 1) < 0) { my_error(ER_KEY_DOES_NOT_EXITS, MYF(0), keyname, tables->alias); goto err; |