Commit graph

5147 commits

Author SHA1 Message Date
unknown
3125fed2a3 Merge of the fix for bug #9681 4.1->5.0
mysql-test/r/olap.result:
  Auto merged
mysql-test/t/olap.test:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-04-19 19:00:02 -07:00
unknown
6a97b07994 sql_select.cc:
Fixed bug #9681.
  The bug happened with queries using derived tables specified by
  a SELECT with ROLLUP, such as:
  SELECT * FROM (SELECT a, SUM(a) FROM t1 GROUP BY a WITH ROLLUP) t2,
  if column a of table t1 is declared as NOT NULL.
  This was to the fact that the first column of the temporary table
  created to contain the derived table erroneously inherited the NOT NULL
  attribute from column a.
olap.result, olap.test:
  Added a test case for bug #9681.


mysql-test/t/olap.test:
  Added a test case for bug #9681.
mysql-test/r/olap.result:
  Added a test case for bug #9681.
sql/sql_select.cc:
  Fixed bug #9681.
  The bug happened with queries using derived tables specified by
  a SELECT with ROLLUP, such as:
  SELECT * FROM (SELECT a, SUM(a) FROM t1 GROUP BY a WITH ROLLUP) t2,
  if column a of table t1 is declared as NOT NULL.
  This was to the fact that the first column of the temporary table
  created to contain the derived table erroneously inherited the NOT NULL
  attribute from column a.
2005-04-19 16:54:30 -07:00
unknown
ab603af807 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-merges
2005-04-18 16:03:07 +04:00
unknown
599fde0c51 Manual merge of patch for bug #8068 "TIMEDIFF with first negative
argument gives wrong result" (and similar bug in ADDTIME/SUBTIME)
into 5.0 tree.


mysql-test/t/func_sapdb.test:
  Auto merged
mysql-test/r/func_sapdb.result:
  Manual merge.
sql/item_timefunc.cc:
  Manual merge.
2005-04-18 14:29:31 +04:00
unknown
4594ea1fd1 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg8086
2005-04-18 13:54:42 +04:00
unknown
44bab0ead1 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/sql_yacc.yy:
  Auto merged
2005-04-18 11:27:02 +02:00
unknown
b51f70b81e Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug9439
2005-04-17 20:56:36 +04:00
unknown
982a12eea0 Merge fix for BUG#9439 from 4.1
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
2005-04-17 20:54:31 +04:00
unknown
be9b52bd69 Post-merge fixes
sql/opt_range.cc:
  Auto merged
2005-04-17 02:10:43 +04:00
unknown
3c112262b5 Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-look-range
2005-04-17 02:06:17 +04:00
unknown
6b00231421 Fix for BUG#9348: when computing union of two intervals set lower bound to
minimum of lower bounds of two joined intervals.


mysql-test/r/range.result:
  Testcase for BUG#9348
mysql-test/t/range.test:
  Testcase for BUG#9348
2005-04-17 02:05:09 +04:00
unknown
9e5325ab5c Fix for BUG#9439:
Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024)
(this is the final cset with proper tests)


mysql-test/r/show_check.result:
  Testcase for BUG#9439
mysql-test/t/show_check.test:
  Testcase for BUG#9439
sql/sql_show.cc:
  Fix for BUG#9439:
  Changed type of "Sub_part" column in SHOW KEYS from TINYINT to SMALLINT (as MAX_KEY_LENGTH=1024)
2005-04-16 23:35:39 +04:00
unknown
cef7e66e98 Merge
myisam/mi_search.c:
  Auto merged
myisam/mi_write.c:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/myisam.result:
  SCCS merged
mysql-test/t/myisam.test:
  SCCS merged
2005-04-16 17:58:11 +02:00
unknown
dacff5a908 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-bug9188
2005-04-16 17:44:04 +02:00
unknown
550fff6b72 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
2005-04-16 11:43:03 +03:00
unknown
48faa137af Added more rows to test to get predictable results
mysql-test/t/range.test:
  Added more rows to test to get predictable results
  (if it still fails, we need to add even more rows)
