Commit graph

39688 commits

Author SHA1 Message Date
Tatiana A. Nurnberg
de8042d007 Bug#43748: crash when non-super user tries to kill the replication threads
Fine-tuning. Broke out comparison into method by
suggestion of Davi. Clarified comments. Reverting
test-case which I find too brittle; proper test
case in 5.1+.
2009-03-25 17:10:27 +01:00
Georgi Kodinov
08626e800e Bug#43748: crash when non-super user tries to kill the replication threads
(Pushing for Azundris)
      
We allow security-contexts with NULL users (for
system-threads and for unauthenticated users).
If a non-SUPER-user tried to KILL such a thread,
we tried to compare the user-fields to see whether
they owned that thread. Comparing against NULL was
not a good idea.
      
If KILLer does not have SUPER-privilege, we
specifically check whether both KILLer and KILLee
have a non-NULL user before testing for string-
equality. If either is NULL, we reject the KILL.
2009-03-25 15:37:21 +02:00
Leonard Zhou
cfa6235224 Fix the test case error in PB. 2009-03-25 16:19:09 +08:00
Alexey Kopytov
159b18fad1 Automerge. 2009-03-24 23:50:59 +03:00
Alexey Kopytov
b071b660e9 Fix for bug #43801: mysql.test takes too long, fails due to
expired timeout on debx86-b in PB 

Moved the resource-intensive test case for bug #41486 into 
a separate test file to reduce execution time for mysql.test.
2009-03-24 23:44:38 +03:00
Leonard Zhou
84a63525d5 Merge 2009-03-24 15:29:04 +08:00
Leonard Zhou
97c6e3f88b BUG#41719 delayed INSERT into timestamp col needs set time_zone for concurrent binlogging
When do 'insert delayed' operation, the time_zone info doesn't be keeped in the row info.
So when we do insert sometime later, time_zone didn't write into binlog.
This will cause wrong result for timestamp column in slave.

Our solution is that adding time_zone info with the delayed-row and
restoring time_zone from row-info when execute that row in the furture by another thread.
So we can write correct time_zone info into binlog and got correct result in slave.
2009-03-24 08:45:05 +08:00
Matthias Leich
9c515e3d5c Merge of fixes into actual tree 2009-03-23 21:19:41 +01:00
Matthias Leich
3e89ac0120 Fix for Bug#43015 and Bug#43065
Details for Bug#43015 main.lock_multi: Weak code (sleeps etc.)
   -------------------------------------------------------------
   - The fix for bug 42003 already removed a lot of the weaknesses mentioned.
   - Tests showed that there are unfortunately no improvements of this tests
     in MySQL 5.1 which could be ported back to 5.0.
   - Remove a superfluous "--sleep 1" around line 195

   Details for Bug#43065 main.lock_multi: This test is too big if the disk is slow
   -------------------------------------------------------------------------------
   - move the subtests for the bugs 38499 and 36691 into separate scripts
   - runtime under excessive parallel I/O load after applying the fix
     lock_multi           [ pass ]          22887
     lock_multi_bug38499  [ pass ]         536926
     lock_multi_bug38691  [ pass ]         258498
2009-03-23 15:22:31 +01:00
Sergey Glukhov
1cff5b9c53 remove compiler warnings 2009-03-23 16:51:39 +04:00
Tatiana A. Nurnberg
8aff42f6a0 auto-merge 2009-03-23 05:21:45 +01:00
Tatiana A. Nurnberg
e5a599bd73 Bug#43254: SQL_SELECT_LIMIT=0 crashes command line client
When asking what database is selected, client expected
to *always* get an answer from the server.

We now handle failure more gracefully.

See comments in ticket for a discussion of what happens,
and how things interlock.
2009-03-23 05:08:32 +01:00
Narayanan V
b466a93b8a merging with mysql-5.0-bugteam 2009-03-20 11:42:55 +05:30
Davi Arnaut
2417701e46 Bug#43461: invalid comparison with string literal in default.c
Don't compare string literals as it results in unspecified behavior.
2009-03-19 17:20:15 -03:00
Ignacio Galarza
5d13d4f34e auto-merge 2009-03-19 09:58:56 -04:00
Bernt M. Johnsen
39ceb7f6ef Bug#43329 merge from 5.0 GCA-branch 2009-03-19 14:52:35 +01:00
Ignacio Galarza
e82390130e auto-merge 2009-03-19 09:44:58 -04: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
Alexey Kopytov
5e7238e76e Automerge. 2009-03-19 13:07:30 +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
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
Bernt M. Johnsen
b011395bfa Bug#43329 prepared for commit on 5.0 2009-03-18 15:07:13 +01:00
Alexey Kopytov
5315ffa7fa Automerge. 2009-03-18 11:35:52 +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
Georgi Kodinov
718efce059 merged 5.0-bugteam -> bug 22047 2009-03-17 16:28:05 +02:00
Patrick Crews
e54bad485d Bug#41307: Tests using include/ndb_backup.inc won't work on Windows due to 'grep' call.
Revised patch incorporating cleaner test code brought up during review.
Removed the use of grep and accomplished same actions via SQL / use of the server.

