Commit graph

2266 commits

Author SHA1 Message Date
gkodinov/kgeorge@magare.gmz
b98922b7cc Merge magare.gmz:/home/kgeorge/mysql/work/B36011-take2-5.0-bugteam
into  magare.gmz:/home/kgeorge/mysql/work/B36011-5.1-bugteam
2008-05-16 19:03:50 +03:00
gkodinov/kgeorge@magare.gmz
df3341a764 Bug #36011: server crash with explain extended on query
with dependent subqueries
An IN subquery is executed on EXPLAIN when it's not correlated.
If the subquery required a temporary table for its execution
not all the internal structures were restored from pointing to
the items of the temporary table to point back to the items of
the subquery.
Fixed by restoring the ref array when a temp tables were used in
executing the IN subquery during EXPLAIN EXTENDED.
2008-05-16 17:05:55 +03:00
sergefp@mysql.com
c21dbf27cf BUG#35850 "Performance regression in 5.1.23/5.1.24"
- Disable the "prefer full scan on clustered primary key over full scan
  of any secondary key" rule introduced by BUG#35850.
- Update test results accordingly 
(bk trigger: file this for BUG#35850)
2008-05-07 09:58:21 +04:00
igor@olga.mysql.com
cb9e855d9f Merge olga.mysql.com:/home/igor/mysql-5.1-bugteam
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.1-bug35844
2008-04-24 14:19:44 -07:00
gshchepa/uchum@host.loc
cdd0428ac8 Merge host.loc:/home/uchum/work/5.0-bugteam
into  host.loc:/home/uchum/work/5.1-bugteam
2008-04-23 11:06:26 +05:00
igor@olga.mysql.com
b210e5df6d Fixed bug#35844.
The function test_if_skip_sort_order ignored any covering index used for ref
access of a table in a query with ORDER BY if this index was incompatible 
with the ORDER BY list and there was another covering index compatible with
this list. 
As a result sub-optimal execution plans were chosen for some queries with
ORDER BY clause.
2008-04-22 21:49:39 -07:00
gshchepa/uchum@host.loc
a0c5b495cb Fixed bug#36005: server crashes inside NOT IN clause subquery with
impossible WHERE/HAVING clause
                 (subselect_single_select_engine::exec).

Allocation and initialization of joined table list t1, t2... of
subqueries like:

    NOT IN (SELECT ... FROM t1,t2,... WHERE 0)

is optimized out, however server tries to traverse this list.
2008-04-23 02:27:23 +05:00
gkodinov/kgeorge@magare.gmz
dd62320d0e Merge bk-internal:/home/bk/mysql-5.1
into  magare.gmz:/home/kgeorge/mysql/work/merge-build-5.1-bugteam
2008-03-31 10:40:39 +03:00
iggy@amd64.(none)
b9877b84ac Merge amd64.(none):/src/mysql-5.0-bugteam
into  amd64.(none):/src/bug26243/my50-bug26243
2008-03-28 16:01:05 -04:00
iggy@amd64.(none)
79e434bc67 Bug#26243 mysql command line crash after control-c
- Backported the 5.1 DBUG to 5.0.
- Avoid memory cleanup race on Windows client for CTRL-C
2008-03-28 14:02:27 -04:00
evgen@moonbone.local
8fe48b6875 Merge moonbone.local:/work/27219-5.0-opt-mysql
into  moonbone.local:/work/27219-bug-5.1
2008-03-28 18:09:14 +03:00
evgen@moonbone.local
0bce8e6f9b Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-bugteam
into  moonbone.local:/work/27219-5.0-opt-mysql
2008-03-28 14:31:52 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
090d1396cf Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-28 12:14:27 +02:00
gkodinov/kgeorge@magare.gmz
aab53be5c0 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1
into  magare.gmz:/home/kgeorge/mysql/work/merge-5.1-bugteam
2008-03-28 11:27:03 +02:00
gkodinov/kgeorge@magare.gmz
faaf239f87 Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-bugteam
into  magare.gmz:/home/kgeorge/mysql/autopush/B35206-5.1-bugteam
2008-03-28 09:51:06 +02:00
gkodinov/kgeorge@magare.gmz
cde380ea50 Bug #35206: select query result different if the key is indexed or not
The code for executing indexed ORDER BY was not setting all the 
internal fields correctly when selecting to execute ORDER BY over
and index.
Fixed by change the access method to one that will use the 
quick indexed access if one is selected while selecting indexed
ORDER BY.
2008-03-27 19:39:21 +02:00
evgen@moonbone.local
21c6145a6e Bug#27219: Aggregate functions in ORDER BY.
Mixing aggregate functions and non-grouping columns is not allowed in the
ONLY_FULL_GROUP_BY mode. However in some cases the error wasn't thrown because
of insufficient check.

In order to check more thoroughly the new algorithm employs a list of outer
fields used in a sum function and a SELECT_LEX::full_group_by_flag.
Each non-outer field checked to find out whether it's aggregated or not and
the current select is marked accordingly.
All outer fields that are used under an aggregate function are added to the
Item_sum::outer_fields list and later checked by the Item_sum::check_sum_func
function.
2008-03-27 19:49:32 +03:00
gshchepa/uchum@host.loc
57afe19c8b Merge host.loc:/home/uchum/work/5.0-opt
into  host.loc:/home/uchum/work/5.1-opt
2008-03-27 00:51:29 +04:00
gshchepa/uchum@host.loc
2dcec449e0 Fixed bug #35193.
View definition as SELECT ... FROM DUAL WHERE ... has
valid syntax, but use of such view in SELECT or
SHOW CREATE VIEW syntax causes unexpected syntax error.

Server omits FROM DUAL clause when storing view body
string in a .frm file for further evaluation.
However, syntax of SELECT-witout-FROM query is more
restrictive than SELECT FROM DUAL syntax, and doesn't
allow the WHERE clause.

NOTE: this syntax difference is not documented.


View registration procedure has been modified to
preserve original structure of view's body.
2008-03-26 22:43:12 +04:00
kaa@kaamos.(none)
b753e4a02e Fix for bug #34928: Confusion by having Primary Key and Index
The bug is a regression introduced in 5.1 by the patch for bug28404.

Under some circumstances test_if_skip_sort_order() could leave some
data structures in an inconsistent state so that some parts of code
could assume the selected execution strategy for GROUP BY/DISTINCT as
a loose index scan (e.g. JOIN_TAB::is_using_loose_index_scan()), while
the actual strategy chosen was an ordered index scan, which led to
wrong data being returned.

Fixed test_if_skip_sort_order() so that when changing the type for a
join table, select->quick is reset not only for EXPLAIN, but for the 
actual join execution as well, to not confuse code that depends on its
value to determine the chosen GROUP BY/DISTINCT strategy.
2008-03-26 19:37:36 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
74cbd71e94 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-13 23:35:52 +02:00
kaa@kaamos.(none)
0a7052e4d3 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-12 11:19:46 +03:00
kaa@kaamos.(none)
7e365efa30 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-11 15:47:16 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
ab013df080 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-07 11:25:47 +02:00
sergefp@mysql.com
b779af5503 BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql"
- Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call
  to before the late NULLs filtering code.
- Backport function comments from 6.0.
2008-03-03 20:35:44 +03:00
gshchepa/uchum@host.loc
6d24220689 Merge host.loc:/home/uchum/work/5.0-opt-34830
into  host.loc:/home/uchum/work/5.1-opt
2008-03-01 12:24:00 +04:00
gshchepa/uchum@host.loc
3bf9c7edf1 Fixed bug #34830: mixed table and field names in Item_ref
and Item_direct_ref constructor calls.

Order of ref->field_name and ref->table_name arguments
is of Item_ref and Item_direct_ref in the fix_inner_refs
function is inverted.
2008-02-29 15:11:11 +04:00
anozdrin/alik@quad.
340906f46d Fix for Bug#30217: Views: changes in metadata behaviour
between 5.0 and 5.1.
  
The problem was that in the patch for Bug#11986 it was decided
to store original query in UTF8 encoding for the INFORMATION_SCHEMA.
This approach however turned out to be quite difficult to implement
properly. The main problem is to preserve the same IS-output after
dump/restore.
  
So, the fix is to rollback to the previous functionality, but also
to fix it to support multi-character-set-queries properly. The idea
is to generate INFORMATION_SCHEMA-query from the item-tree after
parsing view declaration. The IS-query should:
  - be completely in UTF8;
  - not contain character set introducers.
  
For more information, see WL4052.
2008-02-22 13:30:33 +03:00
holyfoot/hf@hfmain.(none)
652b7099ca Merge bk@192.168.21.1:mysql-5.0-opt
into  mysql.com:/home/hf/work/32942/my50-32942
2008-02-18 19:18:44 +04:00
holyfoot/hf@hfmain.(none)
0c8df13cda Merge bk@192.168.21.1:mysql-5.1-opt
into  mysql.com:/home/hf/work/32942/my51-32942
2008-02-18 19:08:35 +04:00
holyfoot/hf@hfmain.(none)
377ecd81c7 Merge mysql.com:/home/hf/work/32942/my50-32942
into  mysql.com:/home/hf/work/32942/my51-32942
2008-02-18 16:07:47 +04:00
kaa@kaamos.(none)
5647dee192 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-17 14:57:01 +03:00
holyfoot/hf@mysql.com/hfmain.(none)
7abba3b021 Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan"
Problem is not about intervals and doesn't actually cause 'full table scan'.
We have an optimization for DISTINCT when we have
'DISTINCT field_from_first_join_table' we don't need to read all the
rows from the JOIN-ed table if we found one conforming row.
It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon
that case in the evaluate_join_record() and that doesn't break the
recordreading loop in sub_select().

Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case.
2008-02-17 15:48:17 +04:00
kaa@kaamos.(none)
9f194149b8 Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-02-13 12:12:00 +03:00
jani@a88-113-38-195.elisa-laajakaista.fi
4f98f3e683 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-02-08 12:13:33 +01:00
igor@olga.mysql.com
5e14047e23 Fixed bug #33833.
Two disjuncts containing equalities of the form key=const1 and key=const2 can
be merged into one if const1 is equal to const2. To check it the common 
collation of the constants were used rather than the collation of the field key.
For example when the default collation of the constants was cases insensitive
while the collation of the field was case sensitive, then two or-ed equality 
predicates key='b' and key='B' incorrectly were merged into one f='b'. As a 
result ref access was used instead of range access and wrong result sets were 
returned in many cases. 
Fixed the problem by comparing constant in the or-ed predicate with collation of
the key field.
2008-01-26 21:45:35 -08:00
tsmith@ramayana.hindu.god
3906cc27d7 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2008-01-25 10:37:29 -07:00
anozdrin/alik@quad.
5ff7860f69 Merge quad.:/mnt/raid/alik/MySQL/devel/5.1
into  quad.:/mnt/raid/alik/MySQL/devel/5.1-rt-merged-5.0-rt
2008-01-24 17:40:16 +03:00
tsmith@ramayana.hindu.god
6668554a8d Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2008-01-22 15:56:15 -07:00
anozdrin/alik@ibm.
baf5f73853 Merge ibm.:/home/alik/Documents/MySQL/devel/5.1
into  ibm.:/home/alik/Documents/MySQL/devel/5.1-rt-merged-5.1
2008-01-19 22:32:48 +03:00
kaa@kaamos.(none)
e91bf15d5c Merge kaamos.(none):/data/src/opt/mysql-5.0-opt
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-01-19 21:09:22 +03:00
sergefp@mysql.com
d56ac2f37b BUG#33794 "MySQL crashes executing specific query":
The problem occurred when one had a subquery that had an equality X=Y where 
Y referred to a named select list expression from the parent select. MySQL 
crashed when trying to use the X=Y equality for ref-based access. 

Fixed by allowing non-Item_field items in the described case.
2008-01-18 22:50:36 +03:00
igor@olga.mysql.com
947715c228 Merge olga.mysql.com:/home/igor/mysql-5.1-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.1-opt-bug33697
2008-01-11 10:12:29 -08:00
igor@olga.mysql.com
b85ffdb5d5 Fixed bug #33697.
When the function test_if_skip_sort_order prefers index backward scan 
to ref access the corresponding access functions must be set accordingly.
2008-01-11 10:05:34 -08:00
kaa@kaamos.(none)
0cec5f8e4b Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-01-10 20:44:23 +03:00
mhansson/martin@linux-st28.site
8b65423d9d Merge mhansson@bk-internal:/home/bk/mysql-5.1-opt
into  linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848
2007-12-21 14:52:39 +01:00
serg@janus.mylan
d9ca7b670e Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  janus.mylan:/usr/home/serg/Abk/mysql-5.1
2007-12-20 22:11:37 +01:00
kostja@bodhi.(none)
dfe685e6fc A pre-requisite for the fix for Bug#12713 "Error in a stored function
called from a SELECT doesn't cause ROLLBACK of state"
Make private all class handler methods (PSEA API) that may modify
data. Introduce and deploy public ha_* wrappers for these methods in 
all sql/.
This necessary to keep track of all data modifications in sql/,
which is in turn necessary to be able to optimize two-phase
commit of those transactions that do not modify data.
2007-12-20 21:16:55 +03:00
mhansson/martin@linux-st28.site
fe93176c30 Merge linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848-gca
into  linux-st28.site:/home/martin/mysql/src/bug32848/my51-bug32848-gca
2007-12-20 14:19:52 +01:00
mhansson/martin@linux-st28.site
284d8c71ee Merge mhansson@bk-internal:/home/bk/mysql-5.0-opt
into  linux-st28.site:/home/martin/mysql/src/bug32848/my50-bug32848
2007-12-20 11:24:42 +01:00