Commit graph

59197 commits

Author SHA1 Message Date
Georgi Kodinov
8dd687c627 Bug #50642 : ssl certs in test suite are expiring soon.
Updated the certs to expire on 2015. 
Made sure they work with both yassl and openssl.
2010-01-29 15:55:46 +02:00
Ramil Kalimullin
221cdc4084 Fix for bug#49897: crash in ptr_compare when char(0) NOT NULL
column is used for ORDER BY

Problem: filesort isn't meant for null length sort data
(e.g. char(0)), that leads to a server crash.

Fix: disregard sort order if sort data record length is 0 (nothing
to sort).
2010-01-29 13:17:57 +04:00
Davi Arnaut
d7797f51ec Bug#50423: Crash on second call of a procedure dropping a trigger
The problem was that a DROP TRIGGER statement inside a stored
procedure could cause a crash in subsequent invocations. This
was due to the addition, on the first execution, of a temporary
table reference to the stored procedure query table list. In
a subsequent invocation, there would be a attempt to reinitialize
the temporary table reference, which by then was already gone.

The solution is to backup and reset the query table list each
time a trigger needs to be dropped. This ensures that any temp
changes to the query table list are discarded. It is safe to
do so at this time as drop trigger is restricted from more
complicated scenarios (ie, not allowed within stored functions,
etc).
2010-01-28 12:41:14 -02:00
Joerg Bruehe
f89f6c3036 Upmerge a merge changeset, no contents changes. 2010-02-12 18:46:32 +01:00
Joerg Bruehe
d879fa71d7 Merge from central branch, preparing for push. 2010-02-12 18:33:07 +01:00
Joerg Bruehe
a02157aea2 Correction: The "release" setting had got lost in the RPM spec file. 2010-02-12 17:23:22 +01:00
Sergey Vojtovich
d48d71b804 Merge fix for BUG48438 to mysql-5.1-bugteam. 2010-02-12 16:47:43 +04:00
Sergey Vojtovich
1d2a8e7175 Merge fix for BUG48757 to mysql-5.1-bugteam. 2010-02-12 16:38:00 +04:00
Sergey Vojtovich
c977a00b48 Merge fix for BUG49628 to mysql-5.1-bugteam. 2010-02-12 16:37:05 +04:00
Sergey Vojtovich
d605ba0306 BUG#48757 - missing .ARZ file causes server crash
Server crashes when accessing ARCHIVE table with missing
.ARZ file.

When opening a table, ARCHIVE didn't properly pass through
error code from lower level azopen() to higher level open()
method.
2010-02-12 16:33:03 +04:00
Sergey Vojtovich
55a3e3a0b0 BUG#49628 - corrupt table after legal SQL, LONGTEXT column
Bulk REPLACE or bulk INSERT ... ON DUPLICATE KEY UPDATE may
break dynamic record MyISAM table.

The problem is limited to bulk REPLACE and INSERT ... ON
DUPLICATE KEY UPDATE, because only these operations may
be done via UPDATE internally and may request write cache.

When flushing write cache, MyISAM may write remaining
cached data at wrong position. Fixed by requesting write
cache to seek to a correct position.
2010-02-12 16:30:04 +04:00
Sergey Vojtovich
e766c177bb BUG#48438 - crash with error in unioned query against merge
table and view...

Invalid memory reads after a query referencing MyISAM table
multiple times with write lock. Invalid memory reads may
lead to server crash, valgrind warnings, incorrect values
in INFORMATION_SCHEMA.TABLES.{TABLE_ROWS, DATA_LENGTH,
INDEX_LENGTH, ...}.

This may happen when one of the table instances gets closed
after a query, e.g. out of slots in open tables cache. UNION,
MERGE and VIEW are irrelevant.

The problem was that MyISAM didn't restore state info
pointer to default value.
2010-02-12 15:28:38 +04:00
Sergey Glukhov
7ac39b12cf automerge 2010-02-12 14:11:13 +04:00
Sergey Glukhov
18303b70c6 Bug#48294 assertion when creating a view based on some row() construct in select query
In case of 'CREATE VIEW' subselect transformation does not happen(see JOIN::prepare).
During fix_fields Item_row may call is_null() method for its arugmens which
leads to item calculation(wrong subselect in our case as
transformation did not happen before). This is_null() call
does not make sence for 'CREATE VIEW'.
Note:
Only Item_row is affected because other items don't call is_null() 
during fix_fields() for arguments.
2010-02-12 13:44:20 +04:00
Davi Arnaut
0ee625fa1f Move test case. Embedded server does not support privilege
related bits.
2010-02-12 00:54:14 -02:00
Joerg Bruehe
16e60ff563 Upmerge changes done to the generic spec file in 5.0 to 5.1,
this includes a major whitespace (formatting) alignment
and sequence changes to better agree with other spec files.

Further changes:
- All features are controlled by "%define" set from call
  options or builtin.
