Commit graph

63767 commits

Author SHA1 Message Date
Magne Mahre
62930fa17d Null merge (from mysql-5.0) 2011-03-22 16:28:42 +01:00
Magne Mahre
40af59490e Post-push fix for Bug 11896296
Didn't build on Solaris.
2011-03-22 16:27:32 +01:00
Magne Mahre
e694249886 Null merge 2011-03-22 13:53:35 +01:00
Magne Mahre
7606856e48 Bug#11896296 REMOVE LGPL LICENSED FILES IN MYSQL 5.0
The LGPL license is used in some legacy code, and to
adhere to current licensing polity, we remove those
files that are no longer used, and reorganize the
remaining LGPL code so it will be GPL licensed from
now on.

Note:  This patch only removed LGPL licensed files
       in MySQL 5.0, and is the first of a set of
       patches to remove LGPL from all trees.
       (See Bug# 11840513 for details)
2011-03-22 13:50:14 +01:00
Georgi Kodinov
798ac10b21 Bug #11763135: 55812: MYSQL AB SHOULD NOT BE AUTHOR, EVEN IN EXAMPLE
Fixed the author and the copyright.
2011-03-21 17:54:40 +02:00
MySQL Build Team
da88c798ae fixing 38697/11749301 2011-03-21 20:23:39 +01:00
Mayank Prasad
140b9093e2 Bug #11751148 : show events shows events in other schema
Issue:
------
Due to prefix match, database like 'k' was matching with 'ka' and events of 'ka' we getting displayed for 'show event' of 'k'.

Resolution:
-----------
Scan for listing of events in a schema is made to be done on exact match of database (schema) name instead of just prefix.
2011-03-21 21:32:47 +05:30
Ramil Kalimullin
130b6b5a25 Null merge of the backported fix for bug#51875/#11759554 from mysq-5.0. 2011-03-21 09:24:22 +03:00
Ramil Kalimullin
49ee8db5df Fix for bug#51875/#11759554 backported from mysql-5.1. 2011-03-21 09:21:14 +03:00
Vinay Fisrekar
e8ad8f4fd8 Bug#11766500 - 59624: FUNCS_1 SUITE TESTS FAILING WITH RESULT DIFFERENCE WHEN RUN USING EMBEDDED MODE
Updating result files
2011-03-18 16:35:57 +05:30
Kent Boortz
4b8fc90d53 Merge 2011-03-17 15:06:25 +01:00
Nirbhay Choubey
da70b67a41 Minor fix in mysqldump test. 2011-03-17 16:28:16 +05:30
Kent Boortz
bd58869ebe Merge 2011-03-16 23:33:12 +01:00
Kent Boortz
0a23e39b62 Removed the "Third-Party Component Notices" part from README 2011-03-16 23:07:05 +01:00
Kent Boortz
35bda0ae15 Removed the "Third-Party Component Notices" part 2011-03-16 23:04:29 +01:00
Luis Soares
f39b86d772 Fix for BUG#11868903 (BUG#59717)
There is a race between two threads: user thread and the dump
thread. The former sets a debug instruction that makes the latter wait
before processing an Xid event. There can be cases that the dump
thread has not yet processed the previous Xid event, causing it to
wait one Xid event too soon, thus causing sync_slave_with_master never
to resume.
      
We fix this by moving the instructions that set the debug variable
after calling sync_slave_with_master.
2011-03-16 15:11:54 +00:00
Dmitry Shulga
6c2f5e306c Fixed Bug#11764168 "56976: SEVERE DENIAL OF SERVICE IN PREPARED STATEMENTS".
The problem was that server didn't check resulting size of prepared
statement argument which was set using mysql_send_long_data() API.
By calling mysql_send_long_data() several times it was possible
to create overly big string and thus force server to allocate
memory for it. There was no way to limit this allocation.

The solution is to add check for size of result string against
value of max_long_data_size start-up parameter. When intermediate
string exceeds max_long_data_size value an appropriate error message
is emitted.

We can't use existing max_allowed_packet parameter for this purpose
since its value is limited by 1GB and therefore using it as a limit
for data set through mysql_send_long_data() API would have been an
incompatible change. Newly introduced max_long_data_size parameter
gets value from max_allowed_packet parameter unless its value is
specified explicitly. This new parameter is marked as deprecated
and will be eventually replaced by max_allowed_packet parameter.
Value of max_long_data_size parameter can be set only at server
startup.
2011-03-15 17:36:12 +06:00
Davi Arnaut
8da2b4f5d7 Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
Add a missing DBUG_RETURN function test_if_number().
2011-03-14 15:03:22 -03:00
Bjorn Munch
11e879feb6 merge from 5.1-mtr 2011-03-11 12:49:14 +01:00
Mayank Prasad
74a438fc5b BUG #11760210: 52596: SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
Issue:
      SSL_CIPHER set to a specific CIPHER name was not getting picked up by SHOW STATUS Command.

Solution:
      If specific cipher name is specified, avoid overwriting of Cipher List with default Cipher names.
2011-03-11 16:16:34 +05:30
Bjorn Munch
8b51caa0c8 merge from 5.1 main 2011-03-11 10:07:34 +01:00
Mattias Jonsson
3da5a9cf2c Merge of Bug#11766232 - bug#59297 2011-03-09 18:12:23 +01:00
Georgi Kodinov
dafbbad7a8 merge mysql-5.0->mysql-5.1 2011-03-09 14:59:34 +02:00
Georgi Kodinov
e1f412bec7 merge mysql-5.0-secrutiy-fixed -> mysql-5.0 2011-03-09 14:48:23 +02:00
Bjorn Munch
0c98f15a08 merge from 5.1 main 2011-03-08 18:52:56 +01:00
joerg.bruehe@oracle.com
2ab3b055e8 Merge from mysql-5.1.56-release 2011-03-03 21:11:47 +01:00
Alexander Barkov
c82f9661f6 Bug 11766519 - 59648: MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED.
Part 2. Function QUOTE() was not multi-byte safe.

  @ mysql-test/r/ctype_ucs.result
  @ mysql-test/t/ctype_ucs.test
  Adding tests

  @ sql/item_strfunc.cc
  Fixing Item_func_quote::val_str to be multi-byte safe.

  @ sql/item_strfunc.h
  Multiple size needed for quote characters to mbmaxlen
2011-03-03 18:39:26 +03:00
Alexander Barkov
5956241859 BUG#11766519 (bug#59648): MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED
Problem: wrong character set pointer was passed to my_strtoll10_mb2,
which led to DBUG_ASSERT failure in some cases.

  @ mysql-test/r/func_encrypt_ucs2.result
  @ mysql-test/t/func_encrypt_ucs2.test
  @ mysql-test/r/ctype_ucs.result
  @ mysql-test/t/ctype_ucs.test
  Adding tests

  @ sql/item_func.cc
  "cs" initialization was wrong (res does not necessarily point to &str_value)

  @ sql/item_strfunc.cc
  Item_func_dec_encrypt::val_str() and Item_func_des_descrypt::val_str()
  did not set character set for tmp_value (the returned value),
  so the old value, which was previously copied from args[1]->val_str(),
  was incorrectly returned with tmp_value.
2011-03-03 15:04:04 +03:00
Alexander Barkov
0c396e8fda An after-fix for
Bug#11765108 - Bug#58036: CLIENT UTF32, UTF16, UCS2 SHOULD BE DISALLOWED, THEY CRASH SERVER 

Fixing wrong usage of DBUG_ASSERT.
In non-debug version thd_init_client_charset
was not executed at all.
2011-03-03 11:25:37 +03:00
Vinay Fisrekar
c9e9dede76 Bug#11766165 - 59211: SELECT RETURNS DIFFERENT VALUE FOR MIN(YEAR) FUNCTION
Result File Correction For Bug Fix
2011-03-01 21:26:24 +05:30
Alexander Barkov
bb7f40a185 Bug#11766725 (Bug#59901) EXTRACTVALUE STILL BROKEN AFTER FIX FOR BUG #44332
Problem: a byte behind the end of input string was read
in case of a broken XML not having a quote or doublequote
character closing a string value.

Fix: changing condition not to read behind the end of input string

  @ mysql-test/r/xml.result
  @ mysql-test/t/xml.test
  Adding tests

  @ strings/xml.c
  When checking if the closing quote/doublequote was found,
  using p->cur[0] us unsafe, as p->cur can point to the byte after the value.
  Comparing p->cur to p->beg instead.
2011-03-01 15:30:18 +03:00
Bjorn Munch
3fceb5b699 Attempt at solving missing end of mtr output on Windows 2011-02-28 16:10:35 +01:00
Bjorn Munch
355f7ed789 merge from 5.1 main 2011-02-24 15:07:51 +01:00
Bjorn Munch
1f9d8cd862 Bug #11762407 54999: MTR GLOBAL SUPPRESSION HIDES SQL THREAD EXECUTION UNEXPECTED ERRORS
Removed the global suppression, added lots of local ones to affected tests
Re-commit, now kept "Slave SQL" at start of patterns.
2011-02-23 10:31:37 +01:00
hery.ramilison@oracle.com
40b27a952b Null-merge from mysql-5.1.52sp1-release 2011-02-22 22:03:32 +01:00
Nirbhay Choubey
dd4723d47d Postfix for tests failing due to fix for bug#11766310. 2011-02-22 19:28:50 +05:30
Nirbhay Choubey
a8e6f7c67b Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
("-") IN DATABASE NAMES IN ALTER DATABASE.

mysqldump did not quote database name in 'ALTER DATABASE'
statements in its output. This can further cause a failure
while loading if database name contains a hyphen '-'.

This happened as, while printing the 'ALTER DATABASE'
statements, the database name was not quoted.

Fixed by quoting the database name.
2011-02-21 12:37:24 +05:30
Alexander Barkov
cd3a8131c6 A post-fix for b58036. 2011-02-18 17:17:37 +03:00
Alexander Barkov
8a96012922 Bug#11765108 (Bug#58036) client utf32, utf16, ucs2 should be disallowed, they crash server
A separate fix for 5.1 (as 5.1 and 5.5 have seriously
differged in the related pieces of the code).
A patch for 5.5 was approved earlier.

Problem: ucs2 was correctly disallowed in "SET NAMES" only,
while mysql_real_connect() and mysql_change_user() still allowed
to use ucs2, which made server crash.

Fix: disallow ucs2 in mysql_real_connect() and mysql_change_user().

  @ sql/sql_priv.h
    - changing return type for thd_init_client_charset() to bool,
      to return errors to the caller

  @ sql/sql_var.cc
    - using new function

  @ sql/sql_connect.cc
    - thd_client_charset_init:
      in case of unsupported client character set send error and return true;
      in case of success return false
    - check_connection:
      Return error if character set initialization failed

  @ sql/sql_parse.cc
    - check charset in the very beginnig of the CMD_CHANGE_USER handling code

  @ tests/mysql_client_test.c
    - adding tests
2011-02-18 16:12:36 +03:00
Vasil Dimov
f912dcd82e Merge mysql-5.1-innodb -> mysql-5.1 2011-02-18 14:57:11 +02:00
Martin Hansson
cd4c263dc4 Bug#11766675 - 59839: Aggregation followed by subquery yields wrong result
The loop that was looping over subqueries' references to outer field used a
local boolean variable to tell whether the field was grouped or not. But the
implementor failed to reset the variable after each iteration. Thus a field
that was not directly aggregated appeared to be.

Fixed by resetting the variable upon each new iteration.
2011-02-18 11:50:06 +01:00
Marko Mäkelä
db55cf8526 Allow 30 seconds for slow shutdown in the Bug #60049 test. 2011-02-17 22:25:33 +02:00
Vasil Dimov
5e7d354326 Fix the non-determinism in innodb_information_schema.test
Thanks to Kristian Nielsen for finding out the root cause for the
failure, see: https://bugs.launchpad.net/maria/+bug/677407
2011-02-17 19:09:53 +02:00
Vasil Dimov
7581b94a6c Merge mysql-5.1 from bk-internal into my local repo 2011-02-17 14:07:39 +02:00
Vasil Dimov
0a3e7beb1e Merge mysql-5.1-innodb -> mysql-5.1 2011-02-17 13:56:05 +02:00
Magne Mahre
f2a42aee2e Bug#48053 String::c_ptr has a race and/or does an invalid
memory reference

There are two issues present here.
  1) There is a possibility that we test a byte beyond the
     allocated buffer

  2) We compare a byte that might never have been
     initalized to see if it's 0.

