Commit graph

63856 commits

Author SHA1 Message Date
Tor Didriksen
9baf84e99a merge 5.0 => 5.1 : Bug#12329653 2011-05-04 17:12:45 +02:00
Tor Didriksen
a32df762d4 Bug#12329653 - EXPLAIN, UNION, PREPARED STATEMENT, CRASH, SQL_FULL_GROUP_BY
The query was re-written *after* we had tagged it with NON_AGG_FIELD_USED.
Remove the flag before continuing.
2011-05-04 16:18:21 +02:00
Georgi Kodinov
c00c350f14 merge mysql-5.0-security->mysql-5.1-security 2011-05-04 15:49:30 +03:00
Georgi Kodinov
faad822740 Addendum to the fix for bug #11764517 : replaced an absolute path. 2011-05-04 15:47:29 +03:00
Georgi Kodinov
b22fdf1cba Merged 5.0-security->5.1-security 2011-05-04 14:29:23 +03:00
Georgi Kodinov
4c5dfc00f7 Bug #11764517: 57359: POSSIBLE TO CIRCUMVENT SECURE_FILE_PRIV
USING '..' ON WINDOWS

Backport of the fix to 5.0 (to be null-merged to 5.1).
Moved the test into the main test suite. 
Made mysql-test-run.pl to not use symlinks for sdtdata as the symlinks
are now properly recognized by secure_file_priv.
Made sure the paths in load_file(), LOAD DATA and SELECT .. INTO OUTFILE 
that are checked against secure_file_priv in a correct way similarly to 5.1 
by the extended is_secure_file_path() backport before the comparison.
Added an extensive test with all the variants of upper/lower case, 
slash/backslash and case sensitivity.
Added few comments to the code.
2011-04-28 12:22:41 +03:00
Georgi Kodinov
4d95c794d6 Bug #11810224: CORRECT INVALID LGPL NOTICE IN CLUSTER FILES
The 5.1 part of the of the fix.
2011-04-18 17:14:34 +03:00
Georgi Kodinov
8f449c36de Bug #11810224: CORRECT INVALID LGPL NOTICE IN CLUSTER FILES
The 5.0 fix. Removed unreferenced files and the directory 
that has them.
2011-04-18 17:04:01 +03:00
Mattias Jonsson
a10f8a4073 merge 2011-04-15 13:49:52 +02:00
Jon Olav Hauglid
56da39b7d9 Merge from mysql-5.0-security to mysql-5.1-security
Text conflict in mysql-test/r/sp-security.result
2011-04-13 09:57:16 +02:00
Jon Olav Hauglid
7f5180598f Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEE
DEFINITION OF ANY ROUTINE.

This follow-up patch removes SHOW PROCEDURE CODE from the test
case as this command is only available on debug versions of the
server and therefore caused the test to fail on release builds.
2011-04-13 09:54:51 +02:00
Mattias Jonsson
c75923e079 backport of Bug#11867664 from mysql-5.5
3381 Mattias Jonsson	2011-03-18
      Bug#11867664:  SERVER CRASHES ON UPDATE WITH JOIN ON PARTITIONED TABLE
      
      Regression from bug#11766232.
      m_last_part could be set beyond the last partition.
      Fixed by only setting it if within the limit.
      Also added check in print_error.
2011-04-11 18:09:23 +02:00
Sven Sandberg
bbfb9eabd5 corrected bug reference for experimental test 2011-04-11 16:01:46 +02:00
Jon Olav Hauglid
7f2ddaa9fe Merge from mysql-5.0-security to mysql-5.1-security
Text conflict in sql/sp_head.cc
2011-04-11 12:38:03 +02:00
Jon Olav Hauglid
b3ea1d1feb Bug#11882603 SELECT_ACL ON ANY COLUMN IN MYSQL.PROC ALLOWS TO SEE
DEFINITION OF ANY ROUTINE.

The problem was that having the SELECT privilege any column of the
mysql.proc table by mistake allowed the user to see the definition
of all routines (using SHOW CREATE PROCEDURE/FUNCTION and SHOW
PROCEDURE/FUNCTION CODE).

This patch fixes the problem by making sure that those commands
are only allowed if the user has the SELECT privilege on the
mysql.proc table itself.

