Commit graph

70 commits

Author SHA1 Message Date
Marko Mäkelä
bc145193c1 Merge 10.1 into 10.2 2019-04-25 09:04:09 +03:00
Alexander Barkov
279b50b4eb MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP 2019-04-22 14:01:58 +04:00
Alexander Barkov
0bb924e18c MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP 2019-04-17 20:21:11 +04:00
Alexander Barkov
5227198908 MDEV-16190 Server crashes in Item_null_result::field_type on SELECT with time field, ROLLUP and HAVING
virtual Item_null_result::get_date() was not overridden.
It used the inherited Item::get_date(), which tests field_type(),
which in case of Item_null_result calls result_field->field_type(),
and result_field is not really always set (e.g. it's not set in the
test case from the bug report).

Overriding Item_null::get_date() like it's done for other val_xxx() methods.
This make the code more symmetric across data types.

In the new reduction, get_date() immediately returns NULL without entering
into any data type specific code.
2018-06-11 16:29:22 +04:00
Sergei Golubchik
2ccf247e93 after merge changes:
* rename all debugging related command-line options
  and variables to start from "debug-", and made them all
  OFF by default.
* replace "MySQL" with "MariaDB" in error messages
* "Cast ... converted ... integer to it's ... complement"
  is now a note, not a warning
* @@query_cache_strip_comments now has a session scope,
  not global.
2011-12-12 23:58:40 +01:00
Alexey Kopytov
05c4f3f396 Automerge. 2009-11-06 17:54:19 +03:00
Alexey Kopytov
39f9a3ffd0 Bug #48475: DISTINCT is ignored with GROUP BY WITH ROLLUP and
only const tables

The problem was caused by two shortcuts in the optimizer that
are inapplicable in the ROLLUP case.

Normally in a case when only const tables are involved in a
query, DISTINCT clause can be safely optimized away since there
may be only one row produced by the join. Similarly, we don't
need to create a temporary table to resolve DISTINCT/GROUP
BY/ORDER BY. Both of these are inapplicable when the WITH
ROLLUP modifier is present.

Fixed by disabling the said optimizations for the WITH ROLLUP
case.

mysql-test/r/olap.result:
  Added a test case for bug #48475.
mysql-test/t/olap.test:
  Added a test case for bug #48475.
sql/sql_select.cc:
  Disabled const-only table optimizations for the WITH ROLLUP
  case.
2009-11-06 09:44:01 +03:00
Alexey Kopytov
23cbd659a0 Automerge. 2009-10-30 18:59:06 +03:00
Alexey Kopytov
b67cdaa351 Bug #48131: crash group by with rollup, distinct, filesort,
with temporary tables

There were two problems the test case from this bug was
triggering:

1. JOIN::rollup_init() was supposed to wrap all constant Items
into another object for queries with the WITH ROLLUP modifier
to ensure they are never considered as constants and therefore
are written into temporary tables if the optimizer chooses to
employ them for DISTINCT/GROUP BY handling.

However, JOIN::rollup_init() was called before
make_join_statistics(), so Items corresponding to fields in
const tables could not be handled as intended, which was
causing all kinds of problems later in the query execution. In
particular, create_tmp_table() assumed all constant items
except "hidden" ones to be removed earlier by remove_const()
which led to improperly initialized Field objects for the
temporary table being created. This is what was causing crashes
and valgrind errors in storage engines.

2. Even when the above problem had been fixed, the query from
the test case produced incorrect results due to some
DISTINCT/GROUP BY optimizations being performed by the
optimizer that are inapplicable in the WITH ROLLUP case.

Fixed by disabling inapplicable DISTINCT/GROUP BY optimizations
when the WITH ROLLUP modifier is present, and splitting the
const-wrapping part of JOIN::rollup_init() into a separate
method which is now invoked after make_join_statistics() when
the const tables are already known.

mysql-test/r/olap.result:
  Added a test case for bug #48131.
mysql-test/t/olap.test:
  Added a test case for bug #48131.
sql/sql_select.cc:
  1. Disabled inapplicable DISTINCT/GROUP BY optimizations when
  the WITH ROLLUP modifier is present.
  2. Split the const-wrapping part of JOIN::rollup_init() into a
  separate method.
sql/sql_select.h:
  Added rollup_process_const_fields() declaration.
2009-10-30 18:54:53 +03:00
unknown
6cc8a820d3 Merge mysql.com:/home/ram/work/b32558/b32558.5.0
into  mysql.com:/home/ram/work/b32558/b32558.5.1


