Commit graph

54234 commits

Author SHA1 Message Date
Andrei Elkin
e66ba2a74b Bug#36443 Server crashes when executing insert when insert trigger on table
The crash appeared to be a result of allocating an instance of Discrete_interval 
      automatically that that was referred in out-of-declaration scope.
                        
      Fixed with correcting backing up and restoring scheme of
      auto_inc_intervals_forced, introduced by bug#33029, by means of shallow copying;
      added simulation code that forces executing those fixes of the former bug that
      targeted at master-and-slave having incompatible bug#33029-prone versions.

mysql-test/suite/bugs/r/rpl_bug33029.result:
  new results file
mysql-test/suite/bugs/t/rpl_bug33029.test:
  test merely checks no crash happens on slave.
sql/slave.cc:
  forcing to execute special logics implemented for bug#33029 if
  simulate_bug33029 the debug option is set.
sql/sql_class.cc:
  swaps of backed and the actual auto_inc_intervals_forced basing on shallow coping.
sql/structs.h:
  Removing the deep _copy() and methods associated with it;
  adding methods to Discrete_intervals_list:
      
  private `=', copy constructor to prevent using;
  private set_members();
  public  copy_shallow(), swap(), get_{head, tail, current}();
          empty_no_free() through set_members().
2008-06-19 21:47:59 +03:00
Georgi Kodinov
0a68dd1d3f null merge 2008-06-03 16:06:05 +03:00
Georgi Kodinov
da4cfa6d1e Bug#37069 (5.0): implement --skip-federated
mysql-test/r/federated_disabled.result:
  Bug#37069 (5.0): test case
mysql-test/t/federated_disabled-master.opt:
  Bug#37069 (5.0): test case
mysql-test/t/federated_disabled.test:
  Bug#37069 (5.0): test case
2008-06-03 13:12:37 +03:00
Georgi Kodinov
ea120c56f5 Bug#37069: Make federated disabled by default
The federated storage engine is now disabled by default.
mysql-test-run.pl is updated to enable it whenever it's required and available.

mysql-test/lib/mtr_cases.pl:
  Bug#37069: mysql-test-run.pl automatically enables federated 
  for federated related tests
sql/sql_plugin.cc:
  Bug#37069: federated is disabled by default
2008-05-30 13:21:45 +03:00
Chad MILLER
14aef9781a Merge from 5.0. Update version. 2008-05-23 00:25:21 +02:00
Chad Miller
e981dd6215 Merge metainfo for mailer plugin. 2008-05-22 17:57:41 +02:00
Chad MILLER
636e751f36 Add branch metainfo for mailer plugin. 2008-05-21 18:18:44 -04:00
unknown
59a880f951 Raise version number after cloning 5.1.25-rc 2008-05-21 09:59:58 +02:00
unknown
3433706a12 Update test coverage for Bug#27430 "Crash in subquery code when in PS
and table DDL changed after PREPARE" to pass in embedded mode.


mysql-test/r/ps.result:
  Update results (Bug#27430)
mysql-test/r/ps_ddl.result:
  Update results (Bug#27430)
mysql-test/t/ps.test:
  Add a test case for Bug#27430. ps.test is not run in --embedded-server,
  thus it now contains the part of the test for Bug#27430 that
  doesn't work in embedded server.
mysql-test/t/ps_ddl.test:
  Move a part of the test for Bug#27430 that doesn't work
  in embedded server to ps.test, that includes not_embedded.inc.
2008-05-20 22:43:26 +04:00
unknown
7ce32c91ba A number of fixes after a merge from the main 5.1 tree:
the local tree contains a fix for 
Bug#32748 "Inconsistent handling of assignments to 
general_log_file/slow_query_log_file",
which changes output of a number of tests.


mysql-test/r/general_log_file_basic.result:
  Update results (Bug#32748)
mysql-test/r/log_output_basic.result:
  Update the test with results of the fix for Bug#32748
mysql-test/r/slow_query_log_file_basic.result:
  Update the test with results of the fix for Bug#32748
mysql-test/t/general_log_file_basic.test:
  Adjust to take into account the fix for Bug#32748 
  (a port from 6.0-bugteam)
mysql-test/t/log_output_basic.test:
  Adjust to take into account the fix for Bug#32748 
  (a port from 6.0-bugteam)
mysql-test/t/slow_query_log_file_basic.test:
  Adjust to take into account the fix for Bug#32748 
  (a port from 6.0-bugteam)
tests/mysql_client_test.c:
  Fix a compilation warning.
2008-05-20 22:23:58 +04:00
unknown
3587539f22 Bug#27430 "Crash in subquery code when in PS and table DDL changed
after PREPARE"
Update test results after a merge with the main tree: the new minimum for 
the table definition cache is 256.


mysql-test/r/table_definition_cache_basic.result:
  Update test results: the new minimum for table definition cache is 256
2008-05-20 21:07:11 +04:00
unknown
02c901ee5e Bug#27430 "Crash in subquery code when in PS and table DDL changed after
PREPARE", review fixes:
- make the patch follow the specification of WL#4166 and remove  
the new error that was originally introduced.
Now the client never gets an error from reprepare, unless it failed.
I.e. even if the statement at hand returns a completely different
result set, this is not considered a server error.
The C API library, that can not handle this situation, was modified to
return a client error.
Added additional test coverage.


include/errmsg.h:
  Add a new client side error: now when we automatically
  reprepare a statement, the new result set may contain a different
  number of columns.
include/mysql_com.h:
  Add a new server status to be sent to the client if the 
  number of columns in the result set is different.
libmysql/errmsg.c:
  Add a new error message.
libmysql/libmysql.c:
  Make the client library robust against a result set that
  contains a different number of columns from prepare time.
  Previously that could never happen, and we simply had an assert.
  That means in particular that all clients are advised to upgrade
  with transition to 5.1, if they are using prepared statements C API.
  Make mysql_stmt_store_result() and mysql_stmt_execute() robust against 
  "broken" statement handles (those that have an error).
sql/sql_parse.cc:
  Clear transient server status flags at start of statement more 
  systematically.
sql/share/errmsg.txt:
  Remove an error that is unused and is not part of any public release.
sql/sql_prepare.cc:
  Instead of returning an error in case the number of result set columns
  has changed, simply update the client in server status.
  That will allow modern clients automatically recover from an error.
tests/mysql_client_test.c:
  Add additional coverage to the cases when the number of result
  set columns changed as a result of reprepare.
  Cover conversion and truncation of result set columns.
2008-05-20 20:36:26 +04:00
unknown
4175806efc Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-27430


Makefile.am:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
sql/item.cc:
  Auto merged
sql/my_decimal.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
libmysqld/CMakeLists.txt:
  Manual merge.
libmysqld/lib_sql.cc:
  Manual merge.
mysql-test/t/disabled.def:
  Manual merge.
2008-05-20 11:38:17 +04:00
unknown
4b13b5cb34 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-27430
into  bodhi.(none):/opt/local/work/mysql-5.1-27430


sql/sql_base.cc:
  Manual merge.
2008-05-20 11:33:27 +04:00
unknown
37b2c32d95 Bug#27430 "Crash in subquery code when in PS and table DDL changed after
PREPARE": rename members, methods, classes to follow the spec 
(a code review request)


sql/mysql_priv.h:
  enum_metadata_type -> enum_table_ref_type
sql/sp_head.cc:
  Metadata_version_observer -> Reprepare_observer
sql/sql_base.cc:
  metadata -> table_ref
sql/sql_class.cc:
  Replace an abstract interface with a concrete implementation.
sql/sql_class.h:
  enum_metadata_type -> enum_table_ref_type
sql/sql_prepare.cc:
  Move implementation of Execute_observer to sql_class.cc and
  rename the class to Reprepare_observer.
  Use getters instead of direct access to the members.
sql/table.h:
  metadata -> table_ref
2008-05-20 11:29:16 +04:00
unknown
990f1f09ed Bug#27430 Crash in subquery code when in PS and table DDL changed after PREPARE
Add test target to the makefile that will cause all
statements to be re-prepared before execution.


Makefile.am:
  Add test-reprepare target. In combination with the
  --ps-protocol this will cause that every statement
  in the test suite be re-prepared before execution.
sql/sql_base.cc:
  Re-prepare each statement before execution.
2008-05-19 13:39:31 -03:00
unknown
4111616625 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  mysql.com:/d2/hf/mysql-5.1-bugteam
2008-05-19 11:39:30 +05:00
unknown
ee4e10c7fc disabled.def:
rpl_innodb_bug28430 disabled


mysql-test/suite/rpl/t/disabled.def:
  rpl_innodb_bug28430 disabled
2008-05-19 11:38:53 +05:00
unknown
c5865cfdb6 Merge host.loc:/work/bk/5.0-bugteam
into  host.loc:/work/bk/5.1-bugteam


sql/sql_update.cc:
  Auto merged
2008-05-18 14:27:44 +05:00
unknown
8bc987ab5b Merge host.loc:/work/bugs/5.0-bugteam-36676
into  host.loc:/work/bk/5.0-bugteam
2008-05-18 14:27:17 +05:00
unknown
29e7fa258d Fixed bug#36676: multiupdate using LEFT JOIN updates only
first row or fails with an error:
  ERROR 1022 (23000): Can't write; duplicate key in table ''

The server uses intermediate temporary table to store updated
row data.  The first column of this table contains rowid.
Current server implementation doesn't reset NULL flag of that
column even if the server fills a column with rowid.
To keep each rowid unique, there is an unique index.
An insertion into an unique index takes into account NULL
flag of key value and ignores real data if NULL flag is set.
So, insertion of actually different rowids may lead to two
kind of problems.  Visible effect of each of these problems
depends on an initial engine type of temporary table:

1. If multiupdate initially creates temporary table as
a MyISAM table (a table contains blob columns, and the
create_tmp_table function assumes, that this table is
large), it inserts only one single row and updates
only rows with one corresponding rowid. Other rows are
silently ignored. 

2. If multiupdate initially creates MEMORY temporary
table, fills it with data and reaches size limit for
MEMORY tables (max_heap_table_size), multiupdate
converts MEMORY table into MyISAM table and fails
with an error:
  ERROR 1022 (23000): Can't write; duplicate key in table ''


Multiupdate has been fixed to update the NULL flag of
temporary table rowid columns.



mysql-test/r/multi_update_tiny_hash.result:
  Added test case for bug#36676.
mysql-test/t/multi_update_tiny_hash-master.opt:
  Added test case for bug#36676.
mysql-test/t/multi_update_tiny_hash.test:
  Added test case for bug#36676.
sql/sql_update.cc:
  Fixed bug#36676: multiupdate using LEFT JOIN updates only
                   first row or fails with an error:
    ERROR 1022 (23000): Can't write; duplicate key in table ''
  
  The multi_update::send_data method has been modified to reset null bits of
  fields containing rowids.
2008-05-18 14:21:25 +05:00
unknown
314e6e2551 Merge magare.gmz:/home/kgeorge/mysql/work/mysql-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-bugteam


sql/handler.cc:
  Auto merged
configure.in:
  merge 5.0-bugteam to 5.1-bugteam
2008-05-18 11:42:55 +03:00
unknown
1c12291b2f Fix mysql_client_test failure in pushbuild 5.1-27430
(Bug#27430)


sql/sql_prepare.cc:
  Fix a simple coding mistake.
2008-05-18 10:28:36 +04:00
unknown
1cf0b5cb89 Implement some code review fixes for the fix for Bug#27430
"Crash in subquery code when in PS and table DDL changed after PREPARE"


include/my_sys.h:
  Add two new flags for my_error(). These flags help parameterize
  behavoiur of my_message_sql()
sql/item.cc:
  Update comments.
  Fix a typo in Item_param::set_param_type_and_swap_value()
sql/mysqld.cc:
  Implement two additional flags for my_error():
   - if ME_NO_SP_HANDLER is specified, ignore stored procedure continue/
      exit handlers
   - if ME_NO_WARNING_FOR_ERROR is specified, do not push warning
sql/sql_base.cc:
  Update comments.
  Rename a few methods.
sql/sql_class.h:
  Update and improve comments.
sql/sql_prepare.cc:
  Update comments.
  Style changes.
sql/table.h:
  Update comments.
  Style changes.
  Rename a few methods.
tests/mysql_client_test.c:
  Zero the bind array, to follow C API requirements.
2008-05-18 01:51:18 +04:00
unknown
f197f3abb4 Bug #36705 key_buffer_size of >= 2G allocates all availabel virtual memory on 64-bit wondo.
temporary variables of 'long' types were used to store ulong values,
that causes init_key_cache to receive distorted parameters


sql/handler.cc:
  Bug #36705 key_buffer_size of >= 2G allocates all availabel virtual memory on 64-bit wondo.
  
  types of temporary variables changed to match init_key_cache() parameters
2008-05-17 12:53:47 +05:00
unknown
eee5b97258 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-bugteam
2008-05-16 17:48:07 -04:00
unknown
290b6c00c9 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-bugteam
2008-05-16 17:40:01 -04:00
unknown
85cabe0b91 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-bugteam
2008-05-16 17:37:37 -04:00
unknown
747d881b3d subselect.result:
updated the testcase for bug 36011


mysql-test/r/subselect.result:
  updated the testcase for bug 36011
2008-05-16 19:28:24 +03:00
unknown
277e783d13 Merge magare.gmz:/home/kgeorge/mysql/work/B36011-take2-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam


sql/sql_select.cc:
  Auto merged
mysql-test/r/subselect.result:
  merge of bug 36011 to 5.1-bugteam
mysql-test/t/subselect.test:
  merge of bug 36011 to 5.1-bugteam
2008-05-16 19:03:50 +03:00
unknown
97354b1907 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/autopush/B36011-take2-5.0-bugteam
2008-05-16 18:56:43 +03:00
unknown
7b35af4aaa Re-record results from unmerged file. 2008-05-16 11:38:13 -04:00
unknown
3618df7379 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


mysql-test/suite/rpl/t/rpl_sp.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
  Use local.  Needs re-recording.
2008-05-16 11:36:11 -04:00
unknown
7d53cbc3a3 Fix merge problems and re-record output for legitimate changes.
mysql-test/r/ctype_cp932_binlog_stm.result:
  New offsets because of quote marks.
mysql-test/r/mysqlbinlog.result:
  Re-add variables removed in merge at file-vers 1.47.
mysql-test/suite/binlog/r/binlog_database.result:
  create_string() output changes the quoting and inserts newlines.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  Change in quoting.
mysql-test/suite/rpl/r/rpl_sp.result:
  Adds quotes and newlines in creation of routines in binlog.
2008-05-16 11:35:15 -04:00
unknown
1f904b7f11 Add a test at Andrei's behest. Show the SHOW CREATE on the
master also, so that we can visually see the slave is the same.


mysql-test/r/rpl_sp.result:
  SHOW CREATE on master also.
mysql-test/t/rpl_sp.test:
  SHOW CREATE on master also.
2008-05-16 11:26:29 -04:00
unknown
db84d00029 Merge mats-laptop.(none):/home/bkroot/mysql-5.1-bugteam
into  mats-laptop.(none):/home/bk/b36197-mysql-5.1-bugteam
2008-05-16 16:13:13 +02:00
unknown
65677ea535 Fixes to make rpl_insert_id pass in 5.1-bugteam.
mysql-test/extra/rpl_tests/rpl_insert_id.test:
  Moving save and restore of @@global.concurrent_insert into the same
  session thread.
mysql-test/suite/rpl/r/rpl_insert_id.result:
  Result file change.
mysql-test/suite/rpl/t/rpl_insert_id.test:
  ***MISSING TEXT***
2008-05-16 16:08:24 +02:00
unknown
0fb1527e95 Bug #36011: server crash with explain extended on query
with dependent subqueries
An IN subquery is executed on EXPLAIN when it's not correlated.
If the subquery required a temporary table for its execution
not all the internal structures were restored from pointing to
the items of the temporary table to point back to the items of
the subquery.
Fixed by restoring the ref array when a temp tables were used in
executing the IN subquery during EXPLAIN EXTENDED.


mysql-test/r/subselect.result:
  Bug #36011: test case
mysql-test/t/subselect.test:
  Bug #36011: test case
sql/sql_select.cc:
  Bug #36011: restore the ref array after execution 
  when there were temp tables.
2008-05-16 17:05:55 +03:00
unknown
21b8d8b5b3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/Users/davi/mysql/mysql-5.0-bugteam
2008-05-16 10:55:48 -03:00
unknown
f72dc6fe18 Merge mysql.com:/Users/davi/mysql/mysql-5.0-bugteam
into  mysql.com:/Users/davi/mysql/mysql-5.1-bugteam
2008-05-16 10:31:55 -03:00
unknown
7b79348edb Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


mysql-test/suite/rpl/t/rpl_sp.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
  manual merge.
2008-05-16 09:23:27 -04:00
unknown
e10957274a Updated to address Davi's complaint about missing binlog.
mysql-test/r/rpl_sp.result:
  Add binlog results to show that they're written correctly.
mysql-test/t/rpl_sp.test:
  Add binlog results to show that they're written correctly.
2008-05-16 09:15:56 -04:00
unknown
9cbcf5a8a5 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  mats-laptop.(none):/home/bkroot/mysql-5.1-bugteam
2008-05-16 14:56:46 +02:00
unknown
6f914937e8 Merge pcrews-mac-local.local:/Users/pcrews/usr/local/bin/data0/clean/mysql-5.1-bugteam
into  pcrews-mac-local.local:/Users/pcrews/usr/local/bin/data0/build_work/test_fix/mysql-5.1-bugteam_35744
2008-05-16 06:52:48 -04:00
unknown
3d0ca97cad Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  mats-laptop.(none):/home/bkroot/mysql-5.1-bugteam
2008-05-16 11:15:22 +02:00
unknown
b2fe762e02 Raise version number after cloning 5.0.62 2008-05-16 11:01:59 +02:00
unknown
9397cbb837 Merge mkindahl@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  mats-laptop.(none):/home/bkroot/mysql-5.1-bugteam
2008-05-16 10:03:15 +02:00
unknown
7ca1538b90 Merge host.loc:/work/bugs/5.0-bugteam-36488
into  host.loc:/work/bk/5.0-bugteam
2008-05-16 13:00:12 +05:00
unknown
09de24ec5c Merge host.loc:/work/bugs/5.0-bugteam-36488
into  host.loc:/work/bk/5.1-bugteam


sql/item_strfunc.cc:
  Auto merged
2008-05-16 12:59:32 +05:00
unknown
9906138343 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my50-bug36570
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug36570/my51-bug36570


BitKeeper/deleted/.del-binlog_innodb.result:
  Auto merged
sql/sp_head.cc:
  Auto merged
mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result:
  need to re-record.
mysql-test/suite/rpl/r/rpl_sp.result:
  need to re-record.
mysql-test/r/mysqlbinlog.result:
  manual merge.
mysql-test/suite/rpl/t/rpl_sp.test:
  manual merge.
sql/sp.cc:
  manual merge.
sql/sp_head.h:
  manual merge.
2008-05-15 19:45:42 -04:00