summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge mysql.com:/home/cps/mysql/trees/4.1-runtime-bug9191petr/cps@mysql.com/owlet.local2006-11-0116-68/+358
|\ | | | | | | into mysql.com:/home/cps/mysql/trees/5.0-runtime-bug9191
| * Fix Bug #9191 "TIMESTAMP/from_unixtime() no longer accepts 2^31-1"petr/cps@mysql.com/owlet.local2006-11-0117-70/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (4.1 version, with post-review fixes) The fix for another Bug (6439) limited FROM_UNIXTIME() to TIMESTAMP_MAX_VALUE which is 2145916799 or 2037-12-01 23:59:59 GMT, however unix timestamp in general is not considered to be limited by this value. All dates up to power(2,31)-1 are valid. This patch extends allowed TIMESTAMP range so, that max TIMESTAMP value is power(2,31)-1. It also corrects FROM_UNIXTIME() and UNIX_TIMESTAMP() functions, so that max allowed UNIX_TIMESTAMP() is power(2,31)-1. FROM_UNIXTIME() is fixed accordingly to allow conversion of dates up to 2038-01-19 03:14:07 UTC. The patch also fixes CONVERT_TZ() function to allow extended range of dates. The main problem solved in the patch is possible overflows of variables, used in broken-time representation to time_t conversion (required for UNIX_TIMESTAMP).
* | Instance Manager polishing.anozdrin/alik@alik.2006-10-205-61/+47
| |
* | Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtimedlenev@mockturtle.local2006-10-203-16/+32
|\ \ | | | | | | | | | into mockturtle.local:/home/dlenev/src/mysql-5.0-bg15228-2
| * | Fix for bug#15228 "'invalid access to non-static data member'dlenev@mockturtle.local2006-10-203-16/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings in sql_trigger.cc and sql_view.cc". According to the current version of C++ standard offsetof() macro can't be used for non-POD types. So warnings were emitted when we tried to use this macro for TABLE_LIST and Table_triggers_list classes. Note that despite of these warnings it was probably safe thing to do. This fix tries to circumvent this limitation by implementing custom version of offsetof() macro to be used with these classes. This hack should go away once we will refactor File_parser class. Alternative approaches such as disabling this warning for sql_trigger.cc/sql_view.cc or for the whole server were considered less explicit. Also I was unable to find a way to disable particular warning for particular _part_ of file in GCC.
* | | Bug#20028 (Function with select return no data)malff/marcsql@weblab.(none)2006-10-198-8/+424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reverts a change introduced by Bug 6951, which incorrectly set thd->abort_on_warning for stored procedures. As per internal discussions about the SQL_MODE=TRADITIONAL, the correct behavior is to *not* abort on warnings even inside an INSERT/UPDATE trigger. Tests for Stored Procedures, Stored Functions, Triggers involving SQL_MODE have been included or revised, to reflect the intended behavior. (reposting approved patch, to work around source control issues, no review needed)
* | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-194-2/+39
|\ \ \ | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21856
| * | | BUG#21856: Prepared Statements: crash if bad createkroki/tomash@moonlight.intranet2006-10-194-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When statement to be prepared contained CREATE PROCEDURE, CREATE FUNCTION or CREATE TRIGGER statements with a syntax error in it, the preparation would fail with syntax error message, but the memory could be corrupted. The problem occurred because we switch memroot when parse stored routine or trigger definitions, and on parse error we restored the original memroot only after performing some memory operations. In more detail: - prepared statement would activate its own memory root to parse the definition of the stored procedure. - SP would reset this memory root with its own memory root to parse SP statements - a syntax error would happen - prepared statement would restore the original memory root - stored procedure would restore what it thinks was the original memory root, but actually was the statement memory root. That led to double free - in destruction of the statement and in a next call to mysql_parse(). The solution is to restore memroot right after the failed parsing.
* | | | Fix for valgrind warning introduced by the fix for bug#21354:kroki/tomash@moonlight.intranet2006-10-182-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (COUNT(*) = 1) not working in SELECT inside prepared statement. Note: the warning was introduced in 5.0 and 5.1, 4.1 is OK with the original fix. The problem was that in 5.0 and 5.1 clear() for group functions may access hybrid_type member, and this member is initialized in fix_fields(). So we should not call clear() from item cleanup() methods, as cleanup() may be called for unfixed items.
* | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-170-0/+0
|\ \ \ \ | | |/ / | |/| | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21726
| * | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21726kroki/tomash@moonlight.intranet2006-10-170-0/+0
| |\ \ \ | | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21726
| | * | | BUG#21726: Incorrect result with multiple invocations of LAST_INSERT_ID.kroki/tomash@moonlight.intranet2006-10-0613-38/+189
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: bug#21726 does not directly apply to 4.1, as it doesn't have stored procedures. However, 4.1 had some bugs that were fixed in 5.0 by the patch for bug#21726, and this patch is a backport of those fixes. Namely, in 4.1 it fixes: - LAST_INSERT_ID(expr) didn't return value of expr (4.1 specific). - LAST_INSERT_ID() could return the value generated by current statement if the call happens after the generation, like in CREATE TABLE t1 (i INT AUTO_INCREMENT PRIMARY KEY, j INT); INSERT INTO t1 VALUES (NULL, 0), (NULL, LAST_INSERT_ID()); - Redundant binary log LAST_INSERT_ID_EVENTs could be generated.
* | | | Fix after manual merge.kroki/tomash@moonlight.intranet2006-10-121-22/+21
| | | |
* | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-128-75/+204
|\ \ \ \ | | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug20953
| * | | | BUG#20953: create proc with a create view that uses local vars/paramskroki/tomash@moonlight.intranet2006-10-128-75/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | should fail to create The problem was that this type of errors was checked during view creation, which doesn't happen when CREATE VIEW is a statement of a created stored routine. The solution is to perform the checks at parse time. The idea of the fix is that the parser checks if a construction just parsed is allowed in current circumstances by testing certain flags, and this flags are reset for VIEWs. The side effect of this change is that if the user already have such bogus routines, it will now get a error when trying to do SHOW CREATE PROCEDURE proc; (and some other) and when trying to execute such routine he will get ERROR 1457 (HY000): Failed to load routine test.p5. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) However there should be very few such users (if any), and they may (and should) drop these bogus routines.
* | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-105-4/+223
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354
| * \ \ \ \ Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-105-4/+223
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354
| | * \ \ \ \ Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21354kroki/tomash@moonlight.intranet2006-10-105-4/+221
| | |\ \ \ \ \ | | | |_|/ / / | | |/| | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug21354
| | | * | | | BUG#21354: (COUNT(*) = 1) not working in SELECT inside preparedkroki/tomash@moonlight.intranet2006-10-105-3/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | statement. The problem was that during statement re-execution if the result was empty the old result could be returned for group functions. The solution is to implement proper cleanup() method in group functions.
* | | | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-104-5/+23
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug19111
| * \ \ \ \ \ \ Merge pchardin@bk-internal.mysql.com:/home/bk/mysql-5.0-runtimepetr/cps@mysql.com/owlet.local2006-10-104-5/+23
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | | | | | | | | | into mysql.com:/home/cps/mysql/trees/mysql-5.0-virgin
| | * | | | | | Fix Bug #19368 Failure in "flush_instances" causes assert in Thread_registrypetr/cps@mysql.com/owlet.local2006-10-052-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop guardian and all the rest of threads before shutdown in case of an error
| | * | | | | | Fix Bug #22472 IM: --socket option should be removed from Windows versionpetr/cps@mysql.com/owlet.local2006-10-052-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the option is useless on windows. It was removed from listing of mysqlmanager --help on Windows
* | | | | | | | Fix after manial merge.kroki/tomash@moonlight.intranet2006-10-101-14/+14
| | | | | | | |
* | | | | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0kroki/tomash@moonlight.intranet2006-10-103-3/+59
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug19111
| * | | | | | | Bug#19111: TRIGGERs selecting from a VIEW on the firing base table fail.kroki/tomash@moonlight.intranet2006-10-103-5/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a trigger or a function used in a statement it is possible to do SELECT from a table being modified by the statement. However, encapsulation of such SELECT into a view and selecting from a view instead of direct SELECT was not possible. This happened because tables used by views (which in their turn were used from functions/triggers) were not excluded from checks in unique_table() routine as it happens for the rest of tables added to the statement table list for prelocking. With this fix we ignore all such tables in unique_table(), thus providing consistency: inside a trigger or a functions SELECT from a view may be used where plain SELECT is allowed. Modification of the same table from function or trigger is still disallowed. Also, this patch doesn't affect the case where SELECT from the table being modified is done outside of function of trigger, such SELECTs are still disallowed (this limitation and visibility problem when function select from a table being modified are subjects of bug 21326). See also bug 22427.
* | | | | | | | Merge bodhi.local:/opt/local/work/mysql-5.0-rootkostja@bodhi.local2006-10-097-9/+146
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.0-runtime
| * | | | | | | | Bug#21462 (Stored procedures with no arguments require parenthesis)malff/marcsql@weblab.(none)2006-10-093-9/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The syntax of the CALL statement, to invoke a stored procedure, has been changed to make the use of parenthesis optional in the argument list. With this change, "CALL p;" is equivalent to "CALL p();". While the SQL spec does not explicitely mandate this syntax, supporting it is needed for practical reasons, for integration with JDBC / ODBC connectors. Also, warnings in the sql/sql_yacc.yy file, which were not reported by Bison 2.1 but are now reported by Bison 2.2, have been fixed. The warning found were: bison -y -p MYSQL -d --debug --verbose sql_yacc.yy sql_yacc.yy:653.9-18: warning: symbol UNLOCK_SYM redeclared sql_yacc.yy:656.9-17: warning: symbol UNTIL_SYM redeclared sql_yacc.yy:658.9-18: warning: symbol UPDATE_SYM redeclared sql_yacc.yy:5169.11-5174.11: warning: unused value: $2 sql_yacc.yy:5208.11-5220.11: warning: unused value: $5 sql_yacc.yy:5221.11-5234.11: warning: unused value: $5 conflicts: 249 shift/reduce "unused value: $2" correspond to the $$=$1 assignment in the 1st {} block in table_ref -> join_table {} {}, which does not procude a result ($$) for the rule but an intermediate $2 value for the action instead. "unused value: $5" are similar, with $$ assignments in {} actions blocks which are not for the final reduce.
| * | | | | | | | Patch for BUG#15934: im_daemon_life_cycle fails sporadically.anozdrin/alik@alik.2006-10-034-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was a race condition in a test case. The fix eliminates the race condition by explicit wait on UNIX socket to start accepting connections. The patch affects only test suite (i.e. does not touch server codebase).
* | | | | | | | | Merge mysql.com:/home/svoj/devel/mysql/engines/mysql-5.0svoj@mysql.com/april.(none)2006-10-081-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/engines/mysql-5.0-engines
| * | | | | | | | | After merge fix.svoj@mysql.com/april.(none)2006-10-081-1/+1
| | | | | | | | | |
* | | | | | | | | | Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0svoj@may.pils.ru2006-10-084-6/+25
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | into may.pils.ru:/home/svoj/devel/bk/mysql-5.0-engines
| * | | | | | | | | Merge mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-enginessvoj@mysql.com/april.(none)2006-10-061-1/+14
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-5.0-engines
| | * \ \ \ \ \ \ \ \ Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-enginessvoj@mysql.com/april.(none)2006-10-061-1/+14
| | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG22937/mysql-4.1-engines
| | | * | | | | | | | | BUG#22937 - Valgrind failure in 'merge' test (ha_myisammrg.cc:329)svoj@mysql.com/april.(none)2006-10-061-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is addition to fix for bug21617. Valgrind reports an error when opening merge table that has underlying tables with less indexes than in a merge table itself. Copy at most min(file->keys, table->key_parts) elements from rec_per_key array. This fixes problems when merge table and subtables have different number of keys.
| * | | | | | | | | | | Merge mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-4.1-enginessvoj@mysql.com/april.(none)2006-10-062-17/+0
| |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.0-engines
| | * | | | | | | | | | Per discussion with pekka removed non-deterministic test case for bug#21381.svoj@mysql.com/april.(none)2006-10-062-17/+0
| | | | | | | | | | | |
| * | | | | | | | | | | Addition to fix for bug#10974. Fixed spelling.svoj@mysql.com/april.(none)2006-10-061-1/+1
| | | | | | | | | | | |
| * | | | | | | | | | | Merge mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-4.1-enginessvoj@mysql.com/april.(none)2006-10-061-4/+4
| |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG10974/mysql-5.0-engines
| | * | | | | | | | | | Addition to fix for bug#10974. Fixed spelling.svoj@mysql.com/april.(none)2006-10-062-5/+5
| | | | | | | | | | | |
| * | | | | | | | | | | Merge mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-4.1-enginessvoj@mysql.com/april.(none)2006-10-053-0/+23
| |\ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-5.0-engines
| | * | | | | | | | | | Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1-enginessvoj@mysql.com/april.(none)2006-10-053-0/+23
| | |\ \ \ \ \ \ \ \ \ \ | | | |/ / / / / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG21381/mysql-4.1-engines
| | | * | | | | | | | | BUG#21381 - Engine not notified about multi-table UPDATE IGNOREsvoj@mysql.com/april.(none)2006-10-053-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though this is not storage engine specific problem, I was able to repeat this problem with BDB and NDB engines only. That was the reason to add a test case into ndb_update.test. As a result different bad things could happen. BDB has removed duplicate rows which is not expected. NDB returns an error. For multi table update notify storage engine about UPDATE IGNORE as it is done in single table UPDATE.
* | | | | | | | | | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0gluh@mysql.com/gluh.(none)2006-10-053-1/+17
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/gluh/MySQL/Merge/5.0-kt
| * \ \ \ \ \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/data0/bk/mysql-5.0rburnett@bk-internal.mysql.com2006-09-183-1/+17
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
| | * \ \ \ \ \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/data0/bk/mysql-5.0rburnett@bk-internal.mysql.com2006-09-143-1/+17
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
| | | * | | | | | | | | | | | Bug#20862 truncated result with show variables like 'innodb_data_file_path'gluh@mysql.com/gluh.(none)2006-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The size of 'value' field is increased to FN_REFLEN
| | | * | | | | | | | | | | | Merge bk-internal.mysql.com:/data0/bk/mysql-5.0rburnett@bk-internal.mysql.com2006-09-0814-34/+73
| | | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
| | | * \ \ \ \ \ \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/data0/bk/mysql-5.0rburnett@bk-internal.mysql.com2006-09-081-2/+3
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
| | | * \ \ \ \ \ \ \ \ \ \ \ \ \ Merge bk-internal.mysql.com:/data0/bk/mysql-5.0rburnett@bk-internal.mysql.com2006-09-072-0/+16
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into bk-internal.mysql.com:/data0/bk/mysql-5.0-kt