Commit graph

63017 commits

Author SHA1 Message Date
Davi Arnaut
0d7c321540 Bug#54041: MySQL 5.0.92 fails when tests from Connector/C suite run
Fix a regression (due to a typo) which caused spurious incorrect
argument errors for long data stream parameters if all forms of
logging were disabled (binary, general and slow logs).
2010-07-30 09:17:10 -03:00
96e113b60a Bug #34283 mysqlbinlog leaves tmpfile after termination if binlog contains load data infile
With statement- or mixed-mode logging, "LOAD DATA INFILE" queries
are written to the binlog using special types of log events.
When mysqlbinlog reads such events, it re-creates the file in a
temporary directory with a generated filename and outputs a
"LOAD DATA INFILE" query where the filename is replaced by the
generated file. The temporary file is not deleted by mysqlbinlog
after termination.

To fix the problem, in mixed mode we go to row-based. In SBR, we
document it to remind user the tmpfile is left in a temporary
directory.
2010-07-30 11:59:34 +08:00
Vasil Dimov
2aee4d8ddd Merge mysql-5.1-innodb -> mysql-5.1-bugteam 2010-07-29 11:57:33 +03:00
Vasil Dimov
a95441c03a Merge mysql-5.1-bugteam -> mysql-5.1-innodb 2010-07-29 11:51:00 +03:00
Alexander Barkov
c7071a7214 Postfix for BUG#45012.
Problem: The original patch didn't compile on debug_werror
due to wrong format in printf("%d") for size_t variables.

Fix: Adding cast to (int).
2010-07-29 10:12:44 +04:00
2ad690fdf8 BUG#49124 Security issue with /*!-versioned */ SQL statements on Slave
/*![:version:] Query Code */, where [:version:] is a sequence of 5 
digits representing the mysql server version(e.g /*!50200 ... */),
is a special comment that the query in it can be executed on those 
servers whose versions are larger than the version appearing in the 
comment. It leads to a security issue when slave's version is larger 
than master's. A malicious user can improve his privileges on slaves. 
Because slave SQL thread is running with SUPER privileges, so it can
execute queries that he/she does not have privileges on master.

This bug is fixed with the logic below: 
- To replace '!' with ' ' in the magic comments which are not applied on
  master. So they become common comments and will not be applied on slave.

- Example:
  'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!99999 ,(3)*/
  will be binlogged as
  'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/
2010-07-29 11:00:57 +08:00
Davi Arnaut
ccf6ec093e Bug#53463: YaSSL patch appears to be reverted
The problem is that the fix Bug#29784 was mistakenly
reverted when updating YaSSL to a newer version.

The solution is to re-apply the fix and this time
actually add a meaningful test case so that possible
regressions are caught.
2010-07-28 12:59:19 -03:00
Bjorn Munch
56a1917b71 Bug #55597 MTR: Restart the server, from within the test case, with new CLI options.
The expect file can now include "restart:<server options>"
Also drop check-testcase if this has been done
2010-07-28 12:24:38 +02:00
Jimmy Yang
8d28ec7c77 Fix bug #55581 by backporting fix of #52546 from mysql-trunk-innodb
to mysql-5.1-innodb plugin.
2010-07-28 03:20:44 -07:00
Davi Arnaut
f860873c0d Bug#55501: Disable innodb plugin usage in the embedded server on certain OSes
Do not attempt to test the innodb plugin with the embedded server,
it's not supported for now.
2010-07-23 21:55:03 -03:00
Sven Sandberg
93324cbf0e merged BUG#55322 to 5.1-bugteam 2010-07-26 11:56:30 +02:00
Alexander Barkov
e497d6e6e1 Bug#45012 my_like_range_cp932 generates invalid string
Problem: The functions my_like_range_xxx() returned
badly formed maximum strings for Asian character sets,
which made problems for storage engines.

Fix: 
- Removed a number my_like_range_xxx() implementations,
  which were in fact dumplicate code pieces.
- Using generic my_like_range_mb() instead.
- Setting max_sort_char member properly for Asian character sets
- Adding unittest/strings/strings-t.c, 
  to test that my_like_range_xxx() return well-formed 
  min and max strings.

Notes:

- No additional tests in mysql/t/ available.
  Old tests cover the affected code well enough.
2010-07-26 09:06:18 +04:00
Vasil Dimov
6af3c0f947 Increment InnoDB Plugin version to 1.0.11.
InnoDB Plugin 1.0.10 has been released with MySQL 5.1.49.
2010-07-23 19:32:38 +03:00
Bjorn Munch
2994f8b7f1 Bug #55503 MTR fails to filter LEAK SUMMARY from valgrind report of restarted servers
Was not covered by "skip" pattern
Replace with a more generic pattern for SUMMARY
2010-07-23 14:53:09 +02:00
Alexey Kopytov
bb3fbba1af Bug #54476: crash when group_concat and 'with rollup' in
prepared statements

Using GROUP_CONCAT() together with the WITH ROLLUP modifier
could crash the server.

The reason was a combination of several facts:

1. The Item_func_group_concat class stores pointers to ORDER
objects representing the columns in the ORDER BY clause of
GROUP_CONCAT().

2. find_order_in_list() called from
Item_func_group_concat::setup() modifies the ORDER objects so
that their 'item' member points to the arguments list
allocated in the Item_func_group_concat constructor.

3. In some cases (e.g. in JOIN::rollup_make_fields) a copy of
the original Item_func_group_concat object could be created by
using the Item_func_group_concat::Item_func_group_concat(THD
*thd, Item_func_group_concat *item) copy constructor. The
latter essentially creates a shallow copy of the source
object. Memory for the arguments array is allocated on
thd->mem_root, but the pointers for arguments and ORDER are
copied verbatim.

What happens in the test case is that when executing the query
for the first time, after a copy of the original
Item_func_group_concat object has been created by
JOIN::rollup_make_fields(), find_order_in_list() is called for
this new object. It then resolves ORDER BY by modifying the
ORDER objects so that they point to elements of the arguments
array which is local to the cloned object. When thd->mem_root
is freed upon completing the execution, pointers in the ORDER
objects become invalid. Those ORDER objects, however, are also
shared with the original Item_func_group_concat object which is
preserved between executions of a prepared statement. So the
first call to find_order_in_list() for the original object on
the second execution tries to dereference an invalid pointer.

The solution is to create copies of the ORDER objects when
copying Item_func_group_concat to not leave any stale pointers
in other instances with different lifecycles.
2010-07-23 15:52:54 +04:00
Dmitry Shulga
32372a756f Merge 5.1-bugteam -> 5.1-bug-42496 2010-07-23 18:15:56 +07:00
Vasil Dimov
10870186e5 Merge mysql-5.1 -> mysql-5.1-innodb 2010-07-23 12:51:14 +03:00
kevin.lewis@oracle.com
11f6e69046 Merge 2010-07-22 11:17:26 -05:00
kevin.lewis@oracle.com
11b0caf1d6 Bug#49542 - Do as the comment suggests and downgrade directory errors from find_file() to a warning unless they happen during a SHOW command. 2010-07-22 11:15:15 -05:00
Georgi Kodinov
0e7e4a026b merge 2010-07-21 18:56:48 +03:00
Georgi Kodinov
98357570b4 merge 2010-07-21 18:54:11 +03:00
Georgi Kodinov
335a623c41 merge 2010-07-21 18:51:36 +03:00
Georgi Kodinov
681a028adc merge 2010-07-21 18:49:24 +03:00
Georgi Kodinov
142afb1fed merge 2010-07-21 18:36:10 +03:00
Georgi Kodinov
7a2293d192 merge 2010-07-21 18:34:20 +03:00
Georgi Kodinov
f07f225c75 merge 2010-07-21 18:31:28 +03:00
Georgi Kodinov
047d47241c Addendum #4 to bug #53095
SHOW DATABASES LIKE ... was not converting to lowercase on comparison as the
documentation is suggesting. 
Fixed it to behave similarly to SHOW TABLES LIKE ... and updated the failing
on MacOSX lowercase_table2 test case.
2010-07-21 18:05:57 +03:00
Alexey Kopytov
e675e4ab09 Automerge. 2010-07-21 14:14:11 +04:00
Joerg Bruehe
619a19fe52 Merge the version number increase (5.1.49 -> 5.1.50) into the main tree. 2010-07-21 12:09:50 +02:00
Dmitry Shulga
49d327ebf7 Fixed bug #42496 - the server could crash on a debug assert after a failure
to write into a closed socket
2010-07-21 14:56:43 +07:00
Davi Arnaut
c96b249fc3 Bug#45288: pb2 returns a lot of compilation warnings on linux
Fix warnings flagged by the new warning option -Wunused-but-set-variable
that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
option causes a warning whenever a local variable is assigned to but is
later unused. It also warns about meaningless pointer dereferences.
2010-07-20 15:07:36 -03:00
Davi Arnaut
d676c3ff0e Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5
due to GCC preprocessor change
      
The problem is that newer GCC versions treats missing headers
as fatal errors. The solution is to use a guard macro to prevent
the inclusion of system headers when checking the ABI with the
C Preprocessor.

Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638
           http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
2010-07-20 14:44:29 -03:00
Davi Arnaut
17b9155f00 Bug#54453: Failing assertion: trx->active_trans when renaming a
table with active trx

Essentially, the problem is that InnoDB does a implicit commit
when a cursor (table handler) is unlocked/closed, creating
a dissonance between the transaction state within the server
layer and the storage engine layer. Theoretically, a statement
transaction can encompass several table instances in a similar
manner to a multiple statement transaction, hence it does not
make sense to limit a statement transaction to the lifetime of
the table instances (cursors) used within it.

Since this particular instance of the problem is only triggerable
on 5.1 and is masked on 5.5 due 2PC being skipped (assertion is in
the prepare phase of a 2PC), the solution (which is less risky) is
to explicitly end the transaction before the cached table is unlock
on rename table.

