Commit graph

6241 commits

Author SHA1 Message Date
cmiller@zippy.cornsilk.net
56d2406375 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-09-28 10:02:53 -04:00
gkodinov@dl145s.mysql.com
55cc4fd5c6 Merge dl145s.mysql.com:/data/bk/team_tree_merge/mysql-4.1
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
2006-09-28 10:19:25 +02:00
dlenev@mockturtle.local
7897f061aa Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mockturtle.local:/home/dlenev/src/mysql-4.1-runtime
2006-09-28 11:02:10 +04:00
gluh@mysql.com/gluh.(none)
a039376c43 Patch for bug#21432 is reverted 2006-09-27 17:49:16 +05:00
igor@rurik.mysql.com
55dd569bab Fixed bug #21853: assert failure for a grouping query with
an ALL/ANY quantified subquery in HAVING.
The Item::split_sum_func2 method should not create Item_ref
for objects of any class derived from Item_subselect.
2006-09-25 05:24:07 -07:00
cmiller@zippy.cornsilk.net
3681b3ecb5 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-09-23 09:55:16 -04:00
lars/lthalmann@mysql.com/dl145h.mysql.com
7e45d80362 Merge mysql.com:/users/lthalmann/bkroot/mysql-4.1-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-4.1-merge
2006-09-23 05:58:48 +02:00
kaa@polly.local
e9bdddfa28 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
2006-09-22 19:50:16 +04:00
kaa@polly.local
10a60b42f6 Merge polly.local:/tmp/22129/bug22129/my41-bug22129
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
2006-09-22 19:44:51 +04:00
kaa@polly.local
1530b51d8f Fixed bug #22129: A small double precision number becomes zero
Better checks for underflow/overflow
2006-09-22 19:23:58 +04:00
lars/lthalmann@mysql.com/dl145h.mysql.com
9538acf5dc Adding proper setup phase for test case rpl_insert_id 2006-09-21 13:19:52 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
d3f503a0bd Fix for bug #20204: "order by" changes the results returned
Item_substr's results are improperly stored in a temporary table due to       
wrongly calculated max_length value for multi-byte charsets if two            
arguments specified.
2006-09-21 16:05:01 +05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
43194fad43 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-4.1-maint
2006-09-21 09:35:17 +05:00
lars/lthalmann@mysql.com/dl145h.mysql.com
fe782f92d6 Vertical printout in test to make easier to read 2006-09-21 03:32:42 +02:00
igor@rurik.mysql.com
d957636471 Fixed bug #20108.
Any default value for a enum fields over UCS2 charsets was corrupted
when we put it into the frm file, as it had been overwritten by its
HEX representation.
To fix it now we save a copy of structure that represents the enum
type and when putting the default values we use this copy.
2006-09-20 09:46:12 -07:00
svoj@mysql.com/april.(none)
c0ebc0fb2a BUG#10974 - No error message if merge table based on union of innodb, memory
Fixed confusing error message from the storage engine when
it fails to open underlying table. The error message is issued
when a table is _opened_ (not when it is created).
2006-09-20 01:40:59 +05:00
igor@rurik.mysql.com
294c0ccaa9 Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rurik.mysql.com:/home/igor/mysql-4.1-opt
2006-09-19 08:42:58 -07:00
thek@kpdesk.mysql.com
59671a1b16 Merge kpdesk.mysql.com:/home/thek/dev2/bug21139/my41-bug21139
into  kpdesk.mysql.com:/home/thek/dev2/mysql-4.1-maint
2006-09-19 12:44:09 +02:00
thek@kpdesk.mysql.com
66fa757e1f Bug#21139 Handling of database differs in "embedded" , test lowercase_fs_off fails
- Access checks are omitted when compliled without --with-embedded-privilege-control
- Patch: skip this test
2006-09-19 12:40:31 +02:00
svoj@may.pils.ru
43097593e3 Merge may.pils.ru:/home/svoj/devel/mysql/merge/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/merge/mysql-4.1-engines
2006-09-18 20:35:33 +05:00
igor@rurik.mysql.com
dd3b8e4f9a Fixed bug #22085: Crash on the execution of a prepared
statement that uses an aggregating IN subquery with 
HAVING clause.
A wrong order of the call of split_sum_func2 for the HAVING
clause of the subquery and the transformation for the 
subquery resulted in the creation of a andor structure
that could not be restored at an execution of the prepared
statement.
2006-09-16 11:50:00 -07:00
gkodinov/kgeorge@macbook.gmz
c73d2318a3 Merge bk-internal:/home/bk/mysql-4.1-opt
into  macbook.gmz:/Users/kgeorge/mysql/work/B21180-4.1-opt
2006-09-15 18:56:05 +03:00
evgen@moonbone.local
5841147d4d Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  moonbone.local:/work/21677-bug-4.1-opt-mysql
2006-09-14 18:46:44 +04:00
evgen@moonbone.local
a33d1d8484 type_date.test, type_date.result:
Added the test case for bug#21677: Wrong result when comparing a DATE and a DATETIME in BETWEEN
2006-09-14 18:45:23 +04:00
kaa@polly.local
27fae2cb73 Merge polly.local:/tmp/20924/bug20294/my41-bug20294
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
2006-09-13 16:01:46 +04:00
kaa@polly.local
397f0df9ad Cset exclude: kaa@polly.local|ChangeSet|20060912122540|09861
Cset exclude: kaa@polly.local|ChangeSet|20060908100829|09983
2006-09-13 14:41:28 +04:00
kaa@polly.local
f37d63ee85 Merge polly.local:/tmp/20924/bug20294/my41-bug20294
into  polly.local:/home/kaa/src/maint/m41-maint--07OGk
2006-09-12 19:28:57 +04:00
evgen@moonbone.local
9fb0340a34 item_cmpfunc.cc:
Removed changes to the Item_func_between::fix_length_and_dec() made in the fix for bug#16377
query_cache.result:
  Corrected a test case after removing a fix for bug#16377
2006-09-12 19:06:26 +04:00
kaa@polly.local
5df7611caa Post-review fixes for bug #20924 2006-09-12 16:25:40 +04:00
istruewing@chilla.local
38886ffa2b Merge bk-internal.mysql.com:/home/bk/mysql-4.1-engines
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-09-12 11:40:24 +02:00
kaa@polly.local
268c7a3522 Bug #20924: CAST(expr as UNSIGNED) returns SIGNED value when used in various functions
- Honor unsigned_flag in the corresponding functions
- Use compare_int_signed_unsigned()/compare_int_unsigned_signed() instead of explicit comparison in GREATEST() and LEAST()
2006-09-08 14:08:29 +04:00
gkodinov/kgeorge@macbook.gmz
719f836cc4 Bug#21555: incorrect behavior with INSERT ... ON DUPL KEY UPDATE and VALUES
VALUES() was considered a constant. This caused replacing 
 (or pre-calculating) it using uninitialized values before the actual
 execution takes place.
 Mark it as a non-constant (still not dependent of tables) to prevent
 the pre-calculation.
2006-09-08 10:24:14 +03:00
evgen@moonbone.local
31c738d8a2 query_cache.result, func_time.test, type_date.result, func_time.result:
Corrected test case after removal of fix for bug#16377         
type_date.test:
  Corrected test case after removal of fix for bug#16377
item_cmpfunc.cc:
  Removed changes to the agg_cmp_type() made in the for bug#16377
2006-09-08 00:59:34 +04:00
istruewing@chilla.local
45ceab9ec5 Merge chilla.local:/home/mydev/mysql-4.0-bug14400
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-09-07 16:46:20 +02:00
istruewing@chilla.local
39c0f0a484 Bug#14400 - Query joins wrong rows from table which is subject of
"concurrent insert"
Additional fix for full keys and test case.
2006-09-07 15:39:31 +02:00
cmiller@zippy.cornsilk.net
98837a945e Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
2006-09-06 14:44:59 -04:00
gkodinov/kgeorge@rakia.(none)
580d4a0df4 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B16792-4.1-opt
2006-09-05 19:22:55 +03:00
gkodinov/kgeorge@rakia.(none)
68b9ae4d14 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21392-4.1-opt
2006-09-05 13:12:30 +03:00
gkodinov/kgeorge@macbook.gmz
3758b975f8 Bug #21392: multi-table delete with alias table name fails with
1003: Incorrect table name
in multi-table DELETE the set of tables to delete from actually 
references then tables in the other list, e.g:
DELETE alias_of_t1 FROM t1 alias_of_t1 WHERE ....
is a valid statement.
So we must turn off table name syntactical validity check for alias_of_t1 
because it's not a table name (even if it looks like one).
In order to do that we add a special flag (TL_OPTION_ALIAS) to 
disable the name checking for the aliases in multi-table DELETE.
2006-09-04 18:40:30 +03:00
tnurnberg@salvation.intern.azundris.com
e3baa2e92a Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  salvation.intern.azundris.com:/home/tnurnberg/21913/my41-21913
2006-09-04 09:28:39 +02:00
tnurnberg@salvation.intern.azundris.com
13200c3f96 Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
Variable character_set_results can legally be NULL (for "no conversion.")
This could result in a NULL deref that crashed the server.  Fixed.

(Although ran some additional precursory tests to see whether I could break
anything else, but no breakage so far.)
2006-09-04 09:13:40 +02:00
timour/timka@lamia.home
5a0d5670b8 Merge lamia.home:/home/timka/mysql/src/4.1-virgin
into  lamia.home:/home/timka/mysql/src/4.1-bug-21787
2006-09-01 17:21:49 +03:00
timour/timka@lamia.home
02e194cea2 Fix for BUG#21787: COUNT(*) + ORDER BY + LIMIT returns wrong result
The problem was due to a prior fix for BUG 9676, which limited
the rows stored in a temporary table to the LIMIT clause. This
optimization is not applicable to non-group queries with aggregate
functions. The fix disables the optimization in this case.
2006-09-01 15:07:04 +03:00
msvensson@neptunus.(none)
4b41566503 Backport from 5.0
- Dont test "encrypt" in ctype_ucs
2006-09-01 11:21:12 +02:00
msvensson@shellback.(none)
2cb8215809 Merge bk-internal:/home/bk/mysql-4.1-maint
into  shellback.(none):/home/msvensson/mysql/mysql-4.1-maint
2006-09-01 10:26:01 +02:00
msvensson@shellback.(none)
324cf4ccb3 Add target to make "mtr", shortcut for running test suite 2006-09-01 10:21:08 +02:00
jimw@rama.(none)
2b8f30a764 Merge bk-internal:/home/bk/mysql-4.1-maint
into  rama.(none):/home/jimw/my/mysql-4.1-21288
2006-08-31 21:23:25 -07:00
tsmith@maint2.mysql.com
9a8ed3fe3e Merge maint2.mysql.com:/data/localhome/tsmith/bk/g41
into  maint2.mysql.com:/data/localhome/tsmith/bk/41
2006-08-31 00:23:15 +02:00
tsmith@maint2.mysql.com
4ae5e61620 Merge maint2.mysql.com:/data/localhome/tsmith/bk/bfx/41
into  maint2.mysql.com:/data/localhome/tsmith/bk/41
2006-08-30 23:49:21 +02:00
tsmith@maint2.mysql.com
e80741b3a5 Remove ^Z from ctype_ucs.test data, to avoid problems testing on Windows 2006-08-30 22:39:23 +02:00
gluh@mysql.com/gluh.(none)
af9895d4c2 Bug#20393 User name truncation in mysql client
Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte
2006-08-30 15:56:17 +05:00
istruewing@chilla.local
7439a52434 Merge chilla.local:/home/mydev/mysql-4.0-bug14400
into  chilla.local:/home/mydev/mysql-4.1-bug14400
2006-08-29 21:08:40 +02:00
istruewing@chilla.local
0b2a9d01ed Bug#14400 - Query joins wrong rows from table which is
subject of "concurrent insert"
Better fix by Monty: "The previous bug fix didn't work
when using partial keys."
2006-08-29 20:45:04 +02:00
kroki/tomash@moonlight.intranet
1140b1a613 Merge bk-internal.mysql.com:/home/bk/mysql-4.1-runtime
into  moonlight.intranet:/home/tomash/src/mysql_ab/mysql-4.1-bug21096
2006-08-29 17:00:46 +04:00
kroki/tomash@moonlight.intranet
2a4221489b BUG#21096: locking issue ; temporary table conflicts.
The problem was that during DROP TEMPORARY TABLE we tried to acquire
the name lock, though temporary tables belongs to one connection, and
no race is possible.

The solution is to not use table name locking while executing
DROP TEMPORARY TABLE.
2006-08-29 16:59:20 +04:00
evgen@moonbone.local
109d58af66 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-27 23:43:11 +04:00
evgen@moonbone.local
13f50fdb69 Merge moonbone.local:/work/tmp_merge-4.1-mysql
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-26 23:11:34 +04:00
msvensson@neptunus.(none)
4703f302fe Dont' ever use cluster for slave in 4.1 2006-08-26 18:38:42 +02:00
msvensson@neptunus.(none)
5abbe9eb00 Ignore --skip-im if specified on command line
Null merge to 5.0
2006-08-25 17:01:04 +02:00
msvensson@neptunus.(none)
7e8f06c46f Add mysqld-max-nt to list of mysqld executales to look for on windows 2006-08-25 15:23:42 +02:00
msvensson@neptunus.(none)
f0c4aba723 Backport from 5.0 a fix that will start ndb only for tests that needs it 2006-08-25 15:17:03 +02:00
msvensson@neptunus.(none)
31aa966718 Fix running tests suite with non standard tmp dir.
Default is "var/tmp"
2006-08-25 10:46:14 +02:00
msvensson@neptunus.(none)
655bdac0bc Merge bk-internal:/home/bk/mysql-4.1-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
2006-08-25 10:11:55 +02:00
msvensson@neptunus.(none)
37be9fa3a7 Backport fix for finding executables from 5.0 2006-08-25 10:11:15 +02:00
sergefp@mysql.com
848548e16f BUG#16255: Post-review fixes: adjust the testcase. 2006-08-24 19:16:27 +04:00
sergefp@mysql.com
d4cacdb5cc Bug #16255: Subquery in WHERE (the cset by Georgi Kodinov)
Must not use Item_direct_ref in HAVING because it points to
 the new value (witch is not yet calculated for the first row).
2006-08-24 19:14:36 +04:00
tsmith@maint1.mysql.com
679d1e27ed Merge tim@tsmith.mysql.internal:m/bk/41
into  maint1.mysql.com:/data/localhome/tsmith/bk/41
2006-08-24 02:44:49 +02:00
tsmith/tim@siva.hindu.god
e8cbda2c27 Merge siva.hindu.god:/usr/home/tim/m/bk/b21531-41
into  siva.hindu.god:/usr/home/tim/m/bk/41
2006-08-23 18:06:07 -06:00
tsmith/tim@siva.hindu.god
45460bd0af Bug #21531: EXPORT_SET() doesn't accept args with coercible character sets
- Fix typo in Item_func_export_set::fix_length_and_dec() which caused character set aggregation to fail
- Remove default argument from last arg of agg_arg_charsets() function, to reduce potential errors
2006-08-23 18:02:31 -06:00
tsmith/tim@siva.hindu.god
b8521714af Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-41
into  siva.hindu.god:/usr/home/tim/m/bk/41
2006-08-23 16:30:05 -06:00
tsmith@maint1.mysql.com
e312416ef2 Merge bk-internal:/home/bk/mysql-4.1
into  maint1.mysql.com:/data/localhome/tsmith/bk/41
2006-08-23 22:51:20 +02:00
timour/timka@lamia.home
31373e000b Merge lamia.home:/home/timka/mysql/src/4.1-virgin
into  lamia.home:/home/timka/mysql/src/4.1-bug-21456
2006-08-23 18:30:21 +03:00
timour/timka@lamia.home
de723f2998 Bug #21456: SELECT DISTINCT(x) produces incorrect results when using order by
GROUP BY/DISTINCT pruning optimization must be done before ORDER BY 
optimization because ORDER BY may be removed when GROUP BY/DISTINCT
sorts as a side effect, e.g. in 
  SELECT DISTINCT <non-key-col>,<pk> FROM t1
  ORDER BY <non-key-col> DISTINCT
must be removed before ORDER BY as if done the other way around
it will remove both.
2006-08-23 16:46:57 +03:00
holyfoot/hf@mysql.com/vva.(none)
6f16cb371b Merge hf@192.168.21.12:work/mysql-4.1.15440
into  mysql.com:/home/hf/work/mysql-4.1.clean
2006-08-19 13:31:21 +05:00
jimw@rama.(none)
abc148000d Bug #21288: mysqldump segmentation fault when using --where
The problem was that the error handling was using a too-small buffer to
  print the error message generated. We fix this by not using a buffer at
  all, but by using fprintf() directly. There were also some problems with
  the error handling in table dumping that was exposed by this fix that were
  also corrected.
2006-08-17 14:09:24 -07:00
ramil/ram@mysql.com/myoffice.izhnet.ru
907f5db856 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b20695
2006-08-17 11:36:03 +05:00
iggy@rolltop.ignatz42.dyndns.org
a86f035a08 Bug#20328 - Correction to test/result for broken Windows build. 2006-08-16 13:55:16 -04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
39860d67de Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b9509
2006-08-16 12:42:22 +05:00
bar@mysql.com/bar.intranet.mysql.r18.ru
b1f9b63a54 Merge mysql.com:/usr/home/bar/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b9509
2006-08-16 09:31:24 +05:00
sergefp@mysql.com
86c5cad4e0 BUG#21077: Possible crash caused by invalid sequence of handler::* calls:
The crash was caused by invalid sequence of handler::** calls:                                                           
  ha_smth->index_init();                                                                                                 
  ha_smth->index_next_same(); (2)                                                                                        
(2) is an invalid call as it was not preceeded by any 'scan setup' call
like index_first() or index_read(). The cause was that QUICK_SELECT::reset()
didn't "fully reset" the quick select- current QUICK_RANGE wasn't forgotten,
and quick select might attempt to continue reading the range, which would
result in the above mentioned invalid sequence of handler calls.

5.x versions are not affected by the bug - they already have the missing
"range=NULL" clause.
2006-08-15 20:33:14 +04:00
mskold/marty@mysql.com/linux.site
bacdcb053e Merge mskold@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/windows/Linux_space/MySQL/mysql-4.1
2006-08-15 15:58:02 +02:00
mskold/marty@mysql.com/linux.site
6a3143e2a0 ndb_lock.test, ndb_lock.result:
bug #18184  SELECT ... FOR UPDATE does not work..: New test case
ha_ndbcluster.h, ha_ndbcluster.cc, NdbConnection.hpp:
  Fix for bug #21059  Server crashes on join query with large dataset with NDB tables: Releasing operation for each intermediate batch, before next call to trans->execute(NoCommit);
2006-08-15 13:12:27 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
6660f98b64 Fix for bug #20695: Charset introducer overrides charset definition for column.
- if there are two character set definitions in the column declaration,
    we replace the first one with the second one as we store both in the LEX->charset
    slot. Add a separate slot to the LEX structure to store underscore charset.
  - convert default values to the column charset of STRING, VARSTRING fields 
    if necessary as well.
2006-08-15 15:24:07 +05:00
svoj@april.(none)
a55d18e746 Merge april.(none):/home/svoj/devel/bk/mysql-4.1
into  april.(none):/home/svoj/devel/mysql/BUG18874/mysql-4.1
2006-08-14 18:13:50 +05:00
svoj@may.pils.ru
d4bdba176f BUG#18874 - Setting myisam_repair_threads > 1, index cardinality always 1
Fixed by moving update_key_parts() down to be after write_index().
2006-08-14 17:05:02 +05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
dc4b2a4f1d Make the heap_btree test repeatable. 2006-08-14 12:59:54 +05:00
tsmith/tim@siva.hindu.god
72d55f3878 Bug #20536: md5() with GROUP BY and UCS2 return different results on myisam/innodb
Make the encryption functions MD5(), SHA1() and ENCRYPT() return binary results.
    
Make MAKE_SET() and EXPORT_SET() use the correct character set for their default separator strings.
2006-08-11 17:09:19 -06:00
bar@mysql.com/bar.intranet.mysql.r18.ru
4a63a64f1e mysqld --collation-server=xxx --character-set-server=yyy
didn't work as expected: collation_server was set not to xxx,
but to the default collation of character set "yyy".
    
With different argument order it worked as expected:
mysqld --character-set-server=yyy --collation-server=yyy 
    
Fix:
initializate default_collation_name to 0
when processing --character-set-server
only if --collation-server has not been specified
in command line.
2006-08-11 13:19:44 +05:00
gkodinov/kgeorge@macbook.gmz
9ff33b5d93 Bug #16792 query with subselect, join, and group not returning proper values
Treat queries with no FROM and aggregate functions as normal queries,
so the aggregate function get correctly calculated as if there is 1 row. 
This means that they will be considered to have one row, so COUNT(*) will return
1 instead of 0. Other aggregates will behave in compatible manner.
2006-08-10 16:45:02 +03:00
tnurnberg@salvation.intern.azundris.com
170392850d Bug#19844: time_format in Union truncates values
time_format() claimed %H and %k would return at most two digits
(hours 0-23), but this coincided neither with actual behaviour
nor with docs.  this is not visible in simple queries; forcing
a temp-table is probably the easiest way to see this.  adjusted
the return-length appropriately; the alternative would be to
adjust the docs to say that behaviour for > 99 hours is undefined.
---
Bug#19844: time_format in Union truncates values

time_format() claimed %H and %k would return at most two digits
(hours 0-23), but this coincided neither with actual behaviour
nor with docs.  this is not visible in simple queries; forcing
a temp-table is probably the easiest way to see this.  adjusted
the return-length appropriately; the alternative would be to
adjust the docs to say that behaviour for > 99 hours is undefined.
2006-08-10 15:37:24 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
50ae5b7989 Fix for bug #20709: Collation not used in group by on 4.1.
myisam/mi_uniue.c:mi_check_unique() should skip trailing spaces comparing 
TEXT and VARTTEXT key segments.
2006-08-10 15:06:22 +05:00
cmiller@zippy.cornsilk.net
8e4460343f Removed iggy's accidentally checked-in test files. 2006-08-09 13:41:08 -04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
7ff64de172 Merge mysql.com:/usr/home/bar/mysql-4.1.b19741v0
into  mysql.com:/usr/home/bar/mysql-4.1.b19741
2006-08-07 13:15:23 +05:00
gkodinov/kgeorge@macbook.gmz
3183f73601 Bug #21180: Subselect with index for both WHERE and ORDER BY produces empty result
Reseting subqueries with "quick" access methods was incomplete.
 Partially backported the correct reseting of QUICK_SELECTs from 5.x.
2006-08-03 19:20:30 +03:00
svoj@may.pils.ru
34c83fba8d Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG7391/mysql-4.1
2006-08-03 15:49:41 +05:00
msvensson@neptunus.(none)
83167f06a3 Merge neptunus.(none):/home/msvensson/mysql/my41-bug21218
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-08-03 11:57:52 +02:00
svoj@may.pils.ru
395d3c3985 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.1
into  may.pils.ru:/home/svoj/devel/mysql/BUG7391/mysql-4.1
2006-08-03 14:08:43 +05:00
svoj@may.pils.ru
67db270c71 BUG#7391 - Cross-database multi-table UPDATE uses active database
privileges

This problem is 4.1 specific. It doesn't affect 4.0 and was fixed
in 5.x before.

Having any mysql user who is allowed to issue multi table update
statement and any column/table grants, allows this user to update
any table on a server (mysql grant tables are not exception).

check_grant() accepts number of tables (in table list) to be checked
in 5-th param. While checking grants for multi table update, number
of tables must be 1. It must never be 0 (actually we have
DBUG_ASSERT(number > 0) in 5.x in grant_check() function).
2006-08-03 14:03:08 +05:00
cmiller@zippy.cornsilk.net
dd5eeaf676 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/m41-maint--07OBQ
2006-08-02 14:57:12 -04:00
cmiller@zippy.cornsilk.net
c9f64f71c8 Bug#9719: DELETE with WHERE on HEAP table just deletes first row of matched
set.

(Ramil's patch, recreated.)
2006-08-02 13:06:59 -04:00
evgen@moonbone.local
7451ffcd0a Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-02 18:16:05 +04:00
evgen@moonbone.local
cac5ad03b9 Merge moonbone.local:/work/tmp_merge-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-02 16:40:32 +04:00
evgen@moonbone.local
40a1fbdffb Merge moonbone.local:/work/tmp_merge-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-08-02 16:10:52 +04:00
holyfoot/hf@mysql.com/deer.(none)
2119067eee Merge bk@192.168.21.1:mysql-4.1
into  mysql.com:/home/hf/work/mysql-4.1.20317
2006-08-02 16:57:46 +05:00
msvensson@neptunus.(none)
1b88a957c5 Merge neptunus.(none):/home/msvensson/mysql/my41-bug21125
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-07-31 14:40:21 +02:00
gkodinov/kgeorge@rakia.(none)
351554e121 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20792-4.1-opt
2006-07-27 10:06:37 +03:00
gkodinov/kgeorge@rakia.(none)
e2a082aa32 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B20792-4.1-opt
2006-07-26 19:55:33 +03:00
gkodinov/kgeorge@macbook.gmz
565d495997 * Bug #20792: Incorrect results from aggregate subquery
When processing aggregate functions all tables values are reset
to NULLs at the end of each group. 
When doing that if there are no rows found for a group
the const tables must not be reset as they are not recalculated 
by do_select()/sub_select() for each group.
2006-07-26 19:19:30 +03:00
gkodinov/kgeorge@rakia.(none)
49f8ec4c99 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B21019-4.1-opt
2006-07-26 18:49:26 +03:00
gkodinov/kgeorge@macbook.gmz
6766cfcdf9 Bug #21019: First result of SELECT COUNT(*) different than consecutive runs
When optimizing conditions like 'a = <some_val> OR a IS NULL' so that they're
 united into a single condition on the key and checked together the server must 
 check which value is the NULL value in a correct way : not only using ->is_null 
 but also check if the expression doesn't depend on any tables referenced in the 
 current statement. 
 This additional check must be performed because that optimization takes place 
 before the actual execution of the statement, so if the field was initialized 
 to NULL from a previous statement the optimization would be applied incorrectly.
2006-07-26 13:32:28 +03:00
msvensson@neptunus.(none)
e1b1ba54c6 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Modify test case to workaround the test tool problem
 - (Null merge into 5.0)
2006-07-26 11:08:15 +02:00
timour/tkatchaounov@lamia.home
dd7ae38de4 Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  lamia.home:/home/tkatchaounov/autopush/4.1-bug-20954
2006-07-26 01:21:35 +03:00
timour/timka@lamia.home
86ae2f3b06 Fix for BUG#20954: avg(keyval) retuns 0.38 but max(keyval) returns an empty set
The problem was in that opt_sum_query() replaced MIN/MAX functions
with the corresponding constant found in a key, but due to imprecise
representation of float numbers, when evaluating the where clause,
this comparison failed.

When MIN/MAX optimization detects that all tables can be removed,
also remove all conjuncts in a where clause that refer to these
tables. As a result of this fix, these conditions are not evaluated
twice, and in the case of float number comparisons we do not discard
result rows due to imprecise float representation.

As a side-effect this fix also corrects an unnoticed problem in
bug 12882.
2006-07-26 01:11:19 +03:00
holyfoot/hf@mysql.com/deer.(none)
1252cec249 Bug #15440 (handler.test hangs in embedded mode)
the old problem - mysqltest can't handle multiple connections in the
embedded server properly. So i disabled the test for the embedded mode
until mysqltest is fixed
2006-07-25 18:02:42 +05:00
bar@mysql.com/bar.intranet.mysql.r18.ru
d19cd9382e Bug#19741 segfault with cp1250 charset + like + primary key + 64bit os
LIKE craashed with a pattern having letters in the range 128..255
(e.g. A WITH ACUTE or C WITH CARON) because of wrong cast from
signed char to unsigned int.
2006-07-25 17:27:53 +05:00
msvensson@neptunus.(none)
d8151b6368 Bug#21218 Test "mysqlbinlog" fails to execute another program on Windows
- Send confusing output to /dev/null
2006-07-24 18:12:57 +02:00
msvensson@neptunus.(none)
d89f177377 Bug#21125 mysqldump: Problem with non-standard table names
- The mysql-test/std_data/bug15328.cnf file was not copied to install or dist dir.
2006-07-24 14:31:37 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
694d4999ef Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b16327
2006-07-23 14:17:01 +05:00
sergefp@mysql.com
59dc5e8838 Add missing "DROP TABLE" clause 2006-07-22 02:36:17 +04:00
sergefp@mysql.com
bffd438de3 BUG#20975: Incorrect query result for NOT (subquery):
Add implementations of Item_func_{nop,not}_all::neg_transformer
2006-07-21 03:04:04 +04:00
iggy@rolltop.ignatz42.dyndns.org
36296d1bc9 Manual merge required. 2006-07-19 17:39:53 -04:00
iggy@rolltop.ignatz42.dyndns.org
2835ebdf63 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug20328
2006-07-19 17:00:39 -04:00
igor@olga.mysql.com
f201828dd8 Fixed bug #17526: incorrect print method
for class Item_func_trim. 
For 4.1 it caused wrong output for EXPLAIN EXTENDED commands
if expressions with the TRIM function of two arguments were used.
For 5.0 it caused an error message when trying to select
from a view with the TRIM function of two arguments.
This unexpected error message was due to the fact that the
print method for the class Item_func_trim was inherited from
the class Item_func. Yet the TRIM function does not take a list
of its arguments. Rather it takes the arguments in the form:
  [{BOTH | LEADING | TRAILING} [remstr] FROM] str) |
  [remstr FROM] str
2006-07-19 12:36:55 -07:00
iggy@rolltop.ignatz42.dyndns.org
79483c22bb Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug16180
2006-07-19 13:09:11 -04:00
evgen@moonbone.local
6dd8772bfc Merge moonbone.local:/home/evgen/bk-trees/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-07-18 23:30:09 +04:00
evgen@moonbone.local
a8d230c672 Merge moonbone.local:/work/mysql-4.1
into  moonbone.local:/work/tmp_merge-4.1-opt-mysql
2006-07-18 21:30:26 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
0d15e5e340 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/ram/work/4.1.b15195
2006-07-14 16:58:51 +05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
b57efe738a --{skip-}merge option added which allows the user to disable merge engine and
to avoid the potential security problem.
(see bug #15195: Security Breach with MERGE table)
2006-07-14 16:26:58 +05:00
gkodinov/kgeorge@rakia.(none)
f04ea13511 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  rakia.(none):/home/kgeorge/mysql/autopush/B17212-4.1-opt
2006-07-14 12:49:14 +03:00
cmiller@zippy.(none)
fafc11205c Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  zippy.(none):/home/cmiller/work/mysql/m41-maint--07AB5
2006-07-13 13:03:36 -04:00
igreenhoe/greenman@anubis.greendragongames.com
8e3d69d986 Merge igreenhoe@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/pending/bug-4.1-15977
2006-07-13 00:33:49 -07:00
tnurnberg@mysql.com/salvation.intern.azundris.com
4be51e1644 Bug#20432: mysql client interprets commands in comments
do not look for client-specific commands while inside a multi-line comment.
we will allow multi-comments pretty much anywhere within SQL-statements,
but client-specific commands (help, use, print, ...) must be the first token
in the input.
2006-07-13 09:04:06 +02:00
gkodinov/kgeorge@macbook.gmz
5079d5cf6a Bug #17212 results not sorted correctly by ORDER BY when using index
* don't use join cache when the incoming data set is already ordered
    for ORDER BY
    This choice must be made because join cache will effectively
    reverse the join order and the results will be sorted by the index
    of the table that uses join cache.
2006-07-12 10:57:38 +03:00
evgen@moonbone.local
363d14569e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  moonbone.local:/work/16302-bug-4.1-opt-mysql
2006-07-12 06:12:59 +04:00
evgen@moonbone.local
5d4881b864 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  moonbone.local:/work/18503-bug-4.1-mysql
2006-07-12 02:52:29 +04:00
evgen@moonbone.local
8ffda481c9 Fixed bug#18503: Queries with a quantified subquery returning empty set
may return a wrong result.

An Item_sum_hybrid object has the was_values flag which indicates whether any
values were added to the sum function. By default it is set to true and reset
to false on any no_rows_in_result() call. This method is called only in
return_zero_rows() function. An ALL/ANY subquery can be optimized by MIN/MAX
optimization. The was_values flag is used to indicate whether the subquery
has returned at least one row. This bug occurs because return_zero_rows() is
called only when we know that the select will return zero rows before
starting any scans but often such information is not known.
In the reported case the return_zero_rows() function is not called and
the was_values flag is not reset to false and yet the subquery return no rows
Item_func_not_all and Item_func_nop_all functions return a wrong
comparison result.

The end_send_group() function now calls no_rows_in_result() for each item
in the fields_list if there is no rows were found for the (sub)query.
2006-07-12 01:52:18 +04:00
cmiller@zippy.(none)
f12bc24ac6 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.(none):/home/cmiller/work/mysql/m41-maint--07AB5
2006-07-11 14:25:42 -04:00
cmiller@zippy.(none)
22485908ce Bug#20729: Bad date_format() call makes mysql server crash
The problem is that the author used the wrong function to send a warning to the 
user about truncation of data.  push_warning() takes a constant string and 
push_warning_printf() takes a format and variable arguments to fill it.

Since the string we were complaining about contains percent characters, the 
printf() code interprets the "%Y" et c. that the user sends.  That's wrong, and
often causes a crash, especially if the date mentions seconds, "%s".

A alternate fix would be to use  push_warning_printf(..., "%s", warn_buff) .
2006-07-11 13:06:29 -04:00
evgen@moonbone.local
ff3ffe5c39 Merge moonbone.local:/work/allany-4.1-mysql
into  moonbone.local:/work/16302-bug-4.1-opt-mysql
2006-07-11 17:48:33 +04:00
evgen@moonbone.local
a65bf3bf90 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  moonbone.local:/home/evgen/bk-trees/mysql-4.1-opt
2006-07-11 17:35:36 +04:00
evgen@moonbone.local
4235ab7e1c Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-4.1-opt
into  moonbone.local:/work/allany-4.1-mysql
2006-07-11 00:36:14 +04:00
evgen@moonbone.local
d34189715e Fixed bug#16302: Quantified subquery without any tables gives wrong results
The ALL/ANY subqueries are the subject of MIN/MAX optimization. The matter
of this optimization is to embed MIN() or MAX() function into the subquery
in order to get only one row by which we can tell whether the expression
with ALL/ANY subquery is true or false.
But when it is applied to a subquery like 'select a_constant' the reported bug
occurs. As no tables are specified in the subquery the do_select() function 
isn't called for the optimized subquery and thus no values have been added 
to a MIN()/MAX() function and it returns NULL instead of a_constant.
This leads to a wrong query result.

For the subquery like 'select a_constant' there is no reason to apply
MIN/MAX optimization because the subquery anyway will return at most one row.
Thus the Item_maxmin_subselect class is more appropriate for handling such
subqueries.

The Item_in_subselect::single_value_transformer() function now checks
whether tables are specified for the subquery. If no then this subselect is
handled like a UNION using an Item_maxmin_subselect object.
2006-07-11 00:34:37 +04:00
gkodinov/kgeorge@macbook.gmz
893e92761f Merge rakia:mysql/4.1/B14553
into  macbook.gmz:/Users/kgeorge/mysql/work/B14553-4.1-opt
2006-07-10 16:27:04 +03:00
gkodinov/kgeorge@mysql.com/rakia.(none)
2c9f5cc706 BUG#14553: NULL in WHERE resets LAST_INSERT_ID
To make MySQL compatible with some ODBC applications, you can find
the AUTO_INCREMENT value for the last inserted row with the following query:
 SELECT * FROM tbl_name WHERE auto_col IS NULL.
This is done with a special code that replaces 'auto_col IS NULL' with
'auto_col = LAST_INSERT_ID'.
However this also resets the LAST_INSERT_ID to 0 as it uses it for a flag
so as to ensure that only the first SELECT ... WHERE auto_col IS NULL
after an INSERT has this special behaviour.
In order to avoid resetting the LAST_INSERT_ID a special flag is introduced
in the THD class. This flag is used to restrict the second and subsequent
SELECTs instead of LAST_INSERT_ID.
2006-07-10 16:27:03 +03:00
ingo/mydev@chilla.local
d341ca941f Merge chilla.local:/home/mydev/mysql-4.1-bug17877
into  chilla.local:/home/mydev/mysql-4.1-amerge
2006-07-08 19:26:18 +02:00
bar@mysql.com
2303077238 Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17647
2006-07-07 12:17:00 +05:00
konstantin@bodhi.netgear
0db71aaf98 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  bodhi.netgear:/opt/local/work/mysql-4.1-19399
2006-07-07 00:01:05 +04:00
konstantin@bodhi.netgear
8e735d2c11 A fix and a test case for Bug#19399 "res 'Lost Connection' when
dropping/creating tables".

The bug could lead to a crash when multi-delete statements were
prepared and used with temporary tables.

The bug was caused by lack of clean-up of multi-delete tables before
re-execution of a prepared statement. In a statement like
DELETE t1 FROM t1, t2 WHERE ... the first table list (t1) is
moved to lex->auxilliary_table_list and excluded from lex->query_tables
or select_lex->tables. Thus it was unaccessible to reinit_stmt_before_use
and not cleaned up before re-execution of a prepared statement.
2006-07-06 23:59:04 +04:00
iggy@rolltop.ignatz42.dyndns.org
1fe4159026 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1_bug20328
2006-07-06 15:13:25 -04:00
iggy@rolltop.ignatz42.dyndns.org
646dd6e65c Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1_bug16180
2006-07-06 15:00:31 -04:00