scripts/make_binary_distribution.sh:
  Apply Jims patch for  mysql.server
support-files/mysql.server.sh:
  Apply Jims patch to support mysqld_safe
2005-04-16 10:53:30 +03:00
unknown
e77860b7be Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/item.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-04-15 22:35:29 -07:00
unknown
d85fdc1b84 subselect.result, subselect.test:
Added a test case for bug #9516.
item_subselect.h:
  Fixed bug #9516.
  The bug was due to that fact that the class Item_subselect
  inherited the generic implementation of the function
  not_null_tables that was not valid for the objects
  of this class. As a result evaluation of the
  not_null_tables attribute was not correct for subqueries.
  This caused invalid transformations of outer joins into
  inner joins.


sql/item_subselect.h:
  Fixed bug #9516.
  The bug was due to that fact that the class Item_subselect
  inherited the generic implementation of the function
  not_null_tables that was not valid for the objects
  of this class. As a result evaluation of the
  not_null_tables attribute was not correct for subqueries.
  This caused invalid transformations of outer joins into
  inner joins.
mysql-test/t/subselect.test:
  Added a test case for bug #9516.
mysql-test/r/subselect.result:
  Added a test case for bug #9516.
2005-04-15 22:08:34 -07:00
unknown
2b92a78eb8 subselect.result, subselect.test:
Added a test case for bug #9338.
sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
item.cc:
  Fixed bug #9338.
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field. The new method
  is used to replace the occurences of Item_field objects.
item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.


sql/item.h:
  Fixed bug #9338.
  The virtual function replace_equal_field_processor was replaced
  by replace_equal_field. The latter is supposed to be used as a
  callback function in calls of the method transform.
sql/item.cc:
  The method Item_field::replace_equal_field_processor was
  replaced by Item_field::replace_equal_field The new method
  is used to replace the occurences of Item_field objects.
sql/sql_select.cc:
  Fixed bug #9338.
  When an occurence of a field reference has to be replaced
  by another field reference the whole Item_field must be
  replaced.
mysql-test/t/subselect.test:
  Added a test case for bug #9338.
mysql-test/r/subselect.result:
  Added a test case for bug #9338.
