Commit graph

11343 commits

Author SHA1 Message Date
unknown
61bb1f34db Merge mysql.com:/home/jimw/my/mysql-4.1-10944
into  mysql.com:/home/jimw/my/mysql-4.1-clean
2005-06-01 13:00:32 -07:00
unknown
dd1168a34f Merge mysql.com:/home/jimw/my/mysql-4.1-8135
into  mysql.com:/home/jimw/my/mysql-4.1-clean


sql/sql_table.cc:
  Auto merged
2005-06-01 12:59:11 -07:00
unknown
c4797fa67b Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-06-01 20:04:53 +02:00
unknown
f20c56a9e7 Fix handling of NULL fields in FIELD(). (Bug #10944)
mysql-test/r/func_str.result:
  Update results
mysql-test/t/func_str.test:
  Add regression tests
sql/item_func.cc:
  Handle NULL as first argument to FIELD()
2005-06-01 09:48:25 -07:00
unknown
04ed9f0204 more than 64 indexes per table. bugfixes. bug#10995 2005-06-01 18:33:16 +02:00
unknown
de78f2e593 BUG#6883: Added tests for create/drop temporary table, UNLOCK TABLES
If a create table can not do implicit commit, the stmt now fails
CREATE/DROP TEMPORARY TABLE is now flushed to binlog


mysql-test/include/rpl_stmt_seq.inc:
  Documentation, cleared up code
mysql-test/r/rpl_ddl.result:
  New results
mysql-test/t/rpl_ddl.test:
  Added tests for create/drop temporary table
  Added tests for different types of locks in UNLOCK TABLES
  Cleared up code/documentation
sql/sql_parse.cc:
  If A CREATE TABLE fails to do implicit commit, then the stmt now fails (DROP works in same way)
  CREATE/DROP TEMOPORARY TABLE is now flushed to binlog
2005-06-01 15:52:32 +02:00
unknown
aecb4409ef 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-06-01 15:50:52 +02:00
unknown
ae28b3bd07 Fixed BUG#10969: Stored procedures: crash if default() function
Return an error if default() is used on a local variable.
  This is actaully a side-effect of BUG#5967: Stored procedure declared
  variable used instead of column (to be fixed later), so this is really a
  workaround until that is fixed.


mysql-test/r/sp-error.result:
  New test case for BUG#10969.
mysql-test/t/sp-error.test:
  New test case for BUG#10969.
sql/item.h:
  Get name of local variable for error messages.
sql/sql_yacc.yy:
  Return an error if default() is applied on a local SP variable.
2005-06-01 15:42:40 +02:00
unknown
906b210a4a Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge


client/mysql.cc:
  Code cleanups & simply optimizations
mysql-test/r/information_schema.result:
  Safety
mysql-test/t/information_schema.test:
  Safety
sql/ha_ndbcluster.cc:
  Code cleanups
sql/item.cc:
  Code cleanups
sql/item_subselect.cc:
  Code cleanups
sql/item_sum.cc:
  Code cleanups
sql/opt_range.cc:
  Made get_index_only_read_time() static (instad of inline) to increase portability (function was not declared before use)
  Simple optimization
  Fixed wrong key_part->key_length usage in index_merge
  Removed not used variable n_used_covered
  Indentation fixes & comment cleanups
sql/parse_file.cc:
  Code cleanups
sql/sql_base.cc:
  Code cleanups
sql/sql_bitmap.h:
  Added missing return
sql/sql_insert.cc:
  Ensure we get error if INSERT IGNORE ... SELECT fails
sql/sql_select.cc:
  Code cleanups
sql/sql_show.cc:
  Safety fix if a LOT of errors are ignored
sql/sql_update.cc:
  Code cleanups
sql/table.cc:
  Code cleanups
sql/table.h:
  Code cleanups
sql/uniques.cc:
  Code cleanups
strings/decimal.c:
  Simple optimization
  Code cleanups
2005-06-01 16:35:09 +03:00
unknown
44af4dbdf1 A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument).
sql/item_timefunc.cc:
  A fix (bug #10568: Function 'LAST_DAY(date)' does not return NULL for invalid argument).
  Return error for partial dates as well.
2005-06-01 17:09:46 +05:00
unknown
388d9df13e Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
After merge fixes.
2005-06-01 13:22:17 +02:00
unknown
77bd9d36e6 Fixed BUG#10961: Stored procedures: crash if select * from dual
Have to catch errors from SELECT when opening a cursor.


mysql-test/r/sp.result:
  New test case for BUG#10961.
mysql-test/t/sp.test:
  New test case for BUG#10961.
sql/protocol.h:
  Init data in Protocol_cursor constructor, for error cases.
sql/sp_head.cc:
  Catch "hidden" errors during SELECT when opening a cursor.
2005-06-01 12:18:41 +02:00
unknown
9f50c2ffac Fixed handling of condition pushdown to storage engine of NO BETWEEN and NOT IN 2005-06-01 11:56:47 +02:00
unknown
046ced266a Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Manual merge from 4.1.


mysql-test/r/create.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-01 11:15:21 +02:00
unknown
10481cd036 Merge
mysql-test/r/create.result:
  SCCS merged
mysql-test/t/create.test:
  SCCS merged
2005-05-31 20:55:42 +02:00
unknown
e0fbac1931 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-4.1
into xiphis.org:/usr/home/antony/work2/p4-bug10413.2
2005-05-31 19:21:08 +01:00
unknown
57d4adf60c Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
Hand merged from 4.0.


sql/lock.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
2005-05-31 19:37:24 +02:00
unknown
2b548fe935 Bug#10413 - Invalid column name is not rejected
Stop ignoring name parts and check for validity


mysql-test/r/create.result:
  Test for bug#10413
mysql-test/t/create.test:
  Test for bug#10413
sql/sql_yacc.yy:
  Bug#10413
    Stop ignoring parts of fully qualified names.
2005-05-31 18:06:54 +01:00
unknown
3f7b0f708e Fixed BUG#9529: Stored Procedures: No Warning on truncation of procedure name
during creation.
  Although it returns an error, consistent with the behaviour for other objects.
  (Unclear why we would allow the creation of SPs with truncated names.)


mysql-test/r/sp-error.result:
  New test case for BUG#9529.
mysql-test/t/sp-error.test:
  New test case for BUG#9529.
sql/sp.cc:
  Check SP name length on creation (and drop).
sql/sp.h:
  New status code for bad (too long) name.
sql/sql_parse.cc:
  New status code for bad (too long) name.
2005-05-31 18:36:32 +02:00
unknown
190aafb4d9 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


sql/item.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-31 06:00:41 -07: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
87805b682d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/item_subselect.cc:
  Auto merged
2005-05-31 15:22:44 +03:00
unknown
c744e27479 BUG# 10181-mysqld.exe crash with an access vioation after INSERT INTO mysql.host
this is a followup cset after changes suggested by Serg.


sql/sql_acl.cc:
  removed extra parameters used in sql_print_warning
  added code to output "" when host.db is null in the top sql_print_warning call
2005-05-31 07:21:10 -05:00
unknown
d8b01c1e21 Small bug fix in SP item reusal (debug mode only).
sql/item.cc:
  Get the size before trashing (in debug mode only).
2005-05-31 13:12:23 +02:00
unknown
6474d27412 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into mdk10.(none):/home/reggie/bk/41test3
2005-05-31 06:07:44 -05:00
unknown
c50f4be351 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-05-31 12:07:16 +02:00
unknown
2e113adab3 Post-review fixes of BUG#9937: Crash on call to stored procedure.
sql/item_cmpfunc.cc:
  Put the buff parameter back in check_stack_overrun().
sql/item_func.cc:
  Put the buff parameter back in check_stack_overrun().
sql/item_subselect.cc:
  Put the buff parameter back in check_stack_overrun().
sql/mysql_priv.h:
  Put the buff parameter back in check_stack_overrun().
sql/mysqld.cc:
  Style fixes.
sql/sp_head.cc:
  Put the buff parameter back in check_stack_overrun().
sql/sql_parse.cc:
  Put the buff parameter back in check_stack_overrun(), and added comment explaining the purpose.
sql/table.cc:
  Put the buff parameter back in check_stack_overrun().
2005-05-31 12:06:15 +02:00
unknown
5013a1d592 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/item_subselect.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
2005-05-31 12:29:24 +03:00
unknown
cf2188ca39 Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
1.) Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
Used the new option in create_table_from_items().
It is necessary to prevent the SELECT table from being reopend.
It would get new storage assigned for its fields, while the
SELECT part of the command would still use the old (freed) storage.
2.) Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
against a global read lock. This prevents a deadlock in
CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
and avoids the creation of new tables during a global read lock.
3.) Replaced set_protect_against_global_read_lock() and
unset_protect_against_global_read_lock() by
wait_if_global_read_lock() and start_waiting_global_read_lock()
in the INSERT DELAYED handling.


mysql-test/r/create.result:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Added test results.
mysql-test/t/create.test:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Added tests which do not require concurrency.
sql/lock.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Added a new option to mysql_lock_tables() for ignoring FLUSH TABLES.
  Changed the parameter list.
  Removed two unnecessary functions. Their functionality is included in
  wait_if_global_read_lock() and start_waiting_global_read_lock().
sql/mysql_priv.h:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Changed the declaration of mysql_lock_tables().
  Added definitions for the new options.
sql/sql_acl.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_base.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_handler.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_insert.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Replaced set_protect_against_global_read_lock() and
  unset_protect_against_global_read_lock() by
  wait_if_global_read_lock() and start_waiting_global_read_lock()
  in the INSERT DELAYED handling.
  Adjusted mysql_lock_tables() calls to the new argument list.
sql/sql_parse.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Protected the CREATE TABLE and CREATE TABLE ... SELECT commands
  against a global read lock. This prevents a deadlock in
  CREATE TABLE ... SELECT in conjunction with FLUSH TABLES WITH READ LOCK
  and avoids the creation of new tables during a global read lock.
sql/sql_table.cc:
  Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
  Adjusted mysql_lock_tables() calls to the new argument list.
  Used the new option in create_table_from_items().
