Commit graph

57417 commits

Author SHA1 Message Date
Joerg Bruehe
95163cec4f This is a backport of a fix applied in 5.1.32 into 5.1.31sp1
The original fix was done by Jonathan Perkin and committed by Georgi Kodinov
on 2009-02-10.
The same day, Georgi added a compilation fix which is already included here.


Original comment:
  Merge libedit 2.11 and related files,
  based on NetBSD CVS as of 2009/02/06 20:09:00.
2009-03-19 12:08:50 +01:00
Staale Smedseng
4f4c45e163 Merge from 5.0-bugteam 2009-03-19 11:44:57 +01:00
Staale Smedseng
4ecbd0b53d Bug #42502 huge memory leak possible with timezone
functions
      
Unknown timezone specifications are properly rejected
by the server, but are copied into tz_storage before
rejection, and hence is retained until end of server 
life. With sufficiently large bogus timezone specs, 
it is easy to exhaust system memory.
      
Allocation of memory for a copy of the timezone
name is delayed until after verification of validity,
at the cost of a memcpy of the timezone info. This 
only happens once, future lookups will hit the cached
structure.
2009-03-19 11:27:45 +01:00
Bernt M. Johnsen
4a211169c0 Bug#43329 Prepared for push on 5.1 2009-03-19 11:18:52 +01:00
Alexey Kopytov
db08d4f629 Automerge. 2009-03-19 13:09:34 +03:00
Alexey Kopytov
c97060eeab Automerge. 2009-03-19 13:08:15 +03:00
Alexey Kopytov
5e7238e76e Automerge. 2009-03-19 13:07:30 +03:00
Alexey Kopytov
4b7477b976 Automerge. 2009-03-19 13:04:20 +03:00
Alexey Kopytov
a82402dd6f Fixed test failures in 5.1/6.0 introduced by the patch
for bug #41486. Session max_allowed_packet is read-only
as of MySQL 5.1.31. In addition, the global variable
now has no effect on the current session.
2009-03-19 13:02:23 +03:00
Sergey Glukhov
e55b1424af 5.0-bugteam->5.1-bugteam merge 2009-03-19 13:26:12 +04:00
Satya B
59cc98194c Merge 5.0-bugteam to 5.1-bugteam 2009-03-19 14:19:51 +05:30
Sergey Glukhov
a910db2b91 automerge 2009-03-19 12:42:26 +04:00
Sergey Glukhov
28d6b77c23 Bug#41268 Help Text for \c is misleading in client command line interface
fixed help message
2009-03-19 12:37:34 +04:00
Satya B
6ca68ad189 merge to 5.0-bugteam 2009-03-19 13:53:24 +05:30
Sergey Glukhov
5ff4e44bf8 Bug#41627 Illegal mix of collations in LEAST / GREATEST / CASE
Don't throw an error after checking the first and the second arguments.
Continue with checking the third and higher arguments and if some of
them is stronger according to coercibility rules,
then this argument's collation is set as result collation.
2009-03-19 12:20:28 +04:00
Satya B
4f333c876a Fix for BUG#21360 - mysqldump error on federated tables
When loading dump created by mysqldump tool an error is
thrown saying storage engine for the table doesn't have 
an option.
                        
mysqldump tries to re-insert the data into the federated
table which causes the error. Since the data is already
available on the remote server, mysqldump shouldn't try
to dump the data again for FEDERATED tables.
                        
As stated in the bug page, it can be considered similar
to the MERGE ENGINE with "view only" nature.
                        
Fixed by adding the "FEDERATED ENGINE" to the exception
list to ignore the data.
2009-03-19 11:36:37 +05:30
Joerg Bruehe
d0e77a4045 This is a backport from 5.1.32 into 5.1.31sp1.
The original fix was done by Sergey Glukhov on 2009-02-04
All comments are copied from the original fix:


Bug#42495 updatexml: Assertion failed: xpath->context,
                     file .\item_xmlfunc.cc, line 2507
Problem:
   RelativeLocationPath can appear only after a node-set expression
   in the third and the fourth branches of this rule:
     PathExpr :: =  LocationPath
                    | FilterExpr
                    | FilterExpr '/' RelativeLocationPath
                    | FilterExpr '//' RelativeLocationPath
   XPatch code didn't check the type of FilterExpr and crashed.
