Commit graph

61595 commits

Author SHA1 Message Date
Alexey Kopytov
8ccf004f5b Reconciling different file ids for dtoa.c in trunk and 6.0-codebase. 2010-04-11 10:48:58 +04:00
Alexey Kopytov
ab50b8885f Automerge. 2010-04-11 10:33:07 +04:00
Alexander Nozdrin
70a04be1b8 Auto-merge from mysql-trunk. 2010-04-10 12:47:19 +04:00
Alexander Nozdrin
5513891cc3 Make main.query_cache_debug experimental on Linux due to Bug 52356. 2010-04-10 12:25:57 +04:00
Alexander Nozdrin
5cd54c5c39 Update version tag to 5.5.5-m3. 2010-04-10 12:24:06 +04:00
Mats Kindahl
0768deeb27 WL#5030: Splitting mysql_priv.h
Adding my_global.h first in all files using
NO_EMBEDDED_ACCESS_CHECKS.

Correcting a merge problem resulting from a changed definition
of check_some_access compared to the original patches.
2010-04-07 13:58:40 +02:00
Alexey Kopytov
5a274915ec Bug #52165: Assertion failed: file .\dtoa.c, line 465
The failing assertion was written with the assumption that a NULL
string can never be passed to my_strtod(). However, an empty string
may be passed under some circumstances by passing str == NULL and
*end == NULL.

Fixed the assertion to take the above case into account.
2010-04-07 13:59:02 +04:00
Mats Kindahl
2c79d4d02b WL#5030: Splitting mysql_priv.h
Adding include to build on Windows.
2010-04-06 23:00:01 +02:00
Mats Kindahl
a78fe75f92 WL#5030: Splitting mysql_priv.h
Adding includes of my_global.h that seems to be necessary on Windows.
2010-04-06 16:08:51 +02:00
Mats Kindahl
3467c1a7b2 WL#5030: Splitting mysql_priv.h
Moving an extern "C" to not cover #includes.
2010-04-06 14:11:07 +02:00
Mats Kindahl
2e28a449fa WL#5030: Splitting mysql_priv.h
- Adding include/mysql/innodb_priv.h which was missing before.
- Updated .bzrignore to ignore CMake generated cruft.
2010-04-06 12:55:36 +02:00
Mats Kindahl
df3349f0a4 WL#5030: Splitting mysql_priv.h
Minor fixes required because of changes since patches were developed.
2010-04-05 16:10:10 +02:00
Mats Kindahl
8a0c1ddc60 WL#5030: Split and remove mysql_priv.h
Fixing merge problem that causes CSV engine to misbehave.
2010-04-01 14:19:08 +02:00
Mats Kindahl
e409d6f69c WL#5030: Split and remove mysql_priv.h
This patch:

- Moves all definitions from the mysql_priv.h file into
  header files for the component where the variable is
  defined
- Creates header files if the component lacks one
- Eliminates all include directives from mysql_priv.h
- Eliminates all circular include cycles
- Rename time.cc to sql_time.cc
- Rename mysql_priv.h to sql_priv.h
2010-03-31 16:05:33 +02:00
Alexander Nozdrin
36430c53f9 Fix use of uninitialized variable. 2010-03-26 11:09:14 +03:00
Alexey Kopytov
1311b45a61 Fixed mysqld--help-win broken by the merge from trunk main. 2010-03-24 23:29:38 +03: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
Alexander Nozdrin
58d8bfab4f Auto-merge from mysql-trunk. 2010-03-24 11:14:54 +03: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
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
Sergey Glukhov
84917914e0 Bug#51242 HAVING clause on table join produce incorrect results
The problem is that when we make conditon for
grouped result const part of condition is cut off.
It happens because some parts of 'having' condition
which refer to outer join become const after
make_join_statistics. These parts may be lost
during further having condition transformation
in JOIN::exec. The fix is adding 'having'
condition check for const tables after
make_join_statistics is performed.
2010-03-19 13:09:22 +04:00
Andrei Elkin
30df18909c Bug #51648 DBUG_SYNC_POINT is not defined on all platforms and mtr cant pre-check that
DBUG_SYNC_POINT has at least one strong limitation that it's not defined
on all platforms. It has issues cooperating with @@debug.
All in all its functionality is superseded by DEBUG_SYNC facility and
there is no reason to maintain the old less flexible one.

Fixed with adding debug_sync_set_action() function as a facility to set up
a sync-action in the server sources code and re-writing existing simulations
(found 3) to use it.
Couple of tests have been reworked as well.

The patch offers a pattern for setting sync-points in replication threads
where the standard DEBUG_SYNC does not suffice to reach goals.
2010-03-19 11:06:40 +02:00
Alexey Kopytov
53afccc829 Manual merge. 2010-03-19 11:29:12 +03:00
Martin Hansson
d03133dccf Post-push fix to disable a subset of the test case for Bug#47762.
This has been back-ported from 6.0 as the problems proved to afflict 
5.1 as well.
The fix exposed two new bugs. They were reported as follows.
      
