1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-20 10:24:14 +03:00
Commit Graph

26109 Commits

Author SHA1 Message Date
f28655e05a Merge 5.0 -> 5.1 2009-02-10 11:23:47 +01:00
46f91045f8 Bug #42590 MTR v1 crashes under Active State Perl
Perl crashes when MTR 2 tries to start v1
Replaced require with system()
2009-02-10 11:00:16 +01:00
0669b79363 Bug #33813: Schema names are case-sensitive in DROP FUNCTION
The parser was not using the correct fully-qualified-name
production for DROP FUNCTION.
Fixed by copying the production from DROP PROCEDURE.
Tested in the windows specific suite to make sure it's 
tested on a case-insensitive file system.

mysql-test/r/windows.result:
  Bug #33813: test case
mysql-test/t/windows.test:
  Bug #33813: test case
sql/sql_yacc.yy:
  Bug #33813: use the correct production for the name in
  DROP PROCEDURE
2009-02-10 11:58:19 +02:00
8a98664d3b Merging with 5.1-bugteam. 2009-02-09 23:51:59 +01:00
0ef6e2a5ab Merge 5.0 -> 5.1 2009-02-09 22:00:15 +01:00
0fab1a857c This belongs to the fix for
Bug#42003 tests missing the disconnect of connections <> default
second slice
Content:
1. wait_until_count_sessions.inc
   - One PB run of a test using this routine failed because
     5 seconds timeout were exceeded. Although I have some doubts
     if the assigned timeout was really too small, I increase the
     value to 10. We waste the additional 5 seconds only if the
     tests fails anyway.
   - Print the content of the PROCESSLIST if the poll routine fails
2. minor improvements of formatting
3. query_cache_notembedded:
   Activate the wait_until_count_sessions.inc routine which was
   unfortunately forgotten in the changeset before.
2009-02-09 21:52:40 +01:00
86a11e6a39 Merge from upstream 5.1-bugteam. 2009-02-09 16:27:45 -02:00
20e5719574 Bug#42709: safe_process_win.cc does not print correct system error messages.
Fix: use FormatMessage() to output system errors , not strerror()
2009-02-09 19:24:48 +01:00
bab4ff1ae5 Bug#42634: % character in query can cause mysqld signal 11 segfault
The problem is that a unfiltered user query was being passed as
the format string parameter of sql_print_warning which later
performs printf-like formatting, leading to crashes if the user
query contains formatting instructions (ie: %s). Also, it was
using THD::query as the source of the user query, but this
variable is not meaningful in some situations -- in a delayed
insert, it points to the table name.

The solution is to pass the user query as a parameter for the
format string and use the function parameter query_arg as the
source of the user query.

mysql-test/suite/binlog/r/binlog_unsafe.result:
  Add test case result for Bug#42634
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Add test case for Bug#42634
sql/sql_class.cc:
  Don't pass the user query as a format string.
2009-02-09 16:17:58 -02:00
4d0557a2e6 Bug#42610 Dynamic plugin broken in 5.1.31
added ignore-builtin-innodb option which disabled
initialization of builtin InnoDB plugin

mysql-test/r/innodb_ignore_builtin.result:
  test case
mysql-test/t/innodb_ignore_builtin-master.opt:
  test case
mysql-test/t/innodb_ignore_builtin.test:
  test case
sql/mysql_priv.h:
  added ignore-builtin-innodb option which disabled
  initialization of builtin InnoDB plugin
sql/mysqld.cc:
  added ignore-builtin-innodb option which disabled
  initialization of builtin InnoDB plugin
sql/set_var.cc:
  added ignore-builtin-innodb option which disabled
  initialization of builtin InnoDB plugin
sql/sql_plugin.cc:
  added ignore-builtin-innodb option which disabled
  initialization of builtin InnoDB plugin
2009-02-09 19:03:52 +04:00
5fc4c37a80 Bug #42451 setup_fake_relay_log makes an incorrect path on windows
Path composition for the relay log file that is stored into the relay index
file was not correct for windows.
mysql-test language does not provide primitives for portable path composition.
      
