diff options
author | lars@mysql.com <> | 2005-06-22 20:59:33 +0200 |
---|---|---|
committer | lars@mysql.com <> | 2005-06-22 20:59:33 +0200 |
commit | 53761ce08f45a09bb70456b94fb3f3a73190cae8 (patch) | |
tree | e787208ac4a58a71ca208631b17d367bd02156d6 | |
parent | 008548150c0bf34e99b713de5fa3056da0144c94 (diff) | |
parent | 705992719a602c5dad9339be70f7be5ed00e3d6f (diff) | |
download | mariadb-git-53761ce08f45a09bb70456b94fb3f3a73190cae8.tar.gz |
Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/mysql-4.1
-rw-r--r-- | mysys/my_access.c | 12 | ||||
-rw-r--r-- | sql/item.h | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/mysys/my_access.c b/mysys/my_access.c index 89e90e16f18..1b9ad6ff380 100644 --- a/mysys/my_access.c +++ b/mysys/my_access.c @@ -93,18 +93,20 @@ int check_if_legal_filename(const char *path) path+= dirname_length(path); /* To start of filename */ if (!(end= strchr(path, FN_EXTCHAR))) end= strend(path); - if (path == end || (uint) (path - end) > MAX_RESERVED_NAME_LENGTH) + if (path == end || (uint) (end - path) > MAX_RESERVED_NAME_LENGTH) DBUG_RETURN(0); /* Simplify inner loop */ for (reserved_name= reserved_names; *reserved_name; reserved_name++) { const char *name= path; - while (name != end) + const char *current_reserved_name= *reserved_name; + + while (name != end && *current_reserved_name) { - if (my_toupper(&my_charset_latin1, *path) != - my_toupper(&my_charset_latin1, *name)) + if (*current_reserved_name != my_toupper(&my_charset_latin1, *name)) break; - if (name++ == end) + current_reserved_name++; + if (++name == end) DBUG_RETURN(1); /* Found wrong path */ } } diff --git a/sql/item.h b/sql/item.h index d9a40cbdfb6..82ab5a66cfb 100644 --- a/sql/item.h +++ b/sql/item.h @@ -336,7 +336,7 @@ public: virtual bool set_flags_processor(byte *args) { this->item_flags|= *((uint8*)args); - return true; + return false; } }; |