Commit graph

65437 commits

Author SHA1 Message Date
Davi Arnaut
77e744f844 Post-merge fix: rename filename in shared make file. 2010-05-31 09:27:10 -03:00
Tor Didriksen
8231f082e5 Bug #49829 Many "hides virtual function" warnings with SunStudio
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.
2010-05-31 12:59:58 +02:00
Vasil Dimov
f31af3125d Fix coding style 2010-05-31 13:59:23 +03:00
Sergey Glukhov
07f07ffed1 test case fix 2010-05-31 12:38:45 +04:00
Davi Arnaut
a1b8e4dc7e Backport: remove dead code.
Reorganize function to reflect that it does not actually uses curses
and that there is no curses variant.
2010-05-28 19:53:26 -03:00
Davi Arnaut
1164841167 Backport: Remove unused and ancient files, functions, and facilities.
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.
2010-05-28 19:13:31 -03:00
Davi Arnaut
92f659e7a3 Remove build files which relied on the now defunct make-ccc files. 2010-05-28 18:17:02 -03:00
Davi Arnaut
0ef355488b Backport: remove ancient and unused strings files. 2010-05-28 18:11:31 -03:00
Davi Arnaut
ba48581438 Backport a old cleanup patch.
Formatting cleanup: removing tabs and trailing spaces
to conform to MySQL Internals Coding Guidelines.
2010-05-28 18:00:18 -03:00
unknown
229cc4e191 Bug#52168 decimal casting catastrophes: crashes and valgrind errors on simple casts
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.
2010-05-28 17:30:39 +02:00
Vasil Dimov
bb8a7e66d2 Merge mysql-trunk-innodb from bk-internal into my local tree 2010-05-28 17:16:46 +03:00
Jonathan Perkin
ba36de4f2e Differentiate between Oracle Enterprise Linux and Red Hat Enterprise Linux. 2010-05-28 13:56:57 +01:00
Jonathan Perkin
f02c9f13bd Merge 2010-05-28 12:53:55 +01:00
Calvin Sun
825cb9b686 mysql-trunk-innodb: undo r3119 of disabling test cases.
r3119 does not prevent the crash even the test is disabled.
The crash occurs during shutdown.
2010-05-28 02:41:03 -05:00
Alexander Nozdrin
59a9912963 Auto-merge from mysql-trunk. 2010-05-28 09:47:58 +04:00
Vasil Dimov
9ff587c61c Add two debug assertions and a comment to make it clear that
consecutive_ios[0] cannot be NULL when slot is assigned.
2010-05-27 20:30:08 +03:00
Joerg Bruehe
7758bdc8aa Get rid of the "net retry count" difference which
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.
2010-05-27 19:02:19 +02:00
Inaam Rana
cd1ee2b679 Fix the printout for long semaphore waits to not
list a thread doing a wait_ex as an s-lock waiter.
2010-05-27 12:53:39 -04:00
Sergey Glukhov
f1e1d1bd00 Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type
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
2010-05-27 20:01:43 +04:00
Sergey Glukhov
8fa381fda3 Bug#52856 concurrent show columns or show full columns causes a crash!!!1
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.
2010-05-27 19:54:43 +04:00
Alfranio Correia
8357596035 BUG#53437 @@session.sql_bin_log support in substatements is incorrect
The thd->variables.option_bits & OPTION_BIN_LOG is currently abused: 
it's both a system variable and an implementation switch. The current
approach to this option bit breaks the session variable encapsulation. 
      
Besides it is allowed to change @@session.sql_bin_log within a
transaction what may lead to not correctly logging a transaction.
      
To fix the problems,  we created a thd->variables variable to represent
the "sql_log_bin" and prohibited its update inside a transaction or
sub-statement.

mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result:
  Updated result file. The reason the warnings are removed is
  related to BUG#50312.
mysql-test/suite/binlog/r/binlog_switch_inside_trans.result:
  Checks when is possible to change the option @@session.sql_log_bin.
mysql-test/suite/binlog/t/binlog_switch_inside_trans.test:
  Checks when is possible to change the option @@session.sql_log_bin.
mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result:
  Updated the result file with warnings that were being printed
  due to the wrong use of the thd->variables.option_bits and
  sql_log_bin_top_level variables.
mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result:
  Updated the result file with warnings that were being printed
  due to the wrong use of the thd->variables.option_bits and
  sql_log_bin_top_level variables.
sql/share/errmsg-utf8.txt:
  Introduces two error messages to notify that the @@session.sql_log_bin
  cannot be changed inside a sub-statement or transaction.
sql/sql_base.cc:
  Removes the variable sql_log_bin_toplevel and uses
  the session variable sql_log_bin.
sql/sql_class.cc:
  Replaces the variable sql_log_bin_toplevel by the
  (variables.option_bits & OPTION_BIN_LOG).
sql/sql_class.h:
  Removes the variable sql_log_bin_toplevel and creates 
  a session variable sql_log_bin.
sql/sys_vars.cc:
  Checks when the sql_log_bin can be correctly updated.
2010-05-27 16:43:08 +01:00
Vasil Dimov
0732625a51 Merge mysql-trunk-innodb from bk-internal into my local tree 2010-05-27 15:07:08 +03:00
Jonathan Perkin
8a22c222dc Fix HP-UX localtime_r issue correctly, patch from mats. 2010-05-27 12:52:01 +01:00
Jimmy Yang
52a7c91984 Fix an assertion failure with UNIV_DEBUG is set. Initialize a
dict_index_t structure to NULL in dict_load_index(), we could
enter SYS_INDEXES and got table id value comparision failure
for system tables such as SYS_TABLES. In addition, remove
dict_sys mutex assertion when fill I_S table, as we no longer
hold mutex accross the fill operation.

rb://367 approved by Marko.
2010-05-27 04:15:54 -07:00
Vasil Dimov
a8e06452fc Merge mysql-trunk-bugfixing -> mysql-trunk-innodb
(skipping the change to storage/innobase/os/os0file.c because
that issue has already been addressed in mysql-trunk-innodb)
2010-05-27 12:47:57 +03:00
Tor Didriksen
bac571e136 Bug #53445 Build with -Wall and fix warnings that it generates
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++
2010-05-27 09:42:48 +02:00
Vasil Dimov
a0f33cc460 Fix a compiler warning introduced in
jimmy.yang@oracle.com-20100526014433-bx0t9794mnvkiaft
2010-05-27 08:51:03 +03:00
Tor Didriksen
85da8956e6 Bug #53445 Build with -Wall and fix warnings that it generates
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.
2010-05-26 16:12:23 +02:00
Alexander Nozdrin
2d80fb918f Ignore files auto-generated for each build by CMake-build-scripts. 2010-05-26 14:34:41 +04:00
Alexander Nozdrin
de0f63c181 Patch for Bug#53937 (Junk make-ccc files included in MySQL Server bzr repo).
Remove make-ccc files.
2010-05-26 14:20:14 +04:00
Mattias Jonsson
3fb4926252 pre push fix of test results 2010-05-26 09:56:55 +02:00
Jimmy Yang
60d4288272 Check in the support for Information Schema System Table Views. Users
can now view the content of InnoDB System Tables through following
information schema tables:

information_schema.INNODB_SYS_TABLES
information_schema.INNODB_SYS_INDEXES
information_schema.INNODB_SYS_COUMNS
information_schema.INNODB_SYS_FIELDS
information_schema.INNODB_SYS_FOREIGN
information_schema.INNODB_SYS_FOREIGN_COLS
information_schema.INNODB_SYS_TABLESTATS

rb://330 Approved by Marko
2010-05-25 18:44:33 -07:00
Mattias Jonsson
8db43e66ac merge 2010-05-25 17:41:11 +02:00
Mattias Jonsson
2abf030a12 merge 2010-05-25 17:26:48 +02:00
Jonathan Perkin
c99e628784 Pull in time.h for localtime_r. 2010-05-25 14:37:35 +01:00
Mattias Jonsson
a44f5291fe post push fix 2010-05-25 11:34:36 +02:00
Vasil Dimov
a80c59c7fc (second attempt) Disable the tests on embedded windows that fail due to
Bug #53947 InnoDB: Assertion failure in thread 4224 in file
.\sync\sync0sync.c line 324

