Commit graph

38609 commits

Author SHA1 Message Date
gluh@mysql.com/eagle.(none)
4e50bb0ebe Merge mysql.com:/home/gluh/MySQL/Merge/4.1
into  mysql.com:/home/gluh/MySQL/Merge/4.1-opt
2007-12-13 14:38:01 +04:00
mhansson/martin@linux-st28.site
33c4431d39 Bug #32858: Erro: "Incorrect usage of UNION and INTO" does not take
subselects into account

It is forbidden to use the SELECT INTO construction inside UNION statements
unless on the last SELECT of the union. The parser records whether it 
has seen INTO or not when parsing a UNION statement. But if the INTO was
legally used in an outer query, an error is thrown if UNION is seen in a
subquery. Fixed in 5.0 by remembering the nesting level of INTO tokens and 
mitigate the error unless it collides with the UNION.
2007-12-13 11:19:05 +01:00
anozdrin/alik@station.
7d9dd21cd9 Merge station.:/mnt/raid/alik/MySQL/devel/5.0
into  station.:/mnt/raid/alik/MySQL/devel/5.0-rt
2007-12-13 12:01:04 +03:00
tsmith@ramayana.hindu.god
31c1ca4f46 Merge ramayana.hindu.god:/home/tsmith/m/bk/50
into  ramayana.hindu.god:/home/tsmith/m/bk/build/mrg12dec/50
2007-12-12 18:42:26 -07:00
istruewing@stella.local
9217f01136 Dummy push to help pushbuild running again.
Fixed case of comment.
2007-12-12 19:49:08 +01:00
kostja@bodhi.(none)
4c83efbb95 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-12-12 06:00:10 +03:00
istruewing@stella.local
fb93ba7a08 Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-12-11 23:18:14 +01:00
joerg@debian.(none)
2740e876f6 Merge debian.(none):/MySQL/M50/mysql-5.0
into  debian.(none):/MySQL/M50/push-5.0
2007-12-11 21:00:11 +01:00
tomas@whalegate.ndb.mysql.com
faaac96f98 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
2007-12-11 20:59:24 +01:00
joerg@debian.(none)
479ed82765 Merge debian.(none):/MySQL/M50/indent-5.0
into  debian.(none):/MySQL/M50/push-5.0
2007-12-11 20:47:31 +01:00
mhansson/martin@linux-st28.site
867a786549 Bug#32848: Data type conversion bug in union subselects in MySQL 5.0.38
There were two problems when inferring the correct field types resulting from
UNION queries.
- If the type is NULL for all corresponding fields in the UNION, the resulting 
  type would be NULL, while the type is BINARY(0) if there is just a single 
  SELECT NULL.
- If one SELECT in the UNION uses a subselect, a temporary table is created
  to represent the subselect, and the result type defaults to a STRING type,
  hiding the fact that the type was unknown(just a NULL value).
Fixed by remembering whenever a field was created from a NULL value and pass
type NULL to the type coercion if that is the case, and creating a string field
as result of UNION only if the type would otherwise be NULL.
2007-12-11 20:15:03 +01:00
df@pippilotta.erinye.com
de716f1f86 No we're still at 5.0.54. 2007-12-11 17:38:49 +01:00
istruewing@stella.local
ba2d58ae5e Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-12-11 17:09:43 +01:00
tomas@whalegate.ndb.mysql.com
9a189642e7 remoce compiler warnings 2007-12-11 11:41:19 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
3f0f275030 Bug#31990: MINUTE() and SECOND() return bogus results when used on a DATE
HOUR(), MINUTE(), ... returned spurious results when used on a DATE-cast.
This happened because DATE-cast object did not overload get_time() method
in superclass Item. The default method was inappropriate here and
misinterpreted the data.

Patch adds missing method; get_time() on DATE-casts now returns SQL-NULL
on NULL input, 0 otherwise. This coincides with the way DATE-columns
behave.

Also fixes similar bug in Date-Field now.
2007-12-11 10:12:05 +01:00
joerg@debian.(none)
d067b33783 Makefile.am
Formatting change to improve readability of the "test-*" targets.
2007-12-10 19:23:17 +01:00
thek@adventure.(none)
7be4b6b5f4 Test fails because of non deterministric function: show grants for current_user() 2007-12-10 16:16:21 +01:00
thek@adventure.(none)
0f1665da3c Merge adventure.(none):/home/thek/Development/cpp/bug27440/my50-bug27440
into  adventure.(none):/home/thek/Development/cpp/mysql-5.0-runtime
2007-12-10 12:19:48 +01:00
df@pippilotta.erinye.com
a079cb9f49 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-release
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-12-10 12:02:02 +01:00
df@pippilotta.erinye.com
efd74cb680 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-12-10 10:52:05 +01:00
df@pippilotta.erinye.com
45c93a5866 Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
2007-12-10 10:42:58 +01:00
df@pippilotta.erinye.com
353cd3300a Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-4.1-build
2007-12-10 10:41:34 +01:00
tomas@whalegate.ndb.mysql.com
ddbb4d425c Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-12-10 10:31:51 +01:00
tomas@whalegate.ndb.mysql.com
ae7d4929e0 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb-merge
2007-12-10 10:20:52 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
8651aeb2c4 Bug#32770: LAST_DAY() returns a DATE, but somehow internally keeps track of the TIME.
LAST_DAY() says it returns a DATE, not a DATETIME, but didn't zero the time fields.
Adapted from a patch kindly supplied by Claudio Cherubino.
2007-12-10 09:17:18 +01:00
igor@olga.mysql.com
0e3e5cf40d Forced compilers to remove the warning appeared after the patch
with a fix for bug 32694.
2007-12-09 11:53:07 -08:00
igor@olga.mysql.com
f781e154e3 Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug27545
2007-12-08 16:22:45 -08:00
igor@olga.mysql.com
be5485ce6d Merge olga.mysql.com:/home/igor/mysql-5.0-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug32815
2007-12-08 14:47:56 -08:00
timour/tkatchaounov@lapi.mysql.com
9be915e743 Fix for BUG#32694 "NOT NULL table field in a subquery produces invalid results"
The problem was that when convert_constant_item is called for subqueries,
this happens when we already started executing the top-level query, and
the field argument of convert_constant_item pointed to a valid table row.
In turn convert_constant_item used the field buffer to compute the value
of its item argument. This copied the item's value into the field,
and made equalities with outer references always true.
  
