- 26 Nov, 2008 1 commit
-
-
Tatiana A. Nurnberg authored
We pretended that TIMEDIFF() would always return positive results; this gave strange results in comparisons of the TIMEDIFF(low,hi)<TIME(0) type that rendered a negative result, but still gave false in comparison. We also inadvertantly dropped the sign when converting times to decimal. CAST(time AS DECIMAL) handles signs of the times correctly. TIMEDIFF() marked up as signed. Time/date comparison code switched to signed for clarity. mysql-test/r/func_sapdb.result: show that time-related comparisons work with negative time values now. show that converting time to DECIMAL no longer drops sign. mysql-test/t/func_sapdb.test: show that time-related comparisons work with negative time values now. show that converting time to DECIMAL no longer drops sign. sql/item_cmpfunc.cc: signed returns sql/item_cmpfunc.h: signed now (time/date < > =) sql/item_func.cc: signed now sql/item_timefunc.h: Functions such as TIMEDIFF() return signed results! The file-comments pretended we were doing that all along, anyway... sql/my_decimal.cc: heed sign when converting time to my_decimal; times may actually be negative! Needed for SELECT CAST(time('-73:42:12') AS DECIMAL); sql/mysql_priv.h: using signed for dates and times now
-
- 25 Nov, 2008 1 commit
-
-
Ramil Kalimullin authored
Problem: in 5.0 'check table for upgrade' doesn't detect incompatible collation changes made in 5.0.48. Fix: backport #39585 fix to 5.0 sql/handler.cc: Fix for bug#40984: backport fix from 39585 into 5.0 - backport of #39585 fix sql/handler.h: Fix for bug#40984: backport fix from 39585 into 5.0 - backport of #39585 fix
-
- 24 Nov, 2008 3 commits
-
-
Patrick Crews authored
Altering how MTR checks global variable status to exclude timestamp Changed SQL statements to update style.
-
Georgi Kodinov authored
-
Georgi Kodinov authored
ONLY_FULL_GROUP_BY The check for non-aggregated columns in queries with aggregate function, but without GROUP BY was treating all the parts of the query as if they are in the SELECT list. Fixed by ignoring the non-aggregated fields in the WHERE clause. mysql-test/r/func_group.result: Bug #39656: test case mysql-test/t/func_group.test: Bug #39656: test case sql/sql_select.cc: Bug #39656: ignore the new non-aggregated column refs in a WHERE by saving the state so far and then adding only the new values of the other parts of the bitmask.
-
- 21 Nov, 2008 3 commits
-
-
Ramil Kalimullin authored
-
Sergey Glukhov authored
the problem is the same as reported in bug#20835, so the fix is backport of bug#20835 patch. mysql-test/r/subselect.result: test result mysql-test/t/subselect.test: test case
-
Ramil Kalimullin authored
returns truncated results Problem: performig conversion from {INT, DECIMAL, REAL} to CHAR we incorrectly set its max length in some cases that may lead to truncated results returned. Fix: properly set CONVERT({INT, DECIMAL, REAL}, CHAR) result's max length. mysql-test/r/ctype_utf8.result: Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results - test result. mysql-test/t/ctype_utf8.test: Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results - test case. sql/item_timefunc.cc: Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results - calculating Item_char_typecast::max_length use initial argument's charset mbmaxlen instead of from_cs->mbmaxlen, as from_cs may differ in some case (see comment above).
-
- 20 Nov, 2008 1 commit
-
-
Ramil Kalimullin authored
Problem: memory leak occurs when we open a federated table that has its share in the hash. Fix: free not used memory. Note: the fix should NOT be merged to 5.1 (the code changed). sql/ha_federated.cc: Fix for bug#40875: Memory leak in FEDERATED handler - free memory (tmp_share.scheme) allocated in the parse_url() if it isn't used anymore.
-
- 18 Nov, 2008 1 commit
-
-
Sergey Vojtovich authored
-
- 17 Nov, 2008 1 commit
-
-
Alexey Botchkov authored
Item_func_div didn't calculate the precision of the result properly. The result of 5/0.0001 is 5000 so we have to add decimals of the divisor to the planned precision. per-file comments: mysql-test/r/type_newdecimal.result Bug#31616 div_precision_increment description looks wrong test result fixed mysql-test/t/type_newdecimal.test Bug#31616 div_precision_increment description looks wrong test case sql/item_func.cc Bug#31616 div_precision_increment description looks wrong precision must be increased with args[1]->decimals parameter
-
- 14 Nov, 2008 3 commits
-
-
Gleb Shchepa authored
missing after downgrade Obsolete arc/ directory and view .frm file backup support has been removed by the patch for bug 17823. However, that bugfix caused a problem with "live downgrades" of the server: if we rename some view 4 times under 5.1.29/5.0.72 and then try to rename it under 5.1.28/5.0.70 on the same database, the server fails with a error: query 'RENAME TABLE ... TO ...' failed: 6: Error on delete of '....frm-0001' (Errcode: 2) Also .frm file of that view may be lost (renamed to .frm~). The server failed because it tried to rename latest 3 backup .frm files renaming the view: the server used an integer value of the "revision" field of .frm file to extract those file names. After the fix for bug 17823 those files were not created/maintained any more, however the "revision" field was incremented as usual. So, the server failed renaming non existent files. This fix solves the problem by removing the support for "revision" .frm file field: 1. New server silently ignores existent "revision" fields in old .frm files and never write it down; 2. Old server assumes, that missing "revision" field in new .frm files means default value of 0. 3. Accordingly to the fix for bug 17823 the new server drops arc/ directory on alter/rename view, so after "live downgrade" old server begins maintenance of the arc/ directory from scratch without conflicts with .frm files. sql/parse_file.cc: Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade 1. static write_parameter(): the old_version parameter and the section for FILE_OPTIONS_REV have been re moved. 2. write_parameter(): the max_versions parameter has been removed; 3. sql_create_definition_file(): removal of dead code; 4. rename_in_schema_file(): revision and num_view_backups parameters and dead code have been removed; 5. File_parser::parse(): FILE_OPTIONS_REV section has been removed. sql/parse_file.h: Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade 1. The FILE_OPTIONS_REV constant has been removed. 2. sql_create_definition_file and rename_in_schema_file functions: obsolete versions, revision and num_view_backups parameters have been removed. sql/sql_db.cc: Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade Commentary update. sql/sql_trigger.cc: Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade sql_create_definition_file() calls have been updates to new parameter lists. sql/sql_view.cc: Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade 1. The mysql_create_view function code is used for both CREATE VIEW and ALTER queries, but query cache is necessary for ALTER command only. Check for a non first view revision has been replaced with a direct check for ALTER query. 2. The num_view_backups global constant has been removed. 3. view_parameters: the "revision" .frm field support has been removed. 4. sql_create_definition_file and rename_in_schema_file function calls have been updates to new parameter lists. sql/table.h: Bug #40021: Renaming view fails, archived .frm for view is missing after downgrade TABLE_LIST: the revision field has been removed.
-
Ramil Kalimullin authored
tables can cause server to crash! The bug will be fixed by patch for #34779: "crash in checksum table on federated tables with blobs containing nulls" Only a test case commited. mysql-test/r/federated.result: Test case for bug #34774: key prefix on text field in federated tables can cause server to crash! - test result. mysql-test/t/federated.test: Test case for bug #34774: key prefix on text field in federated tables can cause server to crash! - test case.
-
Ramil Kalimullin authored
when InnoDB frm file corruption Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists. The query may fail for some reasons (e.g. null .frm file) then mysqlcheck doesn't process the database tables. Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed. client/mysqlcheck.c: Fix for bug#37527: mysqlcheck fails to report entire database when InnoDB frm file corruption - run "SHOW TABLES" query if "SHOW /*!50002 FULL*/ TABLES" failed; - print error info if both failed. mysql-test/r/mysqlcheck.result: Fix for bug#37527: mysqlcheck fails to report entire database when InnoDB frm file corruption - test result. mysql-test/t/mysqlcheck.test: Fix for bug#37527: mysqlcheck fails to report entire database when InnoDB frm file corruption - test case.
-
- 13 Nov, 2008 2 commits
-
-
Patrick Crews authored
Reordered include files so that no mess will be left if this test is run without InnoDB Previously, this test would leave a database named 'federated' in such a case and would cause tests that examined existing databases to fail.
-
Sergey Glukhov authored
issue 'The storage engine for the table doesn't support check' note for I_S tables mysql-test/r/mysqlcheck.result: test result mysql-test/t/mysqlcheck.test: test case sql/sql_table.cc: issue 'The storage engine for the table doesn't support check' note for I_S tables
-
- 11 Nov, 2008 1 commit
-
-
Sergey Vojtovich authored
With fix for bug 25951 index hints are ignored for fulltext searches, as handling of fulltext indexes is different from handling regular indexes. Meaning it is not possible to implement true index hints support for fulltext indexes within the scope of current fulltext architecture. The problem is that prior to fix for bug 25951, some useful index hints still could be given for boolean mode searches. This patch implements special index hints support for fulltext indexes with the following characteristics: - all index hints are still ignored for NLQ mode searches - it cannot work without an index; - for 5.1 and up index hints FOR ORDER BY and FOR GROUP BY are still ignored for fulltext indexes; - boolean mode searches honor USE/FORCE/IGNORE INDEX hints; - as opposed to index hints for regular indexes, index hints for fulltext BOOLEAN mode searches affect the usage of the index for the whole query. mysql-test/r/fulltext.result: A test case for BUG#38842. mysql-test/t/fulltext.test: A test case for BUG#38842. sql/item_func.cc: For boolean mode searches, which can work without fulltext index, use keys_in_use_for_query bitmap instead of keys_in_use. The effect is that boolean mode searches now honor index hints.
-
- 10 Nov, 2008 1 commit
-
-
Vladislav Vaintroub authored
japanese characters. Fix - removed obsolvete setlocale from my_init.c . In MBCS environments it caused unwanted character-to-byte translations in fputc() in client code and wrong output as result.
-
- 06 Nov, 2008 4 commits
-
-
Georgi Kodinov authored
-
Joerg Bruehe authored
-
Joerg Bruehe authored
Prevent this by modifying CFLAGS and CXXFLAGS. support-files/mysql.spec.sh: Bug #40546 Debug server in RPM is built with compiler optimization Modify CFLAGS and CXXFLAGS for the duration of the debug server build (implemented by doing it in a subshell) so that they do not contain any optimization flag. Play it safe and prepare for both gcc and icc.
-
Georgi Kodinov authored
-
- 03 Nov, 2008 1 commit
-
-
Georgi Kodinov authored
-
- 31 Oct, 2008 1 commit
-
-
Kristofer Pettersson authored
implicit command which isn't completed immediately. mysql-test/r/status2.result: * Moved disconnect command to avoid race. mysql-test/t/status2.test: * Moved disconnect command to avoid race.
-
- 27 Oct, 2008 1 commit
-
-
Sergey Glukhov authored
A string buffers which were included in the 'view' data structure were allocated on the stack, causing an invalid pointer when used after the function returned. The fix: use copy of values for view->md5 & view->queries mysql-test/r/view.result: test result mysql-test/t/view.test: test case sql/sql_view.cc: A string buffers which were included in the 'view' data structure were allocated on the stack, causing an invalid pointer when used after the function returned. The fix: use copy of values for view->md5 & view->queries
-
- 26 Oct, 2008 2 commits
-
-
Serge Kozlov authored
-
Serge Kozlov authored
1. Replace --sleep by wait_* primitive 2. Vertical output for SHOW SLAVE STATUS 3. Updated result file
-
- 24 Oct, 2008 3 commits
-
-
unknown authored
-
Sergey Petrunia authored
-
Sergey Petrunia authored
- Make send_row_on_empty_set() return FALSE when simplify_cond() has found out that HAVING is always FALSE re-committing to put the fix into 5.0 and 5.1 mysql-test/r/group_by.result: BUG#38072: Wrong result: HAVING not observed in a query with aggregate - Testcase mysql-test/t/group_by.test: BUG#38072: Wrong result: HAVING not observed in a query with aggregate - Testcase sql/sql_select.h: BUG#38072: Wrong result: HAVING not observed in a query with aggregate - Make send_row_on_empty_set() return FALSE when simplify_cond() has found out that HAVING is always FALSE
-
- 23 Oct, 2008 4 commits
-
-
Davi Arnaut authored
-
Vladislav Vaintroub authored
-
Georgi Kodinov authored
-
Vladislav Vaintroub authored
Visual Studio 2008 Express edition does not include message compiler mc.exe It is not possible to build MySQL server if only VC2008 Express is installed, because we use mc.exe to generate event log messages. This patch removes the mc.exe dependency. Generated files message.h, message.rc and MSG00001.bin are checked into source code repository. Instructions on how to add or change messages are added to messages.mc
-
- 21 Oct, 2008 4 commits
-
-
Davi Arnaut authored
mysql-test/r/xa.result: Update test case result. mysql-test/t/xa.test: Drop table used for test.
-
Davi Arnaut authored
The problem was that the server did not robustly handle a unilateral roll back issued by the Resource Manager (RM) due to a resource deadlock within the transaction branch. By not acknowledging the roll back, the server (TM) would eventually corrupt the XA transaction state and crash. The solution is to mark the transaction as rollback-only if the RM indicates that it rolled back its branch of the transaction. mysql-test/r/xa.result: Add test case result for Bug#28323 mysql-test/t/xa.test: Add test case for Bug#28323 sql/handler.cc: Reset XID only at the end of the global transaction. sql/share/errmsg.txt: Add new error codes. sql/sql_class.h: Remember the error reported by the Resource Manager. sql/sql_parse.cc: Rollback the transaction if the Resource Manager reported a error and rolled back its branch of the transaction.
-
Davi Arnaut authored
The problem was that the server did not robustly handle a unilateral roll back issued by the Resource Manager (RM) due to a resource deadlock within the transaction branch. By not acknowledging the roll back, the server (TM) would eventually corrupt the XA transaction state and crash. The solution is to mark the transaction as rollback-only if the RM indicates that it rolled back its branch of the transaction. mysql-test/r/xa.result: Add test case result for Bug#28323 mysql-test/t/xa.test: Add test case for Bug#28323 sql/handler.cc: Reset XID only at the end of the global transaction. sql/share/errmsg.txt: Add new error codes. sql/sql_class.h: Remember the error reported by the Resource Manager. sql/sql_parse.cc: Rollback the transaction if the Resource Manager reported a error and rolled back its branch of the transaction.
-
unknown authored
-
- 20 Oct, 2008 2 commits
-
-
Georgi Kodinov authored
-
Kristofer Pettersson authored
-