Commit graph

71406 commits

Author SHA1 Message Date
Tor Didriksen
f325fc42e8 Bug#14300733 CMAKE DOES NOT CHECK FOR ZLIB VERSION
Add check for compressBound() and deflateBound()
Keep existing functionality: fallback to bundled zlib if functions not found.
2013-02-20 11:24:16 +01:00
Satya Bodapati
8b129a8b41 Testcase fix for Bug#14147491
move_file fails randomly on windows if the destination file exists.
Using remove_file before move_file mtr test command.
2013-02-21 12:16:59 +05:30
Satya Bodapati
6ca27ddec0 Testcase fix for BUG#14147491
The random failure will be fixed by Bug#16263506 and this patch

Approved by Marko. rb#1988
2013-02-20 18:25:18 +05:30
Sujatha Sivakumar
1048aed515 Merge from mysq-5.1 to mysql-5.5 2013-02-19 14:36:30 +05:30
Sujatha Sivakumar
4d494b1726 Bug#11746817:MYSQL_INSTALL_DB CREATES WILDCARD GRANTS WHEN
HOST HAS '_' IN THE HOSTNAME

Problem:
=======
'_' and '%' are treated as a wildcards by the ACL code and
this is documented in the manual. The problem with
mysql_install_db is that it does not take this into account
when creating the initial GRANT tables:

--- cut ---
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',
0,0,0,0 FROM dual WHERE LOWER( @current_hostname) != 'localhost';
--- cut ---

If @current_hostname contains any wildcard characters, then 
a wildcard entry will be defined for the 'root' user, 
which is a flaw.

Analysis:
========
As per the bug description when we have a hostname with a
wildcard character in it, it allows clients from several other
hosts with similar name pattern to connect to the server as root.
For example, if the hostname is like 'host_.com' then the same
name is logged in mysql.user table. This allows 'root' users
from other hosts like 'host1.com', 'host2.com' ... to connect
to the server as root user.

While creating the intial GRANT tables we do not have a check
for wildcard characters in hostname.

Fix:
===
As part of fix escape character "\" is added before wildcard
character to make it a plain character, so that the one and
only host with the exact name will be able to connect to the
server.

scripts/mysql_system_tables_data.sql:
  while creating default users get the hostname and
  replace the wildcard characters within the hostname after
  escaping them.
2013-02-19 14:31:11 +05:30
Harin Vadodaria
cc85d62c68 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Merge from 5.1.
2013-02-19 12:19:10 +05:30
Harin Vadodaria
c401365423 Bug#16235681: TURN OFF DEFAULT COMPRESSION WHILE USING
OPENSSL

Description: Specify preference to disable compression
             while using OpenSSL library. OpenSSL uses
             zlib compression by default which may
             lead to some problems.
2013-02-19 12:17:31 +05:30
Annamalai Gurusami
9a989c57de Null merge from mysql-5.1 to mysql-5.5 2013-02-19 10:59:45 +05:30
unknown
8ea6ed92eb 2013-02-19 10:55:55 +05:30
Shivji Kumar Jha
85c299dd98 BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2,
PLATFORM= MACOSX10.6 X86_64 MAX

            post push fix
2013-02-19 01:58:57 +05:30
Pedro Gomes
9054179b25 BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
Null merge
2013-02-18 17:06:00 +00:00
Pedro Gomes
e8e63d463f BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
Post-push fix, broken build:
sql/rpl_master.cc:1049:70: error: converting ‘false’ to pointer type ‘bool*’ [-Werror=conversion-null]
2013-02-18 17:02:26 +00:00
Anirudh Mangipudi
4061d719ec Bug #12546953 "SHOW VARIABLES LIKE 'DATADIR';" RETURN EMPTY.
Problem:
===========================================================
If mysqld daemon is started without a --datadir option
option, and we issue the SHOW VARIABLES LIKE 'DATADIR';SQL command
at the client it returns an empty path. This is because
mysql_real_data_home_ptr is being reset to NULL by Sys_var_charptr
constructor call when the datadir is not given either through
configuration file (no-defaults) or through mysqld parameters.

Solution:
===========================================================
mysql_real_data_home is an array which stores the path of the datadir
and mysql_real_data_home_ptr is the pointer to it. The pointer is
being set to NULL at the Sys_datadir, which is of type Sys_var_charptr,
constructor call. This is because at Sys_datadir call the def_val 
parameter was being passed with DEFAULT(0) which is now replaced with
DEFAULT(mysql_real_data_home). The patch has been tested manually as it
is not possible to start mtr without a default config file.
2013-02-18 19:13:06 +05:30
Tor Didriksen
f144e0fead BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
Post-push fix, broken build:
sql/rpl_master.cc:1049:70: error: converting ‘false’ to pointer type ‘bool*’ [-Werror=conversion-null]
2013-02-18 11:12:24 +01:00
unknown
66eeaad6b8 2013-02-18 11:13:48 +05:30
Shivji Kumar Jha
ae5951d395 BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2,
PLATFORM= MACOSX10.6 X86_64 MAX