The fix saves/restores the original field's value when it belongs to an
outer table.
2007-12-08 23:05:00 +02:00
igor@olga.mysql.com
c04d3727dc Fixed bug #27545.
Both arguments of the function NAME_CONST must be constant expressions.
This constraint is checked in the Item_name_const::fix_fields method. 
Yet if the argument of the function was not a constant expression no
error message was reported. As a result the client hanged waiting for a
response.
Now the function Item_name_const::fix_fields reports an error message
when any of the additional context conditions imposed on the function
NAME_CONST is not satisfied.
2007-12-07 23:36:58 -08:00
igor@olga.mysql.com
c394dbe14a Fixed bug #32815.
The index (key_part_1, key_part-2) was erroneously considered as compatible
with the required ordering in the function test_test_if_order_by_key when 
a query with an ORDER BY clause contained a condition of the form
  key_part_1=const OR key_part_1 IS NULL 
and the order list contained only key_part_2. This happened because the value
of the const_key_parts field in the KEYUSE structure was not formed correctly
for the keys that could be used for ref_or_null access. 
This was fixed in the code of the update_ref_and_keys function.
The problem could not manifest itself for MyISAM databases because the
implementation of the keys_to_use_for_scanning() handler function always
returns an empty bitmap for the MyISAM engine.
2007-12-07 17:14:59 -08:00
tsmith@ramayana.hindu.god
4eb097ba12 Add a way to remove options which mysql-test-run.pl no longer uses. 2007-12-07 14:43:31 -07:00
thek@adventure.(none)
392cc185b3 Bug #27440 read_only allows create and drop database
When read_only option was enabled, a user without SUPER privilege could
perform CREATE DATABASE and DROP DATABASE operations.

This patch adds a check to make sure this isn't possible. It also attempts to 
simplify the logic used to determine if relevant tables are updated,
making it more human readable.
2007-12-07 15:39:41 +01:00
mskold/marty@mysql.com/quadfish.(none)
4619caa5d5 Removed illegal cast 2007-12-07 14:03:54 +01:00
joerg@trift2.
fd5000f650 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-12-07 13:51:41 +01:00
mskold/marty@mysql.com/quadfish.(none)
6047fb2e44 Removed illegal cast 2007-12-07 13:42:44 +01:00
tsmith@ramayana.hindu.god
8c5f194505 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-12-07 03:51:23 -07:00
tsmith@ramayana.hindu.god
bf6292ea97 Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/41
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-12-07 03:40:18 -07:00
tsmith@ramayana.hindu.god
6835272b37 Make tests more robust (clean up better after grant.test) 2007-12-07 03:39:37 -07:00
mskold/marty@mysql.com/quadfish.(none)
fc6f839b03 bug#21072 Duplicate key error in NDB references wrong key: Post-review fixes 2007-12-07 10:33:50 +01:00
tsmith@ramayana.hindu.god
b922c9646c Fix compiler warning about wrong integer size (probably harmless) 2007-12-06 16:11:26 -07:00
tsmith@ramayana.hindu.god
44d74f631f ctype-simple.c: Backport quick fix to remove Windows compiler warnings 2007-12-06 15:05:24 -07:00
mskold/marty@mysql.com/quadfish.(none)
27c025061d bug#21072 Duplicate key error in NDB references wrong key: Return correct key for non-batching inserts 2007-12-06 17:15:21 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
dddced964b Bug#31752: check strmake() bounds
post-fixes: prevent semi-related overflow, additional comments
2007-12-06 11:48:27 +01:00
tnurnberg@white.intern.koehntopp.de
987ec3f306 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31177/50-31177
2007-12-06 08:46:01 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
b1e77cfc31 Bug#31177: Server variables can't be set to their current values
additional fixes for BDB and correct assignment of both signed
and unsigned 64-bit data to unsigned system variables
2007-12-06 01:28:01 +01:00
tsmith@ramayana.hindu.god
f1323ad628 Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/41
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-12-05 15:29:37 -07:00
tsmith@ramayana.hindu.god
10cab933b2 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-12-04 20:58:21 -07:00
tsmith@ramayana.hindu.god
6453025165 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-4.1
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/41
2007-12-04 19:16:22 -07:00
jperkin/jonathan@chorlton.adsl.perkin.org.uk
be06bfe1be post-commit:
Use $BK_USER, if set, in preference to $USER
2007-12-04 12:57:16 +00:00