Commit graph

39467 commits

Author SHA1 Message Date
Tatiana A. Nurnberg
4c788d93b1 auto-merge 2008-12-30 12:47:34 +01:00
Sergey Glukhov
f67ce47617 Bug#41131 "Questions" fails to increment - ignores statements instead stored procs(5.0 ver)
Added global status variable 'Queries' which represents
total amount of queries executed by server including
statements executed by SPs.
note: It's old behaviour of 'Questions' variable.
2008-12-29 16:06:53 +04:00
Sergey Glukhov
a31795b82d Bug#40953 SELECT query throws "ERROR 1062 (23000): Duplicate entry..." error
Table could be marked dependent because it is
either 1) an inner table of an outer join, or 2) it is a part of
STRAIGHT_JOIN. In case of STRAIGHT_JOIN table->maybe_null should not
be assigned. The fix is to set st_table::maybe_null to 'true' only
for those tables which are used in outer join.
2008-12-24 19:24:11 +04:00
Sergey Glukhov
026e9c3676 Bug#41456 SET PASSWORD hates CURRENT_USER()
init user->user struct with 
thd->security_ctx->priv_user context
if user->user is not initializied
2008-12-24 19:14:59 +04:00
Sergey Glukhov
59543e9f80 Bug#25830 SHOW TABLE STATUS behaves differently depending on table name
replace wild_case_compare with my_wildcmp which is multibyte safe function
2008-12-24 19:01:41 +04:00
Sergey Glukhov
4e8fae9ec2 compiler warning fix 2008-12-24 18:45:47 +04:00
Sergey Glukhov
b5f005f65a Bug#41079 information_schema.schema_privileges is limited to 7680 records.
The problem is that we cannot insert new record into memory table
when table size exceeds max memory table size.
The fix is to use schema_table_store_record() function which
converts memory table into MyISAM in case of table size exceeding.

Note:
There is no test case for this bug, the reason is that
1. The code  that was added already is checked(i.e. works) with existing tests
2. Correct work of schema_table_store_record() is checked with other test cases
   (information_schema tests)
So new code is fully covered with existing test cases.
2008-12-23 18:56:08 +04:00
Sergey Glukhov
26e804d0a7 Bug#37575 UCASE fails on monthname
The MONTHNAME/DAYNAME functions
returns binary string, so the LOWER/UPPER functions
are not effective on the result of MONTHNAME/DAYNAME call.  
Character set of the MONTHNAME/DAYNAME function
result has been changed to connection character set.
2008-12-23 18:08:04 +04:00
Sergey Petrunia
6147201a17 Merge 2008-12-22 23:28:08 +03:00
Sergey Petrunia
05ae989e76 BUG#40974: Incorrect query results when using clause evaluated using range check
- QUICK_INDEX_MERGE_SELECT deinitializes its rnd_pos() scan when it reaches EOF, but we 
  need to make the deinitialization in QUICK_INDEX_MERGE_SELECT destructor also. This is because
  certain execution strategies can stop scanning without reaching EOF, then then try to do a full
  table scan on this table. Failure to deinitialize caused the full scan to use (already empty) 
  table->sort and produce zero records.
2008-12-19 16:38:39 +03:00
Timothy Smith
3d063e0c5b Merge from upstream 5.0-bugteam. 2008-12-15 13:09:23 -07:00
Timothy Smith
776fb66ad5 r2629 | inaam | 2008-09-16 18:46:00 +0300 (Tue, 16 Sep 2008) | 9 lines
branches/5.0   bug#39483 InnoDB hang on adaptive hash because of out
of order ::open() call by MySQL

Under some conditions MySQL calls ::open with search_latch leading
to a deadlock as we try to acquire dict_sys->mutex inside ::open
breaking the latching order. The fix is to release search_latch.

Reviewed by: Heikki
2008-12-12 17:42:34 -07:00
Timothy Smith
7886d63c62 Apply 3 patches from innodb-5.0-ss2637.
This fixes Bug#36149: Read buffer overflow in srv0start.c found during "make
test"

Per-revision comments:

r2484 | vasil | 2008-05-28 15:32:48 +0300 (Wed, 28 May 2008) | 9 lines

Fix Bug#36149 Read buffer overflow in srv0start.c found during "make test"

Use strncmp(3) instead of memcmp(3) to avoid reading past end of the string
if it is empty (*str == '\0'). This bug is _not_ a buffer overflow.

Discussed with:	Sunny (via IM)

r2538 | inaam | 2008-07-15 21:24:02 +0300 (Tue, 15 Jul 2008) | 15 lines

Fix of issue# 4

Fixed a timing hole where a thread dropping an index can free the
in-memory index struct while another thread is still using
that structure to remove entries from adaptive hash index belonging
to one of the pages that belongs to the index being dropped.

The fix is to have a reference counter in the index struct and to
wait for this counter to drop to zero beforing freeing the struct.

Reviewed by: Heikki


r2544 | inaam | 2008-07-22 18:58:11 +0300 (Tue, 22 Jul 2008) | 8 lines