This changeset should be reverted once the bug is fixed.
2010-05-25 10:36:06 +03:00
Vasil Dimov
5e012c1626 Revert a changeset since it does not disable the tests:
------------------------------------------------------------
  revno: 3116
  revision-id: vasil.dimov@oracle.com-20100524182209-sk114oipf1vhjbv5
  parent: vasil.dimov@oracle.com-20100524175802-twmwb29vvaehe6b8
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-trunk-innodb
  timestamp: Mon 2010-05-24 21:22:09 +0300
  message:
    Disable the tests on embedded windows that fail due to
    
    Bug #53947 InnoDB: Assertion failure in thread 4224 in file
    .\sync\sync0sync.c line 324
    
    This changeset should be reverted once the bug is fixed.
2010-05-25 10:29:36 +03:00
Mattias Jonsson
63fcf18816 merge 2010-05-25 08:35:48 +02:00
Mattias Jonsson
8b18b6d703 merge 2010-05-24 23:21:08 +02:00
Alexander Nozdrin
eb27f163a3 Fix for Bug#53925 (valgrind failures in rpl.rpl_get_master_version_and_clock
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.
2010-05-24 22:57:25 +04:00
Vasil Dimov
c484578130 Merge a changeset from mysql-5.1-innodb:
------------------------------------------------------------
  revno: 3477
  revision-id: vasil.dimov@oracle.com-20100520132735-a120y85kqmhp7hxi
  parent: vasil.dimov@oracle.com-20100520125403-3u9ydcfu8vz8spls
  committer: Vasil Dimov <vasil.dimov@oracle.com>
  branch nick: mysql-5.1-innodb
  timestamp: Thu 2010-05-20 16:27:35 +0300
  message:
    Disable main.ps_3innodb for valgrind tests since it results in known
    failures, that are described in
    
    Bug#38999 valgrind warnings for update statement in function compare_record()
    
    At the time I am adding this the failures are:
    
    main.ps_3innodb                          [ fail ]  Found warnings/errors in server log file!
            Test ended at 2010-05-20 01:17:34
    line
    ==31559== Thread 11:
    ==31559== Conditional jump or move depends on uninitialised value(s)
    ==31559==    at 0x75C5BD: compare_record(st_table*) (sql_update.cc:35)
    ==31559==    by 0x744732: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
    ==31559==    by 0x74A0D7: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
    ==31559==    by 0x6A79B4: mysql_execute_command(THD*) (sql_parse.cc:3198)
    ==31559==    by 0x754998: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
    ==31559==    by 0x754C4F: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
    ==31559==    by 0x754F33: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
    ==31559==    by 0x6A5028: mysql_execute_command(THD*) (sql_parse.cc:2272)
    ==31559==    by 0x6ADAE8: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5986)
    ==31559==    by 0x6AF3A4: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
    ==31559==    by 0x6B0800: do_command(THD*) (sql_parse.cc:874)
    ==31559==    by 0x69CB46: handle_one_connection (sql_connect.cc:1134)
    ==31559==    by 0x33EDA062F6: start_thread (in /lib64/libpthread-2.5.so)
    ==31559==    by 0x33ECED1B6C: clone (in /lib64/libc-2.5.so)
    ==31559== Conditional jump or move depends on uninitialised value(s)
    ==31559==    at 0x75C5D0: compare_record(st_table*) (sql_update.cc:35)
    ==31559==    by 0x744732: write_record(THD*, st_table*, st_copy_info*) (sql_insert.cc:1486)
    ==31559==    by 0x74A0D7: mysql_insert(THD*, TABLE_LIST*, List<Item>&, List<List<Item> >&, List<Item>&, List<Item>&, enum_duplicates, bool) (sql_insert.cc:835)
    ==31559==    by 0x6A79B4: mysql_execute_command(THD*) (sql_parse.cc:3198)
    ==31559==    by 0x754998: Prepared_statement::execute(String*, bool) (sql_prepare.cc:3583)
    ==31559==    by 0x754C4F: Prepared_statement::execute_loop(String*, bool, unsigned char*, unsigned char*) (sql_prepare.cc:3258)
    ==31559==    by 0x754F33: mysql_sql_stmt_execute(THD*) (sql_prepare.cc:2529)
    ==31559==    by 0x6A5028: mysql_execute_command(THD*) (sql_parse.cc:2272)
    ==31559==    by 0x6ADAE8: mysql_parse(THD*, char const*, unsigned, char const**) (sql_parse.cc:5986)
    ==31559==    by 0x6AF3A4: dispatch_command(enum_server_command, THD*, char*, unsigned) (sql_parse.cc:1233)
    ==31559==    by 0x6B0800: do_command(THD*) (sql_parse.cc:874)
    ==31559==    by 0x69CB46: handle_one_connection (sql_connect.cc:1134)
    ==31559==    by 0x33EDA062F6: start_thread (in /lib64/libpthread-2.5.so)
    ==31559==    by 0x33ECED1B6C: clone (in /lib64/libc-2.5.so)
    ^ Found warnings in /export/home4/pb2/test/sb_3-1827397-1274300957.87/mysql-5.1.48-linux-x86_64-test/mysql-test/var-n_mix/log/mysqld.1.err
