Commit graph

39651 commits

Author SHA1 Message Date
Tatiana A. Nurnberg
8cb7c9030f auto-merge 2009-02-06 18:47:54 +01:00
Tatiana A. Nurnberg
b16ad3bac2 Bug#42525: TIMEDIFF function
In 37553 we declared longlong results for
class Item_str_timefunc as per comments/docs,
but didn't add a method for that. And the
default just wasn't good enough for some
cases.

Changeset adds dedicated val_int() to class.
2009-02-06 18:25:08 +01:00
Timothy Smith
914e81c38e Auto merge from main 5.0 2009-02-06 15:51:36 +01:00
Timothy Smith
299aeb53b7 Handle renamed nwbootstrap -> nwbuild 2009-02-06 15:07:45 +01:00
Georgi Kodinov
7fe7d9b2d2 merged 5.0-main -> 5.0-bugteam 2009-02-06 15:39:29 +02:00
Alexey Kopytov
0a6c553510 Temporarily reverted patch for bug #41868 as it was causing problems in PB. 2009-02-06 12:51:11 +03:00
Matthias Leich
a63c2e5c30 2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Fixed tests:
  backup
  check
  compress
  grant
  information_schema
  multi_update
  overflow
  packet
  query_cache_not_embedded
  sp-threads
  subselect
  synchronization
  timezone_grant
2009-02-05 21:47:23 +01:00
Alexey Kopytov
e266164832 Merge to team tree. 2009-02-05 15:48:30 +03:00
Alexey Kopytov
58f67beb92 Merge from team tree. 2009-02-05 15:07:11 +03:00
Gleb Shchepa
23fb47a3ad Bug #42037: Queries containing a subquery with DISTINCT and
ORDER BY could cause a server crash

Dependent subqueries like

  SELECT COUNT(*) FROM t1, t2 WHERE t2.b
   IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a)

caused a memory leak proportional to the
number of outer rows.


The make_simple_join() function has been modified to
JOIN class method to store join_tab_reexec and
table_reexec values in the parent join only
(make_simple_join of tmp_join may access these values
via 'this' pointer of the parent JOIN).

NOTE: this patch doesn't include standard test case (this is
"out of memory" bug). See bug #42037 page for test cases.
2009-02-05 13:30:39 +04:00
Ramil Kalimullin
909d29ee05 Fix for bug#42014: Crash, name_const with collate
Problem: some queries using NAME_CONST(.. COLLATE ...)
lead to server crash due to failed type cast.

Fix: return the underlying item's type in case of
NAME_CONST(.. COLLATE ...) to avoid wrong casting.
2009-02-05 11:43:39 +04:00
Chad MILLER
69cd86934d Merge from bug tree. 2009-02-04 13:57:33 -05:00
Matthias Leich
f3e0950d86 Merge last changesets into tree, no conflicts 2009-02-04 16:34:28 +01:00
Sergey Vojtovich
8745e368b7 BUG#32047 - 'Spurious' errors while opening MERGE tables
Accessing well defined MERGE table may return an error
stating that the merge table is incorrectly defined. This
happens if MERGE child tables were accessed before and we
failed to open another incorrectly defined MERGE table in
this connection.

myrg_open() internally used my_errno as a variable for determining
failure, and thus could be tricked into a wrong decision by other
uses of my_errno.

With this fix we use function local boolean flag instead of my_errno
to determine failure.
2009-02-04 15:46:23 +04:00
Timothy Smith
058b33d048 The nwbootstrap script depended on BitKeeper, and was fairly complicated. It's much
simpler to just use the source .tar.gz to do a build.  So the script has been renamed
to nwbuild, and simplified.
2009-02-04 04:20:42 +01:00
Alexey Kopytov
887d1493fa Fix for bug #41868: crash or memory overrun with concat + upper, date_format
functions
      
String::realloc() did not check whether the existing string data fits in the newly
allocated buffer for cases when reallocating a String object with external buffer
(i.e.alloced == FALSE).  This could lead to memory overruns in some cases.
2009-02-03 20:19:01 +03:00
Georgi Kodinov
78d80a882a changed the version in .bzr-mysql/default.conf 2009-02-03 11:04:22 +02:00
Patrick Crews
ed5ee58bfc Bug#39369: execution of "variables.test" with "check-testcases" show differences.
The original symptoms of this bug have been fixed as a consequence of other bug fixes.
Taking this time to correct some formatting, such as replacing error numbers with names.
Beginning this with 5.0
2009-02-02 17:30:02 -05:00
Matthias Leich
7da691c9f8 1. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements like
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Modifications according to the code review are included.
Fixed tests:
grant2
grant3
lock_tables_lost_commit
mysqldump
openssl_1
outfile
2009-02-02 22:20:25 +01:00
Tatiana A. Nurnberg
5622d4261f Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
2009-02-02 18:19:07 +01:00
Tatiana A. Nurnberg
d36d50f414 auto-merge 2009-01-31 02:07:36 +01:00
Tatiana A. Nurnberg
1fcf891629 Bug#41370: TIMESTAMP field does not accepts NULL from FROM_UNIXTIME()
When storing a NULL to a TIMESTAMP NOT NULL DEFAULT ...,
NULL returned from some functions threw a 'cannot be NULL error.'

NULL-returns now correctly result in the timestamp-field being
assigned its default value.
2009-01-30 17:12:24 +01:00
Georgi Kodinov
dd8c492801 merged 5.0-main -> 5.0-bugteam 2009-01-30 13:21:53 +02:00
Joerg Bruehe
cf11f38c01 Raise the version number in this (enterprise) tree, 5.0.77 will be a community build. 2009-01-29 22:43:52 +01:00
Georgi Kodinov
1622582b45 merged 35396 to 5.0-bugteam 2009-01-29 14:45:24 +02:00
Georgi Kodinov
63ed1e4964 Bug #35396: Abnormal query times in slow query log
If the system time is adjusted back during a query execution
(resulting in the end time being earlier than the start time)
the code that prints to the slow query log gets confused and 
prints unsigned negative numbers.
            
