Commit graph

38204 commits

Author SHA1 Message Date
svoj@mysql.com/june.mysql.com
107822cf87 Merge mysql.com:/home/svoj/devel/bk/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31277/mysql-4.1-engines
2007-11-14 14:30:21 +04:00
svoj@mysql.com/june.mysql.com
7f9298b919 Merge mysql.com:/home/svoj/devel/mysql/BUG29083/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG31277/mysql-4.1-engines
2007-11-14 14:29:49 +04:00
holyfoot/hf@hfmain.(none)
fbac43bbba Merge mysql.com:/home/hf/work/31305/my41-31305
into  mysql.com:/home/hf/work/31305/my50-31305
2007-11-13 23:15:03 +04:00
holyfoot/hf@hfmain.(none)
acd198d5fa Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/31305/my50-31305
2007-11-13 23:13:59 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
0c15068ff8 Merge bk@192.168.21.1:mysql-4.1-opt
into  mysql.com:/home/hf/work/31305/my41-31305
2007-11-13 23:12:55 +04:00
gkodinov/kgeorge@magare.gmz
eea70871f1 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/autopush/B31562-5.0-opt
2007-11-13 19:00:45 +02:00
gkodinov/kgeorge@magare.gmz
3384d3e96c Bug #31562: HAVING and lower case
The columns in HAVING can reference the GROUP BY and 
SELECT columns. There can be "table" prefixes when
referencing these columns. And these "table" prefixes
in HAVING use the table alias if available.
This means that table aliases are subject to the same
storage rules as table names and are dependent on 
lower_case_table_names in the same way as the table 
names are.
Fixed by :
1. Treating table aliases as table names
and make them lowercase when printing out the SQL
statement for view persistence.
2. Using case insensitive comparison for table 
aliases when requested by lower_case_table_names
2007-11-13 11:39:52 +02:00
mattiasj@mattiasj-laptop.(none)
7491e15f21 Merge mattiasj@bk-internal.mysql.com:/home/bk/mysql-5.0-engines
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
2007-11-12 22:47:48 +01:00
mattiasj@mattiasj-laptop.(none)
f4c100135b Merge mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-main
into  mattiasj-laptop.(none):/home/mattiasj/clones/mysql-5.0-engines_with_main
2007-11-12 21:42:27 +01:00
kent@mysql.com/kent-amd64.(none)
b94de5d1d6 Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1-build
into  mysql.com:/home/kent/bk/bug30069/mysql-4.1-build
2007-11-12 18:57:50 +01:00
svoj@june.mysql.com
9799d6c479 Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines
2007-11-12 21:54:04 +04:00
svoj@mysql.com/june.mysql.com
ed8f506d29 symlink.test, symlink.result:
Use proper variable for test.
2007-11-12 21:52:30 +04:00
istruewing@stella.local
83a9db9a30 Merge stella.local:/home2/mydev/mysql-5.0-ateam
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-12 16:44:05 +01:00
svoj@mysql.com/june.mysql.com
417669f9e8 Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-4.0
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.0
2007-11-12 17:28:02 +04:00
kent@kent-amd64.(none)
af7d3963b2 Merge mysql.com:/home/kent/bk/bug30069/mysql-4.1-build
into  mysql.com:/home/kent/bk/bug30069/mysql-5.0-build
2007-11-12 13:13:43 +01:00
kent@mysql.com/kent-amd64.(none)
3bb7cac84b bigint.test, bigint.result:
Test case for Bug#30069
2007-11-12 12:52:03 +01:00
svoj@june.mysql.com
5e44309422 Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-5.0-engines
2007-11-12 15:16:00 +04:00
svoj@mysql.com/june.mysql.com
40a78cd390 After merge fix. 2007-11-12 15:15:16 +04:00
svoj@mysql.com/june.mysql.com
a6def1f4ab Merge mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.0
into  mysql.com:/home/svoj/devel/mysql/BUG32111/mysql-4.1-engines
2007-11-12 15:02:42 +04:00
kaa@polly.(none)
bf2a90f14b Merge polly.(none):/home/kaa/src/opt/bug30666/my50-bug29131
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-12 12:29:20 +03:00
holyfoot/hf@hfmain.(none)
83a2781894 Merge mysql.com:/home/hf/work/31305/my41-31305
into  mysql.com:/home/hf/work/31305/my50-31305
2007-11-12 13:06:27 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
91e2f91897 Bug #31305 myisam tables crash when they are near capacity.
When we insert a record into MYISAM table which is almost 'full',
we first write record data in the free space inside a file, and then
check if we have enough space after the end of the file.
So if we don't have the space, table will left corrupted.
Similar error also happens when we updata MYISAM tables.