bzr merge 5.1=>5.5
2013-02-17 01:45:10 +05:30
Shivji Kumar Jha
5fcf40a2aa BUG#15965353- RPL.RPL_ROW_UNTIL FAILS ON PB2,
PLATFORM= MACOSX10.6 X86_64 MAX

Problem: The test was failing on pb2's mac machine because
         it was not cleaned up properly. The test checks if
         the command 'start slave until' throws a proper
         error when issued with a wrong number/type of
         parameters. After this,the replication stream was
         stopped using the include file 'rpl_end.inc'.
         The errors thrown earlier left the slave in an
         inconsistent state to be closed by the include
         file which was caught by the mac machine.

Fix: Started slave by invoking start_slave.inc to have a
     working slave before calling rpl_reset.inc

Problem: The test file was not in a good shape. It tested
         start slave until relay log file/pos combination 
         wrongly. A couple of commands were executed at 
         master and replicated at slave. Next, the 
         coordinates in terms of relay log file and pos 
         were noted down followed by reset slave and start
         slave until saved relay log file/pos. Reset slave
         deletes  all relay log files and makes the slave 
         forget its replication position. So, using the 
         saved coordiantes after reset slave is wrong.

Fix: Split the test in two parts:
     a) Test for start slave until master log file/pos and
        checking for correct errors in the failure 
        scenarios.
     b) Test for start slave until relay log file/pos.

Problem: The variables auto_increment_increment and 
         auto_increment_offset were set in the the include
         file rpl_init.inc. This was only configured for 
         some connections that are rarely used by test 
         cases, so likely that it will cause confusion. 
         If replication tests want to setup these variables
         they should do so explicitly.

Fix:
     a) Removed code to set the variables
        auto_increment_increment and auto_increment_offset
        in the include file.
     b) Updated tests files using the same.
2013-02-17 01:42:28 +05:30
Pedro Gomes
91e043c304 BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
Merge from mysql 5.1 to mysql 5.5
2013-02-15 22:18:37 +00:00
Pedro Gomes
7e8c887786 BUG#13545447: RPL_ROTATE_LOGS FAILS DUE TO CONCURRENCY ISSUES IN REP. CODE
In method mysql_binlog_send, right after detecting a EOF in the
read event loop, and before deciding if we should change to a new
binlog file there is a execution window where new events can be
written to the binlog and a rotation can happen. When reaching
the test, the function will then change to a new binlog file
ignoring all the events written in this window. This will result
in events not being replicated.

Only when the binlog is detected as deactivated in the event loop
of the dump thread, can we really know that no more events
remain. For this reason, this test is now made under the log lock
in the beginning of the event loop when reading the events.
2013-02-15 21:57:35 +00:00
Alexander Nozdrin
776b569795 Bug#16056537: MYSQLD CRASHES IN ITEM_FUNC_GET_USER_VAR::FIX_LENGTH_AND_DEC()
The technical problem was that THD::user_var_events_alloc was reset to NULL
from a valid value when a stored program is executed during the PREPARE statement.

The user visible problem was that the server crashed if user issued a PREPARE
statement using some combination of stored functions and user variables.

The fix is to restore THD::user_var_events_alloc to the original value.
This is a minimal fix for 5.5.

More proper patch has been already implemented for 5.6+. It avoids
evaluation of stored functions for the PREPARE phase.

From the user point of view, this bug is a regression, introduced by the patch for WL2649
(Number-to-string conversions), revid: bar@mysql.com-20100211041725-ijbox021olab82nv
However, the code resetting THD::user_var_events_alloc exists even in 5.1.
The WL just changed the way arguments are converted to strings and the bug became visible.
2013-02-15 16:01:37 +04:00
Harin Vadodaria
f824defb36 Bug#16218104: MYSQL YASSL - LUCKY THIRTEEN: BREAKING THE
TLS AND DTLS RECORD PROTOCOLS

Description: Merge from 5.1.
2013-02-15 12:37:21 +05:30
Harin Vadodaria
795b8acc2a Bug#16218104: MYSQL YASSL - LUCKY THIRTEEN: BREAKING THE
TLS AND DTLS RECORD PROTOCOLS

Description: In yassl, decryption phase in TLS protocol
             depends on type of padding. This patch
             removes this dependancy and makes error
             generation/decryption process independent
             of padding type.
