Commit graph

60366 commits

Author SHA1 Message Date
Alexander Nozdrin
6f95733406 Manual merge of patch for Bug#46364 from mysql-next-mr-bugfixing.
Conflicts:
  - mysql-test/r/mysqld--help-win.result
  - sql/sys_vars.cc

Original revsion (in next-mr-bugfixing):
------------------------------------------------------------
revno: 2971 [merge]
revision-id: alfranio.correia@sun.com-20100121210527-rbuheu5rnsmcakh1
committer: Alfranio Correia <alfranio.correia@sun.com>
branch nick: mysql-next-mr-bugfixing
timestamp: Thu 2010-01-21 21:05:27 +0000
message:
  BUG#46364 MyISAM transbuffer problems (NTM problem)
        
  It is well-known that due to concurrency issues, a slave can become
  inconsistent when a transaction contains updates to both transaction and
  non-transactional tables.
                      
  In a nutshell, the current code-base tries to preserve causality among the
  statements by writing non-transactional statements to the txn-cache which
  is flushed upon commit. However, modifications done to non-transactional
  tables on behalf of a transaction become immediately visible to other
  connections but may not immediately get into the binary log and therefore
  consistency may be broken.
              
  In general, it is impossible to automatically detect causality/dependency
  among statements by just analyzing the statements sent to the server. This
  happen because dependency may be hidden in the application code and it is
  necessary to know a priori all the statements processed in the context of
  a transaction such as in a procedure. Moreover, even for the few cases that
  we could automatically address in the server, the computation effort
  required could make the approach infeasible.
              
  So, in this patch we introduce the option
        - "--binlog-direct-non-transactional-updates" that can be used to bypass
        the current behavior in order to write directly to binary log statements
        that change non-transactional tables.
  
  Besides, it is used to enable the WL#2687 which is disabled by default.
    ------------------------------------------------------------
    revno: 2970.1.1
    revision-id: alfranio.correia@sun.com-20100121131034-183r4qdyld7an5a0
    parent: alik@sun.com-20100121083914-r9rz2myto3tkdya0
    committer: Alfranio Correia <alfranio.correia@sun.com>
    branch nick: mysql-next-mr-bugfixing
    timestamp: Thu 2010-01-21 13:10:34 +0000
    message:
      BUG#46364 MyISAM transbuffer problems (NTM problem)
            
      It is well-known that due to concurrency issues, a slave can become
      inconsistent when a transaction contains updates to both transaction and
      non-transactional tables.
                          
      In a nutshell, the current code-base tries to preserve causality among the
      statements by writing non-transactional statements to the txn-cache which
      is flushed upon commit. However, modifications done to non-transactional
      tables on behalf of a transaction become immediately visible to other
      connections but may not immediately get into the binary log and therefore
      consistency may be broken.
                  
      In general, it is impossible to automatically detect causality/dependency
      among statements by just analyzing the statements sent to the server. This
      happen because dependency may be hidden in the application code and it is
      necessary to know a priori all the statements processed in the context of
      a transaction such as in a procedure. Moreover, even for the few cases that
      we could automatically address in the server, the computation effort
      required could make the approach infeasible.
                  
      So, in this patch we introduce the option
            - "--binlog-direct-non-transactional-updates" that can be used to bypass
            the current behavior in order to write directly to binary log statements
            that change non-transactional tables.
      
      Besides, it is used to enable the WL#2687 which is disabled by default.