Fixed by modifying write_dynamic_record and update_dynamic_record functions
to check for free space before writing parts of a record
2007-11-12 13:00:22 +04:00
istruewing@stella.local
a36d20561f Merge stella.local:/home2/mydev/mysql-5.0-amain
into  stella.local:/home2/mydev/mysql-5.0-axmrg
2007-11-11 19:22:22 +01:00
tnurnberg@white.intern.koehntopp.de
3847b1b2eb Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31700/50-31700
2007-11-10 21:53:54 +01:00
gshchepa/uchum@gleb.loc
8b21045f9b Merge gshchepa@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-11-11 00:01:24 +04:00
gshchepa/uchum@gleb.loc
e5394523d3 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-28076
into  gleb.loc:/home/uchum/work/bk/5.0-opt
2007-11-10 23:58:22 +04:00
kaa@polly.(none)
b745305b20 Merge polly.(none):/home/kaa/src/opt/bug32202/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-10 22:46:25 +03:00
gshchepa/uchum@gleb.loc
0aabb89ee1 Fixed bug #28076: inconsistent binary/varbinary comparison.
After adding an index the <VARBINARY> IN (SELECT <BINARY> ...)
clause returned a wrong result: the VARBINARY value was illegally padded
with zero bytes to the length of the BINARY column for the index search.
(<VARBINARY>, ...) IN (SELECT <BINARY>, ... ) clauses are affected too.
2007-11-10 23:44:48 +04:00
tnurnberg@white.intern.koehntopp.de
4c1ff7b54b Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31700/50-31700
2007-11-10 19:18:47 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
8a5e621ff2 Bug#31700: thd->examined_row_count not incremented for 'const' type queries
UNIQUE (eq-ref) lookups result in table being considered as a "constant" table.
Queries that consist of only constant tables are processed in do_select() in a
special way that doesn't invoke evaluate_join_record(), and therefore doesn't
increase the counters join->examined_rows and join->thd->row_count.

The patch increases these counters in this special case.

NOTICE:
This behavior seems to contradict what the documentation says in Sect. 5.11.4:
"Queries handled by the query cache are not added to the slow query log, nor
are queries that would not benefit from the presence of an index because the
table has zero rows or one row."

No test case in 5.0 as issue shows only in slow query log, and other counters
can give subtly different values (with regard to counting in create_sort_index(),
synthetic rows in ROLLUP, etc.).
2007-11-10 18:29:13 +01:00
tnurnberg@white.intern.koehntopp.de
d97dd5a4e5 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/scratch/tnurnberg/31800/50-31800
2007-11-10 13:35:35 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
dd7452c280 Bug#31800: Date comparison fails with timezone and slashes for greater than comparison
BETWEEN was more lenient with regard to what it accepted as a DATE/DATETIME
in comparisons than greater-than and less-than were. ChangeSet makes < >
comparisons similarly robust with regard to trailing garbage (" GMT-1")
and "missing" leading zeros. Now all three comparators behave similarly
in that they throw a warning for "junk" at the end of the data, but then
proceed anyway if possible. Before < > fell back on a string- (rather than
date-) comparison when a warning-condition was raised in the string-to-date
conversion. Now the fallback only happens on actual errors, while warning-
conditions still result in a warning being to delivered to the client.
2007-11-10 13:33:42 +01:00
tnurnberg@white.intern.koehntopp.de
0cd82301fb Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  mysql.com:/misc/mysql/31990/50-31990
2007-11-10 03:12:57 +01:00
tsmith@ramayana.hindu.god
339b3217eb Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50-fix
into  ramayana.hindu.god:/home/tsmith/m/bk/build/50
2007-11-09 18:44:08 -07:00
tsmith@ramayana.hindu.god
faf9d4e922 Fix Windows build problems. 2007-11-09 18:27:20 -07:00
kaa@polly.(none)
8c19367881 Fix for bug #32202: ORDER BY not working with GROUP BY
The bug is a regression introduced by the fix for bug30596. The problem
was that in cases when groups in GROUP BY correspond to only one row,
and there is ORDER BY, the GROUP BY was removed and the ORDER BY
rewritten to ORDER BY <group_by_columns> without checking if the
columns in GROUP BY and ORDER BY are compatible. This led to
incorrect ordering of the result set as it was sorted using the
GROUP BY columns. Additionaly, the code discarded ASC/DESC modifiers
from ORDER BY even if its columns were compatible with the GROUP BY
ones.

