1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-08 17:02:21 +03:00
Commit Graph

28900 Commits

Author SHA1 Message Date
f88699196c 5.1 -> 5.5 merge 2011-04-12 14:13:15 +04:00
60cc2f91d6 Bug#11766270 59343: YEAR(4): INCORRECT RESULT AND VALGRIND WARNINGS WITH MIN/MAX, UNION
When we create temporary result table for UNION
incorrect max_length for YEAR field is used and
it leads to incorrect field value and incorrect
result string length as YEAR field value calculation
depends on field length.
The fix is to use underlying item max_length for
Item_sum_hybrid::max_length intialization.
2011-04-12 14:01:33 +04:00
56bff85247 Bug#11766212 59270: NOT IN (YEAR( ... ), ... ) PRODUCES MANY VALGRIND WARNINGS
Valgrind warning happens due to early null values check
in Item_func_in::fix_length_and_dec(before item evaluation).
As result null value items with uninitialized values are
placed into array and it leads to valgrind warnings during
value array sorting.
The fix is to check null value after item evaluation, item
is evaluated in in_array::set() method.
2011-04-12 13:51:36 +04:00
81ae92c260 some replication tests were marked experimental with reference
to a bug that has been fixed. made these tests non-experimental.
2011-04-12 11:47:00 +02:00
cdba023d9a Merge mysql-5.1-innodb to mysql-5.5-innodb. 2011-04-11 17:03:32 +03:00
bbfb9eabd5 corrected bug reference for experimental test 2011-04-11 16:01:46 +02:00
25b8659117 Merge from mysql-5.1-security to mysql-5.5-security
Text conflict in mysql-test/r/sp-security.result
Text conflict in mysql-test/t/sp-security.test
Text conflict in sql/sp_head.cc
2011-04-11 12:55:43 +02:00
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
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
d78354816f Auto-merge from mysql-5.5. 2011-04-08 18:07:59 +04:00
ece1996b5a Bug#11926811 / Bug#60625 Illegal mix of collations
Problem: comparison of a DATETIME sp variable and NOW()
led to Illegal mix of collations error when 
character_set_connection=utf8.
Introduced by "WL#2649 Number-to-string conversions".

Error happened in Arg_comparator::set_compare_func(),
because the first argument was errouneously converted to utf8,
while the second argument was not.

Fix: separate agg_arg_charsets_for_comparison() into two functions:

- agg_arg_charsets_for_comparison() - for pure comparison,
  when we don't need to return any string result and therefore
  don't need to convert arguments to @@character_set_connection:
    SELECT a = b;

- agg_arg_charsets_for_string_results_with_comparison() - when
  we need to return a string result, but we also need to do
  comparison internally: SELECT REPLACE(a,b,c)
  If all arguments are numbers:
    SELECT REPLACE(123,2,3) -> 133
  we convert arguments to @@character_set_connection.


  @ mysql-test/include/ctype_numconv.inc
  @ mysql-test/r/ctype_binary.result
  @ mysql-test/r/ctype_cp1251.result
  @ mysql-test/r/ctype_latin1.result
  @ mysql-test/r/ctype_ucs.result
  @ mysql-test/r/ctype_utf8.result
  Adding tests

  @ sql/item.cc
  @ sql/item.h
  @ sql/item_func.cc
  @ sql/item_func.h
  @ sql/item_strfunc.cc

  Introducing and using new function
   agg_item_charsets_for_string_result_with_comparison() and
  its Item_func wrapper agg_arg_charsets_for_string_result_with_comparison().
2011-04-08 17:15:23 +04:00
eaa342db6d Auto-merge from mysql-5.5. 2011-04-08 14:49:52 +04:00
397df0ecb6 Auto-merge from mysql-5.1. 2011-04-08 14:49:41 +04:00
71ffbd4651 manual merge 5.1-->5.5 (bug 11829681) 2011-04-08 12:09:24 +04:00
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
61dd7b3611 Adjusting test result for bug#11765157. 2011-04-08 12:34:54 +05:30
4cf9d978ec Merging patch for bug#11765157 from mysql-5.1. 2011-04-08 12:25:59 +05:30
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
1a0dde9206 Bug #11766513 - 59641: Prepared XA transaction in system after hard crash
causes future shutdown hang

InnoDB would hang on shutdown if any XA transactions exist in the
system in the PREPARED state. This has been masked by the fact that
MySQL would roll back any PREPARED transaction on shutdown, in the
spirit of Bug #12161 Xa recovery and client disconnection.

[mysql-test-run] do_shutdown_server: Interpret --shutdown_server 0 as
a request to kill the server immediately without initiating a
shutdown procedure.

xid_cache_insert(): Initialize XID_STATE::rm_error in order to avoid a
bogus error message on XA ROLLBACK of a recovered PREPARED transaction.

innobase_commit_by_xid(), innobase_rollback_by_xid(): Free the InnoDB
transaction object after rolling back a PREPARED transaction.

trx_get_trx_by_xid(): Only consider transactions whose
trx->is_prepared flag is set. The MySQL layer seems to prevent
attempts to roll back connected transactions that are in the PREPARED
state from another connection, but it is better to play it safe. The
is_prepared flag was introduced in the InnoDB Plugin.

trx_n_prepared: A new counter, counting the number of InnoDB
transactions in the PREPARED state.

