Commit graph

38534 commits

Author SHA1 Message Date
gkodinov/kgeorge@magare.gmz
2e2ac428ae Bug #30788: Inconsistent retrieval of char/varchar
Index lookup does not always guarantee that we can
simply remove the relevant conditions from the WHERE
clause. Reasons can be e.g. conversion errors, 
partial indexes etc. 
The optimizer was removing these parts of the WHERE 
condition without any further checking.
This leads to "false positives" when using indexes.
Fixed by checking the index reference conditions
(using WHERE) when using indexes with sub-queries.
2007-11-21 11:40:05 +02:00
thek@adventure.(none)
0b38e67453 Merge adventure.(none):/home/thek/Development/cpp/bug31153/my50-bug31153
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-11-21 10:02:44 +01:00
istruewing@stella.local
f8a855a7c8 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-21 09:31:08 +01:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
725b2d35f4 Fix for bug #30495: optimize table t1,t2,t3 extended errors
Problem: we have CHECK TABLE options allowed (by accident?) for
ANALYZE/OPTIMIZE TABLE.

Fix: disable them.

Note: it might require additional fixes in 5.1/6.0
2007-11-21 11:11:22 +04:00
evgen@moonbone.local
9fed61c389 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31048-bug-5.0-opt-mysql
2007-11-21 02:49:17 +03:00
evgen@moonbone.local
12516abe61 sql_select.cc:
Additional stack check for the bug#31048.
2007-11-21 02:48:01 +03:00
tsmith@ramayana.hindu.god
2b985d0762 Applied InnoDB snapshot innodb-5.0-ss2095
Fixes the following bugs:

- Bug #29560: InnoDB >= 5.0.30 hangs on adaptive hash rw-lock 'waiting for an X-lock'

  Fixed a race condition in the rw_lock where an os_event_reset()
  can overwrite an earlier os_event_set() triggering an indefinite
  wait.
  NOTE: This fix for windows is different from that for other platforms.
  NOTE2: This bug is introduced in the scalability fix to the
  sync0arr which was applied to 5.0 only. Therefore, it need not be
  applied to the 5.1 tree. If we decide to port the scalability fix
  to 5.1 then this fix should be ported as well.

- Bug #32125: Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase

  When unknown find_flag is encountered in convert_search_mode_to_innobase()
  do not call assert(0); instead queue a MySQL error using my_error() and
  return the error code PAGE_CUR_UNSUPP. Change the functions that call
  convert_search_mode_to_innobase() to handle that error code by "canceling"
  execution and returning appropriate error code further upstream.
2007-11-20 10:53:19 -07:00
gkodinov/kgeorge@magare.gmz
846cbf3cd0 Bug #32400: Complex SELECT query returns correct result
only on some occasions

Referencing an element from the SELECT list in a WHERE 
clause is not permitted. The namespace of the WHERE
clause is the table columns only. This was not enforced
correctly when resolving outer references in sub-queries.

Fixed by not allowing references to aliases in a 
sub-query in WHERE.
2007-11-20 19:18:21 +02:00
gshchepa/uchum@gleb.loc
9b8751d43b Merge gleb.loc:/work/bk/5.0-opt-32533
into  gleb.loc:/work/bk/5.0-opt
2007-11-20 20:46:30 +04:00
gshchepa/uchum@gleb.loc
351d9f66d3 Fixed bug #32533.
8bit escape characters, termination and enclosed characters
were silently ignored by SELECT INTO query, but LOAD DATA INFILE
algorithm is 8bit-clean, so data was corrupted during 
encoding.
2007-11-20 20:15:20 +04:00
kent@kent-amd64.(none)
cb6885c134 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/kent/bk/tmpmerge/mysql-5.0-build
2007-11-20 16:23:19 +01:00
gkodinov/kgeorge@magare.gmz
50d8511136 Bug #32268: Indexed queries give bogus MIN and MAX results
Loose index scan does the grouping so the temp table does 
not need to do it, even when sorting.
Fixed by checking if the grouping is already done before
doing sorting and grouping in a temp table and do only 
sorting.
2007-11-20 16:07:24 +02:00
holyfoot/hf@hfmain.(none)
7ab844c905 Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/mysql-5.0-opt
2007-11-20 17:04:42 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
f434cb6066 test case added for the bug #31155 2007-11-20 17:04:24 +04:00
holyfoot/hf@hfmain.(none)
93023d3142 Merge mysql.com:/home/hf/work/31868/my41-31868
into  mysql.com:/home/hf/work/31868/my50-31868
2007-11-20 14:51:40 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
366a87cdaf Merge mysql.com:/home/hf/work/32063/my41-32063
into  mysql.com:/home/hf/work/31868/my41-31868
2007-11-20 14:47:39 +04:00
dfischer/mysqldev@mysql.com/production.mysql.com
4b94aec52a Raise version number after cloning 5.0.52 2007-11-20 11:26:16 +01:00
guilhem@gbichot4.local
2bcf5b4e97 BUG#27850 "mysqldump --single-transaction does not work if TRUNCATE/DROP/RENAME/ALTER":
this has already been closed by a note in the manual, now we
complete this by a note in "mysqldump --help"
2007-11-20 10:25:07 +01:00
evgen@moonbone.local
ddc04e7682 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31048-bug-5.0-opt-mysql
2007-11-19 21:28:50 +00:00
evgen@moonbone.local
6f6fe52ad2 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/31048-bug-5.0-opt-mysql
2007-11-19 21:15:53 +00:00
evgen@moonbone.local
0288cc9dce Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/30384-bug-5.0-opt-mysql
2007-11-19 21:06:03 +00:00
evgen@moonbone.local
da7470afb1 Bug#30384: Having SQL_BUFFER_RESULT option in the CREATE .. KEY(..) .. SELECT
led to creating corrupted index.