This patch fixes the regression by checking if ORDER BY columns form a
prefix of the GROUP BY ones, and rewriting ORDER BY only in that case,
preserving the ASC/DESC modifiers. That check is sufficient, since the
GROUP BY columns contain a unique index.
2007-11-09 19:12:12 +03:00
svoj@mysql.com/june.mysql.com
c6abad79c8 BUG#29083 - test suite times out on OS X 64bit - also in older releases
The "mysql client in mysqld"(which is used by
replication and federated) should use alarms instead of setting
socket timeout value if the rest of the server uses alarm. By
always calling 'my_net_set_write_timeout'
or 'net_set_read_timeout' when changing the timeout value(s), the
selection whether to use alarms or timeouts will be handled by
ifdef's in those two functions.

This is minimal backport of patch for BUG#26664, which was pushed
to 5.0 and up.

Affects 4.1 only.
2007-11-09 16:05:01 +04:00
kaa@polly.(none)
6320cdedb2 Merge polly.(none):/home/kaa/src/opt/bug32020/my50-bug31445
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-09 13:41:50 +03:00
kaa@polly.(none)
e703c6a78c Fix for bug #32020: loading udfs while --skip-grant-tables is enabled
causes out of memory errors

The code in mysql_create_function() and mysql_drop_function() assumed
that the only reason for UDFs being uninitialized at that point is an
out-of-memory error during initialization. However, another possible 
reason for that is the --skip-grant-tables option in which case UDF 
initialization is skipped and UDFs are unavailable.

The solution is to check whether mysqld is running with
--skip-grant-tables and issue a proper error in such a case.
2007-11-09 13:29:43 +03:00
kent@kent-amd64.(none)
8a20af716a Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.0-build
into  mysql.com:/home/kent/bk/bug25205/mysql-5.0-build
2007-11-08 18:16:58 +01:00
joerg@trift2.
df8e60ae01 Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2007-11-08 10:33:57 +01:00
kaa@polly.(none)
00e897ac90 Merge polly.(none):/home/kaa/src/opt/mysql-4.1-opt
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-08 12:08:22 +03:00
kaa@polly.(none)
d27375aff5 Merge polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-5.0-opt
2007-11-08 12:06:14 +03:00
kaa@polly.(none)
d11cd24c32 Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into  polly.(none):/home/kaa/src/opt/mysql-4.1-opt
2007-11-08 12:04:48 +03:00
kaa@polly.(none)
8efd7ef146 Merge polly.(none):/home/kaa/src/opt/bug32103/my41-bug26215
into  polly.(none):/home/kaa/src/opt/bug32103/my50-bug26215
2007-11-08 11:46:58 +03:00
tnurnberg@mysql.com/white.intern.koehntopp.de
5a5ed2a509 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.
2007-11-08 06:08:44 +01:00
tsmith@ramayana.hindu.god
30b56973cb Merge ramayana.hindu.god:/home/tsmith/m/bk/build/50
into  ramayana.hindu.god:/home/tsmith/m/bk/build/b20748/50
2007-11-07 16:26:29 -07:00
tsmith@ramayana.hindu.god
ef59ca3d78 Bug #20748: Configuration files should not be read more than once
A user could not override system-wide settings in their ~/.my.cnf,
because the DEFAULT_SYSCONFDIR was being searched last.  Also, in
some configurations (especially when the --sysconfdir compile-time
option is set to /etc or /etc/mysql), the system-wide my.cnf file
was read multiple times, causing confusion and potential problems.

Rearrange default directories to conform to the manual and logic.
Move --sysconfdir=<path> (DEFAULT_SYSCONFDIR) from the last default
directory to the middle of the list.  $HOME/.my.cnf should be last,
so the user is able to override the system-wide settings.

Change init_default_directories() to remove duplicates from the
list.
2007-11-07 15:23:50 -07:00
kaa@polly.(none)
f1a3c36403 Fix for bug #32103: optimizer crash when join on int and mediumint with
variable in where clause.

Problem: the new_item() method of Item_uint used an incorrect
constructor. "new Item_uint(name, max_length)" calls
Item_uint::Item_uint(const char *str_arg, uint length) which assumes the
first argument to be the string representation of the value, not the
item's name. This could result in either a server crash or incorrect
results depending on usage scenarios.

Fixed by using the correct constructor in new_item():
Item_uint::Item_uint(const char *str_arg, longlong i, uint length).
2007-11-07 18:45:04 +03:00
kaa@polly.(none)
4aa0402224 Fix for bug #30666: Incorrect order when using range conditions on 2
tables or more

The problem was that the optimizer used the join buffer in cases when
the result set is ordered by filesort. This resulted in the ORDER BY
clause being ignored, and the records being returned in the order
determined by the order of matching records in the last table in join.

Fixed by relaxing the condition in make_join_readinfo() to take
filesort-ordered result sets into account, not only index-ordered ones.
2007-11-07 14:00:45 +03:00