- 01 Jun, 2010 4 commits
-
-
He Zhenxing authored
-
He Zhenxing authored
Check the length and use strncpy to make the code safer.
-
He Zhenxing authored
Check the length and use strncpy to make the code safer. plugin/semisync/semisync_master.cc: replace strcpy with strncpy to make the code safer
-
Alexander Nozdrin authored
-
- 31 May, 2010 5 commits
-
-
Alexander Nozdrin authored
- revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461 - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866 BUG#35274 - merge table doesn't need any base tables, gives error 124 when key accessed SELECT queries that use index against a merge table with empty underlying tables list may return with error "Got error 124 from storage engine". The problem was that wrong error being returned. mysql-test/r/merge.result: Backport of - revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461 - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866 A test case for BUG#35274. Modified a test case according to fix for BUG#35274. Key based reads are now allowed for merge tables with no underlying tables defined. mysql-test/t/merge.test: Backport of - revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461 - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866 A test case for BUG#35274. Modified a test case according to fix for BUG#35274. Key based reads are now allowed for merge tables with no underlying tables defined. storage/myisammrg/myrg_queue.c: Backport of - revid:sp1r-svoj@mysql.com/june.mysql.com-20080324111246-00461 - revid:sp1r-svoj@mysql.com/june.mysql.com-20080414125521-40866 Return "end of file" error instead of "wrong index" error when we got a merge table with empty underlying tables list. In 5.1 we cannot rely on info->open_tables value when checking if a merge table has no underlying tables defined. Use info->tables instead.
-
Gleb Shchepa authored
when it should use index Sometimes the LEFT/RIGHT JOIN with an empty table caused an unnecessary filesort. Sample query, where t1.i1 is indexed and t3 is empty: SELECT t1.*, t2.* FROM t1 JOIN t2 ON t1.i1 = t2.i2 LEFT JOIN t3 ON t2.i2 = t3.i3 ORDER BY t1.i1 LIMIT 5; The server erroneously used an item of empty outer-joined table as a common constant of a Item_equal (multi-equivalence expression). By the fix for the bug 16590 the constant status of such an item has been propagated to st_table::const_key_parts map bits related to other Item_equal argument-related key parts (those are obviously not constant in our case). As far as test_if_skip_sort_order function skips constant prefixes of testing keys, this caused an ignorance of available indices, since some prefixes were marked as constant by mistake. mysql-test/r/order_by.result: Test case for bug #38745. mysql-test/t/order_by.test: Test case for bug #38745. sql/item.h: Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY when it should use index Item::is_outer_field() has been added and overloaded for Item_field and Item_ref classes. sql/item_cmpfunc.cc: Bug #38745: MySQL 5.1 optimizer uses filesort for ORDER BY when it should use index Item_equal::update_const() and Item_equal::update_used_tables() have been updated to not take into account the constantness of outer-joined table items.
-
Davi Arnaut authored
-
Tor Didriksen authored
Backport from mysql-pe (of those parts which have not been upmerged from 5.1) sql/field.cc: Local scope variable or method argument same as class attribute. sql/item.cc: Rename auto variable to avoid name clash. sql/item.h: Item_ref::basic_const_item had wrong signature (missing const) and was thus never called. sql/partition_info.cc: Rename, to avoid name clashes. sql/sql_load.cc: Rename, to avoid name clashes.
-
Sergey Glukhov authored
-
- 28 May, 2010 9 commits
-
-
Davi Arnaut authored
Reorganize function to reflect that it does not actually uses curses and that there is no curses variant.
-
Davi Arnaut authored
client/mysql.cc: Remove unused functions. client/sql_string.cc: Remove unused functions. include/my_pthread.h: Remove unused prototype. mysys/my_pthread.c: Remove unused function. sql/lock.cc: Remove unused function. sql/lock.h: Remove unused and duplicated prototypes. sql/sql_class.h: Removed unused variables. sql/sql_const.h: Remove unused defines. sql/sql_priv.h: Remove unused defines. sql/sql_string.cc: Remove unused prototype. sql/thr_malloc.cc: Remove unused function. sql/thr_malloc.h: Remove unused prototype. storage/myisam/CMakeLists.txt: Remove obsolete fulltext file. storage/myisam/Makefile.am: Remove obsolete files (were already commented out). storage/myisam/ft_eval.c: Remove obsolete fulltext file. storage/myisam/ft_eval.h: Remove obsolete fulltext file. storage/myisam/ft_stem.c: Remove obsolete fulltext file. storage/myisam/ft_test1.c: Remove obsolete fulltext file. storage/myisam/ft_test1.h: Remove obsolete fulltext file.
-
Davi Arnaut authored
-
Davi Arnaut authored
-
Davi Arnaut authored
Formatting cleanup: removing tabs and trailing spaces to conform to MySQL Internals Coding Guidelines.
-
unknown authored
The problem is that if a NULL is stored in an Item_cache_decimal object, the associated my_decimal object is not initialized. However, it is still accessed when val_int() is called. The fix is to check for null_value within val_int(), and return without accessing the my_decimal object when the cached value is NULL. Bug#52122 reports the same issue for val_real(), and this patch also includes fixes for val_real() and val_str() and corresponding test cases from that bug report. Also, NULL is returned from val_decimal() when value is null. This will avoid that callers access an uninitialized my_decimal object. Made similar changes to all other Item_cache classes. Now all val_* methods should return a well defined value when actual value is NULL. mysql-test/r/type_decimal.result: Updated result file with test cases for Bug#52168 and Bug#52122. mysql-test/t/type_decimal.test: Added test cases for Bug#52168 and Bug#52122. sql/item.cc: In Item_cache_*::val_* methods, return a well defined value when actual value is NULL. This is especially important for Item_cache_decimal since otherwise one risk accessing an uninitialized my_decimal object. sql/item.h: Added method Item_cache::has_value() which returns TRUE if cache object contains a non-null value.
-
Jonathan Perkin authored
-
Jonathan Perkin authored
-
Alexander Nozdrin authored
-
- 27 May, 2010 5 commits
-
-
Joerg Bruehe authored
is not needed any more with current versions of FreeBSD. (Entries 52410 and 52412 in the Bug DB) That change is based on Dan Nelson replying on the FreeBSD mailing list, freebsd-questions@freebsd.org in a thread running from 2010-Apr-29 to 2010-May-1 titled "Need info about FreeBSD and interrupted system calls for MySQL code" Also, ensure the cmake settings correspond to the autotools ones: Add "HAVE_BROKEN_REALPATH" to cmake. cmake/os/FreeBSD.cmake: With current versions of FreeBSD, threading is not done on the user-level any more, so the huge "net retry count" is not needed any more. However, it is still being kept as a comment for now, so that it can be re-activated should the need arise. In addition, set "HAVE_BROKEN_REALPATH" to completely mirror the autotools path. configure.in: With current versions of FreeBSD, threading is not done on the user-level any more, so the huge "net retry count" is not needed any more. This definitely holds for FreeBSD version 6 and up. Adapt the informational messages to the path taken.
-
Sergey Glukhov authored
For BINARY(N) strip trailing zeroes to make the error message nice-looking mysql-test/r/errors.result: test case mysql-test/r/type_binary.result: result fix mysql-test/t/errors.test: test case sql/key.cc: For BINARY(N) strip trailing zeroes to make the error message nice-looking
-
Sergey Glukhov authored
We should avoid any SHARE fields assignments as this is shared structure and assignments may affect other therads. To avoid this copy of SHARE struct is created and stored into TABLE struct which is used in get_schema_coulumns_record later. mysql-test/r/mdl_sync.result: test case mysql-test/t/mdl_sync.test: test case sql/sql_show.cc: We should avoid any SHARE fields assignments as this is shared structure and assignments may affect other therads. To avoid this copy of SHARE struct is created and stored into TABLE struct which is used in get_schema_coulumns_record later.
-
Jonathan Perkin authored
-
Tor Didriksen authored
Post-push fix: -Wall implies -Wunused on some platforms, which will generate thousands of warnings about unused parameters. configure.cmake: Do not warn about unused parameters in C++
-
- 26 May, 2010 4 commits
-
-
Tor Didriksen authored
Add -Wall to gcc/g++ Fix most warnings reported in dbg and opt mode. cmd-line-utils/libedit/filecomplete.c: Remove unused auto variables. configure.cmake: Add -Wall to gcc. extra/comp_err.c: Cast to correct type. extra/perror.c: Fix segfault (but warnings about deprecated features remain) extra/yassl/taocrypt/include/runtime.hpp: Comparing two literals was reported as undefined behaviour. include/my_global.h: Add a template for aligning character buffers. mysys/lf_alloc-pin.c: Initialize pointer. sql/mysqld.cc: Use UNINIT_VAR rather than LINT_INIT. sql/partition_info.cc: Use UNINIT_VAR rather than LINT_INIT. sql/rpl_handler.cc: Use char[] rather than unsigned long[] array for placement buffer. sql/spatial.cc: Use char[] rather than unsigned void*[] array for placement buffer. sql/spatial.h: Use char[] rather than unsigned void*[] array for placement buffer. sql/sql_partition.cc: Initialize auto variable. sql/sql_table.cc: Initialize auto variables. Add parens around assignment within if() sql/sys_vars.cc: Use UNINIT_VAR. storage/innobase/os/os0file.c: Init first slot in auto variable. storage/myisam/mi_create.c: Use UNINIT_VAR rather than LINT_INIT. storage/myisam/mi_open.c: Remove (wrong) casting. storage/myisam/mi_page.c: Remove (wrong) casting. storage/myisam/mi_search.c: Cast to uchar* rather than char*. strings/ctype-ucs2.c: Use UNINIT_VAR rather than LINT_INIT. Add (uchar*) casting.
-
Alexander Nozdrin authored
-
Alexander Nozdrin authored
Remove make-ccc files.
-
Mattias Jonsson authored
-
- 25 May, 2010 5 commits
-
-
Mattias Jonsson authored
-
Mattias Jonsson authored
-
Jonathan Perkin authored
-
Mattias Jonsson authored
-
Mattias Jonsson authored
-
- 24 May, 2010 4 commits
-
-
Mattias Jonsson authored
-
Alexander Nozdrin authored
in mysql-trunk-merge). There were two problems: - a mistake during merge of a patch for Bug 52629 from 5.1; - MTR treated auxilary output of newer valgrind as an error. The fixes are: - Fix merge error; - Teach MTR to skip 'HEAP summary' section of valgrind output.
-
Alexey Kopytov authored
-
Mattias Jonsson authored
Also moved HA_DATA_PARTITION from ha_partition.cc to table.h.
-
- 23 May, 2010 1 commit
-
-
Alexey Kopytov authored
Conflicts: conflict Makefile.am conflict mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result conflict mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test conflict sql/opt_sum.cc conflict sql/set_var.cc conflict sql/sql_base.cc conflict sql/sql_priv.h conflict sql/sql_show.cc
-
- 21 May, 2010 3 commits
-
-
Gleb Shchepa authored
data directory name command The check_db_name function has been modified to validate tails of #mysql50#-prefixed database names for compliance with MySQL 5.0 database name encoding rules (the check_table_name function call has been reused). mysql-test/r/renamedb.result: Updated test case. mysql-test/r/upgrade.result: Test case for bug #53804. mysql-test/t/renamedb.test: Updated test case. mysql-test/t/upgrade.test: Test case for bug #53804. sql/mysql_priv.h: Bug #53804: serious flaws in the alter database .. upgrade data directory name command The check_mysql50_prefix has been added. sql/sql_table.cc: Bug #53804: serious flaws in the alter database .. upgrade data directory name command - The check_mysql50_prefix has been added. - The check_n_cut_mysql50_prefix function has been refactored to share code with new check_mysql50_prefix function. sql/table.cc: Bug #53804: serious flaws in the alter database .. upgrade data directory name command The check_db_name function has been modified to validate tails of #mysql50#-prefixed database names for compliance with MySQL 5.0 database name encoding rules.
-
Jon Olav Hauglid authored
-
Alexander Nozdrin authored
to crash) from mysql-6.0-codebase.
-