Removed UNIV_INLINE qualifier from btr_search_info_get_ref_count().
Otherwise compilation failed on non-debug builds.

Pointed by: Vasil
2008-12-12 17:40:31 -07:00
Timothy Smith
ae75d95370 Apply the rest of innodb-5.0-ss2475. This fixes Bug#36819, "ut_usectime does
not handle errors from gettimeofday".

r2475 | vasil | 2008-05-22 19:35:30 +0300 (Thu, 22 May 2008) | 13 lines

Fix by retrying gettimeofday() several times if it fails in ut_usectime().
If it fails on all calls then return error to the caller to be handled
at higher level.

Update the variable innodb_row_lock_time_max in SHOW STATUS output only
if ut_usectime() was successful.
2008-12-12 15:48:26 -07:00
Gleb Shchepa
c1bf0475cf Bug #40761: Assert on sum function on
IF(..., CAST(longtext AS UNSIGNED), signed_val)
            (was: LEFT JOIN on inline view crashes server)

Select from a LONGTEXT column wrapped with an expression
like "IF(..., CAST(longtext_column AS UNSIGNED), smth_signed)"
failed an assertion or crashed the server. IFNULL function was
affected too.

LONGTEXT column item has a maximum length of 32^2-1 bytes,
at the same time this is a maximum possible length of any
MySQL item. CAST(longtext_column AS UNSIGNED) returns some
unsigned numeric result of length 32^2-1, so the result of
IF/IFNULL function of this number and some other signed number
will have text length of (32^2-1)+1=32^2 (one byte for the
minus sign) - there is integer overflow, and the length is
equal to zero. That caused assert/crash.

CAST AS UNSIGNED function has been modified to limit maximal
length of resulting number to 67 (maximal length of DECIMAL
and two characters for minus sign and dot).
2008-12-12 17:16:25 +04:00
Gleb Shchepa
03f9b2cea6 rollback of bug #40761 fix 2008-12-12 14:59:10 +04:00
Gleb Shchepa
ce8ad64dd2 Bug #40761: Assert on sum function on
IF(..., CAST(longtext AS UNSIGNED), signed_val)
            (was: LEFT JOIN on inline view crashes server)

Select from a LONGTEXT column wrapped with an expression
like "IF(..., CAST(longtext_column AS UNSIGNED), smth_signed)"
failed an assertion or crashed the server. IFNULL function was
affected too.

LONGTEXT column item has a maximum length of 32^2-1 bytes,
at the same time this is a maximum possible length of any
MySQL item. CAST(longtext_column AS UNSIGNED) returns some
unsigned numeric result of length 32^2-1, so the result of
IF/IFNULL function of this number and some other signed number
will have text length of (32^2-1)+1=32^2 (one byte for the
minus sign) - there is integer overflow, and the length is
equal to zero. That caused assert/crash.

The bug has been fixed by the same solution as in the CASE
function implementation.
2008-12-12 00:57:32 +04:00
Chad MILLER
f8b28604d5 Merge from bugteam trunk. 2008-12-11 13:06:37 -05:00
Chad MILLER
cf9126a034 Bug#33812: mysql client incorrectly parsing DELIMITER
Fix parsing of mysql client commands, especially in relation to
single-line comments when --comments was specified.

This is a little tricky, because we need to allow single-line
comments in the middle of statements, but we don't want to allow
client commands in the middle of statements. So in
comment-preservation mode, we go ahead and send single-line
comments to the server immediately when we encounter them on their
own. 