mysql-test/r/olap.result:
  Auto merged
sql/item_func.h:
  Auto merged
2007-11-23 12:35:02 +04:00
unknown
0c2dac2a8b Fix for bug #32558: group by null-returning expression with rollup causes crash
Problem: setting Item_func_rollup_const::null_value property to argument's null_value
before (without) the argument evaluation may result in a crash due to wrong null_value.

Fix: use is_null() to set Item_func_rollup_const::null_value instead as it evaluates
the argument if necessary and returns a proper value.


mysql-test/r/olap.result:
  Fix for bug #32558: group by null-returning expression with rollup causes crash
    - test result.
mysql-test/t/olap.test:
  Fix for bug #32558: group by null-returning expression with rollup causes crash
    - test case.
sql/item_func.h:
  Fix for bug #32558: group by null-returning expression with rollup causes crash
    - use args[0]->is_null() to obtain Item_func_rollup_const::null_value 
      instead of args[0]->null_value as it's not set in advance in case of 
      constant functions.
2007-11-21 20:53:44 +04:00
unknown
4e15adf822 Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_misc.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/t/func_math.test:
  Auto merged
mysql-test/t/func_misc.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/view_grant.test:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/sql_view.cc:
  Auto merged
client/client_priv.h:
  manual merge
mysql-test/r/mysqldump.result:
  manual merge
mysql-test/r/view_grant.result:
  manual merge
sql/field.cc:
  manual merge
sql/sql_select.cc:
  manual merge
tests/mysql_client_test.c:
  manual merge
2007-10-04 14:23:55 +05:00
unknown
1a4df8a24d Bug#31095: Unexpected NULL constant caused server crash.
The Item_func_rollup_const class is used for wrapping constants to avoid
wrong result for ROLLUP queries with DISTINCT and a constant in the select
list. This class is also used to wrap up a NULL constant but its null_value
wasn't set accordingly. This led to a server crash.

Now the null_value of an object of the Item_func_rollup_const class is set
by its fix_length_and_dec member function.


mysql-test/t/olap.test:
  Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
mysql-test/r/olap.result:
  Added a test case for the bug#31095: Unexpected NULL constant caused server crash.
sql/item_func.h:
  Bug#31095: Unexpected NULL constant caused server crash. 
  Now the null_value of an object of the Item_func_rollup_const class is set
  by its fix_length_and_dec member function.
2007-10-01 20:03:50 +00:00
unknown
937d5f8966 Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/test-5.1-opt-mysql


mysql-test/r/olap.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/field.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/analyse.result:
  Manual merge
mysql-test/r/sp.result:
  Manual merge
sql/item_timefunc.cc:
  Manual merge
2007-05-30 19:35:35 +04:00
unknown
4e9cef545c Bug #28492: subselect returns LONG in >5.0.24a and LONGLONG in <=5.0.24a
Integer values with 10 digits may or may not fit into an int column 
(e.g. 2147483647 vs 6147483647).
Thus when creating a temp table column for such an int we must
use bigint instead.
Fixed to use bigint.
Also subsituted a "magic number" with a named constant.


mysql-test/r/analyse.result:
  Bug #28492: Adjusted the results after having fixed the bug
mysql-test/r/metadata.result:
  Bug #28492: test case
mysql-test/r/olap.result:
  Bug #28492: Adjusted the results after having fixed the bug
mysql-test/r/sp.result:
  Bug #28492: Adjusted the results after having fixed the bug
mysql-test/r/view.result:
  Bug #28492: Adjusted the results after having fixed the bug
mysql-test/t/metadata.test:
  Bug #28492: test case
sql/field.h:
  Bug #28492: Replaced a magic number with a constant
sql/sql_select.cc:
  Bug #28492: Treat integers with 10 and more digits as 
  bigint.
2007-05-30 09:55:38 +03:00
unknown
0e20de498a Merge mysql.com:/d2/hf/mrg/mysql-5.0-opt
into  mysql.com:/d2/hf/mrg/mysql-5.1-opt


mysql-test/r/olap.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/type_datetime.test:
  Auto merged
sql/item_func.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-05-01 13:38:59 +05:00
unknown
5352b41d29 Post-merge fix. 2007-04-29 20:14:35 -07:00
unknown
532f2e8416 Merge olga.mysql.com:/home/igor/mysql-4.1-opt
into  olga.mysql.com:/home/igor/dev-opt/mysql-5.0-opt-bug24856