2010-02-02 10:56:42 +03:00
Alexander Nozdrin
5d35477388 Remove binlog_direct_non_transactional_updates_basic.test and
binlog_direct_non_transactional_updates_basic.result. They will
be added by a cherry-picking merge from mysql-next-mr-bugfixing
(Bug#50766).
2010-02-02 10:41:31 +03:00
Alexander Nozdrin
c7ee11b0ea Patch for Bug#50766. 2010-02-01 23:27:03 +03:00
Alexander Nozdrin
4789e4abb2 Add empty test cases to make sys_vars.all_vars.test pass. 2010-02-01 15:00:13 +03:00
Alexander Nozdrin
31ca1544a3 Update test result file. 2010-01-31 14:43:32 +03:00
Alexander Nozdrin
ebd853c8ae Null-merge from mysql-trunk-merge. 2010-01-31 14:41:14 +03:00
Alexander Nozdrin
daec25c11d Mark some tests experimental. 2010-01-31 14:38:55 +03:00
Alexander Nozdrin
f3d341fc3a Auto-merge from mysql-next-mr. 2010-01-31 01:20:01 +03:00
Alexander Nozdrin
d11db72503 Add libmysqld/sql_audit.cc to .bzrignore. 2010-01-31 01:11:28 +03:00
Alexander Nozdrin
3aa0ead9ea Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
2010-01-31 01:10:29 +03:00
Alexander Nozdrin
2b0f6b5ace Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/suite/rpl/r/rpl_binlog_grant.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - mysql-test/suite/rpl/t/rpl_binlog_grant.test
  - sql/sql_parse.cc
  - sql/sql_table.cc
  - sql/sql_test.cc
2010-01-31 01:06:50 +03:00
Alexander Nozdrin
22e0e72370 Temporarily null-merging yet another WL#5182/WL#5154 patch.
The patches should be ported to next-mr separately.
2010-01-31 00:29:13 +03:00
Alexander Nozdrin
077e7c9a87 Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
  - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
2010-01-31 00:26:38 +03:00
Alexander Nozdrin
2cdad6c3eb Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/suite/binlog/t/binlog_write_error.test
  - sql/log.cc
  - sql/log_event.cc
  - sql/log_event_old.cc
  - sql/mysql_priv.h
  - sql/sp.cc
  - sql/sql_acl.cc
  - sql/sql_base.cc
  - sql/sql_delete.cc
  - sql/sql_insert.cc
  - sql/sql_load.cc
  - sql/sql_table.cc
  - sql/sql_udf.cc
  - sql/sql_update.cc
  - sql/sql_view.cc
2010-01-31 00:12:29 +03:00
Alexander Nozdrin
5a57e6bb45 Fix Windows build failure (after manual merge from 5.1-bugteam). 2010-01-31 00:08:20 +03:00
Alexander Nozdrin
7e4234b4f5 Auto-merge (empty) from mysql-trunk-merge. 2010-01-30 23:10:57 +03:00
Alexander Nozdrin
2b90de942c Manual merge from mysql-trunk-merge.
Conflicts:
  - sql/event_db_repository.cc
  - sql/events.cc
  - sql/sp.cc
  - sql/sql_acl.cc
  - sql/sql_udf.cc
2010-01-30 23:09:31 +03:00
Alexander Nozdrin
2b8f00a9c0 Manual merge from mysql-trunk-merge. 2010-01-30 22:41:52 +03:00
Alexander Nozdrin
d47d32bdb5 Manual merge from mysql-trunk-merge.
Conflicts:
  - sql/mysqld.cc
  - sql/sql_view.cc
  - sql/sql_yacc.yy
2010-01-30 22:37:52 +03:00
Alexander Nozdrin
d03ebe4b79 Manual merge from mysql-trunk-merge.
Conflicts:
  - sql/events.cc
  - sql/mysql_priv.h
  - sql/repl_failsafe.cc
  - sql/sql_db.cc
  - sql/sql_parse.cc
  - sql/sql_show.cc
2010-01-30 22:24:33 +03:00
Alexander Nozdrin
0da16c7c2a Manual merge from mysql-5.1-bugteam.
Conflicts:
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/r/rpl_binlog_grant.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - mysql-test/suite/rpl/t/rpl_binlog_grant.test
  - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
2010-01-30 22:13:36 +03:00
Alexander Nozdrin
4c5b904118 Temporarily NULL-merge two patches for WL#5154 from mysql-trunk-merge.
WL#5154 needs to be ported to next-mr and 6.0 separately.
That can not be done in scope of this merge due to numerous test failures.
2010-01-30 21:58:23 +03:00
Alexander Nozdrin
5aa4c33e32 Manual merge from mysql-5.1-bugteam.
Conflicts:
  - sql/mysql_priv.h
2010-01-30 21:47:11 +03:00
Alexander Nozdrin
b436e0ae20 Null-merge from mysql-5.1-bugteam. 2010-01-30 21:29:21 +03:00
Alexander Nozdrin
6ee51dc7ef Auto-merge from mysql-5.1-bugteam. 2010-01-30 21:27:06 +03:00
unknown
d9e9a73e8f Bug #48321 CURRENT_USER() incorrectly replicated for DROP/RENAME USER;
REVOKE/GRANT; ALTER EVENT.

The following statements support the CURRENT_USER() where a user is needed.
  DROP USER 
  RENAME USER CURRENT_USER() ...
  GRANT ... TO CURRENT_USER()
  REVOKE ... FROM CURRENT_USER()
  ALTER DEFINER = CURRENT_USER() EVENT
but, When these statements are binlogged, CURRENT_USER() just is binlogged
as 'CURRENT_USER()', it is not expanded to the real user name. When slave 
executes the log event, 'CURRENT_USER()' is expand to the user of slave 
SQL thread, but SQL thread's user name always NULL. This breaks the replication.

After this patch, All above statements are rewritten when they are binlogged.
The CURRENT_USER() is expanded to the real user's name and host.
2010-01-30 20:49:25 +08:00
Georgi Kodinov
f51a45cdbb merge 2010-01-29 16:54:27 +02:00
Georgi Kodinov
d468e242b3 Bug #50642 : ssl certs in test suite are expiring soon.
Updated the certs to expire on 2015. 
Made sure they work with both yassl and openssl.
2010-01-29 15:55:46 +02:00
Ramil Kalimullin
172af3722e Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL
column is used for ORDER BY

Problem: filesort isn't meant for null length sort data
(e.g. char(0)), that leads to a server crash.

Fix: disregard sort order if sort data record length is 0 (nothing
to sort).


mysql-test/r/select.result:
  Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL 
  column is used for ORDER BY
    - test result.
mysql-test/t/select.test:
  Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL 
  column is used for ORDER BY
    - test case.
sql/filesort.cc:
  Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL 
  column is used for ORDER BY
    - assert added as filesort cannot handle null length sort data.
sql/sql_select.cc:
  Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL 
  column is used for ORDER BY
    - don't sort null length data e.g. in case of ORDER BY CHAR(0).
2010-01-29 13:17:57 +04:00
Alexander Nozdrin
2423a7b68f Make the following tests experimental:
- main.outfile_loaddata @solaris due to Bug#46895
  - main.signal_demo3 @solaris due to Bug#47791
  - main.sp @solaris due to Bug#47791
  - rpl.rpl_slave_load_remove_tmpfile @windows due to Bug#50474
2010-01-28 21:49:00 +03:00
Tor Didriksen
181f753e8b Bug #50271: Debug output of JOIN structures is garbled
sql/sql_test.cc:
  Assemble results of all the calls to full_name() first,
  in order not to garble the tabular output.
2010-01-28 12:10:57 +01:00
Ramil Kalimullin
7805a2c7c0 Auto-merge. 2010-01-29 15:08:49 +04:00
Georgi Kodinov
443003a467 Bug #49552 : sql_buffer_result cause crash + not found records
in multitable delete/subquery

SQL_BUFFER_RESULT should not have an effect on non-SELECT 
statements according to our documentation.
Fixed by not passing it through to multi-table DELETE (similarly
to how it's done for multi-table UPDATE).
2010-01-29 11:36:28 +02:00
Davi Arnaut
c3a73a8f6d Fix for compiler warnings:
Rename method as to not hide a base.
Reorder attributes initialization.
Remove unused variable.
Rework code to silence a warning due to assignment used as truth value.


sql/item_strfunc.cc:
  Rename method as to not hide a base.
sql/item_strfunc.h:
  Rename method as to not hide a base.
sql/log_event.cc:
  Reorder attributes initialization.
sql/rpl_injector.cc:
  Rework code to silence a warning due to assignment used as truth value.
sql/rpl_record.cc:
  Remove unused variable.
sql/sql_db.cc:
  Rework code to silence a warning due to assignment used as truth value.
sql/sql_parse.cc:
  Rework code to silence a warning due to assignment used as truth value.
sql/sql_table.cc:
  Rework code to silence a warning due to assignment used as truth value.
2010-01-28 19:51:40 -02:00
Andrei Elkin
1750b79fd1 merging from 5.1-bt to a local bugfix branch 2010-01-28 12:22:19 +02:00
Andrei Elkin
0c0eb1d44a merging from 5.1-bt to a local bugfix branch 2010-01-28 11:51:57 +02:00
Alexander Nozdrin
d4e2209dac Manual merge from mysql-trunk-merge.
Conflicts:
  - storage/archive/ha_archive.cc
2010-01-28 01:13:10 +03:00
Alexander Nozdrin
2f3d117ae3 Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/extra/rpl_tests/rpl_mixing_engines.inc
  - sql/log.cc
  - sql/mysqld.cc
  - sql/set_var.cc
  - sql/sql_class.h
2010-01-28 01:07:44 +03:00
Alexander Nozdrin
8c94302504 Auto-merge from mysql-trunk-merge.
main.partition_innodb started to pass.
2010-01-28 00:42:22 +03:00
Alexander Nozdrin
f928e0b03d Auto-merge from mysql-trunk-merge. 2010-01-28 00:32:29 +03:00
Alexander Nozdrin
547269cf38 Auto-merge (empty) from mysql-trunk-merge. 2010-01-28 00:27:38 +03:00
Alexander Nozdrin
cf97ed0c1b Manual merge from mysql-trunk-merge.
Conflicts:
  - sql/ha_partition.cc
  - sql/sql_partition.cc

The following tests started to fail:
  - main.partition_innodb (a crash)
2010-01-28 00:24:35 +03:00
Alexander Nozdrin
ee7b8b7761 Manual merge from mysql-trunk-merge.
Conflicts:
  - sql/event_data_objects.cc
  - sql/events.cc
  - sql/mysql_priv.h
  - sql/repl_failsafe.cc
  - sql/sql_parse.cc
  - sql/sql_show.cc
  - sql/sql_view.cc
  - sql/table.cc
2010-01-28 00:10:37 +03:00
Alexander Nozdrin
34e9b3c7ca Null-merge the following changeset from mysql-trunk-merge:
=========================================================
revision-id: joro@sun.com-20100118155046-v6hvlyfmitcyep8p
committer: Georgi Kodinov <joro@sun.com>
branch nick: B45989-5.1-bugteam
timestamp: Mon 2010-01-18 17:50:46 +0200
message:
  Bug #45989 take 2 : memory leak after explain encounters an
  error in the query.
  
  Fixes a leak after materializing a GROUP BY subquery to a 
  temp table when the subquery has a blob column in the SELECT
  list.
  Fixed by correctly destructing temporary buffers after doing
  the conversion.
=========================================================
2010-01-27 23:45:42 +03:00
Alexander Nozdrin
be53d298e1 Manual merge from mysql-trunk-merge.
Conflicts:
  - sql/sql_partition.cc
2010-01-27 22:55:51 +03:00
Alexander Nozdrin
8d4a842729 Enable all active test suites for daily testing in next-mr and 6.0. 2010-01-27 22:53:45 +03:00
Alexander Nozdrin
992fc07377 Auto-merge from mysql-trunk-merge. 2010-01-27 22:35:04 +03:00
Alexander Nozdrin
1100afe3e0 Auto-merge from mysql-trunk-merge. 2010-01-27 22:15:32 +03:00
Alexander Nozdrin
7cd628cfab Auto-merge from mysql-trunk-merge. 2010-01-27 21:44:01 +03:00
Andrei Elkin
a589499986 bug#47142
merging patches prepared for 5.0 to 5.1-bt. That caused a few changes in the test file
2010-01-27 19:27:49 +02:00