Test case added to sp-security.test.
2011-04-11 12:24:50 +02:00
Alexander Nozdrin
7cb3c6816c Empty-merge from mysql-5.0-security. 2011-04-11 14:06:20 +04:00
Alexander Nozdrin
e68a4619e3 Empty-merge from mysql-5.1. 2011-04-11 14:05:56 +04:00
Alexander Nozdrin
a490a6005a Empty merge from mysql-5.0. 2011-04-11 14:05:08 +04:00
Alexander Nozdrin
df327bb034 Null-merge from mysql-5.0. 2011-04-11 13:58:44 +04:00
Alexander Nozdrin
280c3cf7a9 Bump NDB-version. 2011-04-11 13:57:45 +04:00
Alexander Nozdrin
a81ab01575 Null-merge from mysql-5.0-security. 2011-04-11 13:55:04 +04:00
Alexander Nozdrin
944d78cf23 Empty merge from mysql-5.1 (bump the version). 2011-04-11 13:51:27 +04:00
Alexander Nozdrin
90697a7649 Empty merge from mysql-5.0 (bump the version). 2011-04-11 13:51:02 +04:00
Alexander Nozdrin
e3fc6b27ef Merge from mysql-5.0 (bump the version). 2011-04-11 13:47:15 +04:00
Alexander Nozdrin
ab52fdfaab Bump version. 2011-04-11 13:45:41 +04:00
Sunanda Menon
25096933df Raise version number after cloning 5.0.93 2011-04-11 09:27:07 +02:00
Karen Langford
cd5ec6cb36 Raise version number after cloning 5.1.57 2011-04-10 23:58:04 +02:00
Alexander Nozdrin
397df0ecb6 Auto-merge from mysql-5.1. 2011-04-08 14:49:41 +04:00
Gleb Shchepa
bd193c61e3 Bug #11829681 - 60295: ERROR 1356 ON VIEW THAT EXECUTES FINE AS A QUERY
Select from a view with the underlying HAVING clause failed with a
message: "1356: View '...' references invalid table(s) or column(s)
or function(s) or definer/invoker of view lack rights to use them"

The bug is a regression of the fix for bug 11750328 - 40825 (similar
case, but the HAVING cause references an aliased field).
In the old fix for bug 40825 the Item_field::name_length value has
been used in place of the real length of Item_field::name. However,
in some cases Item_field::name_length is not in sync with the
actual name length (TODO: combine name and name_length into a
solid String field).

The Item_ref::print() method has been modified to calculate actual
name length every time.
2011-04-08 12:05:20 +04:00
Nirbhay Choubey
b563350e7a Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set.

mysqlslap uses a schema to run its tests on and later
drops it if auto-generate-sql is used. This can be a
problem, if the schema is an already existing one.

If create-schema is used with auto-generate-sql option,
mysqlslap while performing the cleanup, drops the specified
database.

Fixed by introducing an option --no-drop, which, if used,
will prevent the dropping of schema at the end of the test.
2011-04-08 12:22:44 +05:30
Georgi Kodinov
e1fbf1b186 fixed a missing warning 2011-04-07 14:44:26 +03:00
Bjorn Munch
507f816e2c merge from 5.1-mtr 2011-04-07 13:15:24 +02:00
Georgi Kodinov
4c58b803ce merge mysql-5.0-security->mysql-5.1-security 2011-04-07 12:31:25 +03:00
Georgi Kodinov
8fbd9e4ca1 merged mysql-5.1->mysql-5.1-security 2011-04-07 12:24:10 +03:00
Georgi Kodinov
db8e5b47d8 merge mysql-5.0->mysql-5.0-security 2011-04-07 12:17:36 +03:00
Bjorn Munch
aafabc920d merge from 5.1 main 2011-04-05 15:02:01 +02:00
Georgi Kodinov
19332ed7b9 Bug #11758687: 50924: object names not resolved correctly
on lctn2 systems

There was a local variable in get_all_tables() to store the 
"original" value of the database name as it can get lowercased
depending on the lower_case_table_name value.
get_all_tables() iterates over database names and for each 
database iterates over the tables in it.
The "original" db name was assigned in the table names loop.
Thus the first table is ok, but the second and subsequent tables
get the lowercased name from processing the first table.
Fixed by moving the assignment of the original database name
from the inner (table name) to the outer (database name) loop.
Test suite added.
2011-04-04 16:04:15 +03:00
Vasil Dimov
bcfabf4350 Merge mysql-5.1-innodb -> mysql-5.1 2011-04-04 09:06:08 +03:00
Gleb Shchepa
173551bb1e Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
In the string context the MIN() and MAX() functions don't take
into account the unsignedness of the UNSIGNED BIGINT argument
column.

