Commit graph

61609 commits

Author SHA1 Message Date
Alexey Kopytov
87b98f6350 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in mysql-test/r/func_str.result
Text conflict in mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_32.result
Text conflict in mysql-test/suite/sys_vars/r/myisam_sort_buffer_size_basic_64.result
Text conflict in mysql-test/t/func_str.test
Text conflict in sql/mysqld.cc
Text conflict in sql/protocol.cc
Text conflict in storage/myisam/mi_open.c
2010-04-02 19:17:43 +04:00
Alexey Kopytov
f2d77ee6ac Null merging innodb-ss6860 to mysql-trunk-merge. 2010-04-02 18:30:39 +04:00
Alexey Kopytov
5e770ab352 Automerge. 2010-04-02 18:22:18 +04:00
Alexander Nozdrin
36430c53f9 Fix use of uninitialized variable. 2010-03-26 11:09:14 +03:00
Sergey Glukhov
52d89df285 Bug#52164 Assertion failed: param.sort_length, file .\filesort.cc, line 149
The crash happens because of incorrect max_length calculation
in QUOTE function(due to overflow). max_length is set
to 0 and it leads to assert failure.
The fix is to cast expression result to
ulonglong variable and adjust it if the
result exceeds MAX_BLOB_WIDTH.
2010-03-26 09:49:35 +04:00
Ramil Kalimullin
bd2a0eaa82 An addition to fix for BUG#51866 - crash with repair
by sort and fulltext keys.

Min value for myisam_sort_buffer_size is 4096.
2010-03-25 20:35:07 +04:00
Andrei Elkin
aa88ec22f1 merge from 5.1-bt rep 2010-03-25 18:13:23 +02:00
Sergey Vojtovich
47fa2317e5 Merge fixes for BUG51877, BUG51866, BUG47598 to mysql-5.1-bugteam. 2010-03-25 19:59:54 +04:00
Andrei Elkin
5e7b3a4f46 merging bug#52304 to 5.1-bt,pe 2010-03-25 14:49:24 +02:00
Sergey Vojtovich
45e4c066e8 Merge fix for BUG51866 to mysql-5.1-bugteam. 2010-03-25 16:11:16 +04:00
Sergey Vojtovich
3f641968fc BUG#51866 - crash with repair by sort and fulltext keys
Repairing MyISAM table with fulltext indexes and low
myisam_sort_buffer_size may crash the server.

Estimation of number of index entries was done incorrectly,
causing further assertion failure or server crash.

Docs note: min value for myisam_sort_buffer_size has been
changed from 4 to 4096.
2010-03-25 16:08:21 +04:00
Sergey Vojtovich
2ab37b2a0d Merge fix for BUG51877 to mysql-5.1-bugteam. 2010-03-25 15:50:36 +04:00
Sergey Vojtovich
ba33a3357d BUG#51877 - HANDLER interface causes invalid memory read
Invalid memory read if HANDLER ... READ NEXT is executed
after failed (e.g. empty table) HANDLER ... READ FIRST.

The problem was that we attempted to perform READ NEXT,
whereas there is no pivot available from failed READ FIRST.

With this fix READ NEXT after failed READ FIRST equals
to READ FIRST.

This bug affects MyISAM tables only.
2010-03-25 15:49:01 +04:00
Sergey Vojtovich
bf733b47cc Merge fix for BUG47598 to mysql-5.1-bugteam. 2010-03-25 15:20:35 +04:00
Sergey Vojtovich
e38e30d0f6 BUG#47598 - MyISAM may write uninitialized data to disk
When MyISAM writes newly created index page it may be
initialized partially. In other words some bytes of
sensible data and uninitialized tail of the page may
go into index file.

Under certain rare circumstances these hunks of memory
may contain data that would be otherwise inaccessible
to user, like passwords or data from other tables.

Fixed by initializing memory for temporary MyISAM key
buffer to '\0'.

No test case for this fix as it is heavily covered by
existing tests.
2010-03-25 15:18:14 +04:00
Alexey Kopytov
1311b45a61 Fixed mysqld--help-win broken by the merge from trunk main. 2010-03-24 23:29:38 +03:00
Sergey Vojtovich
a1590d2e95 More exceptions for InnoDB plugin tests. 2010-03-24 23:09:23 +04:00
Alexey Kopytov
f10885675c Manual merge of mysql-trunk into mysql-trunk-merge.
Conflicts:

Text conflict in client/mysqlbinlog.cc
Text conflict in mysql-test/Makefile.am
Text conflict in mysql-test/collections/default.daily
Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result
Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result
Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test
Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test
Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test
Text conflict in mysys/charset.c
Text conflict in sql/field.cc
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_func.cc
Text conflict in sql/log.cc
Text conflict in sql/log_event.cc
Text conflict in sql/log_event_old.cc
Text conflict in sql/mysqld.cc
Text conflict in sql/rpl_utility.cc
Text conflict in sql/rpl_utility.h
Text conflict in sql/set_var.cc
Text conflict in sql/share/Makefile.am
Text conflict in sql/sql_delete.cc
Text conflict in sql/sql_plugin.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_table.cc
Text conflict in storage/example/ha_example.h
Text conflict in storage/federated/ha_federated.cc
Text conflict in storage/myisammrg/ha_myisammrg.cc
Text conflict in storage/myisammrg/myrg_open.c
2010-03-24 18:03:44 +03:00
Sergey Vojtovich
75aba21f22 Applying InnoDB snapshot
Detailed revision comments:

r6822 | vasil | 2010-03-15 10:17:31 +0200 (Mon, 15 Mar 2010) | 12 lines
branches/5.1:

Typecast to silence a compiler warning:

row/row0sel.c: 4548
        C4244: '=' : conversion from 'float' to 'ib_ulonglong', possible loss of data
row/row0sel.c: 4553
        C4244: '=' : conversion from 'double' to 'ib_ulonglong', possible loss of data

Reported by:	Jonas Oreland <Jonas.Oreland@Sun.COM>
Discussed with:	Sunny Bains <sunny.bains@oracle.com>
2010-03-24 18:52:28 +04:00
Sergey Vojtovich
a10d33386f Applying InnoDB snapshot
Detailed revision comments:

r6785 | vasil | 2010-03-10 09:04:38 +0200 (Wed, 10 Mar 2010) | 11 lines
branches/5.1:

Add the missing --reap statements in innodb_bug38231.test. Probably MySQL
enforced the presence of those recently and the test started failing like:

  main.innodb_bug38231                     [ fail ]
          Test ended at 2010-03-10 08:48:32
  
  CURRENT_TEST: main.innodb_bug38231
  mysqltest: At line 49: Cannot run query on connection between send and reap

r6788 | vasil | 2010-03-10 10:53:21 +0200 (Wed, 10 Mar 2010) | 8 lines
branches/5.1:

In innodb_bug38231.test: replace the fragile sleep 0.2 that depends on timing
with a more robust condition which waits for the TRUNCATE and LOCK commands
to appear in information_schema.processlist. This could also break if there
are other sessions executing the same SQL commands, but there are none during
the execution of the mysql test.
2010-03-24 18:51:57 +04:00
Sergey Vojtovich
0c8a6f6cca Applying InnoDB snapshot, fixes BUG#47621.
Detailed revision comments:

r6783 | jyang | 2010-03-09 17:54:14 +0200 (Tue, 09 Mar 2010) | 9 lines
branches/5.1: Fix bug #47621 "MySQL and InnoDB data dictionaries
will become out of sync when renaming columns". MySQL does not
provide new column name information to storage engine to
update the system table. To avoid column name mismatch, we shall
just request a table copy for now.

rb://246 approved by Marko.
2010-03-24 18:39:23 +04:00
Sergey Vojtovich
46b421ed7b Applying InnoDB snapshot
Detailed revision comments:

r6780 | vasil | 2010-03-08 19:13:20 +0200 (Mon, 08 Mar 2010) | 4 lines
branches/5.1:

Whitespace fixup.
2010-03-24 18:37:23 +04:00
Sergey Vojtovich
d1ec522f63 Applying InnoDB snapshot, fixes BUG#51653
Detailed revision comments:

r6774 | calvin | 2010-03-03 23:56:10 +0200 (Wed, 03 Mar 2010) | 2 lines
branches/5.1: fix bug#51653: outdated reference to set-variable
Non functional change.
2010-03-24 18:36:05 +04:00
Alexey Botchkov
9e76d75937 merging. 2010-03-24 16:14:47 +04:00
Kristofer Pettersson
68c96b8a15 Automerge 2010-03-25 13:26:48 +01:00
Kristofer Pettersson
41249cca5c Bug#46615 Assertion in Query_cache::invalidate in INSERT in a VIEW of a MERGE table
If the listed columns in the view definition of 
the table used in a 'INSERT .. SELECT ..'
statement mismatched, a debug assertion would
trigger in the cache invalidation code
following the failing statement.

Although the find_field_in_view() function
correctly generated ER_BAD_FIELD_ERROR during
setup_fields(), the error failed to propagate
further than handle_select(). This patch fixes
the issue by adding a check for the return
value.
2010-03-24 17:37:41 +01:00
Alexey Botchkov
13033a5da2 merging. 2010-03-24 16:03:29 +04:00
Sergey Glukhov
15877ee10c 5.0-bugteam->5.1-bugteam merge 2010-03-24 14:45:09 +04:00
Sergey Glukhov
658cf9e481 Bug#48483 crash in get_best_combination()
The crash happens because greedy_serach
can not determine best plan due to
wrong inner table dependences. These
dependences affects join table sorting
which performs before greedy_search starting.
In our case table which has real 'no dependences'
should be put on top of the list but it does not
happen as inner tables have no dependences as well.
The fix is to exclude RAND_TABLE_BIT mask from
condition which checks if table dependences
should be updated.
2010-03-24 14:37:28 +04:00
Alexander Nozdrin
c203c8daf8 Auto-merge from mysql-trunk-bugfixing. 2010-03-24 11:10:56 +03:00
Alexey Kopytov
41b6e42421 Mark all main.plugin* tests as experimental on Solaris
as done in 6.0 due to bug #47146.
2010-03-23 23:34:12 +03:00
Georgi Kodinov
d9175c2147 Bug #51850: crash/memory overlap when using load data infile and set
col equal to itself!