Runs as before on *nix systems and now runs on Windows without Cygwin as well.
2009-03-15 12:25:14 -04:00
Georgi Kodinov
8a5a804530 Bug #22047 : Time in SHOW PROCESSLIST for SQL thread in replication
seems to become negative

THD::start_time has a dual meaning : it's either the time since the process
entered a given state or is the transaction time returned by e.g. NOW().
This causes problems, as sometimes THD::start_time may be set to a value
that is correct and needed when used as a base for NOW(), but these times
may be arbitrary (SET @@timestamp) or non-local (coming from the master 
through the replication feed).
If one such non-local time is set there's no way to return a correct value
for e.g. SHOW PROCESSLIST or SELECT ... FROM INFORMATION_SCHEMA.PROCESSLIST.
Fixed by making the Time column in SHOW PROCESSLIST SIGNED LONG instead of 
UNSIGNED LONG and doing the correct conversions.
      
Note that no reliable test suite can be constructed, since it would require
knowing the local time and can't be achieved by the means of the current test
suite.
2009-03-13 15:51:25 +02:00
Chad MILLER
8725bcd944 Merge bug fix and upstream. 2009-03-12 13:32:13 -04:00
Timothy Smith
b756503262 Bug #32625: Make test type_bit_innodb more robust
Since there is more than one duplicate value in the table, when adding the
unique index it is not deterministic which value will be reported as causing a
problem.  Replace the reported value with '' so that it doesn't affect the
results.
2009-03-11 14:54:57 -06:00
Timothy Smith
333e7f3e15 Remove outdated and now useless TODO file from sql-bench. Requested by sales. 2009-03-11 14:52:53 -06:00
Narayanan V
b741553087 Bug#42937 strings/CHARSET_INFO.txt not included in source distributions
The reference manual has instructions for adding new character
sets, and refers to the string/CHARSET_INFO.txt file. This file
is currently not present in the distribution.

Modify the build to include this file in the distribution.
2009-03-11 12:41:59 +05:30
Matthias Leich
62adf8953a Merge of fix into actual tree 2009-03-10 18:21:35 +01:00
Chad MILLER
6b72857803 Merge from bugfix tree. 2009-03-10 12:53:43 -04:00
Chad MILLER
0d9589a433 Bug#42635: mysqldump includes views that were excluded using the \
--ignore-table option

mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.

Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
2009-03-09 16:58:47 -04:00
Chad MILLER
0693a99cfd Fix non-DBUG return. 2009-03-09 16:56:46 -04:00
Georgi Kodinov
5b9a33aafe Bug #42434: license of mysys MD5 implementation is not GPL-compatible
Took the Xfree implementation (based on the same rewrite as the NDB one)
and added it instead of the current implementation.
Added a macro to make the calls to MD5 more streamlined.
2009-03-09 20:57:03 +02:00
Georgi Kodinov
f01890898b merged 5.0-main -> 5.0-bugteam 2009-03-11 15:01:35 +02:00
Georgi Kodinov
e546077ee8 Bug #43354: Use key hint can crash server in explain extended query
The copy of the original arguments of a aggregate function was not
initialized until after fix_fields().
Sometimes (e.g. when there's an error processing the statement)
the print() can be called with no corresponding fix_fields() call.
      
Fixed by adding a check if the Item is fixed before using the arguments
copy.
2009-03-11 14:10:44 +02:00
kent.boortz@sun.com
e400c54a06 Raise version number after cloning 5.0.79 2009-03-09 19:33:01 +01:00
Patrick Crews
1c39d5ff8f Fix of failing funcs_1 tests.
Changes are due to changes in precision.
Re-record of .result files to account for new server precision.
2009-03-09 11:32:07 -04:00
Georgi Kodinov
abdd2fe67a set the tree name to 5.0-main 2009-03-09 15:59:22 +02:00
Georgi Kodinov
df0fc2ea6a fixed a typo 2009-03-09 12:49:18 +02:00
Georgi Kodinov
9870864a88 fixed a win32 compile warning 2009-03-09 12:22:52 +02:00
He Zhenxing
6ddec9a50b Auto merge 2009-03-09 16:44:18 +08:00
Kristofer Pettersson
d6634f461b Manual merge 2009-03-06 11:49:39 +01:00
He Zhenxing
c8532bc979 Auto merge 2009-03-06 17:34:47 +08:00