Commit graph

5634 commits

Author SHA1 Message Date
unknown
8dd1be2d97 Fix for bug#11055: information_schema: routines.sql_data_access has wrong value 2005-06-16 12:12:47 +05:00
unknown
24de70926e Manual merge
sql/field.cc:
  Auto merged
2005-06-15 08:39:00 -07:00
unknown
1575df0074 cast.result, cast.test:
Added test case for bug #11283.
field.h, field.cc:
  Fixed bug #11283: wrong conversion from varchar to decimal.
  Added methods Field_string::val_decimal,
  Field_varstring::val_decimal, Field_blob::val_decimal.
  They are not inherited from the base class Field_longstr
  anymore.


sql/field.cc:
  Fixed bug #11283: wrong conversion from varchar to decimal.
  Added methods Field_string::val_decimal,
  Field_varstring::val_decimal, Field_blob::val_decimal.
  They are not inherited from the base class Field_longstr
  anymore.
sql/field.h:
  Fixed bug #11283: wrong conversion from varchar to decimal.
  Added methods Field_string::val_decimal,
  Field_varstring::val_decimal, Field_blob::val_decimal.
  They are not inherited from the base class Field_longstr
  anymore.
mysql-test/t/cast.test:
  Added test case for bug #11283.
mysql-test/r/cast.result:
  Added test case for bug #11283.
2005-06-15 08:27:33 -07:00
unknown
2ec50db87c Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.10632


strings/decimal.c:
  Auto merged
2005-06-15 19:56:01 +05:00
unknown
df60c7ef2d Fix for bug #10632 (CEILING returns wrong result)
mysql-test/r/func_math.result:
  test result fixed
mysql-test/t/func_math.test:
  test case added
strings/decimal.c:
  handling of round_digit changed - we have to check all the digits after
  the point if round_digit is 0
2005-06-15 19:53:40 +05:00
unknown
04ec8eca81 Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.10337


strings/decimal.c:
  Auto merged
2005-06-15 19:07:11 +05:00
unknown
e4cdb19387 Fix for bug #10337 (cast(NULL DECIMAL) crashes the server)
mysql-test/r/cast.result:
  test result fixed
mysql-test/t/cast.test:
  test case added
sql/item_func.cc:
  checks for NULL added
strings/decimal.c:
  we need to return specified 'scale' for the rounded decimal
2005-06-15 19:02:35 +05:00
unknown
ad57284c69 join_nested.result, join_nested.test:
Added a teast case for bug #11284.
sql_select.cc:
  Fixed bug #11284.
  Optimization with empty inner table currently cannot be
  used in the case of nested outer join.


sql/sql_select.cc:
  Fixed bug #11284.
  Optimization with empty inner table currently cannot be
  used in the case of nested outer join.
mysql-test/t/join_nested.test:
  Added a teast case for bug #11284.
2005-06-15 05:56:19 -07:00
unknown
67c204c46b Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/sql_select.cc:
  Auto merged
2005-06-15 03:39:43 -07:00
unknown
098d02eb44 join_outer.result, join_outer.test:
Added a test case for bug #11285.
sql_select.cc:
  Fixed bug #11285.
  The problem occurred with Item_equal in an 'on expression'
  that was evaluated to false.


sql/sql_select.cc:
  Fixed bug #11285.
  The problem occurred with Item_equal in an 'on expression'
  that was evaluated to false.
mysql-test/t/join_outer.test:
  Added a test case for bug #11285.
mysql-test/r/join_outer.result:
  Added a test case for bug #11285.
2005-06-15 02:02:25 -07:00
unknown
476ca52ee7 Fix for BUG#11211 "GROUP BY doesn't work correctly"
When the GROUP BY clause contains a column reference that can be resolved to
both an aliased column in the SELECT list, and to a column in the FROM clause,
the group column is resolved to the column in the FROM clause (for ANSI conformance).
However, it may be so that the user's intent is just the other way around, and he/she
gets the query results grouped by a completely different column than expexted.
This patch adds a warning in such cases that tells the user that there is potential
ambiguity in the group column.

sql/sql_select.cc
- Added a warning when a GROUP column is ambiguous due to that there is a
  column reference with the same name both in the SELECT and FROM clauses.
  In this case we resolve to the column in FROM clause and warn the user
  of a possible ambiguity.
- More extensive comments.
- Changed the function to return bool instead of int (as in other places).