There's no need to copy the value of a field into itself.
While generally harmless (except for some performance penalties)
it may be dangerous when the copy code doesn't expect this.
Fixed by checking if the source field is the same as the destination
field before copying the data.
Note that we must preserve the order of assignment of the null 
flags (hence the null_value assignment addition).
2010-03-23 17:07:00 +02:00
Andrei Elkin
307fb75e68 Bug #52304 valgrind does not like to print un-inited string in Protocol_text::store()
The reason of the failure was apparent flaw in that a pointer to an uninitialized buffer was
passed to DBUG_PRINT of Protocol_text::store().

Fixed with splitting the print-out into two branches: 
one with length zero of the problematic arg and the rest.
2010-03-23 17:00:50 +02:00
Alexey Kopytov
bbe6b90b52 Fixed the incorrectly merged rpl.rpl_show_slave_running test in
mysql-trunk-merge (by copying the .result/.test files from mysql-pe).
2010-03-23 10:28:57 +03:00
Alexey Kopytov
7ac059ba8f Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Text conflict in sql/item_func.cc
2010-03-22 16:28:51 +03:00
Alexander Nozdrin
bdcf08d727 Make mysqlbinlog_row, mysqlbinlog_row_innodb and mysqlbinlog_row_myisam
experimental due to Bug 52202.
2010-03-22 16:00:38 +03:00
Alexander Barkov
a4332c256e Merging the latest changes 2010-03-22 16:29:53 +04:00
Alexander Barkov
177522a4fe Bug #51976 LDML collations issue
Problem: caseup_multiply and casedn_multiply members      
were not initialized for a dynamic collation, so          
UPPER() and LOWER() functions returned empty strings.      
Fix: initializing the members properly.

Adding tests:
  mysql-test/r/ctype_ldml.result
  mysql-test/t/ctype_ldml.test

Applying the fix:
  mysys/charset.c
2010-03-22 16:27:59 +04:00
Mats Kindahl
e176c4162f Merging with mysql-5.1-bugfixing. 2010-03-22 13:12:57 +01:00
Mats Kindahl
45610a66d9 BUG#49618: Field length stored incorrectly in binary log
for InnoDB

Patch to fix result files for the binlog suite under row-
based replication.
2010-03-22 13:10:18 +01:00
John H. Embretsen
92c7521f27 Merge fix for bug 52060 into tip of 5.1-bugteam. 2010-03-22 10:06:56 +01:00
Gleb Shchepa
2758847bf2 Bug #49910: Behavioural change in SELECT/WHERE on YEAR(4) data type
(Original patch by Sinisa Milivojevic)

The YEAR(4) value of 2000 was equal to the "bad" YEAR(4) value of 0000.                              

The get_year_value() function has been modified to not adjust bad                                    
YEAR(4) value to 2000.
2010-03-22 12:33:25 +04:00
Andrei Elkin
ccdec568c1 bug#51648
comments to rpl_show_slave_running test are added to ease merging
2010-03-22 07:50:19 +02:00
Andrei Elkin
06af918e02 merging bug@51648 to 5.1-bt, pe from local bugfixing branch 2010-03-21 21:30:49 +02:00
Andrei Elkin
e1158e60ac merging bug@51398 to trun-bf from local bf-branch 2010-03-21 19:33:14 +02:00
Vladislav Vaintroub
ad2de79756 Fix cmake build on OSX/i386 (many innodb tests fail
in optimized build) 
Unlike in autotools build, innodb was compiled with 
-DUNIV_MUST_NOT_INLINE set.  this exposed what
seems to be a bug in gcc backend.

The fix is to remove extra definition.
2010-03-21 13:52:57 +01:00
Alexey Kopytov
acc2b9e366 Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts:

Text conflict in mysql-test/r/partition_innodb.result
Text conflict in sql/field.h
Text conflict in sql/item.h
Text conflict in sql/item_cmpfunc.h
Text conflict in sql/item_sum.h
Text conflict in sql/log_event_old.cc
Text conflict in sql/protocol.cc
Text conflict in sql/sql_select.cc
Text conflict in sql/sql_yacc.yy
2010-03-20 23:23:42 +03:00
Alexey Kopytov
22bb602aca Automerge. 2010-03-20 21:36:17 +03:00
Alexey Kopytov
5ab6b0bba0 Streamlined funcs_1.storedproc broken by the patch for bug #8433. 2010-03-20 21:34:51 +03:00
Vladislav Vaintroub
4a39f83ff7 Fix errors when building release
- package some more perl scripts on Windows (mysqlhotcopy and mysqldumpslow)
- do not try to pack .map files (no more produced)
- (CMake-unrelated) fix debug build on FreeBSD, trying to use uninitialized attribute
MY_MUTEX_INIT_FAST
2010-03-19 18:33:48 +01:00