logs_empty_and_mark_files_at_shutdown(): On shutdown, allow
trx_n_prepared transactions to exist in the system.

trx_undo_free_prepared(), trx_free_prepared(): New functions, to free
the memory objects of PREPARED transactions on shutdown. This is not
needed in the built-in InnoDB, because it would collect all allocated
memory on shutdown. The InnoDB Plugin needs this because of
innodb_use_sys_malloc.

trx_sys_close(): Invoke trx_free_prepared() on all remaining
transactions.
2011-04-07 21:12:54 +03:00
08bf3ddde9 Fix for Bug#11765141 - "58072: LOAD DATA INFILE: LEAKS IO CACHE MEMORY WHEN ERROR OCCURS" 2011-04-07 15:09:19 +02:00
c2921ed50d fixed a number for a missing warning 2011-04-07 15:11:51 +03:00
e1fbf1b186 fixed a missing warning 2011-04-07 14:44:26 +03:00
507f816e2c merge from 5.1-mtr 2011-04-07 13:15:24 +02:00
22edce7940 merge from 5.5 main 2011-04-07 12:36:01 +02:00
9d5aac9463 merge 5.5->5.5-security 2011-04-07 12:59:51 +03:00
639c18badd BUG#11815600 - [ERROR] INNODB COULD NOT FIND INDEX
PRIMARY KEY NO 0 FOR TABLE IN ERROR LOG 

Post merge fix, update the .result file.
2011-04-07 11:41:20 +02:00
8fbd9e4ca1 merged mysql-5.1->mysql-5.1-security 2011-04-07 12:24:10 +03:00
31f9189d58 Bug #12316050 MTR: --REPORT-TIMES GIVES TOO HIGH NUMBER FOR INITIALIZATION
Forgot that the main thread would be idle while waiting for tests
Added sub mark_time_idle() so ignore time spent waiting
Also added a new time category 'admin' to take some of 'init'
2011-04-07 10:12:52 +02:00
8c98ac8ea6 Bug #11760361 52764: EXTEND MYSQL-TEST-RUN SUPPORT FOR SUN STUDIO DBX BY ADDING --DBX DEBUGGER
Added necessary options and variables
Added dbx_arguments() similar to gdb_arguments()
Unlike gdb, cannot use init file but must provide commands and args as
  command line argument to dbx
Also simplified debugger behavior to always start with a breakpoint in main()
2011-04-07 10:10:57 +02:00
c913579fcc Merge from mysql-5.5.11-release 2011-04-07 08:59:07 +02:00
83ed55df0a merge mysql-5.1->mysql-5.5 2011-04-06 18:11:43 +03:00
325715c43f Load the innodb plugin instead of builtin in innodb_plugin.innodb_bug59410
Spotted by:	Marko
2011-04-06 14:38:24 +03:00
f644be05ec merge from 5.5 main 2011-04-05 15:04:05 +02:00
aafabc920d merge from 5.1 main 2011-04-05 15:02:01 +02:00
e208984cf2 Merge mysql-5.1-innodb -> mysql-5.5-innodb 2011-04-05 11:30:38 +03:00
56c34b5c1e Add the testcase for Bug#59410 to 5.1/InnoDB Plugin
Bug#59410 read uncommitted: unlock row could not find a 3 mode lock
on the record

This bug is present only in 5.6 but I am adding the test case to earlier
versions to ensure it never appears in earlier versions too.
2011-04-05 11:20:20 +03:00
619f684f54 Add the testcase for Bug#59410 to 5.1/builtin
Bug#59410 read uncommitted: unlock row could not find a 3 mode lock
on the record

This bug is present only in 5.6 but I am adding the test case to earlier
versions to ensure it never appears in earlier versions too.
2011-04-05 11:08:36 +03:00
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
1c6f766624 Merge mysql-5.5-innodb -> mysql-5.5 2011-04-04 09:12:11 +03:00
1cdc7d2724 auto-merge 5.1-->5.5 (bug 11766094) 2011-04-02 23:41:10 +04:00
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
b1dc6899c3 One more test suppression for rpl_extra_col_master tests 2011-03-31 15:48:05 +02:00
9fddc97e6d Merged the fix for bug #11936829 to 5.5.11 release
Bug #11936829: DIFF. BETWEEN MYSQL.USER (AUTHENTICATION_STRING) IN 
  FRESH AND UPGRADED 5.5.11
             
There was no modification for pre 5.5.11 builds that had 
authentication_string.  Thus the column was not upgraded 
by mysql_upgrade.
                         
Fixed by adding an ALTER TABLE MODIFY to update an existing 
column to the latest type version.
                                     
Test suite added.
2011-03-31 16:08:31 +03:00
cfdb759722 Backport of bug#11891417 from mysql-trunk to mysql-5.5 2011-03-31 14:38:54 +02:00
906c5703ab merge from 5.5 main 2011-03-31 12:09:03 +02:00
64b8f1414b merge from 5.1 main 2011-03-31 11:22:54 +02:00
ecade0fe87 Small followup fix after MTR warning cleanup 2011-03-31 10:37:15 +02:00
9cd8fc9a61 Small followup fix after MTR warning cleanup 2011-03-31 10:33:07 +02:00
fa2385ae44 mtr: cleaned up some superfluos global warning suppressions 2011-03-30 14:55:53 +02:00
c82e0399cb mtr: cleaned up some superfluos global warning suppressions 2011-03-30 14:33:53 +02:00