summaryrefslogtreecommitdiff
path: root/mysys/my_access.c
diff options
context:
space:
mode:
authormonty@mishka.local <>2005-06-27 16:46:41 +0300
committermonty@mishka.local <>2005-06-27 16:46:41 +0300
commit83f90e060e464292e27ecdf4afd143b914b24c27 (patch)
treec9f8f871238233e8d65c87579ff7e4d3aae6b221 /mysys/my_access.c
parentd0700b819ea863da2d51cd56bcb50e752df3a24f (diff)
downloadmariadb-git-83f90e060e464292e27ecdf4afd143b914b24c27.tar.gz
Better bug fix for:
#9728 'Decreased functionality in "on duplicate key update #8147 'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE' This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part
Diffstat (limited to 'mysys/my_access.c')
-rw-r--r--mysys/my_access.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mysys/my_access.c b/mysys/my_access.c
index 1b9ad6ff380..8fc83a020cf 100644
--- a/mysys/my_access.c
+++ b/mysys/my_access.c
@@ -98,17 +98,16 @@ int check_if_legal_filename(const char *path)
for (reserved_name= reserved_names; *reserved_name; reserved_name++)
{
+ const char *reserved= *reserved_name; /* never empty */
const char *name= path;
- const char *current_reserved_name= *reserved_name;
- while (name != end && *current_reserved_name)
+ do
{
- if (*current_reserved_name != my_toupper(&my_charset_latin1, *name))
+ if (*reserved != my_toupper(&my_charset_latin1, *name))
break;
- current_reserved_name++;
if (++name == end)
DBUG_RETURN(1); /* Found wrong path */
- }
+ } while (*++reserved);
}
DBUG_RETURN(0);
}