2005-04-15 20:43:45 -07:00
unknown
b753fd96b2 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-bug9188
2005-04-15 17:16:42 +02:00
unknown
53c095f083 Fixed BUG#9902: Crash with simple stored function using user defined variables
... actually, it was a query cache problem. (It shouldn't cache such queries)


mysql-test/r/sp.result:
  Added testcase for BUG#9902.
mysql-test/t/sp.test:
  Added testcase for BUG#9902.
sql/sql_yacc.yy:
  Don't cache queries which are calling stored functions.
2005-04-15 11:06:25 +02:00
unknown
9b583225b3 A test case for Bug#4956 (decimal -> string conversion problem)
mysql-test/r/type_decimal.result:
  Test results (Bug#4956)
mysql-test/t/type_decimal.test:
  A test case for Bug#4956 "strange result, insert into longtext, parameter 
  with numeric value" (the bug itself is not repeatable any more).
2005-04-14 15:14:34 -07:00
unknown
c8723e7f95 merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
2005-04-14 21:31:22 +02:00
unknown
1403fb000b TRUNCATE is always a transaction on itself. pretent we're in auto-commit mode
bug#8151
2005-04-14 18:14:54 +02:00
unknown
3c56b9a542 Merge 2005-04-14 16:10:18 +02:00
unknown
e0fdbeba7e Fixed BUG#9598: stored procedure call within stored procedure
overwrites IN variable
  and added error checking of variables for [IN]OUT parameters while
  rewriting the out parameter handling.


mysql-test/r/sp-error.result:
  New test case for non-variable argument for [IN]OUT parameters.
  (And changed to qualified names in some other error messages.)
mysql-test/r/sp.result:
  New test case for BUG#9598.
mysql-test/t/sp-error.test:
  New test case for non-variable argument for [IN]OUT parameters.
mysql-test/t/sp.test:
  New test case for BUG#9598.
sql/item.h:
  Need to distinguish between SP local variable items and other items,
  for error checking and [IN]OUT parameter handling.
sql/share/errmsg.txt:
  New error message for non-variable arguments for [IN]OUT parameters in stored procedures.
sql/sp_head.cc:
  Rewrote the [IN]OUT parameter handling in procedure invokation, to make
  it work properly when using user variables in sub-calls.
  Also added error checking for non-variable arguments for such parameters
  (and changed to qualified names for wrong number of arg. errors).
sql/sp_rcontext.cc:
  No need to keep track on the out index for an [IN]OUT parameter any more.
sql/sp_rcontext.h:
  No need to keep track on the out index for an [IN]OUT parameter any more.
2005-04-14 14:52:35 +02:00
unknown
0a72f99e86 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.bit_class
2005-04-14 14:33:28 +05:00
unknown
27b2b1fad3 Bit type: fix for create_field::create_field().
sql/field.cc:
  Bit type: fix for create_field::create_field().
  We should return saved length in case of Field_bit_as_char.
2005-04-14 14:32:25 +05:00
unknown
cfefd88d37 information_schema.result, information_schema.test:
Added a test in connection with the fix for
  bug #6106.
view.result, view.test:
  Added test cases for bugs #6106/6107.
sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.


sql/sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.
sql/sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
mysql-test/t/view.test:
  Added test cases for bugs #6106/6107.
mysql-test/r/view.result:
  Added test cases for bugs #6106/6107.
mysql-test/t/information_schema.test:
  Added a test in connection with the fix for
  bug #6106.
mysql-test/r/information_schema.result:
  Added a test in connection with the fix for
  bug #6106.
2005-04-13 23:06:37 -07:00
unknown
11b666fb49 Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean
2005-04-13 12:46:19 -07:00
unknown
c23c4c7cfa Allow SQLCOM_CALL in prepared mode.
mysql-test/r/ps.result:
  Test results: adding tests for CALL statement in prepared mode.
mysql-test/t/ps.test:
  Adding tests for CALL statement in prepared mode.
2005-04-13 12:36:15 -07:00
unknown
9c2446f339 Merge from 4.1
innobase/fil/fil0fil.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
mysql-test/t/ctype_ucs_binlog.test:
  Auto merged
2005-04-13 10:38:11 -07:00
unknown
338df0b77c Fix ctype_ucs_binlog test when ucs2 not available
mysql-test/t/ctype_ucs_binlog.test:
  Require ucs support
2005-04-13 09:02:12 -07:00
unknown
e2089cdd23 Fixed BUG#9674: Stored Procs: Using declared vars in algebric operation
causes system crash.


mysql-test/r/sp.result:
  Added test case for BUG#9674.
mysql-test/t/sp.test:
  Added test case for BUG#9674.
sql/item.cc:
  Returning a pointer to a local variable is not a good idea.
  Better to use parameter which is there for exactly this purpose.
2005-04-13 17:43:53 +02:00
unknown
d6c2a1e3d8 Fixed BUG#9856: Stored procedures: crash if handler for sqlexception, not found.
mysql-test/r/sp.result:
  Added test case for BUG#6129.
mysql-test/t/sp.test:
  Added test case for BUG#6129.
sql/sp_pcontext.h:
  Only need one handler counter.
sql/sql_yacc.yy:
  Count handlers correctly.
2005-04-13 16:57:49 +02:00
unknown
a3aed4d8dc Added test case for BUG#6129: Stored procedure won't display @@sql_mode value.
mysql-test/r/sp.result:
  Added testcase for BUG#6129: Check that sql_mode is really set in mysql.proc.
mysql-test/t/sp.test:
  Added testcase for BUG#6129: Check that sql_mode is really set in mysql.proc.
2005-04-13 16:09:28 +02:00
unknown
5630f0731a Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-04-12 23:12:26 +02:00
unknown
87e742c187 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-04-12 18:13:29 +02:00
unknown
b59dc1e860 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/handler.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-04-12 17:22:14 +02:00
unknown
859b3e16ac FLUSH TABLES WITH READ LOCK should block writes to binlog too
mysql-test/r/flush_block_commit.result:
  FLUSH TABLES WITH READ LOCK should block writes to binlog too
  it does not yet
mysql-test/t/flush_block_commit.test:
  FLUSH TABLES WITH READ LOCK should block writes to binlog too
  it does not yet
2005-04-12 17:15:54 +02:00
unknown
db40f4a57f Fixed BUG#7185: Stored procedure crash if identifier is AVG
mysql-test/r/sp.result:
  Added test case for BUG#7185.
mysql-test/t/sp.test:
  Added test case for BUG#7185.
sql/sql_yacc.yy:
  Allow non-reserved words as stored procedure names.
2005-04-12 15:43:24 +02:00
unknown
378c506dd5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


mysql-test/r/heap.result:
  Auto merged
mysql-test/t/heap.test:
  Auto merged
2005-04-12 14:51:03 +02:00
unknown
5b5a12395c BUG#8924 'Explain' shows different strategy
- If number of records in table is 4, the calculated cost for using "index" and "range" become so close so that any rounding errors becomes visible.
 - Added one more record to the tables for heap test and expoect "range" to be selected
 - Decrease number of records in t1 for range and expect "index" to be choosen.


mysql-test/r/heap.result:
  Add one more record to table t1 and expect explain to use "range"
mysql-test/r/heap_btree.result:
  Add one more record to table t1 and expect explain to use "range"
mysql-test/r/heap_hash.result:
  Add one more record to table t1 and expect explain to use "range"
mysql-test/r/range.result:
  Update results
mysql-test/t/heap.test:
  Add one more record to table t1 and expect explain to use "range"
mysql-test/t/heap_btree.test:
  Add one more record to table t1 and expect explain to use "range"
mysql-test/t/heap_hash.test:
  Add one more record to table t1 in order for optimizer to select use of "range" deterministic
mysql-test/t/range.test:
  Remove one record from table t1 to avoid that cost for "index" and "range" are so close that rounding error become visible.
2005-04-12 12:04:43 +02:00
unknown
281fe07f05 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.bit_class


sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-04-12 12:30:09 +05:00
unknown
dcb61639e7 Bit type support for non-MyISAM tables. 2005-04-12 12:27:43 +05:00
unknown
c99e332cf1 backport kill.test fix from 5.0 2005-04-11 22:36:07 +02:00
unknown
c026b4f7f4 Merge mdk10.(none):/home/reggie/bk/mysql-4.1
into mdk10.(none):/home/reggie/bk/mysql-5.0


mysql-test/r/query_cache.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
sql/item_create.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-04-11 09:29:49 -05:00
unknown
b74783d56e merge
mysql-test/r/ctype_collate.result:
  Auto merged
mysql-test/r/union.result:
  Auto merged
mysql-test/t/union.test:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-04-11 15:11:52 +05:00
unknown
d79e696952 Merge mysql.com:/home/dlenev/src/mysql-4.0-bg9796
into mysql.com:/home/dlenev/src/mysql-4.1-merges


sql/item_create.cc:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
2005-04-11 09:53:54 +04:00
unknown
3e0a626367 Fix for bug #9796 "Query Cache caches queries with CURRENT_USER()
function".

We should not cache queries using CURRENT_USER() function as we do it
for some other functions, e.g. USER() function.


mysql-test/r/query_cache.result:
  Let us test that queries with CURRENT_USER() function are not cached.
mysql-test/t/query_cache.test:
  Let us test that queries with CURRENT_USER() function are not cached.
sql/item_create.cc:
  create_func_current_user():
    We should not cache queries which use CURRENT_USER() function.
2005-04-11 00:30:23 +04:00