- 30 Jul, 2009 1 commit
-
-
Joerg Bruehe authored
correctly if the compiler optimizes too clever. This has happaned on HP-UX 11.23 (IA64) at optimization level "+O2", causing bug#42213: Check for "stack overrun" doesn't work, server crashes Fix it by adding a pragma that prevents this optimization. As a result, it should be safe to use "+O2" on this platform (unless there is some other, optimizer-related, bug which is just currently masked because we use resudec optimization). config/ac-macros/misc.m4: Our autoconf function "MYSQL_STACK_DIRECTION" is meant to determine whether the stack grows towards higher or towards lower addresses. It does this by comparing the addresses of a variable (which is local to a recursive function) on different nesting levels. This approach requires that the function is really implemented as a recursive function, with each nested call allocating a new stack frame containing the local variable. If, however, the compiler is optimizing so clever that the recursive function is implemented by a loop, then this test will not produce correct results. This has happened on HP-UX 11.23 (IA64) when HP's compiler was called with optimization "+O2" (not with "+O1"), reported as bug#42213. Rather than starting a race with the compiler and making the function so complicated that this optimization does not happen, the idea is to prevent the optimization by adding a pragma. For HP, this is "#pragma noinline". If we encounter other compilers which also optimize too clever, we may add their pragmas here. It is a debatable issue whether such pragmas should be guarded by conditional compiling or not, the reviewers voted to do it. It seems HP has different compilers, "ANSI C" and "aCC", on the affected platform "__HP_cc" ("ANSI C") is predefined. To be on the safe side, the pragma will also take effect if HP's "aCC" compiler is used, or any other compiler on HP-UX.
-
- 16 Jun, 2009 1 commit
-
-
Georgi Kodinov authored
-
- 15 Jun, 2009 4 commits
-
-
Georgi Kodinov authored
-
Georgi Kodinov authored
-
Bernt M. Johnsen authored
-
Georgi Kodinov authored
crashes server! The problem affects the scenario when index merge is followed by a filesort and the sort buffer is not big enough for all the sort keys. In this case the filesort function will read the data to the end through the index merge quick access method (and thus closing the cursor etc), but will leave the pointer to the quick select method in place. It will then create a temporary file to hold the results of the filesort and will add it as a sort output file (in sort.io_cache). Note that filesort will copy the original 'sort' structure in an automatic variable and restore it after it's done. As a result at exiting filesort() we have a sort.io_cache filled in and nothing else (as a result of close of the cursors at end of reading data through index merge). Now create_sort_index() will note that there is a select and will clean it up (as it's been used already by filesort() reading the data in). While doing that a special case in the index merge destructor will clean up the sort.io_cache, assuming it's an output of the index merge method and is not needed anymore. As a result the code that tries to read the data back from the filesort output will get no data in both memory and disk and will crash. Fixed similarly to how filesort() does it : by copying the sort.io_cache structure to a local variable, removing the pointer to the io_cache (so that it's not freed by QUICK_INDEX_MERGE_SELECT::~QUICK_INDEX_MERGE_SELECT) and restoring the original structure (together with the valid pointer) after the cleanup is done. This is a safe thing to do because all the structures are already cleaned up by hitting the end of the index merge's read method (QUICK_INDEX_MERGE_SELECT::get_next()) and the cleanup code being written in a way that tolerates repeating cleanups. mysql-test/r/index_merge.result: Bug #44810: test case mysql-test/t/index_merge.test: Bug #44810: test case sql/sql_select.cc: Bug #44810: preserve the io_cache produced by filesort while cleaning up the index merge quick access method (QUICK_INDEX_MERGE_SELECT).
-
- 12 Jun, 2009 2 commits
-
-
Georgi Kodinov authored
-
Georgi Kodinov authored
WHERE and GROUP BY clause Loose index scan may use range conditions on the argument of the MIN/MAX aggregate functions to find the beginning/end of the interval that satisfies the range conditions in a single go. These range conditions may have open or closed minimum/maximum values. When the comparison returns 0 (equal) the code should check the type of the min/max values of the current interval and accept or reject the row based on whether the limit is open or not. There was a wrong composite condition on checking this and it was not working in all cases. Fixed by simplifying the conditions and reversing the logic. mysql-test/r/group_min_max.result: Bug #45386: test case mysql-test/t/group_min_max.test: Bug #45386: test case sql/opt_range.cc: Bug #45386: fix the check whether to use the value if on the interval boundry
-
- 11 Jun, 2009 2 commits
-
-
Joerg Bruehe authored
-
unknown authored
-
- 10 Jun, 2009 1 commit
-
-
Davi Arnaut authored
Backport to MySQL 5.0/1 fix by Vladislav Vaintroub: In Vista and later and also in when using terminal services, when server is started from command line, client cannot connect to it via shared memory protocol. This is a regression introduced when Bug#24731 was fixed. The reason is that client is trying to attach to shared memory using global kernel object namespace (all kernel objects are prefixed with Global\). However, server started from the command line in Vista and later will create shared memory and events using current session namespace. Thus, client is unable to find the server and connection fails. The fix for the client is to first try to find server using "local" names (omitting Global\ prefix) and only if server is not found, trying global namespace.
-
- 09 Jun, 2009 1 commit
-
-
Staale Smedseng authored
with gcc 4.3.2 Compiling MySQL with gcc 4.3.2 and later produces a number of warnings, many of which are new with the recent compiler versions. This bug will be resolved in more than one patch to limit the size of changesets. This is the first patch, fixing a number of the warnings, predominantly "suggest using parentheses around && in ||", and empty for and while bodies.
-
- 06 Jun, 2009 2 commits
-
-
Tatiana A. Nurnberg authored
-
Davi Arnaut authored
client/mysqltest.c: Don't mix declarations and code. Tid up function code.
-
- 05 Jun, 2009 6 commits
-
-
Tatiana A. Nurnberg authored
-
Georgi Kodinov authored
-
Georgi Kodinov authored
-
Georgi Kodinov authored
Implemented a way to circumvent the always true comparison by having nested macros (as suggested on review).
-
Georgi Kodinov authored
-
Georgi Kodinov authored
Fixed the 5.0-bugteam MacOSX warnings. client/mysqldump.c: Bug #45286: typecasts cmd-line-utils/readline/bind.c: Bug #45286: use variable of right type cmd-line-utils/readline/display.c: Bug #45286: use variable of right type dbug/user.r: Bug #45286: no warnings in generating man pages strings/ctype.c: Bug #45286: typecasts
-
- 04 Jun, 2009 5 commits
-
-
Tatiana A. Nurnberg authored
Holding on to the temporary inno hash index latch is an optimization in many cases, but a pessimization in some others. Release temporary latches for those corner cases we (or rather, or customers, thanks!) have identified, that is, when we are about to do something that might take a really long time, like REPAIR or filesort. sql/ha_myisam.cc: Let go of (inno, for now) latch when doing MyISAM-repair. (optimize passes through repair.) ("Stuck" in "Repair with keycache".) sql/sql_insert.cc: Let go of (inno, for now) latch when doing CREATE...SELECT in select_insert::send_data() -- it might take a while. ("stuck" in "Sending data") sql/sql_select.cc: Release temporary (inno, for now) latch on - free_tmp_table() (this can take surprisingly long, "removing tmp table") - create_myisam_from_heap() (HEAP table overflowing onto disk as MyISAM, "converting HEAP to MyISAM")
-
Bernt M. Johnsen authored
-
Bernt M. Johnsen authored
-
Georgi Kodinov authored
When copying the Item class one must copy its attributes as well. mysql-test/r/innodb_mysql.result: Bug #36995: test case mysql-test/t/innodb_mysql.test: Bug #36995: test case sql/item.cc: Bug #36995: copy attributes in the copy constructor
-
Sergey Glukhov authored
The crash happens because of uninitialized lex->ssl_cipher, lex->x509_subject, lex->x509_issuer variables. The fix is to add initialization of these variables for stored procedures&functions. mysql-test/r/sp_notembedded.result: test result mysql-test/t/sp_notembedded.test: test case sql/sql_acl.cc: The crash happens because of uninitialized lex->ssl_cipher, lex->x509_subject, lex->x509_issuer variables. The fix is to add initialization of these variables for stored procedures&functions.
-
- 02 Jun, 2009 1 commit
-
-
Sergey Glukhov authored
The crash happens due to wrong max_length value which is set on Item_func_round::fix_length_and_dec() stage. The value is set to args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields. The fix is to set max_length using float_length() function. mysql-test/r/func_math.result: test result mysql-test/t/func_math.test: test case sql/item_func.cc: The crash happens due to wrong max_length value which is set on Item_func_round::fix_length_and_dec() stage. The value is set to args[0]->max_length which is too big in case of LONGTEXT(LONGBLOB) fields. The fix is to set max_length using float_length() function.
-
- 01 Jun, 2009 1 commit
-
-
Alexey Kopytov authored
-
- 31 May, 2009 3 commits
-
-
He Zhenxing authored
-
He Zhenxing authored
-
He Zhenxing authored
BEGIN/COMMIT/ROLLBACK was subject to replication db rules, and caused the boundary of a transaction not recognized correctly when these queries were ignored by the rules. Fixed the problem by skipping replication db rules for these statements. sql/log_event.cc: Skip checking replication db rules for BEGIN/COMMIT/ROLLBACK statements
-
- 30 May, 2009 1 commit
-
-
Davi Arnaut authored
Bug#34309: '_PC' macro redefinition For reasons that are now a mystery, we had defined a CPP symbol to help ancient compilers work better (in some way that's lost to history). This interferes with at least one modern compiler. Now, don't define the _PC symbol. Those other underscore-leading symbols are suspect also, but at least the names aren't inscrutable. Let's leave them for now.
-
- 29 May, 2009 1 commit
-
-
unknown authored
-
- 28 May, 2009 4 commits
-
-
Joerg Bruehe authored
-
Sergey Glukhov authored
-
Sergey Glukhov authored
The fix is to use case insensitive collation for mysql client command search. client/mysql.cc: The fix is to use case insensitive collation for mysql client command search. mysql-test/r/mysql.result: test result mysql-test/t/mysql.test: test case
-
Georgi Kodinov authored
-
- 27 May, 2009 4 commits
-
-
Georgi Kodinov authored
-
Sergey Glukhov authored
On 64-bit Windows: querying MERGE table with keys may cause server crash.The problem is generic and may affect any statement accessing MERGE table cardinality values. When MERGE engine was copying cardinality statistics, it was using incorrect size of element in cardinality statistics array (sizeof(ptr)==8 instead of sizeof(ulong)==4), causing access of memory beyond of the allocated bounds. sql/ha_myisam.cc: When copying rec_per_key array (an array of ulong) use proper size of element, that is sizeof(ulong). sql/ha_myisammrg.cc: When copying rec_per_key array (an array of ulong) use proper size of element, that is sizeof(ulong). sql/table.cc: When allocating rec_per_key array (an array of ulong) use proper size of element, that is sizeof(ulong).
-
Alexey Kopytov authored
old_password() functions The PASSWORD() and OLD_PASSWORD() functions could lead to memory reads outside of an internal buffer when used with BLOB arguments. String::c_ptr() assumes there is at least one extra byte in the internally allocated buffer when adding the trailing '\0'. This, however, may not be the case when a String object was initialized with externally allocated buffer. The bug was fixed by adding an additional "length" argument to make_scrambled_password_323() and make_scrambled_password() in order to avoid String::c_ptr() calls for PASSWORD()/OLD_PASSWORD(). However, since the make_scrambled_password[_323] functions are a part of the client library ABI, the functions with the new interfaces were implemented with the 'my_' prefix in their names, with the old functions changed to be wrappers around the new ones to maintain interface compatibility. mysql-test/r/func_crypt.result: Added a test case for bug #44767. mysql-test/t/func_crypt.test: Added a test case for bug #44767. sql/item_strfunc.cc: Use the new my_make_scrambled_password*() to avoid String::c_ptr(). sql/item_strfunc.h: Changed Item_func[_old]_password::alloc() interfaces so that we can use the new my_make_scrambled_password*() functions. sql/mysql_priv.h: Added declarations for the new my_make_scrambled_password*() functions. sql/password.c: Added new my_make_scrambled_password*() functions with an additional "length" argument. Changed ones to be wrappers around the new ones to maintain interface compatibility. sql/sql_yacc.yy: Utilize the new password hashing functions with additional length argument.
-
Joerg Bruehe authored
This is the integration of the "community" source extensions into build calls for Windows and for RPMs.
-