The patch is to be null merged into trunk.
2010-07-20 14:36:15 -03:00
Sven Sandberg
cf5e69c904 BUG#55322: SHOW BINLOG EVENTS increases @@SESSION.MAX_ALLOWED_PACKET
Problem: when SHOW BINLOG EVENTS was issued, it increased the value of
@@session.max_allowed_packet. This allowed a non-root user to increase
the amount of memory used by her thread arbitrarily. Thus, it removes
the bound on the amount of system resources used by a client, so it
presents a security risk (DoS attack).

Fix: it is correct to increase the value of @@session.max_allowed_packet
while executing SHOW BINLOG EVENTS (see BUG 30435). However, the
increase should only be temporary. Thus, the fix is to restore the value
when SHOW BINLOG EVENTS ends.
The value of @@session.max_allowed_packet is also increased in
mysql_binlog_send (i.e., the binlog dump thread). It is not clear if this
can cause any trouble, since normally the client that issues
COM_BINLOG_DUMP will not issue any other commands that would be affected
by the increased value of @@session.max_allowed_packet. However, we
restore the value just in case.
2010-07-20 17:27:13 +02:00
Davi Arnaut
13f856f57b Merge of mysql-5.1 into mysql-5.1-bugteam. 2010-07-19 15:34:28 -03:00
Georgi Kodinov
32dcc26b33 fix tree names 2010-07-19 17:47:17 +03:00
MySQL Build Team
f0771195ed 5.1.49 push to mysql-5.1 2010-07-19 16:30:34 +02:00
Jon Olav Hauglid
4b2378a148 Bug #54734 assert in Diagnostics_area::set_ok_status
This assert checks that the server does not try to send OK to the
client if there has been some error during processing. This is done
to make sure that the error is in fact sent to the client.

The problem was that view errors during processing of WHERE conditions
in UPDATE statements where not detected by the update code. It therefore
tried to send OK to the client, triggering the assert.
The bug was only noticeable in debug builds.

This patch fixes the problem by making sure that the update code
checks for errors during condition processing and acts accordingly.
2010-07-19 11:03:52 +02:00
Davi Arnaut
0b83096be5 Bug#48327: Some crashes specific to FreeBSD ("embedded")
Bug#47139: Test "merge" crashes in "embedded" run

Backport patch for Bug#47139
2010-07-16 14:33:35 -03:00
Georgi Kodinov
d4931e4beb Addendum to bug #53814 : test results updates 2010-07-16 16:56:33 +03:00
Ramil Kalimullin
a9b8eb4255 Fix for bug #50667: The InnoDB plugin prevents initialization
of the "embedded" server

Problem: mysqltest_embedded failed to load ha_innodb_plugin library
on some platforms (due to some unresolved references).

Fix: on FreeBSD use -export-dynamic flag building mysqltest_embedded.
That allows to use its global symbols to resolve references in the
dynamically loaded plugin library.
2010-07-16 11:15:22 +04:00
Alexey Kopytov
a42108c291 Backport of the fix for bug#25421 to 5.0.
Calculating the estimated number of records for a range scan
may take a significant time, and it was impossible for a user
to interrupt that process by killing the connection or the
query.

Fixed by checking the thread's 'killed' status in
check_quick_keys() and interrupting the calculation process if
it is set to a non-zero value.
2010-07-15 10:10:16 +04:00
Alexey Kopytov
e59f416691 Bug#55061: Build failing on sol 8 x86 - assembler code vs
compiler problem

GCC-style inline assembly is not supported by the Sun Studio
compilers prior to version 12.

Added a check for the Sun Studio version to avoid using 
_FPU_GETCW() / _FPU_SETCW() when inline assembly is
 unsupported. This can lead to some differences in floating
point calculations on Solaris 8/x86 which, however, is not worth
bothering with Sun-style assembly .il templates.
2010-07-12 18:58:55 +04:00
Mattias Jonsson
6433a55356 merge 2010-07-09 15:00:33 +02:00
Mattias Jonsson
70e490430f merge 2010-07-09 14:59:40 +02:00
Davi Arnaut
147963007b Remove AC_LANG_WERROR, it causes trouble earlier versions
of autoconf and is not strictly needed for now.
2010-07-09 09:51:21 -03:00
karen.langford@oracle.com
8349522bde Fix bug #55039 Failing assertion: space_id > 0 in fil0fil.c. 2010-07-09 14:23:48 +02:00
Georgi Kodinov
5e4fe83272 Addendum #2 to bug #53095 : fixed a bad testcase result. 2010-07-09 15:17:47 +03:00
Vasil Dimov
23648f7935 Merge mysql-5.1 -> mysql-5.1-innodb
(no changes introduced by this merge)
2010-07-09 15:15:09 +03:00
Davi Arnaut
ed9ffc6b09 Bug#45288: pb2 returns a lot of compilation warnings on linux
Although the C standard mandates that sprintf return the number
of bytes written, some very ancient systems (i.e. SunOS 4)
returned a pointer to the buffer instead. Since these systems
are not supported anymore and are hopefully long dead by now,
simply remove the portability wrapper that dealt with this
discrepancy. The autoconf check was causing trouble with GCC.
2010-07-09 09:00:17 -03:00