sql/item_func.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/olap.result:
  Manual merge.
mysql-test/t/olap.test:
  Manual merge.
2007-04-29 18:32:59 -07:00
unknown
dd34042ec1 Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack
some rollup rows (rows with NULLs for grouping attributes) if GROUP BY
list contained constant expressions.

This happened because the results of constant expressions were not put
in the temporary table used for duplicate elimination. In fact a constant
item from the GROUP BY list of a ROLLUP query can be replaced for an
Item_null_result object when a rollup row is produced . 

Now the JOIN::rollup_init function wraps any constant item referenced in
the GROYP BY list of a ROLLUP query into an Item_func object of a special
class that is never detected as constant item. This ensures creation of
fields for such  constant items in temporary tables and guarantees right
results when the result of the rollup operation first has to be written
into a temporary table, e.g. in the cases when duplicate elimination is
required.  


mysql-test/r/olap.result:
  Added a test case for bug #24856.
mysql-test/t/olap.test:
  Added a test case for bug #24856.
sql/item_func.h:
  Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack
  some rollup rows (rows with NULLs for grouping attributes) if GROUP BY
  list contained constant expressions.
  
  Itroduced class Item_func_rollup_const derived from Item_func. The object of
  this class are never detected as constant items.
  We use them for wrapping constant items from the GROUP BY list of any ROLLUP
  query. This wrapping allows us to ensure writing constant items into temporary
  tables whenever the result of the ROLLUP operation has to be written into a
  temporary table, e.g. when ROLLUP is used together with DISTINCT in the SELECT
  list.
sql/sql_select.cc:
  Fixed bug #24856: the result set of a ROLLUP query with DISTINCT could lack
  some rollup rows (rows with NULLs for grouping attributes) if GROUP BY
  list contained constant expressions.
  
  Now the JOIN::rollup_init function wraps any constant item referenced in
  the GROYP BY list of a ROLLUP query into an Item_func object of a special
  class that is never detected as constant item. This ensures creation of
  fields for such  constant items in temporary tables and guarantees right
  results when the result of the rollup operation first has to be written
  into a temporary table, e.g. in the cases when duplicate elimination is
  required.
2007-04-29 16:04:43 -07:00
unknown
8a140cb72e Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt


mysql-test/r/explain.result:
  Auto merged
mysql-test/r/func_default.result:
  Auto merged
mysql-test/r/func_regexp.result:
  Auto merged
mysql-test/r/func_test.result:
  Auto merged
mysql-test/r/having.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/varbinary.result:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
mysql-test/r/func_str.result:
  Manually merged
mysql-test/t/func_str.test:
  Manually merged
2007-03-11 00:26:45 +03:00
unknown
4d6ad7ac60 Fixed bug #26830: a crash for the query with a subselect containing ROLLUP.
Crash happened because the function get_best_group_min_max detected
joins with ROLLUP incorrectly.


mysql-test/r/olap.result:
  Added a test case for bug #26830.
mysql-test/t/olap.test:
  Added a test case for bug #26830.
2007-03-10 02:47:47 -08:00
unknown
fcbf1509e2 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1-opt


BitKeeper/deleted/.del-bdb.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/type_decimal.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/table.cc:
  Auto merged
include/my_base.h:
  SCCS merged
mysql-test/include/mix1.inc:
  SCCS merged
mysql-test/r/group_by.result:
  SCCS merged
mysql-test/r/innodb_mysql.result:
  SCCS merged
mysql-test/t/group_by.test:
  SCCS merged
sql/sql_select.cc:
  SCCS merged
2006-10-19 16:43:46 +02:00
unknown
5e1fe0f800 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt


sql/sql_select.cc:
  Auto merged
mysql-test/r/olap.result:
  SCCS merged
2006-10-19 15:04:12 +02:00
unknown
da9f990b54 Fixed bug#20825: rollup puts non-equal values together
Fix for bug 7894 replaces a field(s) in a non-aggregate function with a item
reference if such a field was specified in the GROUP BY clause in order to
get a correct result.
When ROLLUP is involved this lead to a wrong result due to value of a such
field is got through a copy function and copying happens after the function
evaluation.
Such replacement isn't needed if grouping is also done by such a function.

The change_group_ref() function now isn't called for a function present in
the group list.


