Commit graph

57136 commits

Author SHA1 Message Date
Davi Arnaut
262906f7bc Remove unused variable. 2009-05-05 20:47:43 +02:00
Satya B
a2b1133e3a Additional Fix for BUG#40827 - Killing insert-select to MyISAM can cause
table corruption

Disabling the mysiam_debug.test in embedded mode because of BUG#43733
2009-05-04 14:35:16 +05:30
Georgi Kodinov
1fb73ad3c7 merge 2009-04-30 18:00:51 +03:00
Sergey Vojtovich
5530867103 Merge to 5.1-bugteam. 2009-04-30 19:41:43 +05:00
Andrei Elkin
2ecc941bd8 merging from 5.0-bt rep to a local branch 2009-04-30 17:32:46 +03:00
Andrei Elkin
943b90fb05 merge 5.1-bt rep -> local 5.1-bt 2009-04-30 17:29:57 +03:00
Georgi Kodinov
767a835b52 merged 5.0-bugteam -> 5.1-bugteam 2009-04-30 16:44:13 +03:00
Georgi Kodinov
a60ff1e9f5 merged 5.1-main to 5.1-bugteam 2009-04-30 16:42:38 +03:00
Georgi Kodinov
4ad430f8cd merged 5.0-main to 5.0-bugteam 2009-04-30 16:39:00 +03:00
Andrei Elkin
f683c5e0b6 moving bug#38694 test files into rpl suite 2009-04-30 16:20:38 +03:00
Andrei Elkin
81d05cfad5 merging 5.0-bt to 5.1-bt 2009-04-30 16:17:46 +03:00
Narayanan V
6299dbb356 merging with mysql-5.1-bugteam 2009-04-30 18:22:48 +05:30
Andrei Elkin
fbacc10cbb merge bug#44179 fixes to 5.1-bt 2009-04-30 15:47:09 +03:00
Narayanan V
2b491daa1c BUG#37631 - Incorrect key file for table after upgrading from 5.0 to 5.1
This patch adds corrections to the original patch
submitted 2009-04-08 (http://lists.mysql.com/commits/71607):

- fixed that the original patch didn't work because of an
  incorrect condition;
- added a test case.
2009-04-30 18:16:49 +05:30
Andrei Elkin
6b39bb5eac merging from 5.0-bt rep to a local branch 2009-04-30 15:41:47 +03:00
Andrei Elkin
b3190a4528 Bug #44179 reset slave crashes in my_error when reset_logs returns non-zero
my_error() was invoked in reset_slave()'s with purge_relay_logs()-failing branch
without passing sql_errno to it.

Fixed with setting sql_errno= ER_RELAY_LOG_FAIL in the purge_relay_logs()-failing branch.
2009-04-30 15:28:07 +03:00
Matthias Leich
0c4a79c132 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
Sergey Glukhov
823826a7cb automerge 2009-04-30 15:17:56 +05:00
Satya B
c7c3f33772 merget to 5.1-bugteam 2009-04-30 16:44:50 +05:30
Satya B
49e3fe95fe Addition to the fix for BUG#40827 - Killing insert-select to MyISAM can cause
table corruption


Moved the testcase from the file myisam.test to the new testfile 
mysiam_debug.test
2009-04-30 16:33:44 +05:30
Matthias Leich
ff3e790053 Merge 5.0 -> 5.1 of fix for Bug 44522
This is a "null" merge because the fix is
already in 5.1
2009-04-30 12:29:19 +02:00
Sergey Glukhov
430406a68f Bug#43962 "Packets out of order" calling a SHOW TABLE STATUS
Error happens because sp_head::MULTI_RESULTS is not set for SP
which has 'show table status' command.
The fix is to add a SQLCOM_SHOW_TABLE_STATUS case into
sp_get_flags_for_command() func.
2009-04-30 14:37:29 +05:00
Alexey Botchkov
b1444f40d5 merging 2009-04-30 12:54:45 +05:00
Alexey Botchkov
d7ad0a04d1 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
Satya B
1cdd699022 Fix for BUG#40827 - Killing insert-select to MyISAM can cause table corruption
Killing the insert-select statement corrupts the MyISAM table only
when the destination table is empty and when it has indexes. When 
we bulk insert huge data and if the destination table is empty we 
disable the indexes for fast inserts, data is then inserted and 
indexes are re-enabled after bulk_insert operation
                        
Killing the query, aborts the repair table operation during enable
indexes phase leading to table corruption.
                      
We now truncate the table when we detect that enable indexes is
killed for bulk insert query.As we have an empty table before the 
operation, we can fix by truncating the table.
2009-04-30 12:40:12 +05:30
Martin Hansson
de2c4f0ad0 merge 2009-04-29 20:52:37 +02:00
Vladislav Vaintroub
33723996a8 merge 2009-04-29 14:29:54 +02:00
Martin Hansson
7d24441119 Bug#43737: Select query return bad result
A bug in the initialization of key segment information made it point
to the wrong bit, since a bit index was used when its int value
was needed. This lead to misinterpretation of bit columns
read from MyISAM record format when a NULL bit pushed them over
a byte boundary.
Fixed by using the int value of the bit instead.
2009-04-29 14:00:34 +02:00
Vladislav Vaintroub
57b4295d2b Bug#43932 myisam index corruption with large index and large
key_buffer_size.

The cause of corruption was number overflow when multiplying 
two ulong values, number of used keycache blocks with size
of a single block. The result of multiplication exceeded ulong 
range (4G) and this lead to incorrectly calculated  buffer offset
in the key cache.

The fix is to use size_t for multiplication result.

This patch also fixes pointless cast in safemalloc 
(size of allocated block to uint), that creates lot of false
alarm warnings when using big keycache (> 4GB) in debug mode.
2009-04-29 13:51:10 +02:00
Narayanan V
f51e62cfa3 Bug#44337 Select query using index merge fails with MCH3601
The storage engine was not correctly handling the case in 
which rnd_pos is executed for a handler without a preceding
rnd_next or index read operation. As a result, an unitialized
file handle was sometimes being passed to the QMY_READ API.

The fix clears the rrnAssocHandle at the beginning of each
read operation and then checks to see whether it has been
set to a valid handle value before attempting to use it
in rnd_pos. If rrnAssocHandle has not been set by a previous
read operation, rnd_pos instead falls back to the use of the
currently active handle.
2009-04-29 16:51:14 +05:30
Alexey Botchkov
4edc43b7b8 merging 2009-04-29 09:41:36 +05:00
Alexey Botchkov
a594ff04b0 merging 2009-04-29 09:40:50 +05:00
Alexey Botchkov
1e53c709ca merging 2009-04-29 09:39:49 +05:00
Alexey Botchkov
08690ef254 merging 2009-04-29 07:59:10 +05:00
Alfranio Correia
db7703b392 merge 5.1-bugteam (local) --> 5.1-bugteam 2009-04-28 23:10:29 +01:00
Matthias Leich
69a153d160 Automatic merge, no conflicts, no changes 2009-04-28 21:50:55 +02:00
Matthias Leich
ae723ce535 Merge latest changes into local GCA tree
no conflicts
2009-04-28 21:48:10 +02:00
Matthias Leich
22892f391c Merge of latest changes into local GCA tree
no conflicts
2009-04-28 21:33:18 +02:00
Matthias Leich
7a21958d7f Merge 5.0 -> 5.1 of fix for Bug 43546
Several 5.0 tests do not pass MTR's --check option (moved from Bug 42308)
2009-04-28 20:42:17 +02:00
Matthias Leich
386ceb4916 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
150d3624e7 Merge from 5.0-bugteam 2009-04-28 18:19:55 +02:00
Staale Smedseng
7f119d203f 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
e02d162f79 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.
2009-04-28 14:46:07 +03:00
Alexey Botchkov
8dafd2b95d merging 2009-04-28 14:48:54 +05:00
Alexey Botchkov
d1968ad43f 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
e4d4226efa manual merge 5.0-bugteam --> 5.1-bugteam 2009-04-28 05:27:38 +05:00
Gleb Shchepa
fa01a4ed26 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.
2009-04-28 05:19:13 +05:00
Sergey Glukhov
00c37fdfba ENCRYPT function always returns NULL on windows.
The fix is to disable result log as we need to
test valgrind error only.
2009-04-27 15:05:01 +05:00
Alfranio Correia
8126db7c96 Fixed rpl_innodb_mixed_ddl and rpl_000015.
Respectively, replaced "--exec diff" by "--diff_files" which is a mysqltest command to run a
non-operating system specific diff. Removed the file rpl_000015-slave.sh as it is not
necessary in the new MTR.
2009-04-26 22:21:01 +01:00
Patrick Crews
2bbd677f5b merge 5.0-> 5.1 2009-04-24 13:00:17 -04:00