2013-02-15 12:35:54 +05:30
Shivji Kumar Jha
a6a86f8880 BUG#12359942- REPLICATION TEST FROM ENGINE SUITE RPL_ROW_UNTIL TIMES OUT
post push fix: 
rpl_stm_until.test was disabled because of
this bug. Enabled and fixed it.

Removed a part of the test that was obsolete.
It tested replication from 4.0 master to 5.0
slave.
2013-02-15 00:40:32 +05:30
Shivji Kumar Jha
eb3814b0b3 BUG#12359942- REPLICATION TEST FROM ENGINE SUITE RPL_ROW_UNTIL TIMES OUT
post push fix: 
rpl_stm_until.test was disabled because of
this bug. Enabled and fixed it.

Removed a part of the test that was obsolete.
It tested replication from 4.0 master to 5.0
slave.
2013-02-15 00:38:42 +05:30
Mattias Jonsson
e96182824d Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHEN
DOWNGRADED FROM 5.6.11 TO 5.6.10

Problem was new syntax not accepted by previous version.

Fixed by adding version comment of /*!50531 around the
new syntax.

Like this in the .frm file:
'PARTITION BY KEY /*!50611 ALGORITHM = 2 */ () PARTITIONS 3'
and also changing the output from SHOW CREATE TABLE to:
CREATE TABLE t1 (a INT)
/*!50100 PARTITION BY KEY */ /*!50611 ALGORITHM = 1 */ /*!50100 ()
PARTITIONS 3 */

It will always add the ALGORITHM into the .frm for KEY [sub]partitioned
tables, but for SHOW CREATE TABLE it will only add it in case it is the non
default ALGORITHM = 1.