Fixed by not logging the statements that would have negative
execution time due to time shifts.
No test case since this would involve changing the system time.
2009-01-29 14:40:48 +02:00
Gleb Shchepa
b41c1a45f1 Bug #39069: <row constructor> IN <table-subquery> seriously
messed up

"ROW(...) IN (SELECT ... FROM DUAL)" always returned TRUE.

Item_in_subselect::row_value_transformer rewrites "ROW(...)
IN SELECT" conditions into the "EXISTS (SELECT ... HAVING ...)"
form.
For a subquery from the DUAL pseudotable resulting HAVING
condition is an expression on constant values, so further
transformation with optimize_cond() eliminates this HAVING
condition and resets JOIN::having to NULL.
Then JOIN::exec treated that NULL as an always-true-HAVING
and that caused a bug.

To distinguish an optimized out "HAVING TRUE" clause from
"HAVING FALSE" we already have the JOIN::having_value flag.
However, JOIN::exec() ignored JOIN::having_value as described
above as if it always set to COND_TRUE.

The JOIN::exec method has been modified to take into account
the value of the JOIN::having_value field.
2009-01-28 22:46:45 +04:00
Alexey Kopytov
30ac49019d Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases 
depending on whether the text-based or prepared statements protocol is used for a query.

Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.

This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).
2009-01-28 20:59:08 +03:00
Davi Arnaut
d94e00a0ed Remove test case for bug 40264.
Dirty close tricky does not work on Windows.
2009-01-28 14:33:33 -02:00
Georgi Kodinov
7234ca1a44 Bug #42366: server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT"
Re-generated the PKI files needed.
Removed the ones that are not needed.
Updated the tests to reference the correct SSL subject.
2009-01-28 16:18:50 +02:00
Bjorn Munch
640491287a merge 2009-01-28 14:44:22 +01:00
Bjorn Munch
e08d21b708 Bug #42216 mysqltest: Use of diff belonging to current OS, with wrong option for Solaris
Check for existence of diff fails on Solaris due to unsupported "-v"
Fix is to do this check only on Windows where it was needed
2009-01-28 14:14:05 +01:00
Joerg Bruehe
a5706380dc Backport of a fix done by Kent for bug#42278
into the 5.0.72sp1 branch.

Original changeset (in the main 5.0 branch):
> committer: Kent Boortz <kent@kent-amd64>
> branch nick: mysql-5.0-build-bug42278
> timestamp: Fri 2009-01-23 02:59:03 +0100
2009-01-26 22:06:42 +01:00
Chad MILLER
6841772b58 Merge from team tree. 2009-01-26 12:34:55 -05:00
Kent Boortz
63c4888cf9 From 5.0.48 the NDB client libraries has been missing in the cluster
packages, this is now corrected (Bug#42278)
2009-01-23 02:59:03 +01:00
Davi Arnaut
6a834d1f4f Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit
The problem is that the query cache was storing partial results
if the statement failed when sending the results to the client.
This could cause clients to hang when trying to read the results
from the cache as they would, for example, wait indefinitely for
a eof packet that wasn't saved.

The solution is to always discard the caching of a query that
failed to send its results to the associated client.
2009-01-22 08:28:01 -02:00
Georgi Kodinov
7fc8286257 auto merge 2009-01-16 16:48:41 +02:00
Georgi Kodinov
23fac1b529 merged 5.0-main -> 5.0-bugteam 2009-01-16 13:19:42 +02:00
Georgi Kodinov
7a6dda5077 merged Bug 38795 to 5.0-bugteam 2009-01-15 16:15:38 +02:00
Joerg Bruehe
4ecaa45d11 Merge some tool fixes from the 5.0.72sp1 build back into the tree.
This is not the final merge of that release build, but we need early
access to these tool fixes (use of "awk" in the BDB configuration).
2009-01-15 12:08:09 +01:00
Joerg Bruehe
887126a9fb Merge the changes of the 5.0.66sp1 build back into the tree. 2009-01-15 11:48:31 +01:00
Alexander Nozdrin
50a8cdc6c8 Pull from 5.0-bugteam 2009-01-15 13:10:20 +03:00
Davi Arnaut
080853635d Auto-merge from 5.1-bugteam 2009-01-15 07:52:06 -02:00
Alexander Nozdrin
333aa975ec Backport patch for Bug#31222 (com_% global status counters behave randomly
with mysql_change_user) to 5.0.
2009-01-15 12:36:34 +03:00
Georgi Kodinov
1233360cc2 merge 5.0-main to 5.0-bugteam 2009-01-15 06:35:18 +02:00
MySQL Build Team
d535a2b92e Oops, bumped version too high. Drop it back down from 5.0.78 to 5.0.77. 2009-01-15 00:14:07 +01:00
timothy.smith@sun.com
10408c632d Raise version number after cloning 5.0.76 2009-01-14 20:16:10 +01:00
Chad MILLER
0ba397e0b2 Merge from dev tree. 2009-01-14 11:15:11 -05:00
Chad MILLER
8c9e81e8af Bug#38145: .frm file isn't sync'd with sync_frm enabled
Views weren't sync()d the same way other structures were.

In creating the FRM for views, obey the same rules for variable 
"sync_frm" as for everything else.
2009-01-14 11:11:31 -05:00
Chad MILLER
6ab0034f5a Fix comment. Boolean function returns true/false, not zero/one. 2009-01-14 11:10:36 -05:00