Commit graph

58609 commits

Author SHA1 Message Date
Alexander Barkov
a4377f8ef3 Bug#43207 wrong LC_TIME names for romanian locale
Adding tests for the bug.
2009-10-19 13:44:44 +05:00
Alexander Barkov
fa93f34920 Bug#43207 wrong LC_TIME names for romanian locale
A contributed patch by Andrei Boros (SCA signed).
- Fixing locale definition file
- Adding tests
2009-10-19 13:41:52 +05:00
Kristofer Pettersson
4d937b6a37 Bug#47627 SET @@{global.session}.local_variable in stored routine causes crash
Adding @@session and @@global prefixes to a
declared variable in a stored procedure the server
would lead to a crash.

The reason was that during the parsing of the
syntactic rule 'option_value' an uninitialized
set_var object was pushed to the parameter stack
of the SET statement. The parent rule
'option_type_value'  interpreted the existence of
variables on the parameter stack as an assignment
and wrapped it in a sp_instr_set object.

As the procedure later was executed an attempt
was made to run the method 'check()' on an
uninitialized member object (NULL value) belonging
to the previously created but uninitialized object.
2009-10-19 09:43:33 +02:00
Ramil Kalimullin
df0b8e93f5 Fix for bug#47963: Wrong results when index is used
Problem: using null microsecond part in a WHERE condition 
(e.g. WHERE date_time_field <= "YYYY-MM-DD HH:MM:SS.0000") 
may lead to wrong results due to improper DATETIMEs 
comparison in some cases.

Fix: comparing DATETIMEs as strings we must trim trailing 0's
in such cases.
2009-10-18 21:26:55 +05:00
Bjorn Munch
6c68019899 Bug #48133 MTR should not dump entire history of mysqld log when failing to start server
Don't print entire log, but use extract_server_log() introduced by 46007
2009-10-18 13:01:46 +02:00
Bjorn Munch
264c330fd0 Bug #48130 Expected failures should not count towards max-test-fail
Test batches may be terminated too early
Avoid counting exp-fail tests
2009-10-17 18:34:56 +02:00
Bjorn Munch
6c9cb9ba22 merge from 5.1 main 2009-10-16 23:25:05 +02:00
Alexey Kopytov
8e931fe53c Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
The problem was in incorrect handling of predicates involving 
NULL as a constant value by the range optimizer. 
 
For example, when creating a SEL_ARG node from a condition of 
the form "field < const" (which would normally result in the 
"NULL < field < const" SEL_ARG),  the special case when "const" 
is NULL was not taken into account, so "NULL < field < NULL" 
was produced for the "field < NULL" condition. 
 
As a result, SEL_ARG structures of this form could not be 
further optimized which in turn could lead to incorrectly 
constructed SEL_ARG trees. In particular, code assuming SEL_ARG 
structures to always form a sequence of ordered disjoint 
intervals could enter an infinite loop under some 
circumstances. 
 
Fixed by changing get_mm_leaf() so that for any sargable 
predicate except "<=>" involving NULL as a constant, "empty" 
SEL_ARG is returned, since such a predicate is always false.
2009-10-17 00:19:51 +04:00
Joerg Bruehe
0e11bad589 Merge merge changesets from main 5.1 into 5.1-bugteam. 2009-10-16 18:40:25 +02:00
Joerg Bruehe
34358bec25 Upmerge a merge changeset. 2009-10-16 16:53:04 +02:00
Joerg Bruehe
ee56b111a0 Upmerge merge changesets. 2009-10-16 16:12:42 +02:00
Joerg Bruehe
9cabf98cb0 Merge a compile fix. 2009-10-16 15:35:39 +02:00
Georgi Kodinov
9588bc2207 merge 2009-10-16 16:11:21 +03:00
Joerg Bruehe
5c95f2363a Upmerge the Windows compile fix from 5.0 to 5.1 2009-10-16 15:05:52 +02:00
Joerg Bruehe
f359b258ee Merge 5.0-bugteam (compile fix) into main 5.0 2009-10-16 14:29:41 +02:00
Joerg Bruehe
0e5dd3712a Upmerge a Windows compile fix from 5.0 to 5.1. 2009-10-16 14:21:20 +02:00
Joerg Bruehe
11d4eb352d Merge the Windows compile fix into the push tree. 2009-10-16 14:09:31 +02:00
Joerg Bruehe
9ceeabd9b2 Compile fix for Windows:
Use "#ifdef", not plain "#if".
2009-10-16 14:06:33 +02:00
Martin Hansson
c6a11dff02 Bug#46019: ERROR 1356 When selecting from within another
view that has Group By
      