Fix:
   If FilterExpr is a scalar expression
   (variable reference, literal, number, scalar function call)
   return error.
2009-03-18 22:23:21 +01:00
Sergey Petrunia
79909a27eb Merge 2009-03-18 19:08:54 +03:00
Horst Hunger
c216de6e10 due to merge (pull) 2009-03-18 17:36:49 +01:00
Horst Hunger
ea24cef9b2 Due to bug#43733 I disabled "concurrent_innodb_(un)safelog.test" for embedded server. 2009-03-18 17:23:39 +01:00
Guangbao Ni
1a20ddfef5 Auto-merged from 5.1-bugteam 2009-03-18 15:19:28 +00:00
Guangbao Ni
647821432c Auto-merge from 5.1-bugteam 2009-03-18 15:02:06 +00:00
Joerg Bruehe
37f64c1241 This is a backport from 5.1.32 into 5.1.31sp1.
The original fix was done by Gleb Shchepa on 2009-01-21
All comments are copied from the original fix:


Bug#42188: crash and/or memory corruption with user variables 
           in trigger

Interchangeable calls to the mysql_change_user client function 
and invocations of a trigger changing some user variable caused 
a memory corruption and a crash.

The mysql_change_user API call forces TDH::cleanup() on a server 
that frees user variable entries.
However it didn't reset Item_func_set_user_var::entry to NULL 
because Item_func_set_user_var::cleanup() was not overloaded.
So, Item_func_set_user_var::entry held a pointer to freed memory,
that caused a crash.

The Item_func_set_user_var::cleanup method has been overloaded
to cleanup the Item_func_set_user_var::entry field.
2009-03-18 15:48:07 +01:00
Bernt M. Johnsen
b011395bfa Bug#43329 prepared for commit on 5.0 2009-03-18 15:07:13 +01:00
Guangbao Ni
15d24779e1 Bug #42217 mysql.procs_priv does not get replicated
mysql.procs_priv table itself does not get replicated.
Inserting routine privilege record into mysql.procs_priv table
is triggered by creating function/procedure statements
according to current user's privileges.
Because the current user of SQL thread has GLOBAL_ACL,
which doesn't need any check mysql.procs_priv privilege
when create/alter/execute routines.
Corresponding GLOBAL_ACL privilege user
doesn't insert routine privilege record into
mysql.procs_priv when creating a routine.

Fixed by switching the current user of SQL thread to definer user if
the definer user exists on slave.
That populates procs_priv, otherwise to keep the SQL thread
user and procs_priv remains unchanged.
2009-03-18 13:48:23 +00:00
Tatiana A. Nurnberg
720f7ed651 auto-merge 2009-03-18 14:19:58 +01:00
Vladislav Vaintroub
e2ba86fb2c merge 2009-03-18 14:20:01 +01:00
Georgi Kodinov
0349dabf61 addendum to the 22047 fix : updated funcs_1 test suite 2009-03-18 14:52:31 +02:00
Chad MILLER
51e0a699a7 Using autoconf definitions instead of manually appending to CFLAGS is
smarter, and according to a contributer, it is necessary for plugin authors
using "--with-debug".
2009-03-18 08:49:05 -04:00
Bjorn Munch
1b922ca6e8 merge from main 2009-03-18 13:44:05 +01:00
Joerg Bruehe
7dd62b165f This is a backport from 5.1.32 into 5.1.31sp1.
The original fix was done by Georgi Kodinov on 2009-01-28
All comments are copied from the original fix:


Bug #42366: server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT"

Re-generated the PKI files needed.
Removed the ones that are not needed.
Updated the tests to reference the correct SSL subject.
2009-03-18 13:36:23 +01:00
Georgi Kodinov
56c0f724b3 merged 5.1-main -> 5.1-bugteam 2009-03-18 14:34:03 +02:00
Tatiana A. Nurnberg
333d4d6c4f auto-merge 2009-03-18 13:31:35 +01:00
Sergey Petrunia
962fce83cb Merge 2009-03-18 14:32:32 +03:00
Alfranio Correia
2f16f07054 Bug #42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave
Compiling with debug and assigning an invalid directory to --slave-load-tmpdir
was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() ||
can_overwrite_status). This assertion assumes that a thread can change its
state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing
its execution unless the overwrite flag (i.e. can_overwrite_status) is true.