I.e.:
        CREATE TABLE t1 (a BIGINT UNSIGNED);
        INSERT INTO t1 VALUES (18446668621106209655);
        SELECT CONCAT(MAX(a)) FROM t1;

returns -75452603341961.
2011-03-31 22:59:11 +04:00
Bjorn Munch
b1dc6899c3 One more test suppression for rpl_extra_col_master tests 2011-03-31 15:48:05 +02:00
Bjorn Munch
64b8f1414b merge from 5.1 main 2011-03-31 11:22:54 +02:00
Bjorn Munch
9cd8fc9a61 Small followup fix after MTR warning cleanup 2011-03-31 10:33:07 +02:00
Magne Mahre
ffb98660d2 Fix-up after commit of Bug#11900714
The patch fixes a build problem on MacOSX, where
the compiler complains about unused parameters.
2011-03-30 16:14:13 +02:00
Bjorn Munch
c82e0399cb mtr: cleaned up some superfluos global warning suppressions 2011-03-30 14:33:53 +02:00
Marko Mäkelä
4ffb26de4b Bug#11877216 InnoDB too eager to commit suicide on a busy server
sync_array_print_long_waits(): Return the longest waiting thread ID
and the longest waited-for lock. Only if those remain unchanged
between calls in srv_error_monitor_thread(), increment
fatal_cnt. Otherwise, reset fatal_cnt.

Background: There is a built-in watchdog in InnoDB whose purpose is to
kill the server when some thread is stuck waiting for a mutex or
rw-lock. Before this fix, the logic was flawed.

The function sync_array_print_long_waits() returns TRUE if it finds a
lock wait that exceeds 10 minutes (srv_fatal_semaphore_wait_threshold).
The function srv_error_monitor_thread() will kill the server if this
happens 10 times in a row (fatal_cnt reaches 10), checked every 30
seconds. This is wrong, because this situation does not mean that the
server is hung. If the server is very busy for a little over 15
minutes, it will be killed.

Consider this example. Thread T1 is waiting for mutex M. Some time
later, threads T2..Tn start waiting for the same mutex M. If T1 keeps
waiting for 600 seconds, fatal_cnt will be incremented to 1. So far,
so good. Now, if M is granted to T1, the server was obviously not
stuck. But, T2..Tn keeps waiting, and their wait time will be longer
than 600 seconds. If 5 minutes later, some Tn has still been waiting
for more than 10 minutes for the mutex M, the server can be killed,
even though it is not stuck.

rb:622 approved by Jimmy Yang
2011-03-30 14:25:58 +03:00
Sergey Glukhov
fbed52c1ba Bug#11766124 59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
Valgrind warning happens due to missing NULL value check in
Item::get_date. The fix is to add this check.
2011-03-30 11:08:35 +04:00
Sergey Glukhov
778a605af3 Bug#11766126 59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
Valgrind warning happens because null values check happens too late
in Item_func_month::val_str(after result string calculation).The fix
is to check null value before result string calculation.
2011-03-30 11:00:41 +04:00
Jon Olav Hauglid
455646e785 Bug# 11763784 (former 56541)
ASSERTION TABLE->DB_STAT FAILED IN
SQL_BASE.CC::OPEN_TABLE() DURING I_S Q

This assert could be triggered if a statement requiring a name
lock on a table (e.g. DROP TRIGGER) executed concurrently
with an I_S query which also used the table.

One connection first started an I_S query that opened a given table.
Then another connection started a statement requiring a name lock
on the same table. This statement was blocked since the table was
in use by the I_S query. When the I_S query resumed and tried to
open the table again as part of get_all_tables(), it would encounter
a table instance with an old version number representing the pending
name lock. Since I_S queries ignore version checks and thus pending
name locks, it would try to continue. This caused it to encounter
the assert. The assert checked that the TABLE instance found with a
different version, was a real, open table. However, since this TABLE
instance instead represented a pending name lock, the check would
fail and trigger the assert.

This patch fixes the problem by removing the assert. It is ok for
TABLE::db_stat to be 0 in this case since the TABLE instance can
represent a pending name lock.

Test case added to lock_sync.test.
2011-03-29 10:09:05 +02:00
Mayank Prasad
4a4892d4d8 Bug#11751148 : show events shows events in other schema
Issue:
======
Test case Correction for bug#11751148.
2011-03-28 21:01:37 +05:30
Sergey Glukhov
9d1c240ac2 Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
Valgrind warning happens due to missing NULL value check in
Item_func::val_decimal. The fix is to add this check.
2011-03-28 17:27:44 +04:00