summaryrefslogtreecommitdiff
path: root/mysys/my_access.c
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2005-06-27 16:46:41 +0300
committerunknown <monty@mishka.local>2005-06-27 16:46:41 +0300
commitd10877ce8ce4f939f88f79e6ad42af251fd51ebe (patch)
treec9f8f871238233e8d65c87579ff7e4d3aae6b221 /mysys/my_access.c
parent9ec764c4ffb67f93efb70951965598346bf2442b (diff)
downloadmariadb-git-d10877ce8ce4f939f88f79e6ad42af251fd51ebe.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 mysql-test/r/insert_select.result: More tests for bug #9728 and #8147 mysql-test/r/insert_update.result: Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works mysql-test/t/insert_select.test: More tests for bug #9728 and #8147 mysql-test/t/insert_update.test: Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works mysys/my_access.c: Cleanup (shorter loop variable names) sql/ha_ndbcluster.cc: Indentation fixes sql/item.cc: Remove item_flags sql/item.h: Remove item_flags sql/mysql_priv.h: New arguments to mysql_prepare_insert sql/sql_base.cc: Remove old fix for bug #8147 sql/sql_insert.cc: Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE sql/sql_parse.cc: Revert fix for #9728 Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause sql/sql_prepare.cc: New arguments to mysql_prepare_insert sql/sql_yacc.yy: Revert bug fix for #9728
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);
}