- "bundled zlib" is on by default.
- "with libgcc" is controlled by runtime detection of gcc.
- Handling of "CFLAGS" and "CXXFLAGS" is more concentrated.
- Several missing man pages were added.
2010-02-11 21:33:48 +01:00
Georgi Kodinov
5107f6b9b4 Addendum to bug #46175 : use and check for the correct error values
when converting to a enumerated type.
2010-02-11 19:41:53 +02:00
Davi Arnaut
be632a2f5a Bug#48449: hang on show create view after upgrading when view contains function of view
SHOW CREATE TABLE on a view (v1) that contains a function whose
statement uses another view (v2), could trigger a infinite loop
if the view referenced within the function causes a warning to
be raised while opening the said view (v2).

The problem was a infinite loop over the stack of internal error
handlers. The problem would be triggered if the stack contained
two or more handlers and the first two handlers didn't handle the
raised condition. In this case, the loop variable would always
point to the second handler in the stack.

The solution is to correct the loop variable assignment so that
the loop is able to iterate over all handlers in the stack.
2010-02-10 16:11:08 -02:00
Bjorn Munch
cf72d8679a merge 49210 2010-01-28 15:19:18 +01:00
Tor Didriksen
c850371d37 Bug #50271: Debug output of JOIN structures is garbled 2010-01-28 12:10:57 +01:00
Ramil Kalimullin
f546069d94 Auto-merge. 2010-01-29 15:08:49 +04:00
Georgi Kodinov
5de67f2045 Bug #49552 : sql_buffer_result cause crash + not found records
in multitable delete/subquery