mysql-test/t/olap.test:
  Added the test case for the bug#20825:  rollup puts non-equal values together
mysql-test/r/olap.result:
  Added the test case for the bug#20825:  rollup puts non-equal values together
sql/sql_select.cc:
  Fixed bug#20825: rollup puts non-equal values together
  The change_group_ref() function now isn't called for a function present in
  the group list.
2006-09-29 20:02:53 +04:00
unknown
5222b59093 Merge dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.0-opt
into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-5.1


mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/heap_hash.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/join_outer.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/range.result:
  Auto merged
mysql-test/r/row.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_date.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/view_grant.result:
  Auto merged
mysql-test/t/func_group.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_list.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/t/sp.test:
  SCCS merged
sql/item_cmpfunc.cc:
  SCCS merged
sql/sql_select.cc:
  SCCS merged
2006-09-18 12:57:20 +02:00
unknown
22c3e7b4e1 Fixed bug #5500: EXPLAIN returned a wrong select_type for queries using views.
Select_type in the EXPLAIN output for the query SELECT * FROM t1 was
'SIMPLE', while for the query SELECT * FROM v1, where the view v1
was defined as SELECT * FROM t1, the EXPLAIN output contained 'PRIMARY'
for the select_type column.
 


mysql-test/r/group_by.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/information_schema.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/olap.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/range.result:
  Adjusted results after the fix for bug #5500.
mysql-test/r/view.result:
  Added a test case for bug #5500.
  Adjusted other results.
mysql-test/r/view_grant.result:
  Adjusted results after the fix for bug #5500.
mysql-test/t/view.test:
  Added a test case for bug #5500.
2006-09-06 08:21:43 -07:00
unknown
deee3a30d6 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql


mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/binlog_row_blackhole.result:
  Auto merged
mysql-test/r/binlog_stm_blackhole.result:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_compress.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/func_group.result:
  Auto merged
mysql-test/r/func_math.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_system.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/gis.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/partition_pruning.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/rpl_get_lock.result:
  Auto merged
mysql-test/r/rpl_master_pos_wait.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/type_blob.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/group_min_max.test:
  Auto merged
mysql-test/t/partition_pruning.test:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/table.h:
  Auto merged
2006-08-01 09:24:19 +04:00
unknown
ef452e19bf BUG#14940 "MySQL choose wrong index", v.2
- Make the range-et-al optimizer produce E(#table records after table 
                                           condition is applied),
- Make the join optimizer use this value,
- Add "filtered" column to EXPLAIN EXTENDED to show 
  fraction of records left after table condition is applied
- Adjust test results, add comments


mysql-test/r/archive_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/auto_increment.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bdb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/bench_count_distinct.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/binlog_stm_blackhole.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/case.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/cast.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_collate.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ctype_cp1250_ch.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/date_formats.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/distinct.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/fulltext.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_crypt.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_default.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_encrypt.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_gconcat.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_group.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_if.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_in.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_like.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_math.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_op.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_regexp.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_set.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_str.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_system.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_test.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/func_time.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_by.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/group_min_max.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/having.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/heap_hash.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_innodb.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/index_merge_ror.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/innodb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/insert_update.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/join_nested.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/key_diff.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/myisam.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ndb_gis.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/negation_elimination.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/null.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/olap.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/partition_pruning.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/query_cache.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/row.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_get_lock.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/rpl_master_pos_wait.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/select.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/ssl_compress.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/subselect.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/type_blob.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/union.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/varbinary.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/variables.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/r/view.result:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/ctype_cp1250_ch.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/func_like.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/group_min_max.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/index_merge_ror_cpk.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/join.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
mysql-test/t/partition_pruning.test:
  BUG#14940: Adjust the test results: EXPLAIN EXTENDED now has extra "filtered" column
sql/opt_range.cc:
  BUG#14940: Make range/index_merge/group-min-max optimizer produce TABLE::quick_condition_rows -
    estimate of #records that will match the table condition.
