Commit graph

184 commits

Author SHA1 Message Date
evgen@moonbone.local
fd1a43b080 Bug#15130: CREATE .. SELECT was denied to use advantages of the SQL_BIG_RESULT.
When the SQL_BIG_RESULT flag is specified SELECT should store items from the
select list in the filesort data and use them when sending to a client.
The get_addon_fields function is responsible for creating necessary structures
for that. But this function was allowed to do so only for SELECT and
INSERT .. SELECT queries. This makes the SQL_BIG_RESULT useless for
the CREATE .. SELECT queries.

Now the get_addon_fields allows storing select list items in the filesort
data for the CREATE .. SELECT queries.
2007-07-24 18:15:44 +04:00
igor@olga.mysql.com
f8683bfb44 Fixed bug #25798.
This bug may manifest itself not only with the queries for which
the index-merge access method is chosen. It also may display
itself for queries with DISTINCT.

The bug was in how the Unique::get method used the merge_buffers
function. To compare elements in the the queue employed by
merge_buffers() it must use the buffpek_compare function rather
than the function for binary comparison.
2007-07-01 15:33:28 -07:00
igor@olga.mysql.com
2d29a57f2b Fixed bug #28811: crash for a query containing a subquery with
ORDER BY and LIMIT 1. 
The bug was introduced by the patch for bug 21727. The patch
erroneously skipped initialization of the array of headers
for sorted records for non-first evaluations of the subquery.

To fix the problem a new parameter has been added to the
function make_char_array that performs the initialization.
Now this function is called for any invocation of the 
filesort procedure. Yet it allocates the buffer for sorted
records only if this parameter is NULL.
2007-06-07 22:35:31 -07:00
dkatz@damien-katzs-computer.local
89e28d00b0 Bug #27119 server crash with integer division by zero during filesort on huge result
Fixed a problem and compiler warning on 64bit platforms so that they only allocated UINT_MAX number of BUFFPEKS.
2007-05-17 20:45:33 -04:00
dkatz@damien-katzs-computer.local
971d8d0077 Bug #27119 server crash with integer division by zero during filesort on huge result
Fixed a compiler warning on platforms where uint != ulong from the first pushed fix.
2007-05-17 17:54:31 -04:00
dkatz@damien-katzs-computer.local
41dac22271 Bug #27119 server crash with integer division by zero during filesort on huge result
Added checks to detect integer overflow and fixed other bugs on the error path.
2007-05-16 16:14:13 -04:00
gkodinov/kgeorge@macbook.gmz
d2c977a935 Bug #26672:
DATE/DATETIME values are out of the currently supported
 4 basic value types (INT,STRING,REAL and DECIMAL).
 So expressions (not fields) of compile type DATE/DATETIME are 
 generally considered as STRING values. This is not so
 when they are compared : then they are compared as 
 INTEGER values.
 But the rule for comparison as INTEGERS must be checked
 explicitly each time when a comparison is to be performed.
 filesort is one such place. However there the check was 
 not done and hence the expressions (not fields) of type 
 DATE/DATETIME were sorted by their string representation.
 Fixed to compare them as INTEGER values for filesort.
2007-03-07 14:51:45 +02:00
monty@mysql.com/narttu.mysql.fi
e5cc397f33 Fixed compiler warnings (for linux and win32 and win64)
Fixed a couple of usage of not initialized warnings (unlikely cases)
2007-02-22 16:59:57 +02:00
monty@mysql.com/narttu.mysql.fi
26aa385bc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-02-21 14:07:08 +02:00
igor@olga.mysql.com
19f4fb2b4f Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug24653
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug24653
2007-01-25 21:01:28 -08:00
igor@olga.mysql.com
36df33d80a Fixed bug #24653.
The bug report has demonstrated the following two problems.
1. If an ORDER/GROUP BY list includes a constant expression being 
optimized away and, at the same time, containing single-row
subselects that return more that one row, no error is reported.
Strictly speaking the standard allows to ignore error in this case.
Yet, now a corresponding fatal error is reported in this case.
2. If a query requires sorting by expressions containing single-row
subselects that, however, return more than one row, then the execution
of the query may cause a server crash. 
To fix this some code has been added that blocks execution of a subselect
item in case of a fatal error in the method Item_subselect::exec.
2007-01-25 18:44:35 -08:00
monty@mysql.com/narttu.mysql.fi
a04157fbb3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-01-22 14:04:40 +02:00
kent@mysql.com/kent-amd64.(none)
6523aca729 my_strtoll10-x86.s:
Corrected spelling in copyright text
Makefile.am:
  Don't update the files from BitKeeper
