mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results) innobase/dict/dict0dict.c: Replace memcmp with comparison of characters to avoid warnings from purify when 'sptr' points to a very short string mysql-test/r/select_found.result: Add missing drop table mysql-test/r/type_set.result: More tests mysql-test/t/select_found.test: Add missing drop table mysql-test/t/type_set.test: More tests mysys/my_init.c: Avoid warning from purify (purify doesn't handle getrusage() properly) sql/field.h: enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters sql/filesort.cc: enum & set are sorted as numbers. This fixes an access to uninitialized memory when enum/set are multi-byte characters sql/item_cmpfunc.cc: Fixed warning from purify. (Not critical as the arguments are passed to a function but not used) Allocate Arg_comparator() with 'new' instead of sql_alloc() to ensure proper initialization sql/mysqld.cc: Wait for signal handler to stop when running --bootstrap (Fixes warning from purify) sql/sql_insert.cc: Initialize slot used by innodb.cc (not critical) sql/sql_lex.h: Better comments sql/sql_repl.cc: memcmp -> bcmp() to avoid warning from purify sql/sql_select.cc: Fix for out-of-bound memory reference when doing DISTINCT on const expressions strings/ctype-simple.c: Fixes to not access uninitialized memory (Not critical)
This commit is contained in:
parent
54dadffc74
commit
8b8c9452dd
15 changed files with 147 additions and 55 deletions
|
|
@ -2671,7 +2671,8 @@ scan_more:
|
|||
/* Starting quote: remember the quote character. */
|
||||
quote = *sptr;
|
||||
} else if (*sptr == '#'
|
||||
|| (0 == memcmp("-- ", sptr, 3))) {
|
||||
|| (sptr[0] == '-' && sptr[1] == '-' &&
|
||||
sptr[2] == ' ')) {
|
||||
for (;;) {
|
||||
/* In Unix a newline is 0x0A while in Windows
|
||||
it is 0x0D followed by 0x0A */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue