Commit graph

40213 commits

Author SHA1 Message Date
Alexey Kopytov
c0cd2742af Bug #41943: mysqlbinlog.exe crashes if --hexdump option is used
The --hexdump option crashed mysqlbinlog when used together  
with the --read-from-remote-server option due to use of  
uninitialized memory.  
  
Since Log_event::print_header() relies on temp_buf to be  
initialized when the --hexdump option is present,  
dump_remote_log_entries() was fixed to setup temp_buf to point  
to the start of a binlog event as done in  
dump_local_log_entries().  
 
The root cause of this bug is identical to the one for 
bug #17654. The latter was fixed in 5.1 and up, so this 
patch is backport of the patches for bug #17654 to 5.0. 
 
Only 5.0 needs a changelog entry. 

client/mysqlbinlog.cc:
  Fixed dump_remote_log_entries() so that temp_buf is initialized 
  as it may be used later by Log_event::print_header() if the 
  --hexdump option is present.
mysql-test/r/mysqlbinlog.result:
  Added a test case for bug #41943.
mysql-test/t/mysqlbinlog.test:
  Added a test case for bug #41943.
2009-05-07 18:31:02 +04:00
Bernt M. Johnsen
a9f57db08c Bug 23471 merged from GCA and prepared for push 2009-05-07 08:57:27 +02:00
Matthias Leich
413c0756ac Fix for Bug#44493 Fix InnoDB owned 5.0 tests with imperfect cleanup
Details:
  innodb-autoinc-optimize
     Add DROP TABLE which is missing (Backport of fix from 5.1)
  innodb_notembedded
     Take care that the disconnects of additional sessions
     are completed.

  Note:
     The merge 5.0 -> 5.1 for innodb-autoinc-optimize
     should be a "null" merge = no changes in 5.1.
2009-05-06 17:11:08 +02:00
Chad MILLER
767501a9b1 Merge community up to enterprise, thus ending the community-server
adventure.
2009-05-06 09:06:32 -04:00
Anurag Shekhar
69fcfa67d3 merging with local fix. 2009-05-06 14:59:10 +05:30
Anurag Shekhar
609a794b15 Bug #39918 memory (heap) engine crashing with b-tree index and DELETE
with seg fault

Multiple-table DELETE from a table joined to itself may cause
server crash. This was originally discovered with MEMORY engine,
but may affect other engines with different symptoms.

The problem was that the server violated SE API by performing
parallel table scan in one handler and removing records in
another (delete on the fly optimization).


mysql-test/r/heap_btree.result:
  Updated test result after adding new test for this bug.
mysql-test/t/heap_btree.test:
  Updated test result after adding new test for the bug report.
sql/sql_delete.cc:
  Updated to check if the files in delete list appears in join list and disable 
  delete while scanning, if it appears.
2009-05-06 13:37:10 +05:30
Chad MILLER
4822696ecb Pull 5.1 treatment of community features into 5.0. 2009-05-05 17:03:23 -04:00
Davi Arnaut
6bee08c61d Merge from 5.0-pe-stage into main. 2009-05-05 20:41:58 +02:00
Bernt M. Johnsen
ef65e32d70 Bug#23471 prepared for commit in 5.0 gca branch 2009-05-05 11:07:11 +02:00
unknown
e9f38910da Merge from mysql-5.0.80-release 2009-05-01 19:43:27 +02:00
MySQL Build Team
12b0c92f23 merge in small portability tweaks from 5.0.80 2009-05-01 19:37:23 +02:00
MySQL Build Team
d64c0e1675 A few portability tweaks for Netware, SCO and QNX 2009-05-01 19:35:04 +02:00
Gleb Shchepa
f0791b8b6b Bug #37362: Crash in do_field_eq
EXPLAIN EXTENDED of nested query containing a error:

   1054 Unknown column '...' in 'field list'

may cause a server crash.


Parse error like described above forces a call to
JOIN::destroy() on malformed subquery.
That JOIN::destroy function closes and frees temporary
tables. However, temporary fields of these tables
may be listed in st_select_lex::group_list of outer
query, and that st_select_lex may not cleanup them
properly. So, after the JOIN::destroy call that
st_select_lex::group_list may have Item_field
objects with dangling pointers to freed temporary
table Field objects. That caused a crash.


mysql-test/r/subselect3.result:
  Added test case for bug #37362.
mysql-test/t/subselect3.test:
  Added test case for bug #37362.
sql/sql_select.cc:
  Bug #37362: Crash in do_field_eq
  
  The JOIN::destroy function has been modified to
  cleanup temporary table column items.
2009-05-01 00:20:37 +05:00
Andrei Elkin
75da023da6 merging from 5.0-bt rep to a local branch 2009-04-30 17:32:46 +03:00
Georgi Kodinov
abf3efe588 merged 5.0-main to 5.0-bugteam 2009-04-30 16:39:00 +03:00
Daniel Fischer
a5b6707a3f after-backport fixes 2009-04-30 15:38:00 +02:00
Andrei Elkin
9cf91b4cd9 merging from 5.0-bt rep to a local branch 2009-04-30 15:41:47 +03:00
Daniel Fischer
475a4eb74e missing files for libedit 2009-04-30 13:53:30 +02:00
Daniel Fischer
ac4ab1413f adjust version string 2009-04-30 13:38:10 +02:00
Daniel Fischer
1ba56d53ed backport #34773, commit 61127 2009-04-30 13:35:25 +02:00
Daniel Fischer
37741cae58 backport #39591, commit 59390 2009-04-30 13:14:37 +02:00
Daniel Fischer
13973ee754 backport #41437, commit 62803 2009-04-30 13:03:29 +02:00
Daniel Fischer
2d1c6ed62e backport #41456, commit 61847 2009-04-30 12:57:03 +02:00
Daniel Fischer
bb575dcc57 backport #41470, commit 62661 2009-04-30 12:52:45 +02:00
Daniel Fischer
195ea7ea9d backport #42014, commit 65523 2009-04-30 12:45:37 +02:00
Daniel Fischer
3aabe4eb60 missing files from 42419 2009-04-30 12:42:50 +02:00
Daniel Fischer
ce81eaeefd backport 42366, copying certificates from 5.0 2009-04-30 12:38:22 +02:00
Daniel Fischer
4c60b1d4b7 backport #42419, commits 66925, 66999 2009-04-30 12:36:18 +02:00
Matthias Leich
e5d859fab7 Merge of fix for Bug#44522 main.not_embedded_server fails with "--check-testcases"
into actual tree
2009-04-30 12:26:11 +02:00
Daniel Fischer
8c1bb95156 backport #43748, applying commits 70359 and 70377 2009-04-30 12:16:50 +02:00
Daniel Fischer
bd537f0913 Backported libedit changes. 2009-04-30 12:04:37 +02:00
Alexey Botchkov
626a272ed4 mysql_client_test fixed.
per-file comments:
  tests/mysql_client_test.c
the test for bug 37956 isn't relevant anymore.
The query there 'select point(?,?)' doesn't produce an error.
2009-04-30 12:52:27 +05:00
Alexey Botchkov
eed928808e merging 2009-04-29 09:40:50 +05:00
Matthias Leich
ae154dca77 Merge latest changes into local GCA tree
no conflicts
2009-04-28 21:48:10 +02:00
Matthias Leich
2328f9b13f Fix for Bug#43546 Several 5.0 tests do not pass MTR's --check option
(moved from Bug 42308)

Details:
- insert_update
  Add DROP TABLE which was missing, error numbers -> names
- varbinary
  Add DROP TABLE which was missing
- sp_trans_log
  Add missing DROP function, improved formatting
2009-04-28 20:12:18 +02:00
Staale Smedseng
9f04d27027 Bug#35769 typo in mysqlhotcopy documentation
Fixed a number of typos, and made punctuation and
capitalization more consistent in documentation
and help.
2009-04-28 18:16:17 +02:00
Andrei Elkin
d38e62634f Bug #38694 Race condition in replication thread shutdown
The issue of the current bug is unguarded access to mi->slave_running 
by the shutdown thread calling end_slave() that is bug#29968 
(alas happened not to be cross-linked with the current bug)

Fixed:

with removing the unguarded read of the running status
and perform reading it in terminate_slave_thread()
at time run_lock is taken (mostly bug#29968 backporting, still with some
improvements over that patch - see the error reporting from 
terminate_slave_thread()).
Issue of bug#38716 is fixed here for 5.0 branch as well.

Note:

There has been a separate artifact identified - 
a race condition between init_slave() and  end_slave() - 
reported as  Bug#44467.

mysql-test/r/rpl_bug38694.result:
  a new results file is added.
mysql-test/t/rpl_bug38694-slave.opt:
  simulating delay at slave threads shutdown.
mysql-test/t/rpl_bug38694.test:
  A new test to check if a delay at the termination phase of slave threads
  could cause any issue.
sql/slave.cc:
  The unguarded read of the running status is removed. Its reading is done in
  terminate_slave_thread() at time run_lock is taken;
  Calling terminate_slave_threads(skip_lock := !need_slave_mutex) in the failing branch of start_slave_threads() which is bug#38716 issue.
sql/slave.h:
  removing terminate_slave_thread() out of the global interface scope.
2009-04-28 14:46:07 +03:00
Alexey Botchkov
ddc9a19550 merging 2009-04-28 14:48:54 +05:00
Alexey Botchkov
620fb880d7 Bug#38990 Arbitrary data input plus GIS functions causes mysql server crash
the Point() and Linestring() functions create WKB representation of an
   object instead of an real geometry object.
   That produced bugs when these were inserted into tables.

   GIS tests fixed accordingly.
            
per-file messages:
  mysql-test/r/gis-rtree.result
Bug#38990 Arbitrary data input plus GIS functions causes mysql server crash 
    test result
  mysql-test/r/gis.result
Bug#38990 Arbitrary data input plus GIS functions causes mysql server crash 
    test result
  mysql-test/t/gis-rtree.test
Bug#38990 Arbitrary data input plus GIS functions causes mysql server crash 
    test fixed - GeomFromWKB invocations removed
  mysql-test/t/gis.test
Bug#38990 Arbitrary data input plus GIS functions causes mysql server crash 
    test fixed - AsWKB invocations added
  sql/item_geofunc.cc
Bug#38990 Arbitrary data input plus GIS functions causes mysql server crash 
     Point() and similar functions to create a proper object
2009-04-28 14:47:26 +05:00
Gleb Shchepa
def0470598 backport from 6.0:
Bug #40925: Equality propagation takes non indexed attribute

Query execution plans and execution time of queries like

  select a, b, c from t1
    where a > '2008-11-21' and b = a limit 10

depended on the order of equality operator parameters:
"b = a" and "a = b" are not same. 


An equality propagation algorithm has been fixed:
the substitute_for_best_equal_field function should not
substitute a field for an equal field if both fields belong
to the same table.


mysql-test/r/select.result:
  Added test case for bug #40925.
mysql-test/t/select.test:
  Added test case for bug #40925.
sql/item.cc:
  Bug #40925: Equality propagation takes non indexed attribute
  
  An equality propagation algorithm has been fixed:
  the substitute_for_best_equal_field function should not 
  substitute a field for an equal field if both fields belong
  to the same table.
2009-04-28 05:19:13 +05:00
Patrick Crews
b7a70c8b3d Bug#32784: Timeout in test "innodb_charset": InnoDB much slower than other handlers
Turned off autocommit at the start of this test per Innobase recommendation.
Noted significant reduction in run time for this test w/ a minor increase in other tests' run-times.
2009-04-24 12:58:23 -04:00
Satya B
d5065d1426 Applying InnoDB snashot 5.0-ss4900, part 2. Fixes BUG#43309
1) BUG#43309 - Test main.innodb can't be run twice

Detailed revision comments:

r4701 | vasil | 2009-04-13 17:03:46 +0300 (Mon, 13 Apr 2009) | 6 lines
branches/5.0:

Fix Bug#43309 Test main.innodb can't be run twice

by making the innodb.test reentrant.
2009-04-24 17:27:53 +05:30
Satya B
0e4caf39fe Applying InnoDB snashot 5.0-ss4900 part 1, Fixes BUG#42279
1) BUG#42279 - Race condition in btr_search_drop_page_hash_when_freed()

Detailed revision comments:

r4031 | marko | 2009-01-23 15:33:46 +0200 (Fri, 23 Jan 2009) | 8 lines
branches/5.0: btr_search_drop_page_hash_when_freed(): Check if
buf_page_get_gen() returns NULL.  The page may have been evicted
from the buffer pool between buf_page_peek_if_search_hashed() and
buf_page_get_gen(), because the buffer pool mutex will be released
between these two calls. (Bug #42279)

rb://82 approved by Heikki Tuuri
2009-04-24 17:18:20 +05:30
Satya B
55533a7efd merge to latest 5.0-bugteam tree 2009-04-24 16:53:56 +05:30
Satya B
4610c13a24 Fix for BUG#43660- SHOW INDEXES/ANALYZE does NOT update cardinality
for indexes of InnoDB table

Fixes by replacing the PRNG that is used to pick random pages with a 
better one. 

Also adds a configuration option "innodb_use_legacy_cardinality_algorithm"
to enable the fix only when the option is set.

This patch is from http://bugs.mysql.com/file.php?id=11789
2009-04-24 16:33:50 +05:30
Staale Smedseng
e1b22ab9a1 Bug#33146 CHECKSUM TABLE is not interruptable by KILL
QUERY statement
      
Commit 55629 applied to 5.0-bugteam and 5.1-bugteam: 
Check for thd->killed in CHECKSUM loop.
2009-04-23 19:52:39 +02:00
Sergey Vojtovich
f8b219ee29 BUG#36966 - mysqldump.test fails in pushbuild
mysqldump.test is designed to run with concurrent inserts
disabled. It is disabling concurrent inserts at the very
beginning of the test case, and re-enables them at the
bottom of the test. But for some reason (likely incorrect
merge) we enable concurrent inserts in the middle of the test.

The problem is fixed by enabling concurrent inserts only
at the bottom of the test case.
2009-04-21 14:01:13 +05:00
Georgi Kodinov
0804479569 Bug #35087: Inserting duplicate values at one time with DES_ENCRYPT leads
to wrong results
      
3 problems found with DES_ENCRYPT/DES_DECRYPT :

1. The max length was not calculated properly. Fixed in fix_length_and_dec()
2. DES_ENCRYPT had a side effect of sometimes reallocating and changing 
the value of its argument. Fixed by explicitly pre-allocating the necessary
space to pad the argument with trailing '*' (stars) when calculating the 
DES digest.
3. in DES_ENCRYPT the string buffer for the result value was not 
reallocated to the correct size and only string length was assigned to it. 
Fixed by making sure there's enough space to hold the result.
2009-04-17 18:52:57 +03:00
Sergey Glukhov
ff923cc82d Bug#44151 using handler commands on information_schema tables crashes server
information schema tables are based on internal tmp tables which are removed
after each statement execution. So HANDLER comands can not be used with
information schema.


mysql-test/r/handler.result:
  test result
mysql-test/t/handler.test:
  test case
sql/sql_handler.cc:
  information schema tables are based on internal tmp tables which are removed
  after each statement execution. So HANDLER comands can not be used with
  information schema.
2009-04-17 12:41:15 +05:00
Patrick Crews
5b05d360b0 Bug#26887 - main.count_distinct3 fails randomly
Streamlined how we increase the size of our test table.
The new method shows run time decreased by ~60%.
This is not a guarantee that we will not see test timeouts (the random failures noted in the bug),
but it should significantly reduce the chances of this occurring.
2009-04-16 13:47:44 -04:00