Many files:
  Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
  Adjusted year(s) in copyright header 
Many files:
  Added GPL copyright text
Removed files:
  Docs/Support/colspec-fix.pl
  Docs/Support/docbook-fixup.pl
  Docs/Support/docbook-prefix.pl
  Docs/Support/docbook-split
  Docs/Support/make-docbook
  Docs/Support/make-makefile
  Docs/Support/test-make-manual
  Docs/Support/test-make-manual-de
  Docs/Support/xwf
2006-12-31 01:02:27 +01:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
monty@mysql.com/narttu.mysql.fi
88dd873de0 Fixed compiler warnings detected by option -Wshadow and -Wunused:
- Removed not used variables and functions
- Added #ifdef around code that is not used
- Renamed variables and functions to avoid conflicts
- Removed some not used arguments

Fixed some class/struct warnings in ndb
Added define IS_LONGDATA() to simplify code in libmysql.c

I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
2006-12-15 00:51:37 +02:00
gkodinov@dl145s.mysql.com
e74c9add47 Merge bk-internal:/home/bk/mysql-5.0
into  dl145s.mysql.com:/data0/bk/team_tree_merge/MERGE/mysql-5.0-opt
2006-11-27 16:25:52 +01:00
sergefp@mysql.com
0421d489fb Fix typo in comment 2006-11-21 21:52:39 +03:00
monty@mysql.com/nosik.monty.fi
e825879800 Remove compiler warnings
(Mostly in DBUG_PRINT() and unused arguments)
Fixed bug in query cache when used with traceing (--with-debug)
Fixed memory leak in mysqldump
Removed warnings from mysqltest scripts (replaced -- with #)
2006-11-20 22:42:06 +02:00
igor@rurik.mysql.com
79abdb38f8 Merge rurik.mysql.com:/home/igor/mysql-5.0-opt
into  rurik.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug21727
2006-11-01 14:50:14 -08:00
igor@rurik.mysql.com
2a7acba7e1 Fixed bug #21727.
This is a performance issue for queries with subqueries evaluation
of which requires filesort.
Allocation of memory for the sort buffer at each evaluation of a
subquery may take a significant amount of time if the buffer is rather big.
With the fix we allocate the buffer at the first evaluation of the
subquery and reuse it at each subsequent evaluation.
2006-10-31 17:31:56 -08:00
jani@ua141d10.elisa.omakaista.fi
446d2c9960 Added a missing breakpoint. This could cause
wrong results in order by in some rare cases.
2006-10-03 12:44:59 +03:00
igor@rurik.mysql.com
f2225cab27 Fixed bug #22015: crash with GROUP_CONCAT over a derived table
that returns the results of aggregation by GROUP_CONCAT.
The crash was due to an overflow happened for the field
sortoder->length.
The fix prevents this overflow exploiting the fact that the
value of sortoder->length cannot be greater than the value of
thd->variables.max_sort_length.
2006-09-20 08:08:57 -07:00
monty@mysql.com
3da5f1c223 Move handling of suffix_length from strnxfrm_bin() to filesort to ensure proper sorting of all kind of binary objects
field::sort_key() now adds length last for varbinary/blob
VARBINARY/BLOB is now sorted by filesort so that shorter strings comes before longer ones
Fixed issues in test cases from last merge
2005-10-14 00:04:52 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
01ce8a8aa9 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
2005-09-12 20:18:49 +03:00
monty@mishka.mysql.com
0965bfa832 Review fixes since last pull
Fix for bug #13025; Server crash in filesort because wrong call to handler::position()
2005-09-12 18:48:17 +03:00
evgen@moonbone.local
e94f16a125 Fix bug #7422 "order by" doesn't work
Field with wrong buffer was used to make sort key, which results in producing
same sort key for all records.
2005-06-21 20:14:50 +04:00
monty@mysql.com
780202f130 Moved some old test and added a new test to only be run with mysql-test-run --big
Fixed warnings by valgrind for sum_distinct.test
Enable buffered-record-reads after filesort for InnoDB tables with short primary key
Enabled sort-with-data for MyISAM temporary files
2005-04-07 19:24:14 +03:00
ramil@mysql.com
d5e3ba70f3 merging 2005-03-15 19:31:52 +04:00
ramil@mysql.com
04328c3dfa A fix (bug #8799: Killed filesorts can fail inited==RND assertion in ha_rnd_end). 2005-03-15 15:32:11 +04:00
timour@mysql.com
b9c56257bb Merge 2005-03-10 13:59:48 +02:00
timour@mysql.com
f489e56291 Fix for BUG#7425.
The reported problems were due to two completely unrelated omissions.
1) The file sort procedure didn't correctly create the sort key in
   make_sortkey when the sortkey was an unsigned integer.
2) The name resolution procedure for column references inside a HAVING
   clause did not propagate the unsigned_flag of the resolved references.
This patch corrects both problems.
2005-03-09 16:51:03 +02:00
monty@mysql.com
72b692e11f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-02-28 16:22:26 +02:00
monty@mysql.com
3839e443a4 merge with 4.1 2005-02-28 12:18:39 +02:00
monty@mysql.com
253bfcf783 Fixed wrong memory references found by purify
(No really critical errors found, but a few possible wrong results)
2005-02-28 11:59:46 +02:00
mskold@mysql.com
b9aa67bc76 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-02-26 16:15:36 +01:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02:00
mskold@mysql.com
5d23cdb591 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-02-16 13:13:13 +01:00
hf@deer.(none)
d75c9dc1d8 Fix for bug #8534 (Compile errors in Precision Math code on Windows) 2005-02-16 11:44:34 +04:00
monty@mysql.com
410e51c854 Fixed failing test cases 'row.test' when running with --ps-protocol
Simple optimzations done while reviewing code
2005-02-15 16:45:00 +02:00
mskold@mysql.com
66343612d1 Merge 2005-02-11 22:30:37 +01:00
hf@deer.(none)
b94a482ee9 Precision Math implementation 2005-02-09 02:50:45 +04:00
mskold@mysql.com
f21a737197 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-02-01 10:05:22 +01:00
bar@mysql.com
8828884f4c CSC#4385: slow sorting for UTF8 large table:
my_strnxfrm_utf8 now requires 2 bytes per character
in filesort key, instead of 3 bytes per character.
Shorter filesort keys make sorting faster.
2005-01-26 16:34:09 +04:00
mskold@mysql.com
7c07a2e725 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0-ndb
into mysql.com:/usr/local/home/marty/MySQL/test/mysql-5.0-ndb
2005-01-21 08:43:41 +01:00
monty@mysql.com
502ba93b38 Merge with global tree 2005-01-18 04:03:26 +02:00
monty@mysql.com
edffca827e Merge mysql.com:/home/my/mysql-4.0 into mysql.com:/home/my/mysql-4.1 2005-01-18 03:52:15 +02:00
monty@mysql.com
5ba79d72a7 Anoter fix for moved IO_CACHE object 2005-01-18 02:04:41 +02:00
mskold@mysql.com
6bb027a97c Merge 2005-01-17 09:44:34 +01:00
monty@mysql.com
0a1076a25f Merge with 4.1 2005-01-15 14:09:45 +02:00
monty@mysql.com
a37e91e435 Changed interface for my_strntod() to make it more general and more portable 2005-01-15 12:28:38 +02:00