When SELECT'ing from a view that mentions another,
materialized, view, access was being denied. The issue was
resolved by lifting a special case which avoided such access
checking in check_single_table_access. In the past, this was
necessary since if such a check were performed, the error
message would be downgraded to a warning in the case of SHOW
CREATE VIEW. The downgrading of errors was meant to handle
only that scenario, but could not distinguish the two as it
read only the error messages.
      
The special case was needed in the fix of bug no 36086.
Before that, views were confused with derived tables.
      
After bug no 35996 was fixed, the manipulation of errors
during SHOW CREATE VIEW execution is not dependent on the
actual error messages in the queue, it rather looks at the
actual cause of the error and takes appropriate
action. Hence the aforementioned special case is now
superfluous and the bug is fixed.
2009-10-16 13:12:21 +02:00
Georgi Kodinov
8f6f3dba21 Bug #40877: multi statement execution fails in 5.1.30
Implemented the server infrastructure for the fix:

1. Added a function LEX_STRING *thd_query_string(THD) to return
a LEX_STRING structure instead of char *.
This is the function that must be called in innodb instead of 
thd_query()

2. Did some encapsulation in THD : aggregated thd_query and 
thd_query_length into a LEX_STRING and made accessor and mutator 
methods for easy code updating. 

3. Updated the server code to use the new methods where applicable.
2009-10-16 13:29:42 +03:00
Joerg Bruehe
9c76415a03 Upmerge a merge changeset - no contents change. 2009-10-16 11:33:39 +02:00
Georgi Kodinov
757e641dea merge 2009-10-16 12:07:50 +03:00
Georgi Kodinov
6b81bff83c Revert the fix for bug #47123 until test suite failures are resolved. 2009-10-16 11:42:16 +03:00
Joerg Bruehe
d12bd3f794 Merge the bug fixes into the push tree. 2009-10-15 20:28:04 +02:00
Joerg Bruehe
1cd95b6a44 Merge bug fix into push tree. 2009-10-15 20:14:07 +02:00
Georgi Kodinov
f79064c4d4 version change 2009-10-15 14:48:12 +03:00
Georgi Kodinov
a3586e2280 merge 2009-10-15 14:45:54 +03:00
Georgi Kodinov
ff5833d346 All NDB tests made experimental after a discussion with Bernhard Ocklin. 2009-10-15 14:22:25 +03:00
Georgi Kodinov
77fd19b5ec Marked all the NDB related tests experimental as agreed with Bernard Ocklin. 2009-10-15 14:02:29 +03:00
Alexey Kopytov
f98d11ee24 Manual merge. 2009-10-15 14:42:51 +04:00
Sergey Vojtovich
cd69e34ca7 Disabled part of test for BUG#47073 until additional fix is pushed. 2009-10-15 12:31:11 +05:00
Hery Ramilison
c723b69ea2 Added make targets 'test-bt-fast' and 'test-bt-debug-fast'
Put variable declaration at the beginning of a block
2009-10-15 00:40:40 +02:00
Jorgen Loland
aea42df6f5 merge 2009-10-14 18:24:29 +02:00
Jorgen Loland
a91b18262c Followup patch for BUG#47280
Temporary tables may set join->group to 0 even though there is 
grouping. Also need to test if sum_func_count>0 when JOIN::exec() 
decides whether to present results in a grouped manner.
2009-10-14 18:20:01 +02:00
Georgi Kodinov
a820c73229 merge 2009-10-14 18:46:45 +03:00
Georgi Kodinov
88aa7af8c8 merge 2009-10-14 18:45:09 +03:00
Georgi Kodinov
8fc8d661a1 version change 2009-10-14 18:44:22 +03:00
Georgi Kodinov
9449be5868 merge 2009-10-14 17:36:11 +03:00
Georgi Kodinov
b251cbd531 merged main to mysql-5.0-bugteam 2009-10-14 17:33:20 +03:00
Georgi Kodinov
4bc8680854 merged 5.1-main 2009-10-14 17:30:39 +03:00
He Zhenxing
adab17b9e6 Attempt to fix Windows testcase output issue 2009-10-14 21:25:11 +08:00
Sergey Vojtovich
cf88f221ee BUG#47455 - The myisam_crash_before_flush_keys test fails on Windows
Simplified and made more determenistic myisam_crash_before_flush_keys
test.
2009-10-14 16:26:16 +05:00
Jorgen Loland
bf0aa2bd34 Bug#47280 - strange results from count(*) with order by multiple
columns without where/group
                     