mysql-test/t/group_by.test
  Added test for BUG#11211.

mysql-test/r/group_by.result
  Added test for BUG#11211.


mysql-test/r/group_by.result:
  Import patch 11211.diff
mysql-test/t/group_by.test:
  Import patch 11211.diff
sql/sql_select.cc:
  Import patch 11211.diff
BitKeeper/etc/ignore:
  Added ndb/src/dummy.cpp to the ignore list
mysql-test/r/alias.result:
  Added warning for potentially ambiguous column.
mysql-test/r/having.result:
  Added warning for potentially ambiguous column.
2005-06-15 10:12:49 +03:00
unknown
e1c2646a0c prohibit opening Query cache for SP cursors (BUG#9715)
mysql-test/r/query_cache.result:
  testing cursors in SP with QC
  testing suspicious but working using selects in function with QC
mysql-test/t/query_cache.test:
  testing cursors in SP with QC
  testing suspicious but working using selects in function with QC
sql/sp_head.h:
  method for prohibiting of QC using SP query
sql/sp_rcontext.cc:
  prohibit opening Query cache for SP cursors
sql/sp_rcontext.h:
  constructor moved to .cc file to be able to use methods from lex_keeper
2005-06-14 22:45:48 +03:00
unknown
38cf777005 Merge bk@192.168.21.1:/usr/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.clean
2005-06-14 17:55:44 +05:00
unknown
02b1eb988d Addition to fix for bug #11314 (test case wasn't complete)
mysql-test/r/func_default.result:
  test result fixed
mysql-test/t/func_default.test:
  test case fixed
2005-06-14 17:50:24 +05:00
unknown
0473ce99fa Fix for bug #11314 (HAVING DEFAULT() hangs)
mysql-test/t/func_default.test:
  test result fixed
sql/item.cc:
  code simplified using real_item() method,
  error returning added
2005-06-14 17:43:51 +05:00
unknown
2de78782a2 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-11044
2005-06-14 14:26:17 +03:00
unknown
40a1cc0d59 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-tmp
2005-06-14 12:23:17 +02:00
unknown
b1f306d0c4 Merge mysql.com:/home/timka/mysql/src/5.0-virgin
into mysql.com:/home/timka/mysql/src/5.0-bug-11044
2005-06-14 12:57:30 +03:00
unknown
d87c2dd6bf Fix for BUG#11044 - "SELECT DISTINCT on indexed column returns inconsistent results"
The problem was that when there was no MIN or MAX function, after finding the
group prefix based on the DISTINCT or GROUP BY attributes we did not search further
for a key in the group that satisfies the equi-join conditions on attributes that
follow the group attributes. Thus we ended up with the wrong rows, and subsequent
calls to select_cond->val_int() in evaluate_join_record() were filtering those
rows. Hence - the query result set was empty.

The problem occured both for GROUP BY queries without MIN/MAX and for queries
with DISTINCT (which were internally executed as GROUP BY queries).


mysql-test/r/group_min_max.result:
  Added test result for BUG#11044. Notice that the group by query is
  equivalent to the distinct query and both are executed via the same
  algorithm.
mysql-test/t/group_min_max.test:
  Added test for BUG#11044. Notice that the group by query is
  equivalent to the distinct query and both are executed via the
  same algorithm.
sql/opt_range.cc:
  * Use the extended prefix in QUICK_GROUP_MIN_MAX_SELECT::get_next()
    to find keys that satisfy equality conditions in the case when there is
    no MIN or MAX function.
  * Corrected some method comments.
  * Corrected debug printout of cost information.
2005-06-14 12:52:44 +03:00
unknown
7bb5fe9411 merge
BitKeeper/etc/logging_ok:
  auto-union
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2005-06-14 00:05:27 +02:00
unknown
a4535bc827 func_if.result, func_if.test:
Correction for test case of bug #11142.


mysql-test/t/func_if.test:
  Correction for test case of bug #11142.
mysql-test/r/func_if.result:
  Correction for test case of bug #11142.
2005-06-13 11:38:16 -07:00
unknown
89906482e0 func_if.result, func_if.test:
Added a test case for bug #11142.
item_cmpfunc.cc:
  Fixed bug #11142.
  Implementation of Item_func_nullif::is_null was corrected.


sql/item_cmpfunc.cc:
  Fixed bug #11142.
  Implementation of Item_func_nullif::is_null was corrected.
mysql-test/t/func_if.test:
  Added a test case for bug #11142.
mysql-test/r/func_if.result:
  Added a test case for bug #11142.
2005-06-13 11:24:26 -07:00
unknown
1a0bddb84d Merge ibabaev@bk-internal.mysql.com:/home/bk/mysql-5.0
into igor-inspiron.creware.com:/home/igor/mysql-5.0
2005-06-13 10:39:58 -07:00
unknown
e802cd3bc7 Merge igor-inspiron.creware.com:/home/igor/mysql-4.1
into igor-inspiron.creware.com:/home/igor/dev/mysql-4.1-0
2005-06-13 07:35:46 -07:00
unknown
0cd6d1c6f1 Merge igor-inspiron.creware.com:/home/igor/dev/mysql-4.1-0
into igor-inspiron.creware.com:/home/igor/dev/mysql-5.0-0


BitKeeper/etc/logging_ok:
  auto-union
mysql-test/r/ctype_utf8.result:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-13 06:28:23 -07:00
unknown
172c03c804 Making XID deterministic for rpl_ddl test
mysql-test/r/rpl_ddl.result:
  Making XID deterministic for test
mysql-test/t/rpl_ddl.test:
  Making XID deterministic for test
2005-06-13 15:18:36 +02:00
unknown
3f483c18bd ctype_utf8.test, ctype_utf8.result:
Added a test case for bug #11167.
sql_select.cc:
  Fixed bug #11167.
  In 4.1 char/varchar fields are limited by 255 characters in
  length that make them longer than 255 bytes in size for such
  character sets as UTF8. The functions store_record_in_cache
  and read_cached_records did not take into account this
  Moreover the code did not take into account that the size
  of the varchar fields in 5.0 can be up to 65535 bytes


sql/sql_select.cc:
  Fixed bug #11167.
  In 4.1 char/varchar fields are limited by 255 characters in
  length that make them longer than 255 bytes in size for such
  character sets as UTF8. The functions store_record_in_cache
  and read_cached_records did not take into account this
  Moreover the code did not take into account that the size
  of the varchar fields in 5.0 can be up to 65535 bytes
mysql-test/r/ctype_utf8.result:
  Added a test case for bug #11167.
mysql-test/t/ctype_utf8.test:
  Added a test case for bug #11167.
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-06-13 06:10:19 -07:00
unknown
50260639aa Merge mysql.com:/home/bkroot/mysql-5.0 into mysql.com:/home/bk/mysql-5.0
BitKeeper/etc/logging_ok:
  auto-union
sql/sql_parse.cc:
  Auto merged
2005-06-13 11:13:06 +02:00
unknown
8c4fe301d0 Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b6883-mysql-4.1
2005-06-13 11:12:10 +02:00
unknown
871977f26f Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


client/mysql.cc:
  Auto merged
mysql-test/r/lowercase_table2.result:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-06-10 20:11:20 -07:00
unknown
0670a02ca2 Merge mysql.com:/home/jimw/my/mysql-4.1-9500
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-06-10 14:44:25 -07:00
unknown
4b0264dffd Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


mysql-test/r/sp.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sp_rcontext.cc:
  Auto merged
2005-06-10 16:56:34 +02:00
unknown
03949f8ce8 Post review and additional fix for BUG#10968: Stored procedures: crash if long loop.
Fixed valgrind complaints. This fixes the memory leak problems for
  procedured, and partially for functions. There's still a leak involving
  results from functions that turned out to be too involved, so it will be
  fixed separately.


mysql-test/r/sp.result:
  Fixed some minor mistake (spotted while debugging).
mysql-test/t/sp.test:
  Fixed some minor mistake (spotted while debugging).
sql/item_func.cc:
  Moved Item_func_sp::cleanup() from item_func.h to ease debugging,
  and made a debug output come out right.
sql/item_func.h:
  Moved Item_func_sp::cleanup() to item_func.cc to ease debugging.
sql/sp_head.cc:
  Fixed valgrind problems with the previous memory leak fix (unit cleanup and
  putting result field in a differen mem_root), and removed prealloc flag from
  init_alloc_root() calls.
sql/sp_rcontext.cc:
  New mem_root pointer used for return fields from functions.
sql/sp_rcontext.h:
  New mem_root pointer used for return fields from functions.
2005-06-10 16:14:01 +02:00
unknown
846d6be749 Merge obarnir@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/omer/source/src50_0609


BitKeeper/etc/logging_ok:
  auto-union
2005-06-10 06:58:26 -07:00
unknown
7a355b191a Bug #10213 mysqldump crashes when dumping VIEWs
- Added testcase for this bug


mysql-test/r/mysqldump.result:
  Updated test result
mysql-test/t/mysqldump.test:
  Added testcase
2005-06-10 15:14:38 +02:00
unknown
d340c0f52b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/sql_show.cc:
  Auto merged
2005-06-10 14:34:43 +02:00
unknown
5b81b2dc87 Merge mysql.com:/home/jimw/my/mysql-5.0-10543
into  mysql.com:/home/jimw/my/mysql-5.0-clean


sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-06-09 19:29:55 -07:00
unknown
a3fe140963 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysys/hash.c:
  Auto merged
sql/ha_heap.h:
  Auto merged
configure.in:
  Resolve conflicts from 4.1
mysql-test/r/heap.result:
  Update results
mysql-test/t/heap.test:
  Merge from 4.1
2005-06-09 19:27:45 -07:00
unknown
72724bd84b Merge mysql.com:/home/jimw/my/mysql-4.1-10566
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-06-09 18:03:18 -07:00
unknown
a1650deab6 Adding auxiliary scripts that allow to display messages in result files from within test files
- show_msg.inc   - displays a message followed by a line of '-' at the length of the messgae
 - show_msg80.inc - displays a message followed by a line of '-' with a fixed length of 80


mysql-test/r/mysqltest.result:
  Updated result file
mysql-test/t/mysqltest.test:
  Added test cases to test the show_msg.inc and show_msg80.inc auxiliary files
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-06-09 11:01:23 -07:00
unknown
b4326ccf6d Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into xiphis.org:/usr/home/antony/work2/p1-bug11028.4
2005-06-09 18:44:59 +01:00
unknown
8ab8fca7d5 select.test, select.result:
Added a test case for bug #10084.
sql_yacc.yy:
  Fixed bug #10084: STRAIGHT_JOIN for expressions with ON was
  added.


sql/sql_yacc.yy:
  Fixed bug #10084: STRAIGHT_JOIN for expressions with ON was
  added.
mysql-test/r/select.result:
  Added a test case for bug #10084.
mysql-test/t/select.test:
  Added a test case for bug #10084.
2005-06-09 09:16:16 -07:00
unknown
fec1c6ac67 Merge
BitKeeper/etc/logging_ok:
  auto-union
myisam/mi_check.c:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/innodb_handler.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/set_var.cc:
  Auto merged
mysql-test/r/sql_mode.result:
  SCCS merged
mysql-test/t/sql_mode.test:
  SCCS merged
sql/sql_acl.cc:
  SCCS merged
sql/sql_handler.cc:
  SCCS merged
sql/sql_table.cc:
  SCCS merged
2005-06-09 17:15:06 +01:00
unknown
c995109b69 Bug#11028 Crash on create table like
Report error instead of crashing


mysql-test/r/create.result:
  Test for bug 11028
mysql-test/t/create.test:
  Test for bug 11028
sql/sql_table.cc:
  fix for null db name
2005-06-09 16:06:15 +01:00
unknown
146893a7a0 Fix for bug #10083 (round doesn't increase scale)
mysql-test/r/func_math.result:
  test result fixed
mysql-test/t/func_math.test:
  test case added
sql/item_func.cc:
  now we always use decimals_to_set
2005-06-09 15:27:26 +05:00
unknown
42b4b3ce58 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/gluh/MySQL/Merge/4.1
2005-06-09 15:26:46 +05:00
unknown
f160958770 Fix for bug#10732: Set SQL_MODE to NULL gives garbled error message
generate proper error message if we use SET ... = NULL for 'set'
  variables
2005-06-09 14:39:29 +05:00
unknown
7073dda620 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.8482
2005-06-09 13:31:29 +05:00
unknown
98c2ec7538 Fix for bug #8482 (Incorrect rounding)
mysql-test/r/type_newdecimal.result:
  test result fixed
mysql-test/t/type_newdecimal.test:
  test case added
strings/decimal.c:
  in round(999.9, 0) case we have to increase intg
2005-06-09 12:44:44 +05:00
unknown
467b6dc477 Merge mysql.com:/home/jonas/src/mysql-4.1
into mysql.com:/home/jonas/src/mysql-4.1-push
2005-06-09 08:12:14 +02:00