Commit graph

11370 commits

Author SHA1 Message Date
unknown
b603e47d90 Fix for BUG#8441: in index_merge code when creating index search tuples use
KEY_PART_INFO::store_length, not KEY_PART_INFO::length (like range code does)


mysql-test/r/index_merge_innodb.result:
  Testcase for BUG8441
mysql-test/t/index_merge_innodb.test:
  Testcase for BUG8441
2005-06-20 08:56:37 +00:00
unknown
ac4421442a correcting error messages after discussion with Paul (replication of routines).
mysql-test/r/rpl_sp.result:
  result update
sql/share/errmsg.txt:
  correcting error messages after discussion with Paul.
2005-06-19 17:39:08 +02:00
unknown
16613aadbe Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-06-18 20:11:41 +03:00
unknown
0945dea8d0 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into xiphis.org:/usr/home/antony/work2/p3-bug6877.3


sql/mysql_priv.h:
  Auto merged
sql/table.cc:
  Auto merged
2005-06-17 22:32:46 +01:00
unknown
c25470e3a1 Bug#6877 MySQL should give an error if the requested table type is not available
Implement new SQL mode - NO_ENGINE_SUBSTITUTION


mysql-test/r/sql_mode.result:
  Test for bug 6877
mysql-test/t/sql_mode.test:
  Test for bug 6877
sql/handler.cc:
  change to ha_checktype()
sql/handler.h:
  change to ha_checktype()
sql/mysql_priv.h:
  new sql mode NO_ENGINE_SUBSTITUTION
  change to args for get_table_type() and create_frm()
sql/mysqld.cc:
  new sql mode NO_ENGINE_SUBSTITUTION
sql/set_var.cc:
  change to ha_checktype() args
sql/sql_delete.cc:
  change to get_table_type() args
sql/sql_rename.cc:
  change to get_table_type() args
sql/sql_table.cc:
  move common code to check_engine()
  change to ha_checktype(), get_table_type() args
sql/table.cc:
  change to ha_checktype(), create_frm(), get_table_type() args
sql/unireg.cc:
  change to create_frm() args
2005-06-17 22:14:44 +01:00
unknown
f16b102f6b Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0
2005-06-17 23:53:51 +03:00
unknown
c0918af2c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-10736


sql/sql_class.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-17 23:27:23 +04:00
unknown
63c21c07fc Rename all prepared statements COM_ commands to prefix with COM_STMT_
libmysql/libmysql.c:
  Rename.
libmysqld/lib_sql.cc:
  Rename.
sql/item_cmpfunc.cc:
  Use proper method to check for stmt prepare, only_prepare is removed.
sql/mysql_priv.h:
  Remove an obsolete define. Rename mysql_stmt_free to mysql_stmt_close.
sql/sql_class.h:
  Remove THD::only_prepare.
  Rename.
sql/sql_lex.cc:
  Rename COM_PREPARE -> COM_STMT_PREPARE
sql/sql_parse.cc:
  Rename.
sql/sql_prepare.cc:
  Rename.
sql/sql_yacc.yy:
  Rename.
tests/mysql_client_test.c:
  Rename.
2005-06-17 23:26:25 +04:00
unknown
46fa81f990 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug4-5.0


sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
2005-06-17 20:30:11 +03:00
unknown
467ca505b5 fixed printing of sum(distinct ) & avg(distinct ) & cast(... as decimal) (BUG#7015, BUG#11387)
mysql-test/r/view.result:
  using sum(distinct ), cast(... as decimal) & avg(distinct ) in views
mysql-test/t/view.test:
  using sum(distinct ), cast(... as decimal) & avg(distinct ) in views
sql/item.h:
  Add a comment for Item::print
sql/item_func.cc:
  Use functype(), not func_name() for item equvalence detection
sql/item_func.h:
  Missed function typoes added
  Add a comment for Item_func::func_name()
  style fix
sql/item_strfunc.cc:
  Use functype(), not func_name() for item equvalence detection
sql/item_strfunc.h:
  Add missing func_name and func_type
sql/item_sum.cc:
  Item_sum func_name report beggining of function till first argument
sql/item_sum.h:
  Item_sum func_name report beggining of function till first argument
sql/item_timefunc.cc:
  Use functype(), not func_name() for item equvalence detection
sql/item_timefunc.h:
  Add missing func_name and func_type
sql/item_uniq.h:
  Add missing func_name
2005-06-17 17:27:47 +03:00
unknown
aece56e30a Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/sql_select.cc:
  Auto merged
2005-06-17 14:54:59 +02:00
unknown
30aabe00de Merge dl145c.mysql.com:/home/ndbdev/tomas/mysql-4.1
into dl145c.mysql.com:/home/ndbdev/tomas/mysql-5.0


sql/sql_select.cc:
  Auto merged
2005-06-17 12:53:49 +02:00
unknown
6de6d3ad5c sql_select.cc:
fixed 64bit bug in lenght store/retrive in cache


sql/sql_select.cc:
  fixed 64bit bug in lenght store/retrive in cache
2005-06-17 12:36:09 +02:00
unknown
8f8f697490 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/sql_class.h:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
2005-06-17 11:29:55 +02:00
unknown
db10586e80 Post-merge fixes. 2005-06-17 01:58:36 +04:00
unknown
574f6c8dcc Manual merge (4.1->5.0) 2005-06-17 00:34:35 +04:00
unknown
c0484a301f Fix Bug#9334 "PS API queries in log file" and
Bug#8367 "low log doesn't gives complete information about prepared 
statements"
Implement status variables for prepared statements commands (a port of
the patch by Andrey Hristov).
See details in comments to the changed files.
No test case as there is no way to test slow log/general log in 
mysqltest.


mysql-test/r/ps_grant.result:
  Now execute is logged with tag 'Execute' (changed result file).
sql/mysql_priv.h:
  - remove obsolete macro.
  - add declarations for new status variables.
  - export function log_slow_statement, which now is used in sql_prepare.cc
sql/mysqld.cc:
  Add status variables for prepared statements API: now we record
  mysql_stmt_close, mysql_stmt_reset, mysql_stmt_prepare, mysql_stmt_execute
  mysql_stmt_send_long_data, PREPARE, EXECUTE, DEALLOCATE.
sql/sql_parse.cc:
  - account DEALLOCATE prepare as a Com_stmt_close command (close of a
  prepared statement).
sql/sql_prepare.cc:
  - fix a bug in SQL syntax for prepared statements + logging:
    if we use --log and EXECUTE stmt USING @no_such_variable;, the
    server crashed because the old code assumed that the variable 
    returned by get_var_with_binlog is never NULL.
  - account statistics for 
    mysql_stmt_{prepare,execute,close,reset,send_long_data} in
    Com_stmt_{prepare,execute,close,reset,send_long_data} correspondingly.
  - log slow statements into the slow log early, when thd->query
    points to a valid (with expanded placeholder values) query.
    The previous version was logging it in sql_parse, when thd->query
    is empty. Prevent the server from logging the statement twice by 
    setting thd->enable_slow_log= FALSE.
  - now in case of EXECUTE stmt in SQL syntax for prepared statements the 
    general log gets two queries, e.g.
    Query    EXECUTE stmt USING @a, @b, @c
    Execute  INSERT INTO t1 VALUES (1, 2, 3)
    This makes the behavior consistent with PREPARE command, which
    also logs the statement twice.
2005-06-17 00:11:48 +04:00
unknown
cb121e0ce5 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-16 21:27:51 +02:00
unknown
51cd70da3d A fix for Bug#9141 "4.1 does not log into slow log
ALTER, OPTIMIZE and ANALYZE statements".
In 4.1 we disabled logging of slow admin statements. The fix adds an 
option to enable it back.
No test case (slow log is not tested in the test suite), but tested
manually.
+ post-review fixes (word police mainly).


sql/mysql_priv.h:
  - declaration for a new option
sql/mysqld.cc:
  Add server option '--log-slow-admin-statements' to log slow
  optimize/alter/etc statements to the slow log if it's enabled.
  Add warnings that this option works only if the slow log is open.
sql/sql_class.h:
  Rename 'thd->slow_command' to thd->enable_slow_log (negates
  the meaning of this variable, and so resolves the need to negate
  value opt_log_slow_admin_statements when setting it).
sql/sql_parse.cc:
  Implement optional logging of administrative statements in the slow log.
2005-06-16 23:05:38 +04:00
unknown
0f57c00481 Manual merge
mysql-test/t/rpl_ddl.test:
  Auto merged
ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-16 10:04:41 -07:00
unknown
0812385dcc group_by.result, group_by.test:
Added a test case for bug #8614.
sql_select.cc:
  Fixed bug #8614.
  SELECT DISTINCT ... GROUP BY 'const' must be equivalent to
  SELECT ... GROUP BY 'const'.


sql/sql_select.cc:
  Fixed bug #8614.
  SELECT DISTINCT ... GROUP BY 'const' must be equivalent to
  SELECT ... GROUP BY 'const'.
mysql-test/t/group_by.test:
  Added a test case for bug #8614.
mysql-test/r/group_by.result:
  Added a test case for bug #8614.
2005-06-16 09:45:41 -07:00
unknown
3d7535f0ad Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
2005-06-16 15:33:48 +02:00
unknown
536a1cd14b merged
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
  Auto merged
ndb/test/ndbapi/testBlobs.cpp:
  Auto merged
sql/sql_select.cc:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  ul
2005-06-16 14:35:15 +02:00
unknown
17b55ca39b for consictency, changed to use memcpy_fixed. 2005-06-16 13:39:54 +02:00
unknown
5574de167c Fix for bug#9434 SHOW CREATE DATABASE information_schema;
added ability to do SHOW CREATE DATABASE `information_schema`
2005-06-16 13:27:22 +05:00
unknown
8dd1be2d97 Fix for bug#11055: information_schema: routines.sql_data_access has wrong value 2005-06-16 12:12:47 +05:00
unknown
9fb9133f2c cleanup for bug#11167.
portability alignment issues.
2005-06-15 22:49:52 +02:00
unknown
f1f1d39a29 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-15 20:24:13 +02:00
unknown
f1e42a0b35 renamed:
Item_buff -> Cached_item
  Item_arena -> Query_arena
  TEST_ASSERT -> YYERROR_UNLESS


sql/item.h:
  renamed:
    Item_buff -> Cached_item
sql/item_buff.cc:
  renamed:
    Item_buff -> Cached_item
sql/item_func.cc:
  renamed:
    Item_arena -> Query_arena
sql/item_subselect.cc:
  renamed:
    Item_arena -> Query_arena
sql/sp_head.cc:
  renamed:
    Item_arena -> Query_arena
sql/sp_head.h:
  renamed:
    Item_arena -> Query_arena
sql/sql_base.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_class.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_class.h:
  renamed:
    Item_arena -> Query_arena
sql/sql_lex.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_prepare.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_select.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_select.h:
  renamed:
    Item_buff -> Cached_item
    Item_arena -> Query_arena
sql/sql_union.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_view.cc:
  renamed:
    Item_arena -> Query_arena
sql/sql_yacc.yy:
  renamed:
    TEST_ASSERT -> YYERROR_UNLESS
sql/table.cc:
  renamed:
    Item_arena -> Query_arena
2005-06-15 19:58:35 +02: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
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
7fdcb69b81 Merge grichter@bk-internal.mysql.com:/home/bk/mysql-5.0
into lmy002.wdf.sap.corp:/home/georg/work/mysql/prod/mysql-5.0


sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
2005-06-15 15:58:56 +02:00
unknown
6393d0239d Added comment after Serg's review 2005-06-15 15:57:38 +02:00
unknown
c813e97cfa Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2005-06-15 15:02:48 +02: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
d925e516b3 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2005-06-15 13:32:41 +02: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
749a4e9166 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0
2005-06-15 09:28:35 +02:00
unknown
fcf1aab756 Fix for bug #11174 (can't determine hostname under Windows 64-bit) 2005-06-15 09:27:24 +02: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
4d8cbb0c27 fix of BUG#11111 fix
sql/item.h:
  revrited as recursive
sql/sql_select.cc:
  real_type is virtual
tests/mysql_client_test.c:
  check results abd delete views
2005-06-15 01:57:25 +03:00
unknown
10061029bc Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-bug3-5.0
2005-06-15 01:57:23 +03:00
unknown
970e20b7fe Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/mysql-5.0-bug-11111
2005-06-15 02:57:22 +04:00
unknown
4095a52a77 Fix 11 "fetch from view returns wrong data"
Wrong method for creating temporary field was choosen, which results in
sending int field with int header but lonlong data.

Test case is added to mysql_client_test.c because client library is required
to test the bug.



tests/mysql_client_test.c:
  Test case for bug#11111 "fetch from view returns wrong data"
sql/sql_select.cc:
  Fix bug #11111 "fetch from view returns wrong data"
sql/item.h:
  Fix bug #11111 "fetch from view returns wrong data"
2005-06-15 01:57:40 +04: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
d5600efdc1 Final patch to the bug #11314 (HAVING DEFAULT hangs)
sql/item.cc:
  it's safer not to reassign arg member
2005-06-14 20:04:42 +05: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