Simple SELECT with implicit grouping used to return many rows if
the query was ordered by the aggregated column in the SELECT
list. This was incorrect because queries with implicit grouping
should only return a single record.
                              
The problem was that when JOIN:exec() decided if execution needed
to handle grouping, it was assumed that sum_func_count==0 meant
that there were no aggregate functions in the query. This
assumption was not correct in JOIN::exec() because the aggregate
functions might have been optimized away during JOIN::optimize().
                  
The reason why queries without ordering behaved correctly was
that sum_func_count is only recalculated if the optimizer chooses
to use temporary tables (which it does in the ordered case).
Hence, non-ordered queries were correctly treated as grouped.
                  
The fix for this bug was to remove the assumption that
sum_func_count==0 means that there is no need for grouping. This
was done by introducing variable "bool implicit_grouping" in the
JOIN object.
2009-10-14 10:46:50 +02:00
sunanda.menon@sun.com
85f00a96ee Null-merge from mysql-5.0.84sp1-release 2009-10-14 10:16:04 +02:00
Bjorn Munch
23306c563a Bug #46007 Tests fail due to a crash while running 'check testcase before test'
Difficult to debug due to lacking report
This does not solve the real issue, but extracts server log when it happens
Forst commit was incomplete, didn't cover all cases
2009-10-14 09:31:34 +02:00
0ece5891a2 Bug#46640: output from mysqlbinlog command in 5.1 breaks replication
The BINLOG statement was sharing too much code with the slave SQL thread, introduced with
the patch for Bug#32407. This caused statements to be logged with the wrong server_id, the
id stored inside the events of the BINLOG statement rather than the id of the running 
server.
      
Fix by rearranging code a bit so that only relevant parts of the code are executed by
the BINLOG statement, and the server_id of the server executing the statements will 
not be overrided by the server_id stored in the 'format description BINLOG statement'.
2009-10-14 09:39:05 +08:00
karen.langford@sun.com
5ad32f3e89 Raise version number after cloning 5.0.87 2009-10-13 20:50:37 +02:00
karen.langford@sun.com
c06a3c4fb4 Null-merge from mysql-5.1.37sp1-release 2009-10-13 20:21:42 +02:00
Alexey Kopytov
5db734a896 Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
The problem was in incorrect handling of predicates involving 
NULL as a constant value by the range optimizer.  
 
For example, when creating a SEL_ARG node from a condition of 
the form "field < const" (which would normally result in the 
"NULL < field < const" SEL_ARG),  the special case when "const" 
is NULL was not taken into account, so "NULL < field < NULL" 
was produced for the "field < NULL" condition. 
 
As a result, SEL_ARG structures of this form could not be 
further optimized which in turn could lead to incorrectly 
constructed SEL_ARG trees. In particular, code assuming SEL_ARG 
structures to always form a sequence of ordered disjoint 
intervals could enter an infinite loop under some 
circumstances. 
 
Fixed by changing get_mm_leaf() so that for any sargable 
predicate except "<=>" involving NULL as a constant, "empty" 
SEL_ARG is returned, since such a predicate is always false.
2009-10-13 19:49:32 +04:00
Satya B
1685375812 merge to mysql-5.1-bugteam 2009-10-13 12:48:29 +05:30