sql/sql_class.cc:
  BUG#14940: Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.cc:
  BUG#14940: 
  - Make the join optimizer to use TABLE::quick_condition_rows=
    = E(#table records after filtering with table condition) 
  - Add "filtered" column to output of EXPLAIN EXTENDED
sql/sql_select.h:
  BUG#14940: Added comments
sql/table.h:
  BUG#14940: Added comments
2006-07-28 21:27:01 +04:00
unknown
1e44259440 Fixed bug #19714.
DESCRIBE returned the type BIGINT for a column of a view if the column
was specified by an expression over values of the type INT.
    
E.g. for the view defined as follows:
  CREATE VIEW v1 SELECT COALESCE(f1,f2) FROM t1
DESCRIBE returned type BIGINT for the only column of the view if f1,f2 are
columns of the INT type.
At the same time DESCRIBE returned type INT for the only column of the table
defined by the statement:
  CREATE TABLE t2 SELECT COALESCE(f1,f2) FROM t1.
    
This inconsistency was removed by the patch.

Now the code chooses between INT/BIGINT depending on the
precision of the aggregated column type.
 
Thus both DESCRIBE commands above returns type INT for v1 and t2.
 


mysql-test/r/analyse.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/bigint.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/create.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/olap.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_2myisam.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_3innodb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_4heap.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_5merge.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_6bdb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/ps_7ndb.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/sp.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/subselect.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/type_ranges.result:
  Adjusted the results after having fixed bug #19714.
mysql-test/r/view.result:
  Added a test case for bug #19714.
mysql-test/t/view.test:
  Added a test case for bug #19714.
2006-07-13 20:48:26 -07:00
unknown
c5f78752aa Manual merge
BitKeeper/etc/ignore:
  auto-union
mysql-test/t/bool.test:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/func_concat.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/grant_cache.test:
  Auto merged
mysql-test/t/innodb-deadlock.test:
  Auto merged
mysql-test/t/loaddata.test:
  Auto merged
mysql-test/t/lowercase_table.test:
  Auto merged
mysql-test/t/lowercase_table3.test:
  Auto merged
mysql-test/t/mix_innodb_myisam_binlog.test:
  Auto merged
mysql-test/t/mysqlbinlog.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_EE_error.test:
  Auto merged
mysql-test/t/rpl_change_master.test:
  Auto merged
mysql-test/t/rpl_empty_master_crash.test:
  Auto merged
BitKeeper/deleted/.del-isam.test~834fb0ee8196c445:
  Auto merged
BitKeeper/deleted/.del-rpl_trunc_binlog.test~961b1f6ac73d37c8:
  Auto merged
mysql-test/r/flush_block_commit.result:
  Auto merged
mysql-test/r/flush_table.result:
  Auto merged
mysql-test/r/lock_multi.result:
  Auto merged
mysql-test/r/rpl_server_id1.result:
  Auto merged
mysql-test/r/rpl_server_id2.result:
  Auto merged
mysql-test/r/rpl_start_stop_slave.result:
  Auto merged
mysql-test/t/create_select_tmp.test:
  Auto merged
mysql-test/t/ctype_latin1_de.test:
  Auto merged
mysql-test/t/flush_block_commit.test:
  Auto merged
mysql-test/t/func_if.test:
  Auto merged
mysql-test/t/innodb-lock.test:
  Auto merged
mysql-test/t/lock_multi.test:
  Auto merged
mysql-test/t/rpl_drop.test:
  Auto merged
mysql-test/t/rpl_error_ignored_table.test:
  Auto merged
mysql-test/t/rpl_flush_log_loop.test:
  Auto merged
mysql-test/t/rpl_get_lock.test:
  Auto merged
mysql-test/t/rpl_heap.test:
  Auto merged
mysql-test/t/rpl_insert_id.test:
  Auto merged
mysql-test/t/rpl_loaddata.test:
  Auto merged
mysql-test/t/rpl_loaddata_rule_m.test:
  Auto merged
mysql-test/t/rpl_loaddata_rule_s.test:
  Auto merged
mysql-test/t/rpl_loaddatalocal.test:
  Auto merged
mysql-test/t/rpl_max_relay_size.test:
  Auto merged
mysql-test/t/rpl_reset_slave.test:
  Auto merged
mysql-test/t/system_mysql_db.test:
  Auto merged
mysql-test/t/system_mysql_db_fix.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/t/rpl_server_id2.test:
  Auto merged
2005-09-15 22:21:30 +04:00
unknown
36d163d6cf Fix bug#12887 Distinct is not always applied after rollup
For queries with GROUP BY and without hidden GROUP BY fields DISTINCT is
optimized away becuase such queries produce result set without duplicates.
But ROLLUP can add rows which may be same to some rows and this fact was
ignored.

Added check so if ROLLUP is present DISTINCT can't be optimized away.


sql/sql_select.cc:
  Fix bug #12887 Distinct is not always applied after rollup
mysql-test/r/olap.result:
  Test case for bug #12887 Distinct is not always applied after rollup
mysql-test/t/olap.test:
  Test case for bug #12887 Distinct is not always applied after rollup
2005-09-15 21:34:11 +04:00
unknown
fa3c6c76f2 Post-merge fixes 2005-09-09 12:57:00 +04:00
unknown
0ef988ada3 Post-merge fixes
client/mysqlimport.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/t/connect.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
ndb/src/kernel/main.cpp:
  Auto merged
ndb/src/kernel/blocks/backup/Backup.hpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/ndbapi/Makefile.am:
  Auto merged
ndb/src/ndbapi/NdbTransaction.cpp:
  Auto merged
ndb/test/src/NdbBackup.cpp:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_sum.h:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-09-09 11:50:38 +04:00
unknown
20994fec52 Merge 4.1->5.0
client/mysqlimport.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/r/connect.result:
  Auto merged
mysql-test/r/func_gconcat.result:
  Auto merged
mysql-test/t/connect.test:
  Auto merged
mysql-test/t/func_gconcat.test:
  Auto merged
ndb/src/kernel/blocks/backup/Backup.cpp:
  Auto merged
ndb/src/kernel/blocks/backup/Backup.hpp:
  Auto merged
ndb/src/kernel/main.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/ndbapi/Makefile.am:
  Auto merged
ndb/test/src/NdbBackup.cpp:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-09-09 10:54:59 +04:00
unknown
2eaee052bc olap.result, olap.test:
Added a test case with VIEW for bug #12885.


mysql-test/t/olap.test:
  Added a test case with VIEW for bug #12885.
mysql-test/r/olap.result:
  Added a test case with VIEW for bug #12885.
2005-09-08 15:45:31 -07:00
unknown
10349b118f Manual merge
mysql-test/r/connect.result:
  Auto merged
mysql-test/t/connect.test:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-09-08 13:44:36 -07:00
unknown
91d2150dd6 sql_select.cc:
Fixed bug #12885.
  Forced inheritence of the maybe_null flag for the expressions
  containing GROUP BY attributes in selects with ROLLUP.
olap.test, olap.result:
  Added test case for bug #12885.


mysql-test/r/olap.result:
  Added test case for bug #12885.
mysql-test/t/olap.test:
  Added test case for bug #12885.
sql/sql_select.cc:
  Fixed bug #12885.
  Forced inheritence of the maybe_null flag for the expressions
  containing GROUP BY attributes in selects with ROLLUP.
2005-09-08 12:37:16 -07:00
unknown
cdf0387106 After-merge fixes.
configure.in:
  A hack to ensure that the tree compiles on SuSE 9.0 with -ansi -pedantic
mysql-test/r/olap.result:
  More post-merge fixes.
mysql-test/r/rpl_log.result:
  Post-merge fixes. Guilhem: please investigate.
mysql-test/r/rpl_rotate_logs.result:
  Post-merge fixes. Guilhem: please investigate.
mysql-test/t/olap.test:
  A post-merge fix.
2005-07-19 03:01:25 +04:00
unknown
7f6f31ae73 Merge mysql.com:/home/kostja/mysql/mysql-4.1-root
into  mysql.com:/home/kostja/mysql/mysql-5.0-merge


client/mysqltest.c:
  Auto merged
mysql-test/r/rpl_log.result:
  Auto merged
mysql-test/r/rpl_rotate_logs.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/timezone_grant.result:
  Auto merged
mysql-test/t/ctype_utf8.test:
  Auto merged
mysql-test/t/timezone_grant.test:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
configure.in:
  Manual merge
mysql-test/r/olap.result:
  Manual merge
mysql-test/t/olap.test:
  Manual merge
mysql-test/t/select.test:
  Manual merge
sql/mysqld.cc:
  Manual merge
sql/sql_parse.cc:
  Manual merge
2005-07-19 00:55:37 +04:00
unknown
607030266f olap.result, olap.test:
Added a test case for bug #11543.
sql_select.cc:
  Fixed bug #11543.
  A ROLLUP query could return a wrong result set when
  its GROUP BY clause contained references to the same
  column.


sql/sql_select.cc:
  Fixed bug #11543.
  A ROLLUP query could return a wrong result set when
  its GROUP BY clause contained references to the same
  column.
mysql-test/t/olap.test:
  Added a test case for bug #11543.
mysql-test/r/olap.result:
  Added a test case for bug #11543.
2005-07-01 07:40:22 -07:00
unknown
66b4354a84 view.result:
Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
olap.result, olap.test:
  Added a test case for bug #11639.
sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.


sql/item.h:
  Fixed bug #11639.
  Now if two Item_ref items ref1 and ref2 refer to the same field
  then ref1->eq(ref2) returns 1.
sql/sql_select.cc:
  Fixed bug #11639: a wrong result set when using a view
  instead of the underlying table in a rollup query 
  executed through filesort.
  The old code did not take into account that we always
  use an Item_ref object when referring to a view column.
mysql-test/t/olap.test:
  Added a test case for bug #11639.
mysql-test/r/olap.result:
  Added a test case for bug #11639.
mysql-test/r/view.result:
  Fixed the results of a test for group_concat.
  After the fix foor bug #11639 the results became
  correct.
2005-07-01 03:46:08 -07:00
unknown
bd47a7df59 Merge with 4.1
BitKeeper/etc/logging_ok:
  auto-union
client/sql_string.cc:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
mysys/raid.cc:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/tztime.cc:
  Auto merged
strings/ctype-win1250ch.c:
  Auto merged
mysql-test/r/func_gconcat.result:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/r/innodb.result:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/func_gconcat.test:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/innodb.test:
  merge & ensure that 4.1 and 5.0 source have tests in same order
sql/item_func.cc:
  merge
sql/mysqld.cc:
  merge
sql/opt_range.cc:
  merge
sql/sql_parse.cc:
  merge
  Give better name to goto labels
sql/sql_select.cc:
  merge
2005-06-07 00:31:53 +03:00
unknown
72dd44b9de Move USE_PRAGMA_IMPLEMENTATION to proper place
Ensure that 'null_value' is not accessed before val() is called in FIELD() functions
Fixed initialization of key maps. This fixes some problems with keys when you have more than 64 keys
Fixed that ROLLUP don't always create a temporary table. This fix ensures that func_gconcat.test results are now predictable


mysql-test/r/func_gconcat.result:
  Move innodb specific test to innodb.test
  Changed table name r2 -> t2
  More test to see how ROLLUP was optimized
mysql-test/r/innodb.result:
  Moved test here form func_gconcat
mysql-test/r/olap.result:
  New test results after optimization
mysql-test/t/func_gconcat.test:
  Move innodb specific test to innodb.test
  Changed table name r2 -> t2
  More test to see how ROLLUP was optimized
mysql-test/t/innodb.test:
  Moved test here form func_gconcat
sql/field.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_berkeley.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_blackhole.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_heap.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_innodb.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isam.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_isammrg.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisam.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_myisammrg.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/ha_ndbcluster.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/handler.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/hash_filo.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_cmpfunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_func.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
  Ensure that 'null_value' is not accessed before val() is called
sql/item_geofunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_strfunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_subselect.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_sum.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_timefunc.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/item_uniq.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/log_event.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/mysql_priv.h:
  Change key_map_full to not be const as we are giving it a proper value on startup
sql/mysqld.cc:
  Move key_map variables here and initialize key_map_full properly
sql/opt_range.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/opt_range.h:
  Fix that test_quick_select() works with any ammount of keys
sql/procedure.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/protocol_cursor.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/set_var.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_analyse.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_class.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_crypt.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_insert.cc:
  Fixed that max_rows is ulong
sql/sql_list.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_map.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_olap.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_select.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
  Fixed that ROLLUP don't have to always create a temporary table
  Added new argument to remove_const() to make above possible
  Fixed some errors that creapt up when we don't always do a temporary table for ROLLUP
sql/sql_string.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_table.cc:
  Simple optimizations
  Fixed wrong checking of build_table_path() in undef-ed code
sql/sql_udf.cc:
  Move USE_PRAGMA_IMPLEMENTATION to proper place
sql/sql_yacc.yy:
  removed extra {}
2005-06-03 23:46:03 +03:00
unknown
1b8a49bd84 olap.result:
Fixed bug #10982.
item.cc:
  Fixed bug #10982. In the function Item_ref::val_decimal
  by mistake the method Item_ref::val_decimal was used
  instead of Item_ref::val_decimal_result.


sql/item.cc:
  Fixed bug #10982. In the function Item_ref::val_decimal
  by mistake the method Item_ref::val_decimal was used
  instead of Item_ref::val_decimal_result.
mysql-test/r/olap.result:
  Fixed bug #10982.
2005-05-31 05:56:22 -07:00
unknown
134f660eaa olap.result:
Post merge corrections.


mysql-test/r/olap.result:
  Post merge corrections.
2005-05-31 04:49:52 -07:00
unknown
0f675ad47c Manual post merge
mysql-test/t/olap.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
mysql-test/r/olap.result:
  Manual merge
2005-05-30 05:47:50 -07:00
unknown
5a54820003 olap.result, olap.test:
Added test cases for bug #7894.
sql_select.cc:
  Fixed bug #7894: GROUP BY queries with ROLLUP returned
  wrong results for expressions containing group by columns.
  The fix ensured correct results by replacement of all
  occurrences of group by fields in non-aggregate expressions
  for corresponding ref objects and preventing creation of
  fields in temporary tables for expression containing group
  by fields.


sql/sql_select.cc:
  Fixed bug #7894: GROUP BY queries with ROLLUP returned
  wrong results for expressions containing group by columns.
  The fix ensured correct results by replacement of all
  occurrences of group by fields in non-aggregate expressions
  for corresponding ref objects and preventing creation of
  fields in temporary tables for expression containing group
  by fields.
mysql-test/t/olap.test:
  Added test cases for bug #7894.
mysql-test/r/olap.result:
  Added test cases for bug #7894.
2005-05-30 03:01:51 -07:00
unknown
f8a20dbeb6 Resolve merge from 4.1
BitKeeper/etc/logging_ok:
  auto-union
configure.in:
  Auto merged
myisam/mi_check.c:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
client/mysqldump.c:
  Resolve merge
mysql-test/r/myisam.result:
  Resolve merge
mysql-test/r/mysqldump.result:
  Resolve merge
mysql-test/r/olap.result:
  Resolve merge
mysql-test/r/subselect.result:
  Resolve merge
mysql-test/t/myisam.test:
  Resolve merge
mysql-test/t/mysqldump.test:
  Resolve merge
mysql-test/t/olap.test:
  Resolve merge
mysql-test/t/range.test:
  Resolve merge
mysql-test/t/subselect.test:
  Resolve merge
ndb/src/common/util/version.c:
  Resolve merge
ndb/src/ndbapi/ndberror.c:
  Resolve merge
sql/item.cc:
  Resolve merge
sql/item_strfunc.h:
  Resolve merge
sql/sql_select.cc:
  Resolve merge
sql/sql_yacc.yy:
  Resolve merge
2005-05-18 11:06:34 -07:00
unknown
0a2b07254f olap.result, olap.test:
Added test cases for bug #7914.
sql_select.cc:
  Fixed bug #7914: rollup over expresssions such as sum(a)+1.


sql/sql_select.cc:
  Fixed bug #7914: rollup over expresssions such as sum(a)+1.
mysql-test/t/olap.test:
  Added test cases for bug #7914.
mysql-test/r/olap.result:
  Added test cases for bug #7914.
2005-05-18 05:15:48 -07:00
unknown
8a27426fcd Tests and results fixed with last precision/decimal related modifications
mysql-test/r/case.result:
  test result fixed
mysql-test/r/create.result:
  test result fixed
mysql-test/r/distinct.result:
  test result fixed
mysql-test/r/func_group.result:
  test result fixed
mysql-test/r/func_op.result:
  test result fixed
mysql-test/r/group_by.result:
  test result fixed
mysql-test/r/metadata.result:
  test result fixed
mysql-test/r/olap.result:
  test result fixed
mysql-test/r/ps_2myisam.result:
  test result fixed
mysql-test/r/ps_3innodb.result:
  test result fixed
mysql-test/r/ps_4heap.result:
  test result fixed
mysql-test/r/ps_5merge.result:
  test result fixed
mysql-test/r/ps_6bdb.result:
  test result fixed
mysql-test/r/ps_7ndb.result:
  test result fixed
mysql-test/r/select.result:
  test result fixed
mysql-test/r/sp.result:
  test result fixed
mysql-test/r/type_decimal.result:
  test result fixed
mysql-test/r/type_newdecimal.result:
  test result fixed
mysql-test/r/union.result:
  test result fixed
mysql-test/r/variables.result:
  test result fixed
mysql-test/t/func_group.test:
  test modified
mysql-test/t/olap.test:
  test modified
mysql-test/t/type_decimal.test:
  test modified
2005-05-06 01:01:39 +05:00