The Append_block_log_event::do_apply_event which is responsible for creating
temporary file(s) was not cleaning the thread state. Thus a failure while
trying to create a file in an invalid temporary directory was causing the crash.

To fix the problem we check if the temporary directory is valid before starting
the SQL Thread and reset the thread state before creating a file in
Append_block_log_event::do_apply_event.
2009-03-18 10:31:17 +00:00
Alexey Kopytov
5315ffa7fa Automerge. 2009-03-18 11:35:52 +03:00
Alexey Kopytov
fefff5e496 Manual merge. 2009-03-18 11:27:49 +03:00
Alexey Kopytov
a3e5737abd Fix for bug#41486: extra character appears in BLOB for every
~40Mb after mysqldump/import 
        
When the input string exceeds the maximum allowed size for the 
internal buffer, batch_readline() returns a truncated string. 
Since there was no way for a caller to determine whether the 
string was truncated or not, the command line client assumed 
batch_readline() to always return the whole input string and 
appended a newline character. This resulted in garbled data 
when importing dumps containing strings longer than the 
maximum input buffer size. 
  
Fixed by adding a flag to the batch_readline() interface to 
signal a truncated string to the caller. 
  
Other minor problems fixed during patch implementation: 
 
- The maximum allowed buffer size for batch_readline() was set 
up depending on the client's max_allowed_packet value. It does 
not actully make any sense, as those variables are not 
related. The input buffer size limit is now always set to 1 
MB. 
  
- fill_buffer() did not always set the EOF flag. 
 
- The input buffer could actually grow twice as the specified 
limit due to insufficient checks in intern_read_line().
2009-03-18 11:18:24 +03:00
Satya B
079baf4c23 merge to 5.1-bugteam branch 2009-03-18 12:39:44 +05:30
Satya B
bbd694a3b0 Fix for BUG#32880 - Repairing Archive table fails with internal error 144
Any statement reading corrupt archive data file
(CHECK/REPAIR/SELECT/UPDATE/DELETE) may cause assertion
failure in debug builds. This assertion has been removed
and an error is returned instead.

Also fixed that CHECK/REPAIR returns vague error message
when it mets corruption in archive data file. This is
fixed by returning proper error code.
2009-03-18 11:16:21 +05:30
Leonard Zhou
dd016b9829 Merge 2009-03-18 11:05:48 +08:00
Vladislav Vaintroub
41746bb039 Bug #43715 Link errors when trying to link mysql_embedded.exe
The reason for the error is incorrectly specified link dependencies
for mysql_embedded, mysqltest_embedded and mysql_client_test_embedded
in CMakeLists.txt (ADD_DEPENDENCIES should be TARGET_LINK_LIBRARIES)
2009-03-17 23:28:24 +01:00
Ignacio Galarza
428e28e00c auto-merge 2009-03-17 16:29:24 -04:00
Tatiana A. Nurnberg
061b5d6523 auto-merge 2009-03-17 18:38:04 +01:00
Tatiana A. Nurnberg
6efe0c341d 36446: fix Windows warning 2009-03-17 18:24:35 +01:00
Georgi Kodinov
49c6e74746 merge 5.0-bugteam -> 5.1-bugteam 2009-03-17 16:33:54 +02:00
Georgi Kodinov
799551a4c3 auto-merge 2009-03-17 16:32:44 +02:00
Georgi Kodinov
7af84377cc Bug 22047: Time in SHOW PROCESSLIST for SQL thread in replication seems to
become negative

- merged the fix to 5.1
- extended to cover I_S.PROCESSLIST.TIME
- Changed the column type of I_S.PROCESSLIST.TIME from LOGNLONG
  UNSIGNED
  to LONG (to match the SHOW PROCESSLIST type)
- Added a test case
2009-03-17 16:29:16 +02:00
Georgi Kodinov
718efce059 merged 5.0-bugteam -> bug 22047 2009-03-17 16:28:05 +02:00
Horst Hunger
e9c874224b Fix for bug 39484 after review. I inserted the review results (also including the patches itself):
"Release_lock("hello")" is now also successful when delivering NULL, replaced two sleeps by wait_condition. The last two "sleep 1" have not been replaced as all tried wait conditions leaded to nondeterministic results, especially to succeeding concurrent updates. To replace the sleeps there should be some time planned (or internal knowledge of the server may help).
2009-03-17 14:43:43 +01:00