2005-05-31 11:08:14 +02:00
unknown
97cef22b84 Fix for bug#10059: SHOW TABLE STATUS FROM information_schema; reports uppercase table names
information schema table names are always upper case table names
2005-05-31 13:15:23 +05:00
unknown
7b4385f472 a fix (bug #7405: group_concat with distinct and rollup => ignores distinct in some rows).
sql/item_sum.cc:
  a fix (bug #7405: group_concat with distinct and rollup => ignores distinct in some rows).
  Code changed in order to work with rollup extension.
2005-05-31 10:54:33 +05:00
unknown
d8cec2abf3 One more post-review fix. 2005-05-30 21:49:59 +04:00
unknown
e2285c541b Fixed bug in multiple-table-delete where some rows was not deleted
mysql-test/r/delete.result:
  Test case for bug in multiple-table-delete where some rows was not deleted
mysql-test/t/delete.test:
  Test case for bug in multiple-table-delete where some rows was not deleted
sql/item_subselect.cc:
  Code cleanup
sql/opt_range.cc:
  Code cleanup
sql/sql_delete.cc:
  Fixed bug in multiple-table-delete where some rows was not deleted
  This happend when the first table-to-delete-from was not the the table that was scanned.
  Fixed this by only doing 'delete-on-the-fly' for the first table.
  Fixed also some wrong error handling in multi-table-delete
2005-05-30 20:48:40 +03:00
unknown
b6b6c695a2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-7306-new


sql/sql_delete.cc:
  Auto merged
2005-05-30 21:47:20 +04:00
unknown
5cdac99069 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-7306-new


sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-30 20:56:11 +04:00
unknown
78422442df Preparatory (and the most problematic) patch for Bug#7306
"the server side preparedStatement error for LIMIT placeholder",
which moves all uses of LIMIT clause from PREPARE to OPTIMIZE
and later steps.
After-review fixes.


mysql-test/r/group_min_max.result:
  Test results fixed for EXPLAINs when using GROUP_MIN_MAX access plan.
sql/item_subselect.cc:
  Move setting of the internal LIMIT used for IN/ALL/ANY/EXISTS 
  subqueries to one place: Item_exists_subselect::fix_length_and_dec().
  This implies that unit->select_limit_cnt is not set until the item is 
  fixed. This is OK, as now LIMIT values are not used until JOIN::optimize.
sql/mysql_priv.h:
  setup_tables no longer needs a special flag for the case when
  it's called from JOIN::reinit() (we don't need to call setup_tables
  between two executions of a correlated subquery).
sql/opt_range.cc:
  Fix a glitch in GROUP_MIN_MAX access plan: we should use table metadata,
  not field data, to evaluate max_used_key_length, which is then
  used for explain.
sql/sp.cc:
  - setup_tables signature changed.
sql/sql_base.cc:
  - setup_tables no longer needs a special mode for subqueries.
    Unused checks were removed.
sql/sql_delete.cc:
  - setup_tables signature changed
sql/sql_help.cc:
  - setup_tables signature changed
sql/sql_insert.cc:
  - setup_tables signature changed
sql/sql_lex.cc:
  Consolidate setting of internal LIMIT for IN/ALL/ANY/EXISTS subqeries
  in one place, and hence remove it from st_select_lex::test_limit().
sql/sql_lex.h:
  Cleanup signature of st_select_lex_unit::init_prepare_fake_select_lex().
sql/sql_load.cc:
  - setup_tables signature changed
sql/sql_olap.cc:
  - setup_tables signature changed
sql/sql_parse.cc:
  - st_select_lex_unit::set_limit() signature changed
sql/sql_select.cc:
  Move setting of JOIN::select_limit from JOIN::prepare
  to JOIN::optimize. At prepare, limit is unknown yet.
  Remove excessive cleanups from JOIN::reinit which were overwriting
  join->join_tab[i]->table->used_keys. This fixes the bug which was triggered
  by the change in item_subselect.cc.
sql/sql_union.cc:
  Class st_select_lex_unit was changed to avoid calls to 
   st_select_lex_unit::set_limit from places where it may be unknown.
  Now unit->select_limit_cnt is set at ::exec(). 
  st_select_lex_unit::init_prepare_fake_select_lex(): 
   - move out set_limit functionality
   - remove a few lines of dead code.
  st_select_lex_unit::prepare():
    - now we don't call set_limit at the time of prepare, so the value  
      of unit->select_limit_cnt may be unknown here. Use sl->select_limit
      instead.
  st_select_lex_unit::exec():
    - cleanup
    - call set_limit explicitly as it has been moved out of 
     init_prepare_fake_select_lex.
sql/sql_update.cc:
  - setup_tables signature changed
2005-05-30 20:54:37 +04:00
unknown
424fb61d1a Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-ttdf
2005-05-30 18:59:24 +04:00
unknown
02425b7bf0 Added test for bug #5894 "Triggers with altered tables cause corrupt
databases" and basic handling of errors which happen in triggers.
(The bug itself was fixed by several previous patches).
Fixed bug in multi-delete which were exposed by these tests.


mysql-test/r/trigger.result:
  Added test for bug #5894 "Triggers with altered tables cause corrupt
  databases" and basic handling of errors which happen in triggers.
mysql-test/t/trigger.test:
  Added test for bug #5894 "Triggers with altered tables cause corrupt
  databases" and basic handling of errors which happen in triggers.
sql/sql_delete.cc:
  multi_delete::send_eof():
    Fixed bug which were exposed by testing of basic handling of errors
    in triggers. Error which happened in multi_delete::do_deletes() 
    was wiped out by thd->clear_error() and thus never sent to client
    (and this stalled client connection).
2005-05-30 18:55:56 +04: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
25841aa9ad sql_select.cc:
Post-review modifications for the fix of bug #7894.


sql/sql_select.cc:
  Post-review modifications for the fix of bug #7894.
2005-05-30 05:25:12 -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
4701bd908b Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-05-30 11:06:31 +02:00
unknown
1c7b61e3ae Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0
into  moonbone.local:/work/mysql-5.0-bug-9593


sql/sql_select.cc:
  Auto merged
2005-05-30 03:34:20 +04:00
unknown
73c46d05af Fix bug #9593 "The combination of COUNT, DISTINCT and CONCAT seems to lock the
server"
Bug appears only on Windows platform. Freeing memory in 
TMP_TABLE_PARAM::cleanup() allocated by new Copy_fields[0] in 
setup_copy_fields() results in memory destruction. In test IF used instead 
of CONCAT because IF have more stable crash.



sql/sql_select.cc:
  Fix bug #9593 The combination of COUNT, DISTINCT and CONCAT seems to lock the server
mysql-test/t/count_distinct.test:
  test for bug #9593 The combination of COUNT, DISTINCT and CONCAT seems to lock the server
mysql-test/r/count_distinct.result:
  Test for bug #9593 The combination of COUNT, DISTINCT and CONCAT seems to lock the server
2005-05-30 03:32:50 +04:00
unknown
40e99987a9 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-05-28 10:44:49 +02:00
unknown
4ac347596d Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0
into radha.local:/Users/patg/mysql-5.0
2005-05-28 09:00:29 +02:00
unknown
af8cbbaec5 Fix '%h', '%I', and '%l' format specifiers in TIME_FORMAT()
to handle large time values as documented. (Bug #10590)


mysql-test/r/func_time.result:
  Add new results
mysql-test/t/func_time.test:
  Add new regression test
sql/item_timefunc.cc:
  Fix handling of '%h', '%I', and '%l' format specifiers
  for TIME_FORMAT() to handle large time values correctly.
2005-05-27 16:41:53 -07:00
unknown
260bfacaa9 merged
innobase/row/row0mysql.c:
  Auto merged
sql/hash_filo.h:
  Auto merged
2005-05-28 01:28:18 +02:00
unknown
63d9bd0c54 Comment and test changes per review request by Timour. All tests pass on production with this code.
mysql-test/r/federated.result:
  added explain results to join test results per Timour's request.
mysql-test/t/federated.test:
  Added explain to test per Timour's request
sql/ha_federated.cc:
  better comment to explain why we need table->status set to 0
2005-05-27 22:07:46 +02:00
unknown
1bf54d0943 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/sql_parse.cc:
  Auto merged
2005-05-27 18:30:35 +02:00
unknown
7e0107d44b Merge neptunus.(none):/home/msvensson/mysql/bug9993
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-05-27 17:22:19 +02:00
unknown
166accffda Fixed BUG#8409: Stored procedure crash if function contains FLUSH
by simply disabling FLUSH for stored functions. (I can't really work.)


mysql-test/r/sp-error.result:
  New test case for BUG#8409.
mysql-test/t/sp-error.test:
  New test case for BUG#8409.
sql/sql_yacc.yy:
  Disable FLUSH for stored functions.
2005-05-27 16:19:25 +02:00
unknown
32de310a48 ha_innodb.cc:
Check in Jan's fix to bug #10746 and also add a note to ::start_stmt() that stored procs in 5.0 call it


sql/ha_innodb.cc:
  Check in Jan's fix to bug #10746 and also add a note to ::start_stmt() that stored procs in 5.0 call it
2005-05-27 17:04:50 +03:00
unknown
8264f9bd5e Fix for bug #9992: mysql_next_result hangs on error
set net->no_send_error to 0 before execution of each element of
    multiquery statement to provide the sending of error to client


tests/mysql_client_test.c:
  Fix for bug #9992: mysql_next_result hangs on error
      test case
2005-05-27 18:01:09 +05:00
unknown
d5f4c14b6e Fixed BUG#9559: Functions: Numeric Operations using -ve value gives incorrect
results.
  Actually a problem when converting decimal to int for user variables.


mysql-test/r/sp.result:
  New test case for BUG#9559.
mysql-test/t/sp.test:
  New test case for BUG#9559.
sql/item_func.cc:
  Don't set the unsigned flag when converting decimal user var to int.
2005-05-27 14:48:33 +02:00
unknown
755d2018ad forgotten s/__GNUC__/USE_PRAGMA_INTERFACE/ causes compilation faliures 2005-05-27 14:15:08 +02:00
unknown
8dcb03f7a2 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1


sql/ha_innodb.cc:
  Auto merged
2005-05-27 12:48:36 +02:00
unknown
a985031a29 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-ttdf


sql/sp_head.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-05-27 14:38:34 +04:00
unknown
360d1cd06d don't downgrade the lock for CREATE ... SELECT (bug#6678) 2005-05-27 12:38:29 +02:00
unknown
d51a5baecb Fix for trigger.test failure in --debug mode.
We can't have Item_trigger_field as aggregated object inside of
sp_instr_set_trigger_field class since in this case its destructor
will be called twice. So instead let us create this Item separately
and store pointer to it in instruction object.


sql/sp_head.cc:
  sp_instr_set_trigger_field:
    We can't have Item_trigger_field as aggregated object since in this
    case its destructor will be called twice, so let us store pointer
    to this Item (Another way to avoid this is to exclude this Item
    from free_list but this can't be done in elegant way in 5.0 and
    will also cause additional problems with Item::cleanup()).
sql/sp_head.h:
  sp_instr_set_trigger_field:
    We can't have Item_trigger_field as aggregated object since in this
    case its destructor will be called twice, so let us store pointer
    to this Item (Another way to avoid this is to exclude this Item
    from free_list but this can't be done in elegant way in 5.0 and
    will also cause additional problems with Item::cleanup()).
sql/sql_yacc.yy:
  We can't have Item_trigger_field as aggregated object inside of
  sp_instr_set_trigger_field class since in this case its destructor
  will be called twice. So instead let us create this Item separately
  and store pointer to it in instruction object.
2005-05-27 14:15:17 +04:00
unknown
73b4415ce4 Add USE_PRAGMA_INTERFACE and USE_PRAGMA_IMPLEMENTATION to files not existsing in 4.1
sql/hash_filo.h:
  USE_PRAGMA_INTERFACE
sql/sp_cache.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sp_cache.h:
  USE_PRAGMA_INTERFACE
sql/sp_head.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sp_head.h:
  USE_PRAGMA_INTERFACE
sql/sp_pcontext.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sp_pcontext.h:
  USE_PRAGMA_INTERFACE
sql/sp_rcontext.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sp_rcontext.h:
  USE_PRAGMA_INTERFACE
2005-05-27 12:03:37 +02:00
unknown
03787cce75 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
2005-05-27 11:28:03 +02:00
unknown
6e7dd94ea4 BUG#6883: Added implicit commit for CREATE TABLE, TRUNCATE TABLE and DROP/CREATE DATABASE
mysql-test/r/innodb.result:
  Truncate table now work even if there is open trx
mysql-test/r/innodb_cache.result:
  One query in cache
mysql-test/t/innodb.test:
  Truncate table now succeed even if there is an open transaction
sql/sql_parse.cc:
  Added implicit commit for temp table CREATE TABLE, TRUNCATE TABLE, CREATE/DROP DATABASE.
2005-05-27 04:17:33 +02:00
unknown
ac55fc7adb Bug #10181 mysqld.exe crash with an access violation after INSERT INTO mysql.host
sql_acl.cc:
  Make sure host.db is a valid string pointer before we do our lower_case_table_names comparison


sql/sql_acl.cc:
  Make sure host.db is a valid string pointer before we do our lower_case_table_names comparison
2005-05-26 14:02:18 -05:00
unknown
6e79678dee Merge from 4.1
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
client/sql_string.cc:
  Auto merged
client/sql_string.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysys/my_open.c:
  Auto merged
mysys/raid.cc:
  Auto merged
ndb/src/kernel/blocks/dbtux/Dbtux.hpp:
  Auto merged
sql/field.cc:
  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_func.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/item_uniq.h:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.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_analyse.cc:
  Auto merged
sql/sql_analyse.h:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/opt_range.cc:
  Manual merge
sql/sql_parse.cc:
  Use select_lex pointer instead of lex->select_lex
sql/sql_repl.cc:
  Function moved to log.cc, fix made there instead
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-26 21:01:55 +02:00
unknown
c8b88e8e45 Include fix to function open_binlog from 4.1
- Add O_SHARE when opening file.


sql/log.cc:
  Add O_SHARE when opening file. This is from mysql-4.1 but since function has been moved from sql_repl.cc, it was missed during merge.
2005-05-26 21:01:54 +02:00
unknown
598b7631cd Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-conf-fixes-2


sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/structs.h:
  Auto merged
2005-05-26 21:01:53 +02:00
unknown
48e0630d2f Post-review fixes: rename SHOW_DOUBLE to SHOW_DOUBLE_STATUS 2005-05-26 20:54:02 +02:00
unknown
0d8dce039b Fixed BUG#9937: Crash on call to stored procedure.
This only showed up on two known platforms, both ia64 (one HP-UX and one Linux wich icc).
For some reason, they only get half the stack size they are supposed to have, which
makes deep SP recursion overrun the stack before check_stack_overrun() is triggered.
Also made som minor fixes in the check_stack_overrun() definition, supporting variable
margins.
No test case added, but the reason for the bug report was a failed existing test case
on these machines, which now works.


sql/item_cmpfunc.cc:
  Adopted call to new check_stack_overrun() definition.
sql/item_func.cc:
  Adopted calls to new check_stack_overrun() definition.
sql/item_subselect.cc:
  Adopted call to new check_stack_overrun() definition.
sql/mysql_priv.h:
  Changed definition of check_stack_overrun(), thread_stack_min variable no longer needed.
sql/mysqld.cc:
  thread_stack_min variable no longer needed (with variable margin arg. to check_thread_overrun()).
  On (at least some) ia64 machines, it seems we only get half the requested stack in reality,
  so deep SP recursion crashes before the thread overrun check is triggered.
  We work around this by requesting twice the stack requested to get expected size.
sql/sp_head.cc:
  Adopted call to new check_stack_overrun() definition, and use a wider margin
  execution.
sql/sql_parse.cc:
  Modified check_stack_overrun() definition. Removed unused arg that didn't sever any
  purpose, and added a 'margin' argument to support different margins for different
  callrers.
sql/table.cc:
  Adopted call to new check_stack_overrun() definition.
2005-05-26 20:36:14 +02:00
unknown
5f767b11e4 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1


sql/item.cc:
  Auto merged
2005-05-26 20:02:21 +02:00
unknown
e547fbea68 Cleanups to patch for bug #9660 after review by Monty.
sql/sql_table.cc:
  Make return value of build_table_path() useful
  Eliminate some unnecessary casts
2005-05-26 10:01:26 -07:00
unknown
e3beea23a0 Merge jbruehe@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/M50/mysql-5.0


sql/item.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-05-26 18:12:56 +02:00
unknown
604799534a merge
sql/item.cc:
  Auto merged
2005-05-26 18:33:57 +03:00
unknown
b36a6032fb BUG#9993 2 unexpected warnings when dropping a routine and --skip-grant-tables
- Dont perform automatic privilege handling for stored procedures when server is started --skip-grant-tables
 - Renamed view_skip_grants to skip_grants and added test cases for this


mysql-test/t/skip_grants-master.opt:
  Rename: mysql-test/t/view_skip_grants-master.opt -> mysql-test/t/skip_grants-master.opt
mysql-test/r/skip_grants.result:
  Added test for create and drop procedure with --skip-grant-tables
mysql-test/t/skip_grants.test:
  Added test for create and drop procedure with --skip-grant-tables
sql/mysql_priv.h:
  Make opt_noacl global
sql/mysqld.cc:
  Make opt_noacl global
sql/sql_parse.cc:
  On ly perform automatic privilege add/revoke if server is not started with  --skip-grant-tables
2005-05-26 16:44:46 +02:00
unknown
80b0baa740 fixed problem with long string results of expressions in UNIONS (BUG#10025)
mysql-test/r/union.result:
  test for Bug #10025
mysql-test/t/union.test:
  test for Bug #10025
sql/item.cc:
  set HA_OPTION_PACK_RECORD and change type to MYSQL_TYPE_STRING, to allow correct field creation in case of length more then 255 (creation STRING field with length more then 255)
2005-05-26 17:30:12 +03:00
unknown
d4be3ae2a3 Merge hasky:/my/mysql-build into mysql.com:/home/my/mysql-5.0 2005-05-26 15:20:27 +03:00
unknown
9e42888d2d Moved detection of wrong decimal fields before decimal field was created to avoid ASSERT() for DECIMAL(1) 2005-05-26 14:00:47 +03:00
unknown
96f629db87 Manual merge.
client/mysqldump.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
support-files/mysql.spec.sh:
  Auto merged
client/client_priv.h:
  Manual merge (still to be corrected!)
2005-05-26 12:51:44 +02:00
unknown
7d7b5dbcae Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into neptunus.(none):/home/msvensson/mysql/mysql-4.1


include/my_global.h:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/item.cc:
  Auto merged
2005-05-26 12:10:05 +02:00
unknown
22944a9563 Add ifdefs to control when "#pragma implementation" should be used
Added some more ifdefs for "#pragma interface"


client/sql_string.cc:
  USE_PRAGMA_IMPLEMENTATION
client/sql_string.h:
  USE_PRAGMA_INTERFACE
include/my_global.h:
  Use pragma implementation for gcc pre version 3
mysys/raid.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/field.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_berkeley.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_blackhole.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_heap.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_innodb.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_isam.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_isammrg.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_myisam.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_myisammrg.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/ha_ndbcluster.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/handler.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/hash_filo.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_cmpfunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_func.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_geofunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_strfunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_subselect.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_sum.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_timefunc.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/item_uniq.h:
  USE_PRAGMA_INTERFACE
sql/log_event.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/log_event.h:
  USE_PRAGMA_INTERFACE
sql/opt_range.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/procedure.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/protocol.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/protocol_cursor.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/set_var.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_analyse.h:
  USE_PRAGMA_INTERFACE
sql/sql_class.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_crypt.h:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_list.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_map.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_map.h:
  USE_PRAGMA_INTERFACE
sql/sql_olap.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_select.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_string.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/sql_udf.cc:
  USE_PRAGMA_IMPLEMENTATION
sql/tztime.cc:
  USE_PRAGMA_IMPLEMENTATION
2005-05-26 12:09:14 +02:00
unknown
8ac75806e2 Fix table renaming to not lowercase table names for all storage
engines when lower_case_table_names == 2, as it did previously
for InnoDB and MEMORY. (Bug #9660)


mysql-test/r/lowercase_table2.result:
  Fix results
sql/sql_table.cc:
  Add build_table_path() function to construct the path to
  a table, and use it to replace nearly all of the places
  where this was done with similar code.
  
  Fix mysql_rename_table() to not lowercase the .frm file
  name when lower_case_table_names == 2 and the storage
  engine does not set the HA_FILE_BASED flag (such as InnoDB).
2005-05-25 20:26:40 -07:00
unknown
f0329bfb8c Fix partial keys when converting VARCHAR to TEXT. (Bug #10543)
mysql-test/r/type_varchar.result:
  Update results
mysql-test/t/type_varchar.test:
  Add new regression test
sql/field.cc:
  Add Field::type_can_have_key_part() static method
sql/field.h:
  Add Field::type_can_have_key_part() signature.
sql/sql_table.cc:
  Only reset the length of a key part when changing from a
  field type that can't be used partially to a field that can,
  or vice versa, or when the part is smaller than the length
  of the field.
2005-05-25 18:11:47 -07:00
unknown
5752ecea95 Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-build
into mysql.com:/Users/kent/mysql/bk/mysql-5.0


myisammrg/myrg_open.c:
  Auto merged
mysys/my_getwd.c:
  Auto merged
sql/unireg.cc:
  Auto merged
2005-05-26 01:38:29 +02:00
unknown
865b8917d6 Move function from header file to make it easier to debug
sql/item.cc:
  Move function to make it easier to debug
sql/item.h:
  Move function to make them easier to debug
2005-05-26 00:18:24 +03:00
unknown
5ec889c798 Merge hasky:/my/mysql-build into mysql.com:/home/my/mysql-5.0
sql/sql_lex.h:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-05-25 19:55:01 +03:00
unknown
d8dbb83848 Merge mysql.com:/data0/mysqldev/my/mysql-5.0-build
into mysql.com:/data0/mysqldev/tomas/mysql-5.0-build
2005-05-25 18:54:47 +02:00
unknown
2286913e7f Bug #10838 CREATE TABLE produces strange DEFAULT value 2005-05-25 17:54:36 +02:00
unknown
e38f06f7ff Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
2005-05-25 18:38:29 +03:00
unknown
1834f8899f Fix that we can read tables with the 'older' decimal format used in 5.0.3 & 5.0.4
We will however give a warning when opening such a table that users should use ALTER TABLE ... FORCE to fix
the table. In future release we will fix that REPAIR TABLE will be able to handle this case


sql/sql_lex.h:
  Support for ALTER TABLE ... FORCE
sql/sql_table.cc:
  CHECK TABLE now gives a note if table->s->crashed was set
sql/sql_yacc.yy:
  Support for ALTER TABLE ... FORCE
sql/table.cc:
  
  Fix that we can read tables with the 'older' decimal format used in 5.0.3 & 5.0.4
  (Now we store display length in the .frm table while we previously stored precision)
sql/table.h:
  Store in TABLE_SHARE version number of MySQL where table was created (or checked)
2005-05-25 18:33:36 +03:00
unknown
c6283dbba9 Cleanup's during review
Added ASSERT() to detect wrongly packed fields


sql/field.h:
  Fixed comments to right format
sql/opt_range.cc:
  Merged code
sql/sql_base.cc:
  Fixed indentation
sql/sql_insert.cc:
  Fixed comments to right format
sql/sql_select.cc:
  Simplify code
sql/unireg.cc:
  Simply code for calculating key_buff_length
  Added ASSERT() to detect wrongly packed fields
2005-05-25 18:33:32 +03:00
unknown
aa3a934b9d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


sql/sql_parse.cc:
  Auto merged
2005-05-25 12:57:29 +03:00
unknown
549f56dc3d Cleanup during code review
Faster detection of wrong table names (like PRN) on windows


include/my_sys.h:
  Added check_if_legal_filename()
mysys/my_access.c:
  Added check_if_legal_filename()
  Set errno if my_access() fails
mysys/my_fopen.c:
  USe check_if_legal_filename() instead of my_access() to detect wrong file names on windows
mysys/my_open.c:
  USe check_if_legal_filename() instead of my_access() to detect wrong file names on windows
sql/sql_lex.cc:
  Portability fix
sql/sql_parse.cc:
  Simple cleanup
sql/sql_repl.cc:
  Cleanup during code review
2005-05-25 12:56:47 +03:00
unknown
b4508ef33a changes to fix joins not working (bug #10848). New tests, as well as table->status being set in index_read_idx
mysql-test/r/federated.result:
  new join test results
mysql-test/t/federated.test:
  new simple join tests (more to come with subsequent commits)
sql/ha_federated.cc:
  This fixes joins not working. Monty discussed that having to deal 
  with table->status needs to be moved from the handler/storage engine
  to a higher level
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-25 02:15:09 +02:00
unknown
9ae4241994 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into xiphis.org:/usr/home/antony/work2/p3-bug7241.6
2005-05-24 22:51:02 +01:00
unknown
6ae9eb48d5 Increase limit of partial key length in MEMORY storage engine
to the same as a full key. (Bug #10566)


mysql-test/r/heap.result:
  Update results
mysql-test/t/heap.test:
  Add test for bug #10566
sql/ha_heap.h:
  Add max_supported_key_part_length() method.
2005-05-24 12:21:15 -07:00
unknown
e045e7ac54 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


sql/sql_select.cc:
  Auto merged
2005-05-24 21:18:07 +02:00
unknown
896786eadd Manual merge of patch fixing several trigger related bugs with main tree.
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Manual merge
sql/sql_update.cc:
  Manual merge
2005-05-24 22:35:41 +04:00
unknown
1fa7c69d31 Fix for bugs:
#5860 "Multi-table UPDATE does not activate update triggers"
 #6812 "Triggers are not activated for INSERT ... SELECT"
 #8755 "Trigger is not activated by LOAD DATA".
This patch also implements proper handling of triggers for special forms
of insert like REPLACE or INSERT ... ON DUPLICATE KEY UPDATE. 
Also now we don't call after trigger in case when we have failed to
inserted/update or delete row. Trigger failure should stop statement
execution.

I have not properly tested handling of errors which happen inside of
triggers in this patch, since it is simplier to do this once we will be
able to access tables from triggers.


mysql-test/r/trigger.result:
  Added tests for triggers behavior for various non-standard forms of
  INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
  Also added tests for bugs #5860 "Multi-table UPDATE does not activate
  update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
  and #8755 "Trigger is not activated by LOAD DATA".
mysql-test/t/trigger.test:
  Added tests for triggers behavior for various non-standard forms of
  INSERT such as REPLACE and INSERT ... ON DUPLICATE KEY UPDATE.
  Also added tests for bugs #5860 "Multi-table UPDATE does not activate
  update triggers", #6812 "Triggers are not activated for INSERT ... SELECT"
  and #8755 "Trigger is not activated by LOAD DATA".
sql/item.cc:
  Since it turned out that at trigger loading time we can't say in which
  buffer TABLE::record[0] or record[1] old version of row will be stored
  we have to change our approach to binding of Item_trigger_field to
  Field instances.
  Now after trigger parsing (in Item_trigger_field::setup_table()) we only
  find index of proper Field in the TABLE::field array. Then before trigger
  is invoked we set Table_triggers_list::old_field/new_field so they point
  to arrays holding Field instances bound to buffers with proper row
  versions. And as last step in Item_trigger_field::fix_fields() we get
  pointer to Field from those arrays using saved field index.
  
  Item_trigger_field::setup_field()/fix_fields() were changed to implement
  this approach.
sql/item.h:
  Since it turned out that at trigger loading time we can't say in which
  buffer TABLE::record[0] or record[1] old version of row will be stored
  we have to change our approach to binding of Item_trigger_field to
  Field instances.
  Now after trigger parsing (in Item_trigger_field::setup_table()) we only
  find index of proper Field in the TABLE::field array. Then before trigger
  is invoked we set Table_triggers_list::old_field/new_field so they point
  to arrays holding Field instances bound to buffers with proper row
  versions. And as last step in Item_trigger_field::fix_fields() we get
  pointer to Field from those arrays using saved field index.
  
  Item_trigger_field:
  - Added field_idx member to store index of Field object corresponding to
    this Item in TABLE::field array.
  - Added triggers member to be able to access to parent Table_trigger_list
    object from fix_fields() method.
  - setup_field() no longer needs to know for which type of event this
    trigger is, since it does not make decision Field for which buffer
    (record[0] or record[1] is appropriate for this Item_trigger_field)
sql/mysql_priv.h:
  Added fill_record_n_invoke_before_triggers() methods. They are simple
  wrappers around fill_record() which invoke proper before trigger right
  after filling record with values.
sql/sql_base.cc:
  Added fill_record_n_invoke_before_triggers() methods. They are simple
  wrappers around fill_record() which invoke proper before trigger right
  after filling record with values.
sql/sql_delete.cc:
  mysql_delete():
    Now we stop statement execution if one of triggers failed, we also
    don't execute after delete trigger if we failed to delete row from
    the table (We also pass information about which buffer contains old
    version of row to process_triggers()).
  multi_delete::send_data()/do_deletes():
    Now we also invoke triggers in case of multi-delete.
sql/sql_insert.cc:
  mysql_insert():
    Moved invocation of before triggers to fill_record_n_invoke_before_triggers()
    method. After triggers are now executed as part of write_record().
    (as nice side effect now we also stop statement execution if one of
    triggers fail).
  write_record():
    Invoke after insert trigger after performing insert. Also invoke proper
    triggers if insert is converted to update or conflicting row is deleted.
    Cleaned up error handling a bit - no sense to report error via
    handler::print_error if it was not generated by handler method and
    was reported before.
    Also now we will execute after trigger only if we really have written
    row to the table. 
  select_insert::send_data()/store_values():
    We should also execute INSERT triggers for INSERT ... SELECT statement.
sql/sql_load.cc:
  read_fixed_length()/read_sep_field():
    We should execute INSERT triggers when processing LOAD DATA statement.
    Small cleanup in auto-increment related code. Also moved check for
    thd->killed which is used to abort LOAD DATA in case of problems
    in 'traditional' mode to better place..
sql/sql_trigger.cc:
  Since it turned out that at trigger loading time we can't say in which
  buffer TABLE::record[0] or record[1] old version of row will be stored
  we have to change our approach to binding of Item_trigger_field to
  Field instances.
  Now after trigger parsing (in Item_trigger_field::setup_table()) we only
  find index of proper Field in the TABLE::field array. Then before trigger
  is invoked we set Table_triggers_list::old_field/new_field so they point
  to arrays holding Field instances bound to buffers with proper row
  versions. And as last step in Item_trigger_field::fix_fields() we get
  pointer to Field from those arrays using saved field index.
  
  Table_triggers_list methods were changed to implement this approach
  (see also comments for sql_trigger.h).
sql/sql_trigger.h:
  Since it turned out that at trigger loading time we can't say in which
  buffer TABLE::record[0] or record[1] old version of row will be stored
  we have to change our approach to binding of Item_trigger_field to
  Field instances.
  Now after trigger parsing (in Item_trigger_field::setup_table()) we only
  find index of proper Field in the TABLE::field array. Then before trigger
  is invoked we set Table_triggers_list::old_field/new_field so they point
  to arrays holding Field instances bound to buffers with proper row
  versions. And as last step in Item_trigger_field::fix_fields() we get
  pointer to Field from those arrays using saved field index.
  
  Changed Table_triggers_list to implement this new approach:
  - Added record1_field member to store array of Field objects bound
    to TABLE::record[1] buffer (instead of existing old_field member)
  - Added new_field member and changed meaning of old_field member.
    During trigger execution they should point to arrays of Field objects
    bound to buffers holding new and old versions of row respectively.
  - Added 'table' member to be able to get access to TABLE instance
    (for which this trigger list object was created) from process_triggers()
    method.
  - Now process_triggers() method sets old_field and new_field members
    properly before executing triggers body (basing on new 
    old_row_is_record1 parameter value).
  - Renamed prepare_old_row_accessors_method() to prepare_record1_accessors()
  
  Also added has_before_update_triggers() method which allows to check
  whenever any before update triggers exist for table.
sql/sql_update.cc:
  mysql_update():
    Now we invoke before triggers in fill_record_n_invoke_before_triggers()
    method. Also now we abort statement execution when one of triggers fail.
  safe_update_on_fly():
    When we are trying to understand if we can update first table in multi
    update on the fly we should take into account that BEFORE UPDATE
    trigger can change field values.
  multi_update::send_data()/do_updates()
    We should execute proper triggers when doing multi-update
    (in both cases when we do it on the fly and using temporary tables).
2005-05-24 22:19:33 +04:00
unknown
75e8f8372e Fix error reporting for 'OPTIMIZE TABLE' on InnoDB tables. (Bug #8135)
sql/sql_table.cc:
  Pass through errors from InnoDB in OPTIMIZE TABLE.
2005-05-24 11:11:40 -07:00
unknown
cfb54ed514 ha_archive.cc:
Use local seach path for "mysql_priv.h"
mysqld.dsp:
  Added the ARCHIVE storage engine to max
ha_archive.h:
  VC6, but not VC7, needs a cast of byte[] to char* to make
  the compile select the right conversion function in String


sql/examples/ha_archive.h:
  VC6, but not VC7, needs a cast of byte[] to char* to make
  the compile select the right conversion function in String
VC++Files/sql/mysqld.dsp:
  Added the ARCHIVE storage engine to max
sql/examples/ha_archive.cc:
  Use local seach path for "mysql_priv.h"
2005-05-24 18:51:53 +02:00
unknown
be9845b004 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2005-05-24 19:47:18 +03:00
unknown
edcc645b8e Merge jamppa@bk-internal.mysql.com:/home/bk/mysql-4.1
into ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-4.1
2005-05-24 18:23:31 +03:00
unknown
879d932ba9 Merge
mysql-test/r/lock.result:
  Auto merged
mysql-test/r/rpl_log.result:
  Auto merged
mysql-test/t/lock.test:
  Auto merged
mysql-test/r/rpl_rotate_logs.result:
  SCCS merged
sql/sql_parse.cc:
  SCCS merged
sql/sql_repl.cc:
  SCCS merged
2005-05-24 15:52:48 +01:00
unknown
801c2c275a Added a test case for Bug#8009.
sql/item.cc:
  Fixed Bug#8009.
2005-05-24 17:50:17 +03:00
unknown
3a23b67566 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-4.1
into xiphis.org:/usr/home/antony/work2/p3-bug7241.5
2005-05-24 13:40:25 +01:00
unknown
1a8f64d715 Add comments 2005-05-24 13:38:46 +01:00
unknown
efc7b884eb Bug#7241 - Invalid response when DELETE .. USING and LOCK TABLES used.
Only acquire necessary write lock for multi-delete


mysql-test/r/lock.result:
  Test for Bug#7241
mysql-test/t/lock.test:
  Test for Bug#7241
sql/sql_parse.cc:
  Bug#7241
    Don't acquire write lock on all tables.
    Make sure to set lock_type on real table_list
2005-05-24 11:44:34 +01:00
unknown
d0afc3492e Merge gluh@gluh:/home/gluh/release/mysql-5.0-build
into mysql.com:/home/gluh/MySQL/Merge/mysql-5.0
2005-05-24 15:35:24 +05:00
unknown
ab1ba1341c Merge pmartin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-24 10:19:10 +02:00
unknown
9c79a9d691 Fixed on BUG#6048: Stored procedure causes operating system reboot
Memory leak in locally evalutated expressions during SP execution fixed by
  reusing allocated item slots when possible.
  Note: No test case added, since the test is a stress test that tries to make
  the machine to run out of memory.
  Second attempt, now tested with debug build, valgrind build, max (optimized)
  build, with and without --debug, --vagrind and --ps-protocol.
  Errors in trigger and view test with --debug in debug build where present
  before this patch, and likewise for valgrind warnings for view test in
  valgrind build with --ps-protocol.


sql/item.cc:
  Init rsize in Item (for SP item reusal).
sql/item.h:
  Addes special new operator for reuse of Items, for SP internal use only.
sql/sp_head.cc:
  Reuse items assigned internally in SPs when possible.
sql/sp_rcontext.cc:
  Reuse items assigned internally in SPs when possible.
  Moved the local variable assignment here (from sp_head) to avoid
  duplicated code.
sql/sp_rcontext.h:
  New arg to sp_rcontext::set_item_eval() (and some coding style).
sql/sql_class.cc:
  Adjusted call to new set_item_eval().
2005-05-23 23:43:43 +02:00
unknown
87f3b9f43e mysqld.dsp:
Added BLACKHOLE and FEDERATED storage engines for max builds
  Some preparations for including yaSSL
ha_federated.cc:
  Use local seach path for "mysql_priv.h"


sql/ha_federated.cc:
  Use local seach path for "mysql_priv.h"
VC++Files/sql/mysqld.dsp:
  Added BLACKHOLE and FEDERATED storage engines for max builds
  Some preparations for including yaSSL
2005-05-23 21:15:00 +02:00
unknown
d81bee6ec1 Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/c4944-4.1 2005-05-23 21:05:30 +02:00
unknown
ad9eba227d A comment for view_prepare_mode.
sql/sql_lex.h:
  A comment.
2005-05-23 22:38:12 +04:00
unknown
67c5514b90 BUG#10687 - Merge engine fails under Windows
This final cset is to fix a syntax problem in ha_myisammrg.cc where a / was left out of a format string.
It also adds a check in has_path to avoid a possible redundant comparison.

ha_myisammrg.cc:
  Replaced missing / in format string
my_getwd.c:
  Added test to see if FN_LIBCHAR != '/' before doing comparison to avoid redundant comparison


mysys/my_getwd.c:
  Added test to see if FN_LIBCHAR != '/' before doing comparison to avoid redundant comparison
sql/ha_myisammrg.cc:
  Replaced missing / in format string
2005-05-23 12:31:22 -05:00
unknown
1b2a2c8647 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into mdk10.(none):/home/reggie/bk/mysql-4.1
2005-05-23 12:08:57 -05:00
unknown
36b3f0a052 BUG# 10687: Merge engine fails under Windows
This cset is to roll out the cset applied earlier from Ingo.
This bug has been fixed with a different cset.



sql/ha_myisammrg.cc:
  removed the patch applied earlier
strings/my_vsnprintf.c:
  removed the patch applied earlier.  The patch was to add %c ability.  
  Monty has already done this.
2005-05-23 12:05:15 -05:00
unknown
3e2417ed57 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0.6-build
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-tmp


VC++Files/mysys/mysys.dsp:
  Auto merged
include/my_global.h:
  Auto merged
myisam/rt_split.c:
  Auto merged
sql/field_conv.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
strings/my_vsnprintf.c:
  Auto merged
2005-05-23 19:01:16 +02:00
unknown
bc40c03d3a Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/c4944-4.1 2005-05-23 16:23:05 +02:00
unknown
87b965f2d6 Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-23 07:26:55 +02:00
unknown
05e658235b default_modify.c:
Use MY_STAT to declare argument to my_fstat()
des_key_file.cc:
  Use local seach path for "mysql_priv.h"
mysys.dsp, libmysqld.dsp, libmysql.dsp:
  New file needed, "../mysys/default_modify.c"


VC++Files/libmysql/libmysql.dsp:
  New file needed, "../mysys/default_modify.c"
VC++Files/libmysqld/libmysqld.dsp:
  New file needed, "../mysys/default_modify.c"
VC++Files/mysys/mysys.dsp:
  New file needed, "../mysys/default_modify.c"
sql/des_key_file.cc:
  Use local seach path for "mysql_priv.h"
mysys/default_modify.c:
  Use MY_STAT to declare argument to my_fstat()
2005-05-21 23:23:39 +02:00
unknown
982bd00d48 ha_innodb.cc:
The natural InnoDB type for NEWDECIMAL is FIXBINARY, not BINARY, since there probably is no benefit from stripping trailing bytes 0x20; note that tables created with 5.0.6 and containing DECIMAL do not need to be rebuilt, as BINARY works as well; note that because of Jani's fix to bug 10465, tables created with 5.0.? - 5.0.5 DO NEED TO BE REBUILT if they contain DECIMAL


sql/ha_innodb.cc:
  The natural InnoDB type for NEWDECIMAL is FIXBINARY, not BINARY, since there probably is no benefit from stripping trailing bytes 0x20; note that tables created with 5.0.6 and containing DECIMAL do not need to be rebuilt, as BINARY works as well; note that because of Jani's fix to bug 10465, tables created with 5.0.? - 5.0.5 DO NEED TO BE REBUILT if they contain DECIMAL
2005-05-21 18:44:51 +03:00
unknown
6df4988985 join_outer.test, join_outer.result:
Added test cases for bug #9938.
item.h:
  Fixed bug #9938: missing method not_null_tables for Item_ref.


sql/item.h:
  Fixed bug #9938: missing method not_null_tables for Item_ref.
mysql-test/t/join_outer.test:
  Added test cases for bug #9938.
2005-05-21 08:44:50 -07:00
unknown
e2e90649f5 sql_select.cc:
Added missing comment for fix of #10561.


sql/sql_select.cc:
  Added missing comment for fix of #10561.
2005-05-21 08:39:35 -07:00
unknown
d844dab14f opt_range.cc:
Post review corrections for optimization request #10561.


sql/opt_range.cc:
  Post review corrections for optimization request #10561.
2005-05-21 07:02:43 -07:00
unknown
8f7bca3abd range.result, range.test:
Added test cases for optimization request #10561.
opt_range.cc, sql_select.cc:
  Fixed bug #10561: an optimization request to allow
  range analysis for NOT IN and NOT BETWEEN.


sql/sql_select.cc:
  Fixed bug #10561: an optimization request to allow
  range analysis for NOT IN and NOT BETWEEN.
sql/opt_range.cc:
  Fixed bug #10561: an optimization request to allow
  range analysis for NOT IN and NOT BETWEEN.
mysql-test/t/range.test:
  Added test cases for optimization request #10561.
mysql-test/r/range.result:
  Added test cases for optimization request #10561.
2005-05-21 06:11:44 -07:00
unknown
606d8a5ab0 fixed conflicts
VC++Files/mysys/mysys.dsp:
  Auto merged
include/my_sys.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
2005-05-20 16:34:59 -05:00
unknown
03e26e50b9 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-5.0
into mdk10.(none):/home/reggie/bk/mysql-5.0


sql/spatial.cc:
  Auto merged
2005-05-20 16:24:12 -05:00
unknown
c1ae672add BUG# 9148: Denial of service
The problem was that on Windows the access method indicates that access to file 
such as "com1" and "lpt1" is allowed (since they are device names) and
this causes mysql to attempt to open them as databases or tables.

The fix was to write our own my_access method that uses other Win32 functions
to determine if the given argument is indeed a file and has to requested
mode.


VC++Files/mysys/mysys.dsp:
  added my_access
VC++Files/mysys/mysys_ia64.dsp:
  added my_access.c
include/my_sys.h:
  if on windows, we use my_access.
  if not on windows, then my_access points to the native access method
mysys/Makefile.am:
  added my_access to mysys build file
mysys/mf_pack.c:
  changed call to access to my_access
sql/sql_db.cc:
  changed call to access to my_access
2005-05-20 16:04:10 -05:00
unknown
2a5a3de285 Fixed BUG#10537: Server crashes while loading data file into table through
procedure.
  by simply disabling 'load' in stored procedures, like it's already disabled
  for prepared statements. (They must be made "re-execution" safe before
  working with either PS or SP.)


mysql-test/r/sp-error.result:
  New test case for BUG#10537.
mysql-test/t/sp-error.test:
  New test case for BUG#10537.
sql/sql_yacc.yy:
  Disable LOAD in stored procedures (just as for prepared statements).
2005-05-20 17:47:08 +02:00
unknown
7fa4dc6d2f Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-05-20 17:32:35 +03:00
unknown
19f3d13c8a Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/release/mysql-5.0
2005-05-20 18:32:34 +04:00
unknown
355000fa4e Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/c4944-4.1 2005-05-20 15:30:15 +02:00
unknown
31cffb8a7f my_vsnprintf.c, sql_select.cc, sql_delete.cc, field_conv.cc, rt_split.c:
Fixes for valgrind errors and compatiblity issues by Monty


myisam/rt_split.c:
  Fixes for valgrind errors and compatiblity issues by Monty
sql/field_conv.cc:
  Fixes for valgrind errors and compatiblity issues by Monty
sql/sql_delete.cc:
  Fixes for valgrind errors and compatiblity issues by Monty
sql/sql_select.cc:
  Fixes for valgrind errors and compatiblity issues by Monty
strings/my_vsnprintf.c:
  Fixes for valgrind errors and compatiblity issues by Monty
2005-05-20 15:17:13 +02:00
unknown
ccafae43da Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


sql/sql_select.cc:
  Auto merged
2005-05-20 16:16:22 +03:00
unknown
027c10f3bb compatibility issues
Fixed errors reported by valgrind (some errors in NDB remains)


myisam/rt_split.c:
  Added missing cast that caused problem on novell
  (minor code cleanup)
ndb/src/ndbapi/Ndb.cpp:
  Moved DBUG_ENTER to remove warning from DBUG library
sql/field_conv.cc:
  Added test for valgrind/purify to avoid warning
sql/item_sum.cc:
  Removed comment and added ASSERT as setup can't be called twice anymore
sql/sql_delete.cc:
  Fixed wrong return value
sql/sql_parse.cc:
  More debugging
sql/sql_select.cc:
  Removed duplicate call to setup() which caused a memory leak
strings/my_vsnprintf.c:
  Added support for '%c' (used when printing my_getopt errors)
2005-05-20 16:14:35 +03:00
unknown
648b072da2 do not try to use equal field from outer query as field of local join (BUG#6384)
mysql-test/r/subselect.result:
  changes in plans
  test for bug#6384
mysql-test/t/subselect.test:
  test for bug#6384
sql/sql_select.cc:
  do not set equal field from outer query
2005-05-20 16:01:41 +03:00
unknown
122e029a2c Merge gluh.mysql.r18.ru:/home/gluh/release/mysql-5.0-build
into gluh.mysql.r18.ru:/home/gluh/release/mysql-5.0
2005-05-20 16:55:00 +04:00
unknown
be218f51f5 addition of "REFERENCED_TABLE_SCHEMA",
"REFERENCED_TABLE_NAME", "REFERENCED_COLUMN_NAME" fields into
  KEY_COLUMN_USAGE table
2005-05-20 16:39:28 +04:00
unknown
4c3d3bb2f4 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-05-20 00:05:24 +02:00
unknown
bdf5dbcd9a Cset exclude: matt@mysql.com|ChangeSet|20050519052223|06259
Cset exclude: msvensson@neptunus.(none)|ChangeSet|20050425090838|60886


configure.in:
  Exclude
sql/opt_range.cc:
  Exclude
2005-05-19 23:52:17 +02:00
unknown
1da5382a9f BUG# 10687 - MERGE engine fails under Windows
This patch was submitted by Ingo and it appears to work correctly.


sql/ha_myisammrg.cc:
  use FN_LIBCHAR instead of / so buff works correctly on Windows
strings/my_vsnprintf.c:
  add support for %c to my_vsnprintf
2005-05-19 16:02:14 -05:00
unknown
c321b2ba6e Merge mdk10.(none):/home/reggie/bk/mysql-4.1
into mdk10.(none):/home/reggie/bk/mysql-5.0


sql/spatial.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
2005-05-19 15:50:44 -05:00
unknown
f210d1ddf1 Merge mysqldev@production.mysql.com:my/mysql-5.0-build
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-build


sql/item_func.cc:
  Auto merged
2005-05-19 22:23:59 +02:00
unknown
f4a584f501 This fixed a compile problem on Windows
sql_udf.cc:
  changed dl_name to udf->dl in mysql_create_function


sql/sql_udf.cc:
  changed dl_name to udf->dl in mysql_create_function
2005-05-19 15:18:49 -05:00
unknown
4482604ec6 hf's fix for bug #9060 (FORMAT returns incorrect result)
we need proper rounding there


mysql-test/r/func_math.result:
  test result fixed
mysql-test/t/func_math.test:
  test case added
sql/item_func.cc:
  my_double_round implementation added
sql/item_strfunc.cc:
  my_double_round used
sql/mysql_priv.h:
  my_double_round interface
2005-05-20 01:04:08 +05:00
unknown
4422b07126 Merge neptunus.(none):/home/msvensson/mysql/bug9626
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-build


mysql-test/r/type_newdecimal.result:
  Auto merged
mysql-test/t/type_newdecimal.test:
  Auto merged
sql/item_func.cc:
  Auto merged
2005-05-19 20:41:23 +02:00
unknown
fea271c3b5 Merge mysql.com:/usr/home/ram/work/mysql-4.1-build
into mysql.com:/usr/home/ram/work/mysql-4.1
2005-05-19 23:31:40 +05:00
unknown
9c1bc4252f Merge mysql.com:/usr/home/ram/work/mysql-4.1-build
into mysql.com:/usr/home/ram/work/mysql-5.0-build


sql/spatial.cc:
  Auto merged
2005-05-19 22:55:10 +05:00
unknown
b8d22413c0 hf's fix for bug #10626 ( gis.test fails)
sql/spatial.cc:
  just float8get doesn't work well with the local variables -                     
  they can be of processor-specific floating type - not the                       
  standard decimal (by hf)
2005-05-19 22:53:35 +05:00
unknown
2f24096172 a fix (#10742: Can't compile "sql_lex.cc" on AIX 5.2).
sql/gen_lex_hash.cc:
  a fix (#10742: Can't compile "sql_lex.cc" on AIX 5.2).
  typo fixed.
2005-05-19 18:56:01 +05:00
unknown
185b5e4067 merged
sql/sql_udf.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
2005-05-19 15:20:10 +02:00
unknown
4387f4d967 a fix (bug #10599: Numeric function 'abs' make server crash).
sql/item_func.cc:
  a fix (bug #10599: Numeric function 'abs' make server crash).
  Item_func_abs::decimal_op() now returns 0 if NULL.                              
  trivial optimization - get rid of an extra jump for common situations.          
  fixed Item_func_neg::decimal_op() return value if NULL.
2005-05-19 17:59:14 +05:00
unknown
3bd46ad8d2 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug9626
2005-05-19 14:53:57 +02:00
unknown
9364130a1a Merge mysql.com:/home/bkroot/mysql-4.1 into mysql.com:/home/bk/c4944-4.1 2005-05-19 12:59:46 +02:00
unknown
e439e7c649 CSC#4944: Adding File_size to output of SHOW BINARY lOGS
mysql-test/r/rpl_log.result:
  Adding File_size to output of SHOW BINARY lOGS
mysql-test/r/rpl_rotate_logs.result:
  Adding File_size to output of SHOW BINARY lOGS
sql/sql_repl.cc:
  Adding File_size to output of SHOW BINARY lOGS
2005-05-19 12:34:15 +02:00
unknown
2525722245 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b6961
2005-05-19 14:03:41 +05:00
unknown
c1ed128f66 a fix (bug #10599: Numeric function 'abs' make server crash).
sql/item_func.cc:
  a fix (bug #10599: Numeric function 'abs' make server crash).
  Item_func_abs::decimal_op() and Item_func_neg::decimal_op()
  now return 0 if NULL.
  Trivial optimization - get rid of an extra jump for common situations.
2005-05-19 13:35:13 +05:00
unknown
27378545f9 Merge serg@bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
2005-05-19 09:50:43 +02:00
unknown
275aa24740 after merge fix 2005-05-19 09:47:13 +02:00
unknown
7f4e45ef03 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b6961
2005-05-19 12:06:40 +05:00
unknown
5082d2d0b4 Fixed references to uninitialized memory
sql/sp.cc:
  Simpe fix to avoid reference to unallocated memory (only opened was needed, but I reset both to make things safer and simpler)
2005-05-19 04:48:22 +03:00
unknown
dc4a390174 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-05-19 03:17:39 +03:00
unknown
38c78b8bb9 Revert fix for Bug #6048: it introduced new problems.
sql/item.cc:
  Revert changes
sql/item.h:
  Revert changes
sql/sp_head.cc:
  Revert changes
sql/sp_rcontext.cc:
  Revert changes
2005-05-18 17:10:48 -07:00
unknown
3e2988d00f Fixes to merge from 4.1
client/mysqldump.c:
  Temporarily disable unused (and broken) code.
mysql-test/r/group_min_max.result:
  Update results
mysql-test/r/mysqldump.result:
  Update results
mysql-test/r/subselect.result:
  Update results
mysql-test/t/group_min_max.test:
  Ignore number of rows in output of most explain results
sql/sql_insert.cc:
  Fix reference to max_unique_length
2005-05-18 15:40:34 -07:00
unknown
2de8a4bc8c Resolve merge from 4.1
mysql-test/r/grant_cache.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/t/grant_cache.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
sql/ha_myisammrg.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/handler.h:
  Resolve merge
sql/table.cc:
  Resolve merge
2005-05-18 13:54:36 -07:00
unknown
7e507270b8 merged
sql/unireg.cc:
  Auto merged
2005-05-18 22:14:08 +02:00
unknown
dae940d11e Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
2005-05-18 21:36:46 +02:00
unknown
e507f6a15e udf: when banning paths from soname in CREATE FUNCTION, check for \ on windows.
when reporting an error, use an appropriate buffer for udf->name
2005-05-18 21:31:39 +02:00
unknown
c05b375e5a Merge
ndb/include/kernel/ndb_limits.h:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
mysys/thr_alarm.c:
  Manual merge
2005-05-18 20:52:59 +02:00
unknown
446d4631c7 BUG#9626
- Fix valgrind warnings
 - Remove static db, schema and table name buffers from Ndb.cpp


mysys/thr_alarm.c:
  Initialise sact to zero
ndb/include/kernel/ndb_limits.h:
  Set MAX_ATTR_NAME_SIZE to NAME_LEN which is tha maximum in MySQL
ndb/include/kernel/signaldata/GetTabInfo.hpp:
  Clean up
ndb/include/ndbapi/Ndb.hpp:
  Remove NDB_MAX_INTERNAL_NAME_LENGTH and all char buffers for schema, db and tablename.
  Made them dynamic and moved to NdbImpl.hpp
ndb/include/ndbapi/ndbapi_limits.h:
  Remove the static length's of attr, db, schema and table name.
ndb/src/common/transporter/Packer.cpp:
  Set theSignalId to ~0 when unpacking signal
ndb/src/ndbapi/Ndb.cpp:
  Moved schema, database and tablename to NdbImpl.hpp
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Add NdbIndexImpl::init and NdbEventImpl::init
  Init all vars in NdbIndexImpl, NdbEventImpl, NdbTableImpl and NdbIndexImpl
  Delete the pseudo column NDB$RANGE_NO
  Copy tablename to internal buff in NdbDictInterface to get proper alignment.
  Convert length of table name from bytes words, when setting sz of LinearSectionPtr
  Set LinearSectionPtr array size to number of LinearSections used - save some stack.
ndb/src/ndbapi/NdbDictionaryImpl.hpp:
  Add NdbEventImpl::init and NdbIndexImpl::init
  Remove clearNewProperties and copyNewProperties, it's easier to check if all vars are initied if it's done in the same func.
  Add buffer for tabname ti NdbDictInterface, memset it to 0 in initializer.
ndb/src/ndbapi/NdbImpl.hpp:
  Use BaseString for table, schema and db names.
ndb/src/ndbapi/Ndbinit.cpp:
  Move schema and db name to NdbImpl and use BaseString
ndb/src/ndbapi/ndb_cluster_connection.cpp:
  Destroy ndb_global_event_buffer_mutex and ndb_print_state_mutex
sql/ha_ndbcluster.cc:
  Check if pTrans is not null before calling closeTransaction
  Remove NDB_MAX_ATTR_NAME_SIZE
  Remove truncation of attr names. When attr name length is same in NDB as in MySQL this will be checked in functin check_column_name
2005-05-18 20:50:29 +02:00
unknown
7a71bd4b2a Fixed bug from last push 2005-05-18 21:12:59 +03: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
7a223fe8c9 Merge mysql.com:/home/mydev/mysql-4.1
into mysql.com:/home/mydev/mysql-4.1-4100
2005-05-18 19:45:59 +02:00
unknown
0461b482cb Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
After review version.
Added a condition for MERGE tables. These do not have unique
indexes. But every key could be a unique key on the underlying
MyISAM table. So get the maximum key length for MERGE tables
instead of the maximum unique key length. This is used for
buffer allocation in write_record().


mysql-test/r/merge.result:
  Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
  The test result.
mysql-test/t/merge.test:
  Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
  The test case does not in all cases show the problem
  without the bugfix. The improper memory allocation
  might get through undetected in many cases.
sql/ha_myisammrg.h:
  Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
  Set a table_flag for the MERGE engine telling that any index
  might be unique without being specified as such.
sql/handler.h:
  Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
  Added a new table_flag telling that any index
  might be unique without being specified as such.
sql/sql_insert.cc:
  Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
  Changed the freeing of the memory to be symmetric to its
  allocation (my_safe_alloc -> my_safe_afree).
  This is not directly related to the bug.
sql/table.cc:
  Bug#10400 - Improperly-defined MERGE table crashes with INSERT ... ON DUPLICATE KEY UPDATE
  Added a condition for MERGE tables. These do not have unique
  indexes. But every key could be a unique key on the underlying
  MyISAM table. So get the maximum key length for MERGE tables
  instead of the maximum unique key length. This is used for
  buffer allocation in write_record().
2005-05-18 19:40:39 +02:00
unknown
48ce8aebd5 New file default_modify.c. Fixed a typo on mysqld.cc
Changed name of function my_correct_default_file to
modify_defaults_file. Improved function and fixed some
bugs in it.


include/my_sys.h:
  Changed function name.
include/mysql_com.h:
  New function, modify_defaults_file()
libmysql/Makefile.shared:
  New file, default_modify.lo
libmysql/libmysql.def:
  New function, modify_defaults_file() and fixed version number.
libmysqld/libmysqld.def:
  New function, modify_defaults_file()
mysys/Makefile.am:
  New file, default_modify.c
mysys/default.c:
  Removed function from default.c. New, corresponding one is in default_modify.c,
  name is modify_defaults_file.
server-tools/instance-manager/commands.cc:
  Changed function name.
sql/mysqld.cc:
  Fixed typo.
2005-05-18 20:10:17 +03:00
unknown
a217404883 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
2005-05-18 19:43:48 +03:00
unknown
8b1d4fd3a0 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-05-18 19:01:16 +03:00
unknown
d93806ef7d Fix warnings from icc
Added BUILD scripts for icc
Fixed (one time) memory leak in grant handling


config/ac-macros/misc.m4:
  Remove warnings flags from icc when compiling with -Werror
configure.in:
  Remove warnings flags from icc when compiling with -Werror
extra/replace.c:
  Fix warnings from icc
include/my_dbug.h:
  Fix warnings from icc
sql/gen_lex_hash.cc:
  Fix warnings from icc
sql/mysql_priv.h:
  Add missing variables
sql/mysqld.cc:
  Fix warnings from icc:
  - made a lot of variables static
  - Removing some not used variables
  - Fixed wrong printf()
  - removed extern "C" from some functions
sql/spatial.h:
  Fix warnings from icc
sql/sql_acl.cc:
  Fixed memory leak
sql/sql_lex.cc:
  Fix warnings from icc
sql/sql_lex.h:
  Fix warnings from icc
2005-05-18 19:00:21 +03:00
unknown
1c0e670911 A draft comment for mysql_select. Feel free to moderate and improve. 2005-05-18 19:35:20 +04:00
unknown
fc4a865f0e Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/local/home/marty/MySQL/mysql-5.0


sql/ha_ndbcluster.cc:
  Auto merged
sql/ha_ndbcluster.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-05-18 14:34:42 +02:00
unknown
267c5d7986 Added support for BETWEEN and IN in condition pushdown to ndbcluster by rewriting them as AND and OR expressions 2005-05-18 14:32:05 +02:00
unknown
41407d1a64 Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-18 14:31:15 +02:00
unknown
4f58bd7e94 a fix (bug #10539: When inserting out of range value in BIT, different engines behaves differently).
sql/field.cc:
  a fix (bug #10539: When inserting out of range value in BIT, different engines behaves differently).           
  we have to set the first byte only if there is(are) uneven bit(s).
2005-05-18 17:30:11 +05:00
unknown
2f9c6377f0 Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1


sql/sql_yacc.yy:
  Auto merged
2005-05-18 15:28:13 +03: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
c3ecc1ddf9 fixed fatal compiler error (windows) 2005-05-18 14:13:58 +02:00
unknown
a9ce42c3ae Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0
2005-05-18 13:37:59 +02:00
unknown
fce1521033 sql_yacc.yy:
Added missing ';'.


sql/sql_yacc.yy:
  Added missing ';'.
2005-05-18 04:17:13 -07:00
unknown
efc254bc92 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b10339


sql/set_var.h:
  Auto merged
2005-05-18 14:50:57 +05:00
unknown
3814661dc4 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Bugs/5.0.9286
2005-05-18 14:48:04 +05:00
unknown
9971175072 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/usr/home/ram/work/5.0.b10339


mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/set_var.cc:
  Auto merged
2005-05-18 14:46:05 +05:00
unknown
f79897a57f Merge mysql.com:/usr/local/bk/mysql-5.0
into mysql.com:/home/pem/work/mysql-5.0


sql/item.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
2005-05-18 11:09:30 +02:00
unknown
90a2edd784 Fixed BUG#6048: Stored procedure causes operating system reboot.
Memory leak in locally evalutated expressions during SP execution fixed by
  reusing allocated item slots when possible.
  Note: No test case added, since the test is a stress test that tries to make
  the machine to run out of memory.


sql/item.cc:
  Make it possible to reuse allocated item slots (for use in SP execution).
sql/item.h:
  Make it possible to reuse allocated item slots (for use in SP execution).
sql/sp_head.cc:
  Reuse allocated item slots for expression evalutation during SP execution.
sql/sp_rcontext.cc:
  Updated sp_eval_func_item() call, and prevent item reuse in reused frames (for handlers).
2005-05-18 11:07:57 +02:00
unknown
e8f272e206 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Bugs/5.0.9286


sql/sql_yacc.yy:
  Auto merged
2005-05-18 12:52:02 +05:00
unknown
74b93e57b5 Fix for bug #9286: SESSION/GLOBAL should be disallowed for user variables(for 5.0) 2005-05-18 12:47:45 +05:00
unknown
c0dca5f45b Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/ram/work/5.0.b6267


mysql-test/r/system_mysql_db.result:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-05-18 12:41:36 +05:00
unknown
ef342b743e Change update_auto_increment to return 1 if get_auto_increment() returned ~(ulonglong)
This makes it easier to give an error in the handler if there was a problem generating an auto-increment value


mysys/thr_alarm.c:
  Remove warning from valgrind
sql/item_strfunc.cc:
  Fixed indentation
tests/mysql_client_test.c:
  Removed compiler warning
2005-05-18 10:41:35 +03:00
unknown
83062698fd Change Last_query_cost status variable from global to thread-local.
sql/mysql_priv.h:
  Changed last_query_cost status variable from global to thread-local.
sql/mysqld.cc:
  Changed last_query_cost status variable from global to thread-local.
sql/sql_class.cc:
  Changed last_query_cost status variable from global to thread-local.
sql/sql_class.h:
  Changed last_query_cost status variable from global to thread-local.
sql/sql_select.cc:
  Changed last_query_cost status variable from global to thread-local.
sql/sql_show.cc:
  All SHOW_DOUBLE-type status variables are now assumed to be thread-local (there is 
  only one currently, last_query_cost, and this cset makes it thread-local)
2005-05-18 05:39:10 +02:00
unknown
bcdc5b74da Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-05-18 02:09:24 +03:00
unknown
9397148d3b Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into xiphis.org:/usr/home/antony/work2/p1-bug10246.1
2005-05-17 23:57:42 +01:00
unknown
0e6674a972 fix embedded build
sql/sql_acl.cc:
  style fix, long line.
  fix for embedded build which I broke
2005-05-17 23:49:01 +01:00
unknown
de4ae9609e Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2005-05-18 00:31:01 +03:00
unknown
cdba1d562d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-05-17 22:58:13 +02:00
unknown
59993e03c1 Merge
sql/sql_base.cc:
  Auto merged
2005-05-17 23:54:32 +03:00
unknown
3f8199732e After merge fix
sql/sql_update.cc:
  Add missing join method
2005-05-17 23:52:36 +03:00
unknown
92834915d7 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into xiphis.org:/usr/home/antony/work2/p1-bug10246.1
2005-05-17 21:13:25 +01:00
unknown
89039f7475 Merge acurtis@bk-internal.mysql.com:/home/bk/mysql-5.0
into xiphis.org:/usr/home/antony/work2/p1-bug10246.1


sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-05-17 19:57:27 +01:00
unknown
55171821d2 Bug#10246 - Parser: bad syntax for GRANT EXECUTE
Rename some functions
  more fine-grained sp privileges
  make grant/revoke sp grammar less ambigious


mysql-test/r/sp-security.result:
  change test for new syntax
mysql-test/r/system_mysql_db.result:
  change test for new syntax
mysql-test/t/sp-security.test:
  change test for new syntax
scripts/mysql_create_system_tables.sh:
  now store routine_type for procs_priv
scripts/mysql_fix_privilege_tables.sql:
  now store routine_type for procs_priv
sql/item_func.cc:
  rename of function
sql/mysql_priv.h:
  rename of function
sql/sp_head.cc:
  extra arg for check_some_routine_access
sql/sql_acl.cc:
  rename of function. now handle func/proc acls seperately
sql/sql_acl.h:
  rename of function
sql/sql_parse.cc:
  rename of function
  grants for procs handled distinctly from funcs
sql/sql_show.cc:
  check_some_routine_access extra arg
sql/sql_base.cc:
  fix for build
sql/sql_yacc.yy:
  fix for build
2005-05-17 19:54:20 +01:00
unknown
32544f323a ha_innodb.cc:
Fix bug #10359 : remove extra code


sql/ha_innodb.cc:
  Fix bug #10359 : remove extra code
2005-05-17 21:47:28 +03:00
unknown
6358cdee1e ha_innodb.h, ha_innodb.cc:
Fix bug #10359 : the critical AUTO-INC bug in InnoDB; since reading of the auto-inc counter in an INSERT was not protected by the AUTO-INC table lock of InnoDB, two inserted rows could get the same value for the auto-inc counter, leading to a duplicate key error


sql/ha_innodb.cc:
  Fix bug #10359 : the critical AUTO-INC bug in InnoDB; since reading of the auto-inc counter in an INSERT was not protected by the AUTO-INC table lock of InnoDB, two inserted rows could get the same value for the auto-inc counter, leading to a duplicate key error
sql/ha_innodb.h:
  Fix bug #10359 : the critical AUTO-INC bug in InnoDB; since reading of the auto-inc counter in an INSERT was not protected by the AUTO-INC table lock of InnoDB, two inserted rows could get the same value for the auto-inc counter, leading to a duplicate key error
2005-05-17 21:43:15 +03:00
unknown
7d740ed61c Merge neptunus.(none):/home/msvensson/mysql/bug9535
into neptunus.(none):/home/msvensson/mysql/mysql-5.0


sql/item_strfunc.h:
  Auto merged
2005-05-17 20:32:00 +02:00
unknown
804ce01a31 BUG#9535 Warning for "create table t as select uuid();"
- Set max_length of Item_func_uuid to max_length*system_charset_info->mbmaxlen
  Note! Item_func_uuid should be set to use 'ascii' charset when hex(), format(), md5() etc will use 'ascii'


mysql-test/r/func_misc.result:
  Test results
mysql-test/t/func_misc.test:
  Test case
sql/item_strfunc.h:
  Multiply max_length of Item_func_uuid with system_charset_info->mbmaxlen
2005-05-17 20:31:26 +02:00
unknown
159aac8015 Merge book.sanja.is.com.ua:/Users/bell/mysql/bk/mysql-4.1
into book.sanja.is.com.ua:/Users/bell/mysql/bk/work-4.1
2005-05-17 19:10:53 +03:00
unknown
afaa3c8923 sql_yacc.yy:
missing semicolon added
sql_base.cc:
  bad merge fixed
sp_head.cc, view.test, view.result:
  Correct restoring view name in SP table locking BUG#9758
configure.in:
  restore -fno-implicit-templates -fno-exceptions -fno-rtti in configure


configure.in:
  restore -fno-implicit-templates -fno-exceptions -fno-rtti in configure
mysql-test/r/view.result:
  Correct restoring view name in SP table locking BUG#9758
mysql-test/t/view.test:
  Correct restoring view name in SP table locking BUG#9758
sql/sp_head.cc:
  Correct restoring view name in SP table locking BUG#9758
sql/sql_base.cc:
  bad merge fixed
sql/sql_yacc.yy:
  missing semicolon added
2005-05-17 17:08:43 +02:00
unknown
9b07cafe1e Merge mysql.com:/home/jimw/my/mysql-5.0-7800
into mysql.com:/home/jimw/my/mysql-5.0-clean


sql/set_var.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
2005-05-16 14:33:46 -07:00
unknown
9c71571f83 Merge with 4.1 to get fix for memory leak
client/mysql.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/sql_base.cc:
  merge
2005-05-16 20:21:38 +03:00
unknown
e9beb6d0aa Cleanups based on feedback from Monty.
sql/sql_show.cc:
  Use int10_to_str() instead of my_snprintf() for formatting number
2005-05-16 10:21:28 -07:00
unknown
f80fa96d1c Fix memory leak
client/mysql.cc:
  Remove usage of c_ptr_safe() as this causes a linkage problem when compiling MySQL without inline functions
sql/sql_base.cc:
  Don't use c_ptr_safe() on this string as this causes a realloc and the String object (allocated by sql_yacc.yy) is never freed
2005-05-16 20:16:46 +03:00
unknown
50ff727405 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-16 16:44:53 +02:00
unknown
259699b4eb Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/psergey/mysql-4.1-bug10221
2005-05-16 14:10:02 +00:00
unknown
4b2020c575 Some improvement in Item_int_with_ref class comment. 2005-05-16 14:06:52 +00:00
unknown
2957088d7b Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-05-16 15:28:58 +02:00
unknown
4d3d703200 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-16 15:26:40 +03:00
unknown
d15f89c47a After merge fixes
mysql-test/r/alter_table.result:
  Fixed results after merge
sql/handler.cc:
  Trivial optimzation
sql/sql_table.cc:
  Trvial optimization
sql/sql_yacc.yy:
  After merge fix
sql/unireg.cc:
  Removed argument 'null_fields' from make_empty_rec() as it was not needed
  Moved assert() to right place to take bit fields into account
2005-05-16 15:21:35 +03:00
unknown
70c4325d67 Fixed failing tests for not 32 bit intel machines
Fixed bug in mysql_stmt_fetch() when retrieving rows to return


mysql-test/r/ps.result:
  Fix to not get warnings if mysql_client_test.test fails
mysql-test/t/index_merge_ror.test:
  Proper fix for 64 bit intel (which gives uses another, equal good index)
mysql-test/t/ps.test:
  Fix to not get warnings if mysql_client_test.test fails
sql-common/client.c:
  More debugging
sql/sql_prepare.cc:
  Fixed bug in mysql_stmt_fetch() when retrieving rows to return
sql/sql_select.cc:
  More debugging
tests/mysql_client_test.c:
  More debugging
2005-05-16 13:34:23 +03:00
unknown
5112e25c58 Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0


BitKeeper/etc/logging_ok:
  auto-union
2005-05-16 12:05:42 +02:00
unknown
bc933962a3 relaxed DBUG_ASSERT in Item_int_with_ref::new_item() to "any constant" (BUG#10020)
mysql-test/r/subselect.result:
  test fro bug 10020
mysql-test/t/subselect.test:
  bug 10020 test suite
sql/item.cc:
  any constant allowed here BUG#10020)
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-16 12:19:10 +03:00
unknown
b11b13e9bd Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/psergey/mysql-4.0-bug10095
2005-05-15 22:58:10 +02:00
unknown
06736ab48a Fix for BUG#10095: {wrong query results because of incorrect constant propagation}
The problem: base_list::remove didn't modify base_list::last when removing 
the last list element.
The fix: If we remove the last element, find the element before it (by walking
from the beginning of the list) and set base_list::last accordingly.

The list gets corrupted in both 4.0 and 4.1. There are no visible problems in 
current 4.1 because current 4.1 doesn't call where_cond->fix_fields() after 
constant propagation step.


mysql-test/r/select.result:
  Testcase for BUG#10095
mysql-test/t/select.test:
  Testcase for BUG#10095
sql/sql_list.h:
  Fix for BUG#10095: {wrong query results because of incorrect constant propagation} 
  The problem: base_list::remove didn't modify base_list::last when removing 
  the last list element.
  The fix: If we remove the last element, find the element before it (by walking
  from the beginning of the list) and set base_list::last accordingly.
2005-05-15 22:56:45 +02:00
unknown
bd6aaee935 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
2005-05-14 19:32:28 +03:00
unknown
18d0e6a73d Don't enable binlogs by default as this gives too many warnings 2005-05-14 19:31:34 +03:00
unknown
f8f714a2fb Merge with 4.1
BitKeeper/etc/logging_ok:
  auto-union
BitKeeper/deleted/.del-errmsg.txt~11edc4db89248c16:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~184eb1f09242dc72:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~2cdeb8d6f80eba72:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~4617575065d612b9:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~587903f9311db2d1:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~606dfaeb9e81aa4e:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~6bbd9eac7f0e6b89:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~7397c423c52c6d2c:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~898865062c970766:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~8ed1999cbd481dc4:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~94a93cc742fca24d:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~9dab24f7fb11b1e1:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~b44a85a177954da0:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~b6181e29d8282b06:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~ba132dc9bc936c8a:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~e2609fdf7870795:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~e3183b99fbba0a9c:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~eeb2c47537ed9c23:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~ef28b592c7591b7:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~ef53c33ac0ff8a84:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~f19bfd5d4c918964:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~f96b7055cac394e:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/mi_key.c:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/t/alter_table.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
mysql-test/r/insert_update.result:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
sql/sql_table.cc:
  merge
sql/unireg.cc:
  merge
2005-05-14 18:31:22 +03:00
unknown
faa12bf0c7 Fixed compiler failure 2005-05-14 17:08:43 +03:00
unknown
78f2e7b53d Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1


libmysql/libmysql.c:
  Auto merged
sql/share/danish/errmsg.txt:
  Auto merged
2005-05-14 16:28:52 +03:00
unknown
2059908b9c After merge fixes
BitKeeper/deleted/.del-outfile2.result~fb702ee2518d8e6d:
  Delete: mysql-test/r/outfile2.result
libmysql/libmysql.c:
  Fix indentation for new function mysql_set_character_set()
mysql-test/r/alter_table.result:
  Fix test to be in same order as in 4.0
mysql-test/r/innodb.result:
  After merge fix
mysql-test/r/insert_update.result:
  Add extra test for insert into ... on duplicate key upate
mysql-test/r/outfile.result:
  After merge fix
mysql-test/t/alter_table.test:
  Fix test to be in same order as in 4.0
mysql-test/t/insert_update.test:
  Add extra test for insert into ... on duplicate key upate
mysql-test/t/outfile.test:
  After merge fix
sql/item_func.cc:
  After merge fix
sql/sql_table.cc:
  After merge fix
2005-05-14 16:24:36 +03:00
unknown
7f5bf3dcdb Manual merge (again)
configure.in:
  Auto merged
include/mysql.h:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
BitKeeper/deleted/.del-ctype-cp932.c:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~4617575065d612b9:
  Auto merged
BitKeeper/deleted/.del-errmsg.txt~ffe4a0c9e3206150:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/Makefile.am:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/ps_grant.test:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-ucs2.c:
  Auto merged
2005-05-14 12:38:12 +04:00
unknown
752372f626 Fix wrong format specifier in error messages.
Not to be pushed into 5.0 as there it's fixed differently (in the new
format of error messages)


sql/share/danish/errmsg.txt:
  Fix wrong format specifier in an error message.
sql/share/serbian/errmsg.txt:
  Fix wrong format specifier in an error message.
2005-05-14 02:28:10 +04:00
unknown
037b0a7b14 Merge with 4.0
BitKeeper/etc/logging_ok:
  auto-union
mysql-test/r/outfile2.result:
  Merge rename: mysql-test/r/outfile.result -> mysql-test/r/outfile2.result
myisam/mi_key.c:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/auto_increment.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/auto_increment.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/handler.h:
  Auto merged
mysql-test/t/alter_table.test:
  Merge
mysql-test/t/outfile.test:
  Merge
sql/item_func.cc:
  Merge
sql/share/czech/errmsg.txt:
  Merge
sql/share/danish/errmsg.txt:
  Merge
sql/share/dutch/errmsg.txt:
  Merge
sql/share/english/errmsg.txt:
  Merge
sql/share/estonian/errmsg.txt:
  Merge
sql/share/french/errmsg.txt:
  Merge
sql/share/german/errmsg.txt:
  Merge
sql/share/greek/errmsg.txt:
  Merge
sql/share/hungarian/errmsg.txt:
  Merge
sql/share/italian/errmsg.txt:
  Merge
sql/share/japanese/errmsg.txt:
  Merge
sql/share/korean/errmsg.txt:
  Merge
sql/share/norwegian-ny/errmsg.txt:
  Merge
sql/share/norwegian/errmsg.txt:
  Merge
sql/share/polish/errmsg.txt:
  Merge
sql/share/portuguese/errmsg.txt:
  Merge
sql/share/romanian/errmsg.txt:
  Merge
sql/share/russian/errmsg.txt:
  Merge
sql/share/slovak/errmsg.txt:
  Merge
sql/share/spanish/errmsg.txt:
  Merge
sql/share/swedish/errmsg.txt:
  Merge
sql/share/ukrainian/errmsg.txt:
  Merge
sql/sql_table.cc:
  Merge
sql/sql_yacc.yy:
  Keep old
sql/unireg.cc:
  Merge
2005-05-14 00:01:40 +03:00
unknown
89001262cf Merge bk-internal:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0
2005-05-13 22:49:49 +02:00
unknown
c3f73a4281 sql/ha_blackhole.cc
bug#10175 - blackhole.test hangs with "Warning: prev link 1 didn't point at previous lock at read: read lock with no write locks"
sql/sql_base.cc
    libmysqld/examples/mysql.cc linking problem


sql/ha_blackhole.cc:
  bug#10175 - blackhole.test hangs with "Warning: prev link 1 didn't point at previous lock at read: read lock with no write locks"
sql/sql_base.cc:
  libmysqld/examples/mysql.cc linking problem
2005-05-13 21:43:26 +02:00
unknown
18fd0b9467 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
2005-05-13 22:20:07 +03:00
unknown
9a8d59b02c Fixup from 4.1 to 5.0 merge
sql/sql_lex.h:
  Fix length of options member
2005-05-13 09:55:03 -07:00
unknown
c07f07c3e6 a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
the behavior of enum changed to be consistent.


mysql-test/r/system_mysql_db.result:
  a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
mysql-test/r/type_enum.result:
  a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
mysql-test/r/type_ranges.result:
  a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
sql/sql_insert.cc:
  a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
  Don't issue warnings for enum fields.
sql/sql_parse.cc:
  a fix (bug #6267: ENUM ... NOT NULL w/o default treated differently than other data types).
  set NO_DEFAULT_VALUE_FLAG flag for enum fields as well.
2005-05-13 16:44:14 +05:00
unknown
7a42c5fd41 Merge
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-13 13:26:08 +02:00
unknown
7c1d520ef1 a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
sql/set_var.cc:
  a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
  test for read only variables added.
sql/set_var.h:
  a fix (bug #10339: Incorrect error is displayed if try to set value of internal ' warning_count ').
  sys_var::is_readonly() method introduced.
2005-05-13 16:18:27 +05:00
unknown
2a695127a6 Fixes during review
mysql-test/r/select.result:
  Better error message
mysql-test/t/select.test:
  Better error message
sql/hostname.cc:
  Join identical code
sql/sql_yacc.yy:
  Combine code (and get a better error message)
strings/ctype-ucs2.c:
  Cast pointer differencess
2005-05-13 14:04:32 +03:00
unknown
2380fc937b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0


mysql-test/r/group_min_max.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
2005-05-13 13:36:02 +03:00
unknown
db416599ff Fix for valgrind bug in decimal code
sql/item_func.cc:
  prec_increment should be assigned before fix_length_and_dec call
2005-05-13 14:29:30 +05:00
unknown
b21cf962e3 concurrent-insert can now be set to 2 for concurrent inserts when there is holes in the data file
myisam_max_extra_sort_file_size is depricated
Ensure that myisam_data_pointer_size is honoured when creating new MyISAM files
Changed default value of myisam_data_pointer_size from 4 to 6 to get rid of 'table-is-full' errors



include/myisam.h:
  Change type of myisam_block_size and myisam_concurrent_insert to make them changeable in mysqld.cc
  Removed not used varaible myisam_max_extra_temp_length
include/thr_lock.h:
  Added extra parameter to get_status
myisam/mi_create.c:
  Ensure that myisam_data_pointer_size is honoured
myisam/mi_dynrec.c:
  If 'append_insert_at_end' is set, only write at end of myisam record file
myisam/mi_locking.c:
  Add extra argument to 'mi_get_status' to allow thr_lock to signal that we want to do a concurrent insert
  If this is used, we will append new insert rows at end of data file.
  Change mi_check_status() to allow concurrent_inserts even if there are holes in the file when myisam_concurent_insert=2
myisam/mi_static.c:
  Change behavior of myisam_concurrent_insert so that setting this to 2 allows inserts even if there is a hole in the data file.
  Default value is 2 for MyISAM direct usage but will be set to 1 (old default) by mysqld.cc
myisam/mi_statrec.c:
  If 'append_insert_at_end' is set, only write at end of myisam record file
myisam/mi_write.c:
  If 'append_insert_at_end' is set, only write at end of myisam record file
myisam/myisamdef.h:
  Support for insert-at-end even if there is holes in data file
mysql-test/r/gis-rtree.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/group_min_max.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/index_merge.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/index_merge_ror.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/merge.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/myisam.result:
  Test of concurrent_insert=2
mysql-test/r/null.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/preload.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/ps_1general.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/range.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/r/variables.result:
  concurrent_insert is now a integer, not a boolean
  myisam_extra_sort_file_size is deleted
mysql-test/r/view.result:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/t/index_merge.test:
  Test result changed because default value for myisam_data_pointer_size is changed from 4 -> 6
mysql-test/t/myisam.test:
  Test of concurrent_insert=2
mysql-test/t/ps_1general.test:
  Drop test table
mysql-test/t/variables.test:
  concurrent_insert is now a integer, not a boolean
  myisam_extra_sort_file_size is deleted
mysql-test/t/view.test:
  Drop tables that may be left from previous tests
mysys/thr_lock.c:
  Extra paramter to get_status to signal if concurrent_insert was used
sql/mysqld.cc:
  concurrent-insert can now be set to 2 for concurrent inserts when there is holes in the data file
  myisam_max_extra_sort_file_size is depricated
sql/set_var.cc:
  concurrent-insert is now an integer, not a bool
  myisam_max_extra_sort_file_size is deleted
2005-05-13 12:08:08 +03:00
unknown
dba09923b7 a fix (bug #6961: Traditional: assignment of string to numeric column should fail).
sql/field.cc:
  a fix (bug #6961: Traditional: assignment of string to numeric column should fail).
  Should issue errors in strict modes instead of warnings.
2005-05-13 13:22:27 +05:00