This is still slightly flawed, in that it does not handle a
single-line comment with leading spaces, followed by a client-side
command when --comment has been enabled. But this isn't a new
problem, and it is quite an edge condition. Fixing it would require
a more extensive overall of how the mysql client parses commands.
2008-12-11 12:26:03 -05:00
Luis Soares
e0f4556db7 Fix PB warnings for parenthesis and valgrind leak report.
BUG#38826
2008-12-11 11:06:50 +00:00
Sergey Glukhov
e419c5d349 fix for pushbuild failure on 64 linux 2008-12-11 14:37:18 +04:00
Sergey Glukhov
87ea5307d0 disable bug37956 test if geometry package is not enabled 2008-12-11 12:57:59 +04:00
Alexey Kopytov
b3d59b09a8 Pull from mysql-5.0-bugteam. 2008-12-10 19:16:40 +03:00
Alexey Kopytov
764b9717ef Pull from mysql-5.0-bugteam. 2008-12-10 19:14:32 +03:00
Sergey Glukhov
2b64acde8b Bug#37956 memory leak and / or crash with geometry and prepared statements!
Bug#37671 crash on prepared statement + cursor + geometry + too many open files!
if mysql_execute_command() returns error then free materialized_cursor object.
is_rnd_inited is added to satisfy rnd_end() assertion
(handler may be uninitialized in some cases)
2008-12-10 18:13:11 +04:00
Alexey Kopytov
33bac53782 Fix for a test failure on Solaris/x86/gcc introduced by the patch for bug #27483.
Removed values with more than 15 significant digits from the test case. Results of 
reading/printing such values using system library functions depend on implementation 
and thus are not portable.
2008-12-10 16:07:32 +03:00
Luis Soares
9383631e59 push to 5.0-bugteam tree. 2008-12-10 10:53:22 +00:00
V Narayanan
2453e20f7d updating with mysql-5.0-bugteam 2008-12-10 14:26:57 +05:30
Georgi Kodinov
d506265f2c backported the fix for bug #34773 to 5.0 2008-12-09 20:35:02 +02:00
Patrick Crews
c69ca8476c merge 2008-12-09 10:08:52 -05:00
Sergey Glukhov
c5c64a30d4 Bug#31399 Wrong query result when doing join buffering over BIT fields
if table has bit fields then uneven bits(if exist) are stored into null bits place.
So we need to copy null bits in case of uneven bit field presence.
2008-12-09 16:59:47 +04:00
Sergey Glukhov
d2b5e0bb94 Bug#31291 ALTER TABLE CONVERT TO CHARACTER SET does not change some data types
added ability for TINY[MEDIUM] text fields 
to be converted to greater subtype during
alter if necessary(altered charset)
2008-12-09 16:38:52 +04:00
Sergey Glukhov
904c7c4409 automerge 2008-12-09 16:11:01 +04:00
Alexey Kopytov
73b48decf0 Merge from mysql-5.0-bugteam. 2008-12-09 13:22:55 +03:00
Alexey Kopytov
66fa3c09a3 Added a missing bit from the original patch for bug #27483 which was lost when re-applying
the patch manually to another tree.
2008-12-09 13:19:46 +03:00
Sergey Glukhov
0661c210d3 bug#35558 Wrong server metadata blows up the client
the problem: FORMAT func max_length value was calculated incorrectly
the fix: correct calculation of max_length
2008-12-09 14:00:43 +04:00
Sergey Glukhov
eb46763654 Bug#35796 SHOW CREATE TABLE and default value for BIT field
show default value for BIT field in printable format
2008-12-09 13:53:23 +04:00
Sergey Vojtovich
53e83e6e21 Merge. 2008-12-09 12:53:19 +04:00
Alexey Kopytov
b713958132 Fixed type_float failures in --ps-protocol mode introduced by the test case for bug #27483.
The reason for the failures was bug #21205 (fixed in 6.0 by dtoa, but still present in 5.0/5.1).
2008-12-09 11:05:36 +03:00
Patrick Crews
67fc961e6f merge 2008-12-08 16:22:16 -05:00
Andrei Elkin
0ec3e14e98 merge 5.0->5.0-bugteam for a local tree containing bug#33420 Test 'rpl_packet' fails randomly. 2008-12-08 16:29:13 +02:00
Alexey Kopytov
772685705c Pull from mysql-5.0-bugteam 2008-12-08 15:14:10 +03:00
Georgi Kodinov
64529257ad merged 5.0-main -> 5.0-bugteam 2008-12-08 11:54:41 +02:00
Patrick Crews
33cf11b428 Bug#41258: mysql-test-run does not copy subdirectories of std_data on Windows (5.0 only)
Altered how we copy data from mysql-test/std_data on Windows to match what we are doing in 5.1 and 6.0
2008-12-05 08:21:03 -05:00
Andrei Elkin
cea55f3dc6 Bug #33420 Test 'rpl_packet' fails randomly with changed "Exec_Master_Log_Pos"
Bug #41173 rpl_packet fails sporadically on pushbuild: query 'DROP TABLE t1' failed


The both issues appeared to be a race between the SQL thread executing CREATE table t1
and the IO thread that is expected to stop at the consequent big size event.
The two events need serialization which is implemented.
The early bug required back-porting a part fixes for bug#38350 exclusively for 5.0 version.
2008-12-04 18:36:45 +02:00
Luis Soares
5726574b0c BUG#38826 Race in MYSQL_LOG::purge_logs is impossible to debug in production
BUG#39325 Server crash inside MYSQL_LOG::purge_first_log halts replicaiton

The patch reverses the order of the purging and updating events for log and relay-log.info/index files respectively.
This solves the problem of having holes caused by crashes happening between updating info/index files and purging logs.

NOTE: This is a combined patch for BUG#38826 and BUG#39325. This patch is based on bugteam tree and takes into account reviewers suggestions.
2008-12-04 01:01:03 +00:00
Alexey Kopytov
5f7869a22a Fix for bug #27483: Casting 'scientific notation type' to 'unsigned
bigint' fails on windows.

Visual Studio does not take into account some x86 hardware limitations
which leads to incorrect results when converting large DOUBLE values
to BIGINT UNSIGNED ones.

Fixed by adding a workaround for double->ulonglong conversion on
Windows.
2008-12-03 19:15:39 +03:00
V Narayanan
d5bfbfb9c3 merging with mysql-5.0-bugteam tree. 2008-12-03 17:52:55 +05:30
Tatiana A. Nurnberg
e979ff9ad0 auto-merge 2008-12-03 07:38:26 +01:00
Tatiana A. Nurnberg
83f6af41c7 auto-merge 2008-12-03 07:19:26 +01:00