Bug no 52174: Sometimes wrong plan when reading a MAX value 
from non-NULL index
      
Bug no 52173: Reading NULL value from non-NULL index gives wrong 
result in embedded server 
      
Both bugs taken together affect a much smaller class of queries than #47762, 
so the fix stays for now.
2010-03-19 09:23:44 +01:00
Sergey Glukhov
879b705342 Bug#51598 Inconsistent behaviour with a COALESCE statement inside an IN comparison
Optimizer erroneously translated LEFT JOIN into INNER JOIN.
It leads to cutting rows with NULL right side. It happens
because Item_row uses not_null_tables() method form the
base(Item) class and does not calculate 'null tables'
properly. The fix is adding calculation of 'not null tables'
to Item_row.
2010-03-19 10:21:37 +04:00
Sergey Glukhov
bed0948145 Bug#51494 crash with join, explain and 'sounds like' operator
The crash happens because of discrepancy between values of
conts_tables and join->const_table_map(make_join_statisctics).
Calculation of conts_tables used condition with
HA_STATS_RECORDS_IS_EXACT flag check. Calculation of
join->const_table_map does not use this flag check.
In case of MERGE table without union with index
the table does not become const table and
thus join_read_const_table() is not called
for the table. join->const_table_map supposes
this table is const and later in make_join_select
this table is used for making&calculation const
condition. As table record buffer is not populated
it leads to crash.
The fix is adding a check if an engine supports
HA_STATS_RECORDS_IS_EXACT flag before updating
join->const_table_map.
2010-03-19 10:01:02 +04:00
Alexey Kopytov
aef97cadfa Bug #8433: Overflow must be an error
All numeric operators and functions on integer, floating point 
and DECIMAL values now throw an 'out of range' error rather 
than returning an incorrect value or NULL,  when the result is 
out of supported range for the corresponding data type. 
 
Some test cases in the test suite had to be updated 
accordingly either because the test case itself relied on a 
value returned in case of a numeric overflow, or because a 
numeric overflow was the root cause of the corresponding bugs. 
The latter tests are no longer relevant, since the expressions 
used to trigger the corresponding bugs are not valid anymore. 
However, such test cases have been adjusted and kept "for the 
record".
2010-03-18 13:38:29 +03:00
John H. Embretsen
3d89b6698c Bug#52060 - test udf fails on Snow Leopard
reverse DNS lookup of "localhost" returns "broadcasthost" on Snow Leopard, and NULL on most others.
Simply ignore the output, as this is not an essential part of UDF testing.
2010-03-18 11:26:27 +01:00
Omer BarNir
0d608d5b11 Test suites for engine testing, moved from test-extra so will be available
for general use.
2010-03-17 23:42:07 -07:00
Vladislav Vaintroub
78a965861a Bug #52149 - packaging differences in CMake build
Corrected some packaging bugs:
- install mysqlservices library
- install libmysqlclient_r.so.{16,16.0.0} as links
  to libmysqlclient.so
- install libmysqld-debug.a
- install my_safe_process, my_safe_kill and
  symlinks to mysql-test-run.pl (mtr, mysql-test-run)
  into correct place ${INSTALL_MYSQLTESTDIR}
2010-03-17 19:56:22 +01:00
Mats Kindahl
c14807a21a Merging with mysql-5.1-bugteam 2010-03-17 19:15:41 +01:00
Mats Kindahl
2773758986 BUG#49618: Field length stored incorrectly in binary log
for InnoDB
            
The class Field_bit_as_char stores the metadata for the
field incorrecly because bytes_in_rec and bit_len are set
to (field_length + 7 ) / 8 and 0 respectively, while
Field_bit has the correct values field_length / 8 and
field_length % 8.
            
Solved the problem by re-computing the values for the
metadata based on the field_length instead of using the
bytes_in_rec and bit_len variables.
            
To handle compatibility with old server, a table map
flag was added to indicate that the bit computation is
exact. If the flag is clear, the slave computes the
number of bytes required to store the bit field and
compares that instead, effectively allowing replication
*without conversion* from any field length that require
the same number of bytes to store.
2010-03-17 15:28:49 +01:00
Georgi Kodinov
d32f6b13b5 Bug #49838: DROP INDEX and ADD UNIQUE INDEX for same index may corrupt
definition at engine

If a single ALTER TABLE contains both DROP INDEX and ADD INDEX using 
the same index name (a.k.a. index modification) we need to disable 
in-place alter table because we can't ask the storage engine to have 
two copies of the index with the same name even temporarily (if we 
first do the ADD INDEX and then DROP INDEX) and we can't modify 
indexes that are needed by e.g. foreign keys if we first do 
DROP INDEX and then ADD INDEX.
Fixed the problem by disabling in-place ALTER TABLE for these cases.
2010-03-17 16:18:46 +02:00