Corrected fix. The new method called prepare2 is added to the select_create
class. As all preparations are done by the select_create::prepare function
it doesn't do anything. Slightly changed algorithm of calling the 
start_bulk_insert function. Now it's called from the select_insert::prepare2
function when the SQL_BUFFER_RESULT flags is set.
The is_bulk_insert_mode flag is removed as it is not needed anymore.
2007-11-19 21:05:17 +00:00
tsmith@ramayana.hindu.god
dc403f8128 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  ramayana.hindu.god:/home/tsmith/m/bk/build/50
2007-11-19 13:17:58 -07:00
evgen@moonbone.local
67cae0d48d Bug#31048: Many nested subqueries may cause server crash.
This bug is actually two. The first one manifests itself on an EXPLAIN
SELECT query with nested subqueries that employs the filesort algorithm.
The whole SELECT under explain is marked as UNCACHEABLE_EXPLAIN to preserve
some temporary structures for explain. As a side-effect of this values of
nested subqueries weren't cached and subqueries were re-evaluated many
times. Each time buffer for filesort was allocated but wasn't freed because
freeing occurs at the end of topmost SELECT. Thus all available memory was
eaten up step by step and OOM event occur.
The second bug manifests itself on SELECT queries with conditions where
a subquery result is compared with a key field and the subquery itself also
has such condition. When a long chain of such nested subqueries is present
the stack overrun occur. This happens because at some point the range optimizer
temporary puts the PARAM structure on the stack. Its size if about 8K and
the stack is exhausted very fast.

Now the subselect_single_select_engine::exec function allows subquery result
caching when the UNCACHEABLE_EXPLAIN flag is set.
Now the SQL_SELECT::test_quick_select function calls the check_stack_overrun
function for stack checking purposes to prevent server crash.
2007-11-19 20:00:25 +00:00
gshchepa/uchum@gleb.loc
fedeec6c8a Fixed bug #32282: TEXT silently truncates when value is exactly 65536
bytes length.

The server has been modified to report warnings on truncation to
65536 bytes as usual.
2007-11-19 21:34:21 +04:00
thek@adventure.(none)
1794242b24 Bug #31153 calling stored procedure crashes server if available memory is low
When the server was out of memory it crashed because of invalid memory access.

This patch adds detection for failed memory allocations and make the server
output a proper error message.
2007-11-19 17:59:44 +01:00
kaa@polly.(none)
82c4059fc9 Fix for bug #32221: bug25714, mytest, mysql_client_test complaints and
crashes.

MySQL distributions contain a number of programs that are used only by
the MySQL test suite internally, i.e. they are not indended to be
invoked directly by a user. As a result, such programs are not
documented, do not have any built-in help or proper error reporting,
which may confuse users.

This patch fixes the problem with the following changes:
- mytest, libmysqltest and all references to them were removed from the
distribution since they are not used anymore
- bug25714 now displays an error message when run with incorrect
arguments or with the --help option
- mysql_client_test now does not call abort() in case of errors,
instead it does a clean exit() with a proper error status.
2007-11-19 18:59:25 +03:00
df@pippilotta.erinye.com
d3b0403a1b Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-18431
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-11-19 15:42:12 +01:00
df@pippilotta.erinye.com
44ab4b2e7d Update readline to version 5.2. This fixes bug#18431. 2007-11-19 14:38:08 +01:00
kaa@polly.(none)
ee1bb66368 Merge polly.(none):/home/kaa/src/opt/bug32376/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-19 16:14:05 +03:00
kaa@polly.(none)
b93bbc5ea6 Changed the help text for --comments to make it clear which option
disables the option explicitely.
Changed the option location in code so that --help will show it in
lexical option order.

This is for bug #26215: mysql command line client should not strip
comments from SQL statements
2007-11-19 15:27:44 +03:00
holyfoot/hf@mysql.com/hfmain.(none)
140dd4f322 Bug #30284 spatial key corruption.
SPATIAL key is fine actually, but the chk_key() function
mistakenly returns error. It tries to compare checksums
of btree and SPATIAL keys while the checksum for the SPATIAL isn't
calculated (always 0). Same thing with FULLTEXT keys is handled
using full_text_keys counter, so fixed by counting both
SPATIAL and FULLTEXT keys in that counter.
2007-11-19 11:03:03 +04:00
gshchepa/uchum@gleb.loc
6f7755f058 Merge gleb.loc:/work/bk/5.0-opt-32335
into  gleb.loc:/work/bk/5.0-opt
2007-11-18 00:08:41 +04:00
gshchepa/uchum@gleb.loc
f93b5a9c41 Fixed bug #32335.
Comparison of a BIGINT NOT NULL column with a constant arithmetic
expression that evaluates to NULL caused error 1048: "Column '...'
cannot be null".

Made convert_constant_item() check if the constant expression is NULL
before attempting to store it in a field. Attempts to store NULL in a
NOT NULL field caused query errors.
2007-11-18 00:02:55 +04:00
tnurnberg@white.intern.koehntopp.de
3c0f1ef341 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/misc/mysql/24907/50-24907
2007-11-17 19:13:27 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
6889c82997 Bug#24907: unpredictable (display) precission, if input precission increases
Server failed in assert() when we tried to create a DECIMAL() temp field
with a scale of more than the allowed 30. Now we limit the scale to the
allowed maximum. A truncation warning is thrown as necessary.
2007-11-17 19:05:31 +01:00
holyfoot/hf@hfmain.(none)
796d2dab6e Merge mysql.com:/home/hf/work/31158/my41-31158
into  mysql.com:/home/hf/work/31158/my50-31158
2007-11-17 20:27:13 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
df5b0297fd Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/31158/my41-31158
2007-11-17 20:24:22 +04:00
holyfoot/hf@hfmain.(none)
80e39eb44e Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31158/my50-31158
2007-11-17 20:23:15 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
67ce52fd66 merging 2007-11-17 17:11:05 +04:00
holyfoot/hf@hfmain.(none)
7588fa52b6 Merge mysql.com:/home/hf/work/31158/my41-31158
into  mysql.com:/home/hf/work/31158/my50-31158
2007-11-17 16:48:57 +04:00
tnurnberg@white.intern.koehntopp.de
1f8064d3f8 Merge mysql.com:/misc/mysql/mysql-5.0-opt
into  mysql.com:/misc/mysql/32180/50-32180
2007-11-17 05:57:21 +01:00
tsmith@ramayana.hindu.god
587c27e1d8 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  ramayana.hindu.god:/home/tsmith/m/bk/build/50
2007-11-16 14:57:47 -07:00
tsmith@ramayana.hindu.god
de0d55edf4 Eliminate 'unused variable' warnings when compiling non-debug build 2007-11-16 14:56:37 -07:00
tnurnberg@mysql.com/white.intern.koehntopp.de
4a7c875673 Bug #32180: DATE_ADD treats datetime numeric argument as DATE instead of DATETIME
This is a regression from 2007-05-18 when code to zero out the returned struct was
added to number_to_datetime(); zero for time_type corresponds to MYSQL_TIMESTAMP_DATE.
We now explicitly set the type we return (MYSQL_TIMESTAMP_DATETIME).
2007-11-16 17:43:15 +01:00
joerg@trift2.
9ffd927e7d In the "spec" file for RPM builds, handle the debug server tests different from the standard server. 2007-11-16 17:36:13 +01:00
istruewing@stella.local
ad721c8909 Merge stella.local:/home2/mydev/mysql-4.1-axmrg
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-16 13:27:58 +01:00
istruewing@stella.local
a0aad59f03 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-16 13:27:23 +01:00
joerg@trift2.
31114adb6b Merge trift2.:/MySQL/M41/push-4.1
into  trift2.:/MySQL/M50/push-5.0
2007-11-16 13:07:21 +01:00
istruewing@stella.local
1e435dce80 Merge stella.local:/home2/mydev/mysql-4.1-amain
into  stella.local:/home2/mydev/mysql-4.1-axmrg
2007-11-16 13:04:17 +01:00