2010-05-24 21:27:25 +03:00
Vasil Dimov
3990cb93fd Disable the tests on embedded windows that fail due to
Bug #53947 InnoDB: Assertion failure in thread 4224 in file
.\sync\sync0sync.c line 324

This changeset should be reverted once the bug is fixed.
2010-05-24 21:22:09 +03:00
Vasil Dimov
699a6c1de5 Merge mysql-trunk-innodb from bk-internal into my local tree 2010-05-24 20:58:02 +03:00
Alexey Kopytov
7ce0262ba7 Fixed an incorrectly merged .result file. 2010-05-24 18:13:00 +04:00
Mattias Jonsson
7af0bbc3bc Merge of bug#51851.
Also moved HA_DATA_PARTITION from ha_partition.cc to table.h.
2010-05-24 14:51:59 +02:00
Marko Mäkelä
68ce054f5d Merge a change from mysql-5.1-innodb:
------------------------------------------------------------
revno: 3479
revision-id: marko.makela@oracle.com-20100524110439-fazi70rlmt07tzd9
parent: vasil.dimov@oracle.com-20100520133157-42uk5q3pp0vsinac
committer: Marko Mäkelä <marko.makela@oracle.com>
branch nick: 5.1-innodb
timestamp: Mon 2010-05-24 14:04:39 +0300
message:
  Bug#53578: assert on invalid page access, in fil_io()

  Store the max_space_id in the data dictionary header in order to avoid
  space_id reuse.

  DICT_HDR_MIX_ID: Renamed to DICT_HDR_MAX_SPACE_ID, DICT_HDR_MIX_ID_LOW.

  dict_hdr_get_new_id(): Return table_id, index_id, space_id or a subset of them.

  fil_system_t: Add ibool space_id_reuse_warned.

  fil_create_new_single_table_tablespace(): Get the space_id from the caller.

  fil_space_create(): Issue a warning if the fil_system->max_assigned_id
  is exceeded.

  fil_assign_new_space_id(): Return TRUE/FALSE and take a pointer to the
  space_id as a parameter. Make the function public.

  fil_init(): Initialize all fil_system fields by mem_zalloc(). Remove
  explicit initializations of certain fields to 0 or NULL.
2010-05-24 14:45:24 +03:00
Alexey Kopytov
598cf5aec7 Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
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
2010-05-24 00:41:18 +04:00
Vasil Dimov
ed4bd8ef5d Fix function decoration in Performance Schema code 2010-05-23 23:11:31 +03:00
Calvin Sun
c2b0ebb55b mysql-trunk-innodb: fix compile errors on Windows with UNIV_DEBUG defined. 2010-05-21 16:30:09 -05:00