Also notice that for 5.5, it will say /*!50531 instead of /*!50611, which
will make upgrade from 5.5 > 5.5.31 to 5.6 < 5.6.11 fail!
If one downgrades an fixed version to the same major version (5.5 or 5.6) the
bug 14521864 will be visible again, but unless the .frm is updated, it will
work again when upgrading again.

Also fixed so that the .frm does not get updated version
if a single partition check passes.
2013-02-14 17:03:49 +01:00
Annamalai Gurusami
84ef847056 Merge from mysql-5.1 to mysql-5.5 2013-02-14 16:35:40 +05:30
Annamalai Gurusami
5d47242dde For the error code ER_TOO_LONG_IDENT, the identifier is expected in the my_error call. So removing this line from here. 2013-02-14 16:33:31 +05:30
Annamalai Gurusami
b2e8e0de4f Merge from mysql-5.1 to mysql-5.5. 2013-02-12 15:35:56 +05:30
Annamalai Gurusami
8aecb30cdd Bug #11753153 INNODB GENERATES SYMBOLS THAT ARE TOO LONG, INVALID DDL
FROM SHOW CREATE

Problem: The length of the internally generated foreign key name 
is not checked. 

Solution: The length of the internally generated foreign key name is
checked.  If it is greater than the allowed limit, an error message
is reported. Also, the constraint name is printed in the same manner
as the table name, using the system charset information.

rb://1969 approved by Marko.
2013-02-12 14:52:48 +05:30
Venkatesh Duggirala
b0f78ea278 BUG#16247322-MTR NOT RUNNING SYS_VARS TEST SUITE FOR 5.1
Reverting back the previous changes as they are causing
issues in PB2.
2013-02-08 16:34:32 +05:30
Venkatesh Duggirala
7557fc6c0f BUG#16247322-MTR NOT RUNNING SYS_VARS TEST SUITE FOR 5.1
Problem: Sys_vars suite is disabled in mysql-5.1 branch.
Fix: To enable sys_vars suite in mysql-5.1, add it in
mysql-test-run.pl file and also sys_vars suite should be
added to Makefile.am inorder to get that test directory
2013-02-08 15:41:18 +05:30
Marko Mäkelä
c65dabaf8e Add missing linkage specifiers, so that ha_innodb_plugin.so
will not export internal symbols.
2013-02-08 09:23:12 +02:00
Marko Mäkelä
a6fb71e249 Bug#16292043 RACE CONDITION IN SRV_EXPORT_INNODB_STATUS() WHEN ACCESSING PURGE_SYS->VIEW
srv_export_innodb_status(): Read the purge_sys fields while holding
purge_sys->latch.

Approved by Sunny Bains
2013-02-08 09:22:46 +02:00
Igor Solodovnikov
b7cfe73fa5 bug#14163155 COM_CHANGE_USER DOESN'T WORK WITH CHARACTER-SET-SERVER=UCS2 IN
5.1 SERVER

Problem was caused by the COM_CHANGE_USER parsing code. That code ignored
character set number passed in COM_CHANGE_USER packet. Instead
character_set_client values was used. User name was not converted at all.

Fixed by using passed character set number to convert both db and user names.
If COM_CHANGE_USER does not contain character set number then
character_set_client is used to convert both names.
2013-02-07 19:46:08 +02:00
Tor Didriksen
e908e9bc7e Bug#16192219 CRASH IN TEST_IF_SKIP_SORT_ORDER ON SELECT DISTINCT WITH ORDER BY
This is a backport of the fix for:

Bug#13633549 HANDLE_FATAL_SIGNAL IN TEST_IF_SKIP_SORT_ORDER/CREATE_SORT_INDEX
Don't invoke the range optimizer for a NULL select.
2013-02-07 17:05:07 +01:00
Venkatesh Duggirala
06400b63e7 Bug#16247322- MTR NOT RUNNING SYS_VARS TEST
SUITE FOR 5.1

SYS_VARS suite is not enabled in MTR by default
run. Enabling it with this check-in.

mysql-test/suite/sys_vars/t/disabled.def:
  Till the bugs are fixed, disabling the failed test scripts
2013-02-07 17:23:37 +05:30
unknown
3d7f52255b BUG #13625278 - PB2 SHOULD PROVIDE MORE USEFUL INFORMATION FOR TIMEOUTS 2013-02-06 13:02:14 +05:30
unknown
1e4aaba5ed Merge from mysql-5.1.68-release 2013-02-05 20:47:45 +01:00
unknown
a2be7d26a8 BUG #13625278 - PB2 SHOULD PROVIDE MORE USEFUL INFORMATION FOR TIMEOUTS 2013-02-05 11:58:21 +05:30
unknown
ddb60a719b Bug #16190704: MTR STILL LOSES THE FAILED RUN LOGS AT RETRY-FAIL 2013-02-04 20:25:30 +05:30
Mattias Jonsson
2df2e2617c post-push test result update for bug#14521864. 2013-02-04 14:09:48 +01:00
Venkatesh Duggirala
c179355f5d BUG#16247322-MTR NOT RUNNING SYS_VARS TEST SUITE FOR 5.1
Null merge from mysql-5.1
2013-02-08 16:36:47 +05:30
Venkatesh Duggirala
ae04fc7c5d BUG#16247322-MTR NOT RUNNING SYS_VARS TEST SUITE FOR 5.1
Null merge from mysql-5.1
2013-02-08 15:42:36 +05:30
Marko Mäkelä
bf4c0a1a46 Merge mysql-5.1 to mysql-5.5. 2013-02-08 09:33:21 +02:00
Igor Solodovnikov
39025d2a61 Null-merge from mysql-5.1 2013-02-07 19:46:45 +02:00
Tor Didriksen
b13d0a093d merge 5.1 => 5.5 2013-02-07 17:08:59 +01:00
Venkatesh Duggirala
506b40cd56 Bug #16247322 MTR NOT RUNNING SYS_VARS TEST SUITE FOR 5.1
Null-Merge from mysql-5.5
2013-02-07 17:27:32 +05:30
unknown
6f83811d25 Bug#16263506 - INNODB; USE ABORT() ON ALL PLATFORMS INSTEAD OF
DEREFERENCING UT_DBG_NULL_PTR
The abort() call is standard C but InnoDB only uses it in GCC
environments.  UT_DBG_USE_ABORT is not defined the code crashed
by dereferencing a null pointer instead of calling abort().
Other code throughout MySQL including ndb, sql, mysys and other
places call abort() directly.

This bug also affects innodb.innodb_bug14147491.test which fails
randomly on windows because of this issue. 

Approved by marko in http://rb.no.oracle.com/rb/r/1936/
2013-02-06 13:49:56 -06:00
Ravinder Thakur
6823ac913e Bug#14711808 MSI INSTALLATION / UPGRADE CAN CORRUPT EXISTING INSTALLATION
Currently MySQL MSI installer on Windows installs MySQL in 
"per user" mode. It means that if a Windows machine has 
multiple users, they each can install MySQL independently. 
However the default path of MySQL is "C:\Program Files (x86)\MySQL\"
and when two users install MySQL on same machine, the installation
by second user just overwrites the MySQL files. This default shared 
location leads to the issue where if the second user uninstalls MySQL,
the installation files are removed for the first user as well.

In this fix, we are now making the default installation "per machine".
It means that when MySQL is installed with defaults options, all
users can see the shortcuts for MySQL in start menu(since installations 
is for all users). Also when any user relaunches the installer, it will 
consider that action uninstallation rather than installation for that user.

There are command line options in installer that can be used to undo the
"per machine" installation but will not consider that scenario.MySQL 
is a server product and it does not make a lot of sense to install it
differently for each user.
2013-02-06 13:52:32 +05:30
unknown
5948623ed3 13625278 5.1 => 5.5 2013-02-06 13:04:41 +05:30