SQL_BUFFER_RESULT should not have an effect on non-SELECT 
statements according to our documentation.
Fixed by not passing it through to multi-table DELETE (similarly
to how it's done for multi-table UPDATE).
2010-01-29 11:36:28 +02:00
Davi Arnaut
b5d307e85c Fix for compiler warnings:
Rename method as to not hide a base.
Reorder attributes initialization.
Remove unused variable.
Rework code to silence a warning due to assignment used as truth value.
2010-01-28 19:51:40 -02:00
Andrei Elkin
a5618bfa15 merging from 5.1-bt to a local bugfix branch 2010-01-28 12:22:19 +02:00
Andrei Elkin
df0d350d1f merging from 5.1-bt to a local bugfix branch 2010-01-28 11:51:57 +02:00
Andrei Elkin
67b8cb0d1f bug#47142
merging patches prepared for 5.0 to 5.1-bt. That caused a few changes in the test file
2010-01-27 19:27:49 +02:00
Bjorn Munch
f363fece5e Bug #49210 Enable MTR timeout configuration through environment variables
Define env. vars for both timeout settings
Also incorporated 5.0 patch into mtr version 1
2010-01-27 16:32:59 +01:00
Staale Smedseng
7d5bb84a9a Bug #49223 Change help description for mysqldump
--extended-insert

Help message changed to the same as in the 5.1 online 
documentation.
2010-01-27 16:13:39 +01:00
Bjorn Munch
6e351da89b Bug #49210 Enable MTR timeout configuration through environment variables
Define env. vars for both timeout settings
  This patch is for 5.0 (mtr v1) and should replaces for 5.1 up
2010-01-27 15:21:41 +01:00
Andrei Elkin
f13ebe1252 bug#47142
improving comments
2010-01-27 15:20:03 +02:00
Davi Arnaut
3990858bc7 Bug#47734: Assertion failed: ! is_set() when locking a view with non-existing definer
The problem was that a failure to open a view wasn't being
properly handled. When opening a view with unknown definer,
the open procedure would be treated as successful and would
later crash when attempting to lock the view (which wasn't
opened to begin with).

The solution is to skip further processing when opening a
table if it fails with a fatal error.
2010-01-27 11:10:53 -02:00
Staale Smedseng
c1a6dc5084 Bug #47905 stored procedures with conditional statements not
being logged to slow query log

The problem is that the execution time for a multi-statement
stored procedure as a whole may not be accurate, and thus not
be entered into the slow query log even if the total time
exceeds long_query_time. The reason for this is that
THD::utime_after_lock used for time calculation may be reset
at the start of each new statement, possibly leaving the total
SP execution equal to the time spent executing the last
statement in the SP.

This patch stores the utime on start of SP execution, and
restores it on exit of SP execution. A test is added.
2010-02-11 21:10:13 +01:00
Martin Hansson
83b40ad9e4 Merge of Bug#49534 2010-02-11 15:56:24 +01:00
Martin Hansson
2a22dc2e01 Bug#49534: multitable IGNORE update with sql_safe_updates
error causes debug assertion

The IGNORE option of the multiple-table UPDATE command was
not intended to suppress errors caused by the
sql_safe_updates mode. This flag will raise an error if the
execution of UPDATE does not use a key for row retrieval,
and should continue do so regardless of the IGNORE option.

However the implementation of IGNORE does not support
exceptions to the rule; it always converts errors to
warnings and cannot be extended. The Internal_error_handler
interface offers the infrastructure to handle individual
errors, making sure that the error raised by
sql_safe_updates is not silenced.

Fixed by implementing an Internal_error_handler and using it
for UPDATE IGNORE commands.
2010-02-10 15:37:34 +01:00
Magne Mahre
e17fe14c81 WL#5182 Remove more deprecated 4.1/5.0 features
WL#5182 is a follow-up to WL#5154, deprecating a few more options
and system variables.
2010-01-27 13:23:28 +01:00
Staale Smedseng
b55d41cb6a Merging from 5.0-bugteam 2010-01-27 11:42:20 +01:00
Staale Smedseng
e3dd88c856 Bug#50409 Solaris 8 compatibility broken by assumption about
printstack() being present

When Bug#47391 was fixed, no assumption was made that support
for Solaris 8 was needed. Solaris 8 lacks printstack(), and 
the build breaks because of this.

This patch adds a test for the presence of printstack() to
configure.in for 5.0, and uses HAVE_PRINTSTACK to make
decisions rather than the __sun define.
2010-01-27 11:38:50 +01:00
73cfad9ff4 Bug #49191 rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
The 'rpl_get_master_version_and_clock' test verifies if the slave I/O
thread tries to reconnect to master when it tries to get the values of
the UNIX_TIMESTAMP, SERVER_ID from master under network disconnection.
So the master server is restarted for making the transient network
disconnection, during the period the COM_REGISTER_SLAVE failures are
produced in server log file when the slave I/O thread tries to
register on master.

To fix the problem, suppress COM_REGISTER_SLAVE failures in server log
file by mtr suppression, because they are expected.
2010-01-27 10:52:13 +08:00
Davi Arnaut
60fc7967df Bug#49491: Much overhead for MD5() and SHA1() on short strings
MySQL's hash functions MD5 and SHA relied on the somewhat slow 
sprintf function to convert the digests to hex representations.
This patch replaces the sprintf with a specific and inline hex
conversion function.

Patch contributed by Jan Steemann.
2010-01-26 15:05:19 -02:00
Luis Soares
b9d94d2a09 automerge: mysql-5.1-bugteam branch --> mysql-5.1-bugteam latest
NOTE: added TODO to the comments requested by reviewer during this
      merge.
2010-01-26 08:55:22 +00:00
Georgi Kodinov
93dda2c670 fix a windows test run bug with debug binaries : dbug frame
should be exited before destroying the thread local storage.
2010-01-26 10:47:43 +02:00
Andrei Elkin
1c0056b3ba Bug #47142 "slave start until" stops 1 event too late in 4.1 to 5.0 replication
When replicating from 4.1 master to 5.0 slave START SLAVE UNTIL can stop too late.
The necessary in calculating of the beginning of an event the event's length
did not correspond to the master's genuine information at the event's execution time.
That piece of info was changed at the event's relay-logging due to binlog_version<4 event
conversion by IO thread.

Fixed with storing the master genuine Query_log_event size into a new status
variable at relay-logging of the event. The stored info is extacted at the event
execution and participate further to caclulate the correct start position of the event
in the until-pos stopping routine.
The new status variable's algorithm will be only active when the event comes
from the master of version < 5.0 (binlog_version < 4).
2010-01-25 17:46:48 +02:00
Bjorn Munch
efd5ecb0e0 Bug #50182 mtr: allow $MTR_PORT_BASE or --port-base= as alternative to MTR_BUILD_THREAD
As suggested, convert internally to value of build_thread
2010-01-25 11:20:52 +01:00
8a66b424f3 Manual merge with Conflicts:
sql_udf.cc
2010-01-25 10:55:05 +08:00
He Zhenxing
6bf8c119fe Backport Bug#37148 to 5.1 2010-01-24 15:03:23 +08:00
Bernd Ocklin
bcc97357f1 fix LD_LIBRARY_PATH (bug#50540) 2010-01-22 14:12:17 +01:00
Sergey Vojtovich
a365016f8b Merge InnoDB snapshot with mysql-5.1-bugteam. 2010-01-22 16:26:17 +04:00
Sergey Vojtovich
58ebdfaec0 Applying InnoDB snapshot, fixes BUG#49396.
Detailed revision comments:

r6471 | calvin | 2010-01-16 01:43:27 +0200 (Sat, 16 Jan 2010) | 4 lines
branches/5.1: fix bug#49396: main.innodb test fails in embedded mode

Change replace_result by using $MYSQLD_DATADIR. Tested in both embedded
mode and normal server mode.
2010-01-22 16:23:27 +04:00
Sergey Glukhov
ed79d2ecbb Bug#49501 Inefficient information_schema check (system collation), addon
removed wrongly introduced strlen calls
2010-01-22 14:58:21 +04:00
Sergey Vojtovich
4c7ea1259b Disabled innodb-autoinc-44030 due to BUG#47621. 2010-01-22 14:20:08 +04:00