Fixed with storing only the basename part of the external "fake" relay log into
the relay index file.
Safety of removal of the dirname part of the relaylog is provided by logics of
`setup_fake_relay_log' that places the fake file into @@datadir directory.


mysql-test/include/setup_fake_relay_log.inc:
  storing only the basename part of the external "fake" relay log into the relay
  log index.
mysql-test/suite/rpl/t/rpl_cross_version.test:
  restoring test for windows.
2009-02-09 15:17:04 +02:00
461cad77b4 Bug#42427 : MTR v2 fails with "can't write to /tmp/mysql-test-ports.sem" on Windows
- /tmp directory is not guaranteed to exist on Windows. 
Use the value of environment variable TEMP here
2009-02-09 13:10:34 +01:00
2e2620afd9 branches/zip:
Remove mysql-test/patches/bug35261.diff because that bug has been fixed
in the MySQL repository.
2009-02-09 11:47:16 +00:00
4c0dd2a7b3 Merge of ifx into GCA tree
no conflicts
2009-02-09 12:44:01 +01:00
284aeacd53 branches/5.1:
Merge a change from MySQL:

[looks like the changes to innodb-autoinc.test were made as part of
the following huge merge, but we are merging only changes to that file]

  ------------------------------------------------------------
  revno: 2546.47.1
  committer: Luis Soares <luis.soares@sun.com>
  branch nick: 5.1-rpl
  timestamp: Fri 2009-01-23 13:22:05 +0100
  message:
    merge: 5.1 -> 5.1-rpl
    conflicts:
      Text conflict in client/mysqltest.cc
      Text conflict in mysql-test/include/wait_until_connected_again.inc
      Text conflict in mysql-test/lib/mtr_report.pm
      Text conflict in mysql-test/mysql-test-run.pl
      Text conflict in mysql-test/r/events_bugs.result
      Text conflict in mysql-test/r/log_state.result
      Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
      Text conflict in mysql-test/r/mysqlcheck.result
      Text conflict in mysql-test/r/query_cache.result
      Text conflict in mysql-test/r/status.result
      Text conflict in mysql-test/suite/binlog/r/binlog_index.result
      Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
      Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
      Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
      Text conflict in mysql-test/t/disabled.def
      Text conflict in mysql-test/t/events_bugs.test
      Text conflict in mysql-test/t/log_state.test
      Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
      Text conflict in mysql-test/t/mysqlcheck.test
      Text conflict in mysql-test/t/query_cache.test
      Text conflict in mysql-test/t/rpl_init_slave_func.test
      Text conflict in mysql-test/t/status.test
  removed:
    mysql-test/suite/parts/r/partition_bit_ndb.result
    mysql-test/suite/parts/t/partition_bit_ndb.test
    mysql-test/suite/parts/t/partition_sessions.test
    mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc
    mysql-test/suite/sys_vars/r/tmp_table_size_basic_32.result
    mysql-test/suite/sys_vars/r/tmp_table_size_basic_64.result
    mysql-test/suite/sys_vars/t/tmp_table_size_basic_32.test
    mysql-test/suite/sys_vars/t/tmp_table_size_basic_64.test
    mysql-test/t/log_bin_trust_function_creators_func-master.opt
    mysql-test/t/rpl_init_slave_func-slave.opt
  added:
    mysql-test/include/check_events_off.inc
    mysql-test/include/cleanup_fake_relay_log.inc
    mysql-test/include/have_simple_parser.inc
    mysql-test/include/no_running_event_scheduler.inc
    mysql-test/include/no_running_events.inc
    mysql-test/include/running_event_scheduler.inc
    mysql-test/include/setup_fake_relay_log.inc
    mysql-test/include/wait_condition_sp.inc
    mysql-test/r/fulltext_plugin.result
    mysql-test/r/have_simple_parser.require
    mysql-test/r/innodb_bug38231.result
    mysql-test/r/innodb_bug39438.result
    mysql-test/r/innodb_mysql_rbk.result
    mysql-test/r/partition_innodb_semi_consistent.result
    mysql-test/r/query_cache_28249.result
    mysql-test/r/status2.result
    mysql-test/std_data/bug40482-bin.000001
    mysql-test/suite/binlog/r/binlog_innodb_row.result
    mysql-test/suite/binlog/t/binlog_innodb_row.test
    mysql-test/suite/rpl/r/rpl_binlog_corruption.result
    mysql-test/suite/rpl/t/rpl_binlog_corruption-master.opt
    mysql-test/suite/rpl/t/rpl_binlog_corruption.test
    mysql-test/suite/sys_vars/r/tmp_table_size_basic.result
    mysql-test/suite/sys_vars/t/tmp_table_size_basic.test
    mysql-test/t/fulltext_plugin-master.opt
    mysql-test/t/fulltext_plugin.test
    mysql-test/t/innodb_bug38231.test
    mysql-test/t/innodb_bug39438-master.opt
    mysql-test/t/innodb_bug39438.test
    mysql-test/t/innodb_mysql_rbk-master.opt
    mysql-test/t/innodb_mysql_rbk.test
    mysql-test/t/partition_innodb_semi_consistent-master.opt
    mysql-test/t/partition_innodb_semi_consistent.test
    mysql-test/t/query_cache_28249.test
    mysql-test/t/status2.test
  renamed:
    mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result => mysql-test/suite/funcs_1/r/is_coll_char_set_appl.result
    mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test => mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
  modified:
    .bzr-mysql/default.conf
    CMakeLists.txt
    client/mysql.cc
    client/mysql_upgrade.c
    client/mysqlcheck.c
    client/mysqltest.cc
    configure.in
    extra/resolve_stack_dump.c
    extra/yassl/include/openssl/ssl.h
    include/config-win.h
    include/m_ctype.h
    include/my_global.h
    mysql-test/extra/binlog_tests/database.test
    mysql-test/extra/rpl_tests/rpl_auto_increment.test
    mysql-test/include/commit.inc
    mysql-test/include/have_32bit.inc
    mysql-test/include/have_64bit.inc
    mysql-test/include/index_merge1.inc
    mysql-test/include/linux_sys_vars.inc
    mysql-test/include/windows_sys_vars.inc
    mysql-test/lib/mtr_report.pm
    mysql-test/mysql-test-run.pl
    mysql-test/r/alter_table.result
    mysql-test/r/commit_1innodb.result
    mysql-test/r/create.result
    mysql-test/r/csv.result
    mysql-test/r/ctype_ucs.result
    mysql-test/r/date_formats.result
    mysql-test/r/events_bugs.result
    mysql-test/r/events_scheduling.result
    mysql-test/r/fulltext.result
    mysql-test/r/func_if.result
    mysql-test/r/func_in.result
    mysql-test/r/func_str.result
    mysql-test/r/func_time.result
    mysql-test/r/grant.result
    mysql-test/r/index_merge_myisam.result
    mysql-test/r/information_schema.result
    mysql-test/r/innodb-autoinc.result
    mysql-test/r/innodb.result
    mysql-test/r/innodb_mysql.result
    mysql-test/r/log_bin_trust_function_creators_func.result
    mysql-test/r/log_state.result
    mysql-test/r/myisampack.result
    mysql-test/r/mysql.result
    mysql-test/r/mysqlcheck.result
    mysql-test/r/partition_datatype.result
    mysql-test/r/partition_mgm.result
    mysql-test/r/partition_pruning.result
    mysql-test/r/query_cache.result
    mysql-test/r/read_buffer_size_basic.result
    mysql-test/r/read_rnd_buffer_size_basic.result
    mysql-test/r/rpl_init_slave_func.result
    mysql-test/r/select.result
    mysql-test/r/status.result
    mysql-test/r/strict.result
    mysql-test/r/temp_table.result
    mysql-test/r/type_bit.result
    mysql-test/r/type_date.result
    mysql-test/r/type_float.result
    mysql-test/r/warnings_engine_disabled.result
    mysql-test/r/xml.result
    mysql-test/suite/binlog/r/binlog_database.result
    mysql-test/suite/binlog/r/binlog_index.result
    mysql-test/suite/binlog/r/binlog_innodb.result
    mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
    mysql-test/suite/binlog/t/binlog_innodb.test
    mysql-test/suite/funcs_1/r/is_columns_is.result
    mysql-test/suite/funcs_1/r/is_engines.result
    mysql-test/suite/funcs_1/r/storedproc.result
    mysql-test/suite/funcs_1/storedproc/param_check.inc
    mysql-test/suite/funcs_2/t/disabled.def
    mysql-test/suite/ndb/t/disabled.def
    mysql-test/suite/parts/r/partition_bit_innodb.result
    mysql-test/suite/parts/r/partition_bit_myisam.result
    mysql-test/suite/parts/r/partition_special_innodb.result
    mysql-test/suite/parts/t/disabled.def
    mysql-test/suite/parts/t/partition_special_innodb.test
    mysql-test/suite/parts/t/partition_value_innodb.test
    mysql-test/suite/parts/t/partition_value_myisam.test
    mysql-test/suite/parts/t/partition_value_ndb.test
    mysql-test/suite/rpl/r/rpl_auto_increment.result
    mysql-test/suite/rpl/r/rpl_packet.result
    mysql-test/suite/rpl/r/rpl_row_create_table.result
    mysql-test/suite/rpl/r/rpl_slave_skip.result
    mysql-test/suite/rpl/r/rpl_trigger.result
    mysql-test/suite/rpl/t/disabled.def
    mysql-test/suite/rpl/t/rpl_packet.test
    mysql-test/suite/rpl/t/rpl_row_create_table.test
    mysql-test/suite/rpl/t/rpl_slave_skip.test
    mysql-test/suite/rpl/t/rpl_trigger.test
    mysql-test/suite/rpl_ndb/t/disabled.def
    mysql-test/suite/sys_vars/inc/key_buffer_size_basic.inc
    mysql-test/suite/sys_vars/inc/sort_buffer_size_basic.inc
    mysql-test/suite/sys_vars/r/key_buffer_size_basic_32.result
    mysql-test/suite/sys_vars/r/key_buffer_size_basic_64.result
    mysql-test/suite/sys_vars/r/sort_buffer_size_basic_32.result
    mysql-test/suite/sys_vars/r/sort_buffer_size_basic_64.result
    mysql-test/t/alter_table.test
    mysql-test/t/create.test
    mysql-test/t/csv.test
    mysql-test/t/ctype_ucs.test
    mysql-test/t/date_formats.test
    mysql-test/t/disabled.def
    mysql-test/t/events_bugs.test
    mysql-test/t/events_scheduling.test
    mysql-test/t/fulltext.test
    mysql-test/t/func_if.test
    mysql-test/t/func_in.test
    mysql-test/t/func_str.test
    mysql-test/t/func_time.test
    mysql-test/t/grant.test
    mysql-test/t/information_schema.test
    mysql-test/t/innodb-autoinc.test
    mysql-test/t/innodb.test
    mysql-test/t/innodb_mysql.test
    mysql-test/t/log_bin_trust_function_creators_func.test
    mysql-test/t/log_state.test
    mysql-test/t/myisam_data_pointer_size_func.test
    mysql-test/t/myisampack.test
    mysql-test/t/mysql.test
    mysql-test/t/mysqlcheck.test
    mysql-test/t/partition_innodb_stmt.test
    mysql-test/t/partition_mgm.test
    mysql-test/t/partition_pruning.test
    mysql-test/t/query_cache.test
    mysql-test/t/rpl_init_slave_func.test
    mysql-test/t/select.test
    mysql-test/t/status.test
    mysql-test/t/strict.test
    mysql-test/t/temp_table.test
    mysql-test/t/type_bit.test
    mysql-test/t/type_date.test
    mysql-test/t/type_float.test
    mysql-test/t/warnings_engine_disabled.test
    mysql-test/t/xml.test
    mysys/my_getopt.c
    mysys/my_init.c
    scripts/mysql_install_db.sh
    sql-common/my_time.c
    sql/field.cc
    sql/field.h
    sql/filesort.cc
    sql/ha_partition.cc
    sql/ha_partition.h
    sql/item.cc
    sql/item_cmpfunc.cc
    sql/item_func.h
    sql/item_strfunc.cc
    sql/item_sum.cc
    sql/item_timefunc.cc
    sql/item_timefunc.h
    sql/log.cc
    sql/log.h
    sql/log_event.cc
    sql/log_event.h
    sql/mysql_priv.h
    sql/mysqld.cc
    sql/opt_range.cc
    sql/partition_info.cc
    sql/repl_failsafe.cc
    sql/rpl_constants.h
    sql/set_var.cc
    sql/slave.cc
    sql/spatial.h
    sql/sql_acl.cc
    sql/sql_base.cc
    sql/sql_binlog.cc
    sql/sql_class.h
    sql/sql_cursor.cc
    sql/sql_delete.cc
    sql/sql_lex.cc
    sql/sql_lex.h
    sql/sql_locale.cc
    sql/sql_parse.cc
    sql/sql_partition.cc
    sql/sql_plugin.cc
    sql/sql_plugin.h
    sql/sql_profile.cc
    sql/sql_repl.cc
    sql/sql_select.cc
    sql/sql_select.h
    sql/sql_show.cc
    sql/sql_table.cc
    sql/sql_trigger.cc
    sql/sql_trigger.h
    sql/table.cc
    sql/table.h
    sql/unireg.cc
    storage/csv/ha_tina.cc
    storage/federated/ha_federated.cc
    storage/heap/ha_heap.cc
    storage/innobase/Makefile.am
    storage/innobase/btr/btr0sea.c
    storage/innobase/buf/buf0lru.c
    storage/innobase/dict/dict0dict.c
    storage/innobase/dict/dict0mem.c
    storage/innobase/handler/ha_innodb.cc
    storage/innobase/handler/ha_innodb.h
    storage/innobase/include/btr0sea.h
    storage/innobase/include/dict0dict.h
    storage/innobase/include/dict0mem.h
    storage/innobase/include/ha_prototypes.h
    storage/innobase/include/lock0lock.h
    storage/innobase/include/row0mysql.h
    storage/innobase/include/sync0sync.ic
    storage/innobase/include/ut0ut.h
    storage/innobase/lock/lock0lock.c
    storage/innobase/os/os0file.c
    storage/innobase/plug.in
    storage/innobase/row/row0mysql.c
    storage/innobase/row/row0sel.c
    storage/innobase/srv/srv0srv.c
    storage/innobase/srv/srv0start.c
    storage/innobase/ut/ut0ut.c
    storage/myisam/ft_boolean_search.c
    strings/ctype.c
    strings/xml.c
    tests/mysql_client_test.c
    win/configure.js
    mysql-test/suite/funcs_1/t/is_coll_char_set_appl.test
2009-02-08 19:54:25 +00:00
a95d6ed7a8 branches/5.1:
Merge a change from MySQL:

  ------------------------------------------------------------
  revno: 2709.20.31
  committer: Timothy Smith <timothy.smith@sun.com>
  branch nick: 51
  timestamp: Fri 2008-12-19 01:28:51 +0100
  message:
    Disable part of innodb-autoinc.test, because the MySQL server asserts when
    compiled --with-debug, due to bug 39828, "autoinc wraps around when offset and
    increment > 1".  This change should be reverted when that bug is fixed (and a
    a few other minor changes to the test as described in comments).
  modified:
    mysql-test/r/innodb-autoinc.result
    mysql-test/t/innodb-autoinc.test
2009-02-08 19:36:45 +00:00
3ba87c3700 Auto-merge up from 5.0 2009-02-07 16:50:31 +01:00
0eca4824c3 auto-merge 2009-02-06 18:47:54 +01:00
d66dc23065 Bug#42525: TIMEDIFF function
In 37553 we declared longlong results for
class Item_str_timefunc as per comments/docs,
but didn't add a method for that. And the
default just wasn't good enough for some
cases.

Changeset adds dedicated val_int() to class.

mysql-test/r/func_sapdb.result:
  More tests for casts of TIME() / TIMEDIFF() with negative results.
mysql-test/t/func_sapdb.test:
  More tests for casts of TIME() / TIMEDIFF() with negative results.
sql/item_timefunc.h:
  Since we claim to provide longlong results, we should have
  a suitable function to provide them (the default won't do).
  This one matches the val_real() variant.
2009-02-06 18:25:08 +01:00
bd53d21417 Bug #36763
TRUNCATE TABLE fails to replicate when stmt-based binlogging is not supported.

There were two separate problems with the code, both of which are fixed with
this patch:

1. An error was printed by InnoDB for TRUNCATE TABLE in statement mode when
   the in isolation levels READ COMMITTED and READ UNCOMMITTED since InnoDB
   does permit statement-based replication for DML statements. However,
   the TRUNCATE TABLE is not transactional, but is a DDL, and should therefore
   be allowed to be replicated as a statement.

2. The statement was not logged in mixed mode because of the error above, but
   the error was not reported to the client.

This patch fixes the problem by treating TRUNCATE TABLE a DDL, that is, it is
always logged as a statement and not reporting an error from InnoDB for TRUNCATE
TABLE.


mysql-test/extra/binlog_tests/binlog_truncate.test:
  Adding new test to check that TRUNCATE TABLE is written correctly
  to the binary log.
mysql-test/extra/rpl_tests/rpl_truncate.test:
  Removing redundant testing by eliminating settings of BINLOG_FORMAT.
mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
  Replacing slave and master reset code with include file.
  Removing settings of BINLOG_FORMAT.
  Replacing printing of table contents to compare master and slave
  with diff_tables.inc.
mysql-test/suite/binlog/t/binlog_truncate_innodb.test:
  Adding test for testing that TRUNCATE TABLE is logged correctly for InnoDB
  in all isolation levels.
mysql-test/suite/binlog/t/binlog_truncate_myisam.test:
  Adding test for testing that TRUNCATE TABLE is logged correctly for MyISAM.
mysql-test/suite/binlog/t/disabled.def:
  Disabling binlog_truncate_innodb since it does not work (yet).
sql/sql_base.cc:
  Correcting setting of capabilities flags to make the comparison with 0
  later in the code work correctly.
sql/sql_delete.cc:
  Re-organizing code to ensure that TRUNCATE TABLE is logged in statement
  format and that row format is not used unless there are rows to log (which
  there are not when delete_all_rows() is called, so this has to be logged
  as a statement).
2009-02-06 17:06:41 +01:00
0ea110d858 Bug#42366 server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT
- remove the disbling of all ssl_* tests now when certs are fixed.
2009-02-06 15:09:15 +01:00
0b439b3070 Merge 2009-02-06 12:31:32 +01:00
e27f65369f Merge from team tree. 2009-02-06 13:09:01 +03:00
a8c98eb953 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-06 12:53:20 +03:00
b30239bc1a Temporarily reverted patch for bug #41868 as it was causing problems in PB. 2009-02-06 12:51:11 +03:00
aca7ca6bba Bug#42641 mtr.pl fails to run within JobObject
- Allow the new process to break away from any job that this
   process is part of so that it can be assigned to the new JobObject
   we just created. This is safe since the new JobObject is created with
   the JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag, making sure it will be
   terminated when the last handle to it is closed(which is owned by
   this process).
2009-02-06 08:38:24 +01:00
41e6a1f89c 2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Fixed tests:
  backup
  check
  compress
  grant
  information_schema
  multi_update
  overflow
  packet
  query_cache_not_embedded
  sp-threads
  subselect
  synchronization
  timezone_grant
2009-02-05 21:47:23 +01:00
798f19e463 after-after-push testcase update (bug #39265) 2009-02-05 21:47:24 +04:00
09387431c1 Fix for Bug#42602 main.status: random failures
+ minor improvements
2009-02-05 17:48:47 +01:00
a7435ddf49 after-push test update (bug #39265) 2009-02-05 17:51:00 +04:00
071cfc03b7 BUG#39185 - Cardinality for merge tables calculated incorrectly.
Every subsequent query to a merge table with indexes was lowering
down cardinality.

The problem was that key statistics was not cleared when merge
children were detached. Causing next attach children perform
incremental key statistics calculation.

Fixed by clearing key statistics when attaching first child.

mysql-test/r/merge.result:
  A test case for BUG#39185.
mysql-test/t/merge.test:
  A test case for BUG#39185.
storage/myisammrg/myrg_open.c:
  Clear key statistics when we're attaching first child, even
  if it's buffer was allocated before. This is needed because
  detach_children() doesn't clear statistics, causing incremental
  statistics calculation.
2009-02-05 17:03:47 +04:00
4cd0e2fac4 Merge mysql-5.0-bugteam -> mysql-5.1-bugteam. 2009-02-05 15:49:59 +03:00
759b626d11 Merge to team tree. 2009-02-05 15:48:30 +03:00
b9d02d4669 Bug #39265: fix for the bug 33699 should be reverted
Documented behaviour was broken by the patch for bug 33699
that actually is not a bug.

This fix reverts patch for bug 33699 and reverts the
UPDATE of NOT NULL field with NULL query to old
behavior.


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/include/ps_modify.inc:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/auto_increment.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/csv_not_null.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/null.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_2myisam.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_3innodb.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_4heap.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_5merge.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/warnings.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/ndb/r/ps_7ndb.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/auto_increment.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/csv_not_null.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/null.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/warnings.test:
  Bug #39265: fix for the bug 33699 should be reverted
sql/sql_update.cc:
  Bug #39265: fix for the bug 33699 should be reverted
2009-02-05 13:49:32 +04:00
31d908d70b Fix for bug#42014: Crash, name_const with collate
Problem: some queries using NAME_CONST(.. COLLATE ...)
lead to server crash due to failed type cast.

Fix: return the underlying item's type in case of
NAME_CONST(.. COLLATE ...) to avoid wrong casting.


mysql-test/r/func_misc.result:
  Fix for bug#42014: Crash, name_const with coll
    - test result.
mysql-test/t/func_misc.test:
  Fix for bug#42014: Crash, name_const with coll
    - test case.
sql/item.cc:
  Fix for bug#42014: Crash, name_const with coll
    - in case of NAME_CONST('name', 'value' COLLATE collation)
  Item_name_const::type() returns type of 'value' argument 
  to awoid wrong type casting of the Item_name_const items.
2009-02-05 11:43:39 +04:00
9ee53cbcc0 Auto-merge 2009-02-05 11:45:30 +04:00
6f19c0fc46 Merge last changesets into tree, no conflicts 2009-02-04 16:34:28 +01:00
aa13a4b95e Merge 5.0-bugteam -> 5.1-bugteam. 2009-02-04 17:00:40 +04:00
7957622bfd Automatic merge, no conflicts 2009-02-04 14:20:05 +01:00
1177405381 Merge 2009-02-04 13:29:46 +01:00
2df0beee02 Merge last changesets, no conflicts 2009-02-04 13:10:33 +01:00
97bd763544 BUG#32047 - 'Spurious' errors while opening MERGE tables
Accessing well defined MERGE table may return an error
stating that the merge table is incorrectly defined. This
happens if MERGE child tables were accessed before and we
failed to open another incorrectly defined MERGE table in
this connection.

myrg_open() internally used my_errno as a variable for determining
failure, and thus could be tricked into a wrong decision by other
uses of my_errno.

With this fix we use function local boolean flag instead of my_errno
to determine failure.

myisammrg/myrg_open.c:
  There are two requirement for accessing/setting my_errno variable,
  which were not followed by myrg_open():
  - it must be checked immediately after a function returned an error. There
    must be no calls to other functions that may change it's value between.
  - my_errno value must be set right before a function is going to return an
    error. There must be no calls to other functions that may change it's
    value between (that's why we have these tricks with save_errno at the
    bottom of myrg_open()).
  
  myrg_open() internally used my_errno as a variable for determining
  failure, and thus could be tricked into a wrong decision by other
  uses of my_errno.
mysql-test/r/merge.result:
  A test case for BUG#32047.
mysql-test/t/merge.test:
  A test case for BUG#32047.
2009-02-04 15:46:23 +04:00
1d09ec6208 Bug#42495 updatexml: Assertion failed: xpath->context, file .\item_xmlfunc.cc, line 2507
Problem:
   RelativeLocationPath can appear only after a node-set expression
   in the third and the fourth branches of this rule:
     PathExpr :: =  LocationPath
                    | FilterExpr
                    | FilterExpr '/' RelativeLocationPath
                    | FilterExpr '//' RelativeLocationPath
   XPatch code didn't check the type of FilterExpr and crashed.
Fix:
   If FilterExpr is a scalar expression
   (variable reference, literal, number, scalar function call)
   return error.


mysql-test/r/xml.result:
  test result
mysql-test/t/xml.test:
  test case
sql/item_xmlfunc.cc:
  Problem:
     RelativeLocationPath can appear only after a node-set expression
     in the third and the fourth branches of this rule:
       PathExpr :: =  LocationPath
                      | FilterExpr
                      | FilterExpr '/' RelativeLocationPath
                      | FilterExpr '//' RelativeLocationPath
     XPatch code didn't check the type of FilterExpr and crashed.
  Fix:
     If FilterExpr is a scalar expression
     (variable reference, literal, number, scalar function call)
     return error.
2009-02-04 15:40:12 +04:00
ffdb6ac4bd Merge from upstream 5.1-bugteam 2009-02-04 09:16:43 -02:00
da304a175e Merge of latest changesets into GCA tree 2009-02-04 12:07:52 +01:00
9b11bc02ae Bug #41183 rpl_ndb_circular, rpl_ndb_circular_simplex need maintenance, crash
The bug happened because filtering-out a STMT_END_F-flagged event so that
the transaction COMMIT finds traces of incomplete statement commit.
Such situation is only possible with ndb circular replication. The filtered-out
rows event is one that immediately preceeds the COMMIT query event.
      
Fixed with deploying an the rows-log-event statement commit at executing
of the transaction COMMIT event. 
Resources that were allocated by other than STMT_END_F-flagged event of
the last statement are clean up prior execution of the commit logics.


mysql-test/suite/rpl_ndb/t/disabled.def:
  re-enabling two tests.
sql/log_event.cc:
  Adding the statement cleanup to execute at the transaction commit time.
  The statement might not be ended with execution of STMT_END_F-flagged event because of
  the event was filtered out by SERVER_ID rules.
  Small refactoring for Rows_log_event::do_update_pos() to be split on two parts:
  the statement commit that releases its execution time allocated resources, and
  the relay log update.
2009-02-04 12:13:54 +02:00
4561831bf7 Bug#42588 system_mysql_db_fix30020 fails when run from bin dist with mtr2
- Properly set --bindir=$path_client_bindir and --basedir=$basedir by adding %s format specifier
2009-02-04 10:49:52 +01:00
dfbba6e7fd Fix for bug #41868: crash or memory overrun with concat + upper, date_format
functions
      
String::realloc() did not check whether the existing string data fits in the newly
allocated buffer for cases when reallocating a String object with external buffer
(i.e.alloced == FALSE).  This could lead to memory overruns in some cases.


mysql-test/r/func_str.result:
  Added a test case for bug #41868.
mysql-test/t/func_str.test:
  Added a test case for bug #41868.
sql/sql_class.cc:
  After each call to Item::send() in select_send::send_data() reset buffer to its
  original state to reduce unnecessary malloc() calls. See comments for bug #41868
  for detailed analysis.
sql/sql_string.cc:
  Fixed String::realloc() to check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer.
2009-02-03 20:19:01 +03:00
c9dc936a2b Bug#40536: SELECT is blocked by INSERT DELAYED waiting on
upgrading lock, even with low_priority_updates

The problem is that there is no mechanism to control whether a
delayed insert takes a high or low priority lock on a table.

The solution is to modify the delayed insert thread ("handler")
to take into account the global value of low_priority_updates
when taking table locks. The value of low_priority_updates is
retrieved when the insert delayed thread is created and will
remain the same for the duration of the thread.


include/thr_lock.h:
  Update prototype.
mysql-test/r/delayed.result:
  Add test case result for Bug#40536
mysql-test/t/delayed.test:
  Add test case for Bug#40536
mysys/thr_lock.c:
  Add function parameter which specifies the write lock type.
sql/sql_insert.cc:
  Take a low priority write lock if global value of low_priority_updates
  was ON when the thread was created.
2009-02-03 15:16:24 -02:00
99685a0b79 Merge 5.0 -> 5.1
+ fix wrong resultfile have_outfile.require
2009-02-03 14:45:17 +01:00