The first issue is not triggered by existing code, but an
ASSERT has been added to safe-guard against introducing
new code that triggers it.

The second issue is what triggers the Valgrind warnings
reported in the bug report. A buffer is allocated in
class String to hold the value. This buffer is populated
by the character data constituting the string, but is not
zero-terminated in most cases.  Testing if it is indeed
zero-terminated means that we check a byte that has never
been explicitly set, thus causing Valgrind to trigger.

Note that issue 2 is not a serious problem.  The variable
is read, and if it's not zero, we will set it to zero.
There are no further consequences.

Note that this patch does not fix the underlying problems
with issue 1, as it is deemed too risky to fix at this
point (as noted in the bug report).  As discussed in
the report, the c_ptr() method should probably be
replaced, but this requires a thorough analysis of the
~200 calls to the method.
2011-02-17 12:43:53 +01:00
Marko Mäkelä
e428f0ed9d Disable the Bug #60049 test on embedded, as it requires server restart. 2011-02-17 09:45:07 +02:00
Jonathan Perkin
1ce649d59c Merge to mysql-5.1 2011-02-16 14:43:56 -08:00
Jonathan Perkin
edcdc79e5a Updated README file. 2011-02-16 14:42:44 -08:00
Bjorn Munch
378ddd475f Simple fix of suppress pattern in test insert_select 2011-02-16 21:43:12 +01:00