Commit graph

1520 commits

Author SHA1 Message Date
unknown
eef5f17bde Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-bg8406


mysql-test/r/sp.result:
  Auto merged
mysql-test/r/trigger.result:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
mysql-test/t/trigger.test:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
mysql-test/r/sp-error.result:
  Manual merge.
mysql-test/t/sp-error.test:
  Manual merge.
sql/sp_head.cc:
  Manual merge.
sql/sql_yacc.yy:
  Manual merge.
2005-07-09 22:04:18 +04:00
unknown
14b1f91ba4 Enable support of access to tables from triggers. Thus fix bug #8406 "Triggers
crash if referencing a table" and several other related bugs.
Fix for bug #11834 "Re-execution of prepared statement with dropped function
crashes server." which was spotted during work on previous bugs.

Also couple of nice cleanups:
- Replaced two separate hashes for stored routines used by statement with one.
- Now instead of doing one pass through all routines used in statement for
  caching them and then doing another pass for adding their tables to table
  list, we do only one pass during which do both things.


mysql-test/r/sp-error.result:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/r/sp.result:
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/r/trigger.result:
  Added several tests for triggers using tables.
mysql-test/t/sp-error.test:
  Added test for bug #11834 "Re-execution of prepared statement with dropped
  function crashes server" also covering handling of prepared statements
  which use stored functions but does not require prelocking.
mysql-test/t/sp.test:
  Updated comment about recursive views to reflect current situation.
  Updated test for LOCK TABLES with views in table list.
  (Old version of statement used in this test will work ok now, since prelocking
   algorithm was tuned and will lock only one multi-set of tables for each routine
   even if this routine is used in several different views).
mysql-test/t/trigger.test:
  Added several tests for triggers using tables.
sql/item_func.cc:
  Item_func_sp::cleanup():
    By next statement execution stored function can be dropped or altered so
    we can't assume that sp_head object for it will be still valid.
sql/sp.cc:
  - Added Sroutine_hash_entry structure that represents element in the set of
    stored routines used by statement or routine. We can't as before use
    LEX_STRING for this purprose because we want link all elements of this set
    in list.
  - Replaced sp_add_to_hash() with sp_add_used_routine() which takes into account
    that now we use one hash for stored routines used by statement instead of two
    and which mantains list linking all elelemnts in this hash.
  - Renamed sp_merge_hash() to sp_update_sp_used_routines().
  - Introduced sp_update_stmt_used_routines() for adding elements to the set of
    routines used by statement from another similar set for statement or routine.
    This function will also mantain list linking elements of destination set.
  - Now instead of one sp_cache_routines() function we have family of 
    sp_cache_routines_and_add_tables() functions which are also responsible for
    adding tables used by routines being cached to statement table list. Nice
    optimization - thanks to list linking all elements in the hash of routines
    used by statement we don't need to perform several iterations over this hash
    (as it was before in cases when we have added new elements to it).
sql/sp.h:
  Added declarations of functions used for manipulations with set (hash) of stored
  routines used by statement.
sql/sp_head.cc:
  sp_name::init_qname():
    Now sp_name also holds key identifying routine in the set (hash) of
    stored routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed definition of sp_add_sp_tables_to_table_list() and auxilary functions 
  since now we don't have separate stage on which we add tables used by routines
  used by statement to table list for prelocking. We do it on the same stage as
  we load those routines in SP cache. So all this functionality moved to
  sp_cache_routines_and_add_tables() family of functions.
sql/sp_head.h:
  sp_name:
    Now this class also holds key identifying routine in the set (hash) of stored
    routines used by statement. 
  sp_head:
    Instead of two separate hashes sp_funs/m_spprocs representing sets of stored
    routines used by this routine we use one hash - m_sroutines. 
  sp_instr_set_trigger_field:
    Added support for subqueries in assignments to row accessors in triggers.
  Removed declaration of sp_add_sp_tables_to_table_list() since now we don't have
  separate stage on which we add tables used by routines used by statement to
  table list for prelocking. We do it on the same stage as we load those routines
  in SP cache.
sql/sql_base.cc:
  open_tables():
  - LEX::spfuns/spprocs hashes were replaced with one LEX::sroutines hash.
  - Now instead of doing one pass through all routines used in statement for
    caching them and then doing another pass for adding their tables to table
    list, we do only one pass during which do both things. It is easy to do
    since all routines in the set of routines used by statement are linked in
    the list. This also allows us to calculate table list for prelocking more
    precisely.
  - Now triggers properly inform prelocking algorithm about tables they use.
sql/sql_lex.cc:
  lex_start():
    Replaced LEX::spfuns/spprocs with with one LEX::sroutines hash.
    Added LEX::sroutines_list list linking all elements in this hash.
  st_lex::st_lex():
    Moved definition of LEX constructor to sql_lex.cc file to be able
    use sp_sroutine_key declaration from sp.h in it.
sql/sql_lex.h:
  LEX:
    Replaced two separate hashes for stored routines used by statement with one.
    Added list linking all elements in this hash to be able to iterate through all
    elements and add new elements to this hash at the same time.
    Moved constructor definition to sql_lex.cc.
sql/sql_parse.cc:
  mysql_execute_command():
    Replaced LEX::spfuns/spprocs with one LEX::sroutines hash.
sql/sql_trigger.cc:
  Added missing GNU GPL notice.
  Table_triggers_list::check_n_load()
    Added initialization of sroutines_key which stores key representing
    triggers of this table in the set (hash) of routines used by this statement.
sql/sql_trigger.h:
  Added missing GNU GPL notice.
  Table_triggers_list:
    Added sroutines_key member to store key representing triggers of this
    table in the set (hash) of routines used by this statement.
    Declared sp_cache_routines_and_add_tables_for_triggers() as friend since
    it needs access to sroutines_key and trigger bodies.
sql/sql_yacc.yy:
  - Now we use sp_add_used_routine() instead of sp_add_to_hash() for adding
    elements to the set of stored routines used in statement.
  - Enabled support of subqueries as right sides in assignments to triggers' row
    accessors.
2005-07-09 21:51:59 +04:00
unknown
077e335eb3 Fix for bug #8449(Silent column changes)
mysql-test/r/show_check.result:
  test result fixed
mysql-test/r/sql_mode.result:
  test result fixed
mysql-test/r/type_decimal.result:
  test result fixed
mysql-test/r/type_float.result:
  test result fixed
mysql-test/r/type_newdecimal.result:
  test result fixed
mysql-test/t/type_decimal.test:
  test fixed
mysql-test/t/type_float.test:
  test fixed
mysql-test/t/type_newdecimal.test:
  test case added
sql/share/errmsg.txt:
  error messages added
sql/sql_parse.cc:
  now precision/scale parameters are handled in required way
2005-07-07 21:47:18 +05:00
unknown
3c82f72091 manual merge
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
strings/ctype-utf8.c:
  Auto merged
2005-07-04 03:50:04 +03:00
unknown
306ebf7b1c Fixes during review of new code
- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling


myisam/mi_unique.c:
  Improved comments
myisam/myisampack.c:
  Updated version number
mysql-test/r/group_by.result:
  Added test that was lost during earlier merge
mysql-test/r/information_schema.result:
  Safety fix: Drop procedures before used
mysql-test/t/group_by.test:
  Added test that was lost during earlier merge
mysql-test/t/information_schema.test:
  Safety fix: Drop procedures before used
mysys/hash.c:
  Updated comment
sql/field.cc:
  false -> FALSE
sql/ha_ndbcluster.cc:
  Fix some style issues
  - No () around argument to 'case'
  - Space before ( in switch and if
  - Removed 'goto'
  - Added {}
  - Added () to make expressions easier to read
  - my_snprintf -> strmov
sql/handler.cc:
  if( -> if (
sql/item.cc:
  Indentation changes
sql/item.h:
  false -> FALSE
sql/item_cmpfunc.cc:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_cmpfunc.h:
  Ensure that Item_func_case() check for stack overrun properly
sql/item_func.cc:
  Indentation fixes
  Fixed wrong goto label
sql/mysqld.cc:
  Remove test for opt_disable_networking as this flag can never be set here
sql/opt_range.cc:
  Simplify code
sql/sql_class.h:
  Move define out from middle of class definition
sql/sql_parse.cc:
  Remove extra empty lines
sql/sql_select.cc:
  use real_item() instead of (Item_ref*) item
  Modifed function comment to be align with others
  Simple optimization
sql/sql_union.cc:
  Portability fix:
  Don't use 'bool_variable|=...'
sql/sql_view.cc:
  Move List_iterator_fast out from loops (rewind is faster than creating a new itearator)
strings/ctype-utf8.c:
  if( -> if (
strings/ctype.c:
  Remove disabled code
strings/decimal.c:
  Indentation fixes
strings/xml.c:
  Indentation fixes
2005-07-04 03:42:33 +03:00
unknown
eeee5fb10b Merge with 4.1
Makefile.am:
  Auto merged
myisam/mi_create.c:
  Auto merged
myisam/mi_open.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysys/thr_alarm.c:
  Auto merged
VC++Files/sql/mysqld.dsp:
  Keep old
client/mysqldump.c:
  Manual merge
client/mysqltest.c:
  Automatic merge
configure.in:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Auto merge
mysql-test/r/func_str.result:
  Auto merge
mysql-test/r/group_by.result:
  Auto merge
mysql-test/r/insert_select.result:
  Auto merge
mysql-test/r/insert_update.result:
  Auto merge
mysql-test/r/lowercase_table2.result:
  Auto merge
mysql-test/r/select.result:
  Manual merge
mysql-test/r/variables.result:
  Auto merge
mysql-test/t/ctype_ucs.test:
  Auto merge
mysql-test/t/func_str.test:
  Auto merge
mysql-test/t/group_by.test:
  Auto merge
mysql-test/t/insert_select.test:
  Auto merge
mysql-test/t/insert_update.test:
  Auto merge
mysql-test/t/ndb_alter_table.test:
  Auto merge
mysql-test/t/select.test:
  Auto merge
mysql-test/t/variables.test:
  Auto merge
mysys/my_access.c:
  Auto merge
scripts/make_win_src_distribution.sh:
  Auto merge
sql/field.cc:
  Manual merge
sql/ha_ndbcluster.cc:
  Auto merge
sql/handler.cc:
  Auto merge
sql/item.cc:
  Auto merge
sql/item.h:
  Manual merge
sql/item_cmpfunc.h:
  Auto merge
sql/item_strfunc.cc:
  Auto merge
sql/item_strfunc.h:
  Auto merge
sql/mysql_priv.h:
  manual merge
sql/mysqld.cc:
  manual merge
sql/opt_range.cc:
  manual merge
sql/set_var.cc:
  Auto merge
sql/sql_base.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_insert.cc:
  manual merge
  Restore processing of ON DUPLICATE KEY UPDATE
  Simplify mysql_prepare_insert by using local variable for select_lex and save old values just before they are changed
sql/sql_parse.cc:
  Restore processing of ON DUPLICATE KEY UPDATE
sql/sql_prepare.cc:
  New ON DUPLICATE KEY UPDATE handling
sql/sql_select.cc:
  manual merge
sql/sql_table.cc:
  auto merge
sql/sql_yacc.yy:
  auto merge
strings/ctype-ucs2.c:
  auto merge
strings/ctype-utf8.c:
  auto merge
2005-07-03 14:17:52 +03:00
unknown
b4f595b95f Name resolution context added (BUG#6443)
include/my_bitmap.h:
  new bitmap operation
mysql-test/r/view.result:
  added warnings
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysql-test/t/view.test:
  Correct inserting data check (absence of default value) for view underlying tables (BUG#6443)
mysys/my_bitmap.c:
  new bitmap operation
sql/field.h:
  index of field in table added
sql/item.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item.h:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/item_cmpfunc.cc:
  table list removed from fix_fields() arguments
sql/item_cmpfunc.h:
  table list removed from fix_fields() arguments
sql/item_func.cc:
  table list removed from fix_fields() arguments
sql/item_func.h:
  table list removed from fix_fields() arguments
sql/item_row.cc:
  table list removed from fix_fields() arguments
sql/item_row.h:
  table list removed from fix_fields() arguments
sql/item_strfunc.cc:
  fixed server crash on NULL argument
sql/item_strfunc.h:
  table list removed from fix_fields() arguments
sql/item_subselect.cc:
  table list removed from fix_fields() arguments
sql/item_subselect.h:
  table list removed from fix_fields() arguments
sql/item_sum.cc:
  table list removed from fix_fields() arguments
sql/item_sum.h:
  table list removed from fix_fields() arguments
sql/item_timefunc.cc:
  table list removed from fix_fields() arguments
sql/item_timefunc.h:
  table list removed from fix_fields() arguments
sql/item_uniq.h:
  table list removed from fix_fields() arguments
sql/log_event.cc:
  Name resolution context added
sql/log_event.h:
  Name resolution context added
sql/mysql_priv.h:
  Name resolution context added
sql/set_var.cc:
  table list removed from fix_fields() arguments
sql/share/errmsg.txt:
  new error message
sql/sp.cc:
  Name resolution context added
sql/sp_head.cc:
  table list removed from fix_fields() arguments
sql/sp_head.h:
  Name resolution context added
sql/sql_base.cc:
  table list removed from fix_fields() arguments
  Name resolution context added
sql/sql_class.cc:
  renamed variable
sql/sql_delete.cc:
  Name resolution context added
sql/sql_derived.cc:
  Name resolution context added
sql/sql_do.cc:
  table list removed from fix_fields() arguments
sql/sql_handler.cc:
  Name resolution context added
sql/sql_help.cc:
  Name resolution context added
sql/sql_insert.cc:
  Name resolution context added
  table list removed from fix_fields() arguments
sql/sql_lex.cc:
  Name resolution context added
sql/sql_lex.h:
  removed resolve mode (information stored into name resolution context)
sql/sql_load.cc:
  table list removed from fix_fields() arguments
sql/sql_olap.cc:
  Name resolution context added
sql/sql_parse.cc:
  Name resolution context added
sql/sql_prepare.cc:
  table list removed from fix_fields() arguments
sql/sql_select.cc:
  table list removed from fix_fields() arguments
sql/sql_show.cc:
  Name resolution context added
sql/sql_trigger.cc:
  table list removed from fix_fields() arguments
sql/sql_udf.h:
  table list removed from fix_fields() arguments
sql/sql_union.cc:
  Name resolution context added
sql/sql_update.cc:
  Name resolution context added
sql/sql_view.cc:
  Name resolution context added
sql/sql_view.h:
  table list removed from fix_fields() arguments
sql/sql_yacc.yy:
  Name resolution context added
sql/table.cc:
  Name resolution context added
  merged view processing moved
sql/table.h:
  merged view processing moved
2005-07-01 07:05:42 +03:00
unknown
05c7edf648 Move reset of insert_values to ensure it's done also during error conditions
This fixed a failure of insert_update.test on some platforms


mysys/thr_alarm.c:
  Fixed problem noticed by valgrind
sql/opt_range.cc:
  Simple optimization for common case
sql/sql_base.cc:
  Safety assert
sql/sql_insert.cc:
  Added comment
2005-06-28 15:06:16 +03:00
unknown
76d444fcb6 Portability fixes
Fixes while reviewing new pushed code
NULL as argument to encrypt/decrypt should return NULL without a warning


client/mysqldump.c:
  Cleanup
  Ensure we free allocated memory
  Portability fixes
client/mysqltest.c:
  Cleanup of code during review
  Portability fixes (Don't use 'bool')
mysql-test/r/func_encrypt.result:
  NULL as argument to encrypt/decrypt should return NULL without a warning
mysql-test/r/func_encrypt_nossl.result:
  Added test of NULL argument
mysql-test/t/func_encrypt_nossl.test:
  Added test of NULL argument
sql/handler.cc:
  Cleanup during code review
sql/item_strfunc.cc:
  NULL as argument to encrypt/decrypt should return NULL without a warning
sql/sql_parse.cc:
  Fix wrong merge (fix was not needed as the previous code was reverted)
sql/sql_table.cc:
  Removed extra new line
2005-06-27 20:31:00 +03:00
unknown
6c46a993d7 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  mishka.local:/home/my/mysql-4.1


sql/ha_ndbcluster.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-06-27 16:47:44 +03:00
unknown
d10877ce8c Better bug fix for:
#9728  'Decreased functionality in "on duplicate key update
#8147  'a column proclaimed ambigous in INSERT ... SELECT .. ON DUPLICATE'

This ensures fields are uniquely qualified and also that one can't update other tables in the ON DUPLICATE KEY UPDATE part


mysql-test/r/insert_select.result:
  More tests for bug #9728 and #8147
mysql-test/r/insert_update.result:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysql-test/t/insert_select.test:
  More tests for bug #9728 and #8147
mysql-test/t/insert_update.test:
  Updated tests after changing how INSERT ... SELECT .. ON DUPLICATE KEY works
mysys/my_access.c:
  Cleanup (shorter loop variable names)
sql/ha_ndbcluster.cc:
  Indentation fixes
sql/item.cc:
  Remove item_flags
sql/item.h:
  Remove item_flags
sql/mysql_priv.h:
  New arguments to mysql_prepare_insert
sql/sql_base.cc:
  Remove old fix for bug #8147
sql/sql_insert.cc:
  Extend mysql_prepare_insert() with new field list for tables that can be used in the values port of ON DUPLICATE KEY UPDATE
sql/sql_parse.cc:
  Revert fix for #9728
  Allow one to use other tables in ON DUPLICATE_KEY for INSERT ... SELECT if there is no GROUP BY clause
sql/sql_prepare.cc:
  New arguments to mysql_prepare_insert
sql/sql_yacc.yy:
  Revert bug fix for #9728
2005-06-27 16:46:41 +03:00
unknown
d8ee99b4c4 Simpler impl.
sql/sql_parse.cc:
  Just do a simple sprintf to format error message.
2005-06-27 14:26:07 +02:00
unknown
71f7df2766 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug10466


mysql-test/r/alias.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/func_time.result:
  Auto merged
mysql-test/r/group_by.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/r/ps_2myisam.result:
  Auto merged
mysql-test/r/ps_3innodb.result:
  Auto merged
mysql-test/r/ps_4heap.result:
  Auto merged
mysql-test/r/ps_5merge.result:
  Auto merged
mysql-test/r/ps_6bdb.result:
  Auto merged
mysql-test/r/ps_7ndb.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/t/alias.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
mysql-test/t/func_time.test:
  Auto merged
mysql-test/t/group_by.test:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/select.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
2005-06-27 13:12:10 +02:00
unknown
e3cfd4ef0c Manual merge
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-23 11:22:30 -07:00
unknown
d06446af84 sql_parse.cc:
Fix for fix for bug #9728
  Error caused server hang on prepared insert ... select


sql/sql_parse.cc:
  Fix for fix for bug #9728
  Error caused server hang on prepared insert ... select
2005-06-23 21:06:33 +04:00
unknown
a6c7fb455a Fix bug #9728 decreased functionality in "on duplicate key update"
Remove changes made by bug fix #8147. They strips list of insert_table_list to
only insert table, which results in error reported in bug #9728.
Added flag to Item to resolve ambigous fields reported in bug #8147.


sql/item.h:
  Fix bug#9728  decreased functionality in "on duplicate key update".
sql/item.cc:
  Fix bug#9728  decreased functionality in "on duplicate key update"
sql/sql_parse.cc:
  Fix bug#9728  decreased functionality in "on duplicate key update"
sql/sql_base.cc:
  Fix bug#9728  decreased functionality in "on duplicate key update".
sql/sql_yacc.yy:
  Fix bug#9728  decreased functionality in "on duplicate key update"
mysql-test/t/insert_select.test:
  Test case for bug#9728 Decreased functionality in "on duplicate key update".
mysql-test/r/insert_select.result:
  Test case for bug#9728 Decreased functionality in "on duplicate key update".
2005-06-22 07:18:42 +04:00
unknown
d785fc60ab BUG#10442 Minor changes from code review
mysql-test/r/rpl_multi_update3.result:
  Changes from code review
mysql-test/t/rpl_multi_update3.test:
  Changes from code review
sql/sql_parse.cc:
  Changes from code review
2005-06-21 15:40:58 -04:00
unknown
fc0c652c07 BUG#10466 Datatype "timestamp" displays "YYYYMMDDHHMMSS" irrespective of display sizes.
- Use buffer for printing error message 


sql/sql_parse.cc:
  Use buffer for string
2005-06-20 12:11:52 +02:00
unknown
d2b52d1933 bug#10466: Datatype "timestamp" displays "YYYYMMDDHHMMSS" irrespective of display sizes.
- Print warning that says display width is not supported for datatype TIMESTAMP, if user tries to create a TIMESTAMP column with display width.
 - Use display width for TIMESTAMP only in type_timestamp test to make sure warning is displayed correctly.


mysql-test/include/ps_create.inc:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/alias.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/func_date_add.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/func_str.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/func_time.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/group_by.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/innodb.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_1general.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_2myisam.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_3innodb.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_4heap.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_5merge.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_6bdb.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/ps_7ndb.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/select.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/r/type_timestamp.result:
  When display width is used for a TIMESTAMP column a warning is printed that the display width will be ignored.
mysql-test/r/update.result:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/alias.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/func_date_add.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/func_str.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/func_time.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/group_by.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/innodb.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/ps.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/ps_4heap.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/ps_5merge.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/select.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
mysql-test/t/update.test:
  Reove all uses of display width in for TIMESTAMP columns, except in the type_timestamp test.
sql/share/errmsg.txt:
  Correct swedish error message
sql/sql_parse.cc:
  Print warning if datatype is TIMESTAMP and display width is used.
2005-06-20 12:09:00 +02:00
unknown
63c21c07fc Rename all prepared statements COM_ commands to prefix with COM_STMT_
libmysql/libmysql.c:
  Rename.
libmysqld/lib_sql.cc:
  Rename.
sql/item_cmpfunc.cc:
  Use proper method to check for stmt prepare, only_prepare is removed.
sql/mysql_priv.h:
  Remove an obsolete define. Rename mysql_stmt_free to mysql_stmt_close.
sql/sql_class.h:
  Remove THD::only_prepare.
  Rename.
sql/sql_lex.cc:
  Rename COM_PREPARE -> COM_STMT_PREPARE
sql/sql_parse.cc:
  Rename.
sql/sql_prepare.cc:
  Rename.
sql/sql_yacc.yy:
  Rename.
tests/mysql_client_test.c:
  Rename.
2005-06-17 23:26:25 +04:00
unknown
98ff15531f BUG#10442 Fix replication slave crash when a query with multiupdate and
subselects is used.


sql/sql_parse.cc:
  BUG#10442 Fix crash on replication slave by making sure that table list
  is filled out before it is used.
2005-06-17 11:15:29 -04:00
unknown
db10586e80 Post-merge fixes. 2005-06-17 01:58:36 +04:00
unknown
574f6c8dcc Manual merge (4.1->5.0) 2005-06-17 00:34:35 +04:00
unknown
c0484a301f Fix Bug#9334 "PS API queries in log file" and
Bug#8367 "low log doesn't gives complete information about prepared 
statements"
Implement status variables for prepared statements commands (a port of
the patch by Andrey Hristov).
See details in comments to the changed files.
No test case as there is no way to test slow log/general log in 
mysqltest.


mysql-test/r/ps_grant.result:
  Now execute is logged with tag 'Execute' (changed result file).
sql/mysql_priv.h:
  - remove obsolete macro.
  - add declarations for new status variables.
  - export function log_slow_statement, which now is used in sql_prepare.cc
sql/mysqld.cc:
  Add status variables for prepared statements API: now we record
  mysql_stmt_close, mysql_stmt_reset, mysql_stmt_prepare, mysql_stmt_execute
  mysql_stmt_send_long_data, PREPARE, EXECUTE, DEALLOCATE.
sql/sql_parse.cc:
  - account DEALLOCATE prepare as a Com_stmt_close command (close of a
  prepared statement).
sql/sql_prepare.cc:
  - fix a bug in SQL syntax for prepared statements + logging:
    if we use --log and EXECUTE stmt USING @no_such_variable;, the
    server crashed because the old code assumed that the variable 
    returned by get_var_with_binlog is never NULL.
  - account statistics for 
    mysql_stmt_{prepare,execute,close,reset,send_long_data} in
    Com_stmt_{prepare,execute,close,reset,send_long_data} correspondingly.
  - log slow statements into the slow log early, when thd->query
    points to a valid (with expanded placeholder values) query.
    The previous version was logging it in sql_parse, when thd->query
    is empty. Prevent the server from logging the statement twice by 
    setting thd->enable_slow_log= FALSE.
  - now in case of EXECUTE stmt in SQL syntax for prepared statements the 
    general log gets two queries, e.g.
    Query    EXECUTE stmt USING @a, @b, @c
    Execute  INSERT INTO t1 VALUES (1, 2, 3)
    This makes the behavior consistent with PREPARE command, which
    also logs the statement twice.
2005-06-17 00:11:48 +04:00
unknown
51cd70da3d A fix for Bug#9141 "4.1 does not log into slow log
ALTER, OPTIMIZE and ANALYZE statements".
In 4.1 we disabled logging of slow admin statements. The fix adds an 
option to enable it back.
No test case (slow log is not tested in the test suite), but tested
manually.
+ post-review fixes (word police mainly).


sql/mysql_priv.h:
  - declaration for a new option
sql/mysqld.cc:
  Add server option '--log-slow-admin-statements' to log slow
  optimize/alter/etc statements to the slow log if it's enabled.
  Add warnings that this option works only if the slow log is open.
sql/sql_class.h:
  Rename 'thd->slow_command' to thd->enable_slow_log (negates
  the meaning of this variable, and so resolves the need to negate
  value opt_log_slow_admin_statements when setting it).
sql/sql_parse.cc:
  Implement optional logging of administrative statements in the slow log.
2005-06-16 23:05:38 +04:00
unknown
50260639aa Merge mysql.com:/home/bkroot/mysql-5.0 into mysql.com:/home/bk/mysql-5.0
BitKeeper/etc/logging_ok:
  auto-union
sql/sql_parse.cc:
  Auto merged
2005-06-13 11:13:06 +02:00
unknown
c6c49859b7 Manual merge
sql/mysql_priv.h:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-09 01:13:20 +04:00
unknown
4e0bbc1b6e Fix for bug #11158 "Can't perform multi-delete in stored procedure".
In order to make multi-delete SP friendly we need to have all table 
locks for the elements of main statement table list properly set 
at the end of parsing.

Also performed small cleanup: We don't need relink_tables_for_multidelete()
any longer since the only case now when TABLE_LIST::correspondent_table
is non-zero are tables in auxilary table list of multi-delete and these
tables are handled specially in mysql_multi_delete_prepare().


mysql-test/r/sp-threads.result:
  Added test case for bug #11158 "Can't perform multi-delete in stored
  procedure".
mysql-test/t/sp-threads.test:
  Added test case for bug #11158 "Can't perform multi-delete in stored
  procedure".
sql/mysql_priv.h:
  - Removed third argument from the declaration of multi_delete_precheck()
    as nowdays we calculate number of tables in multi-delete from which
    we are going to delete rows right at the end of statement parsing.
  - Introduced definition of multi_delete_set_locks_and_link_aux_tables()
    which is responsible for propagation of proper table locks from
    multi-delete's auxilary table list to the main list and binding
    corresponding tables in these two lists.
sql/sql_base.cc:
  Removed relink_tables_for_multidelete() routine and its invocations.
  We don't need them in 5.0 since the only case now when
  TABLE_LIST::correspondent_table is non-zero are tables in auxilary table
  list of multi-delete and these tables are handled specially in
  mysql_multi_delete_prepare().
sql/sql_lex.h:
  LEX::table_count
    Added description of new role of this LEX member for multi-delete. 
    Now for this statement we store number of tables from which we should
    delete records there.
sql/sql_parse.cc:
  multi_delete_precheck():
    Moved code which is responsible for iterating through auxilary table
    list and binding its elements with corresponding elements of main
    table list, and properly updating locks in it to separate function -
    multi_delete_set_locks_and_link_aux_tables(). This is because in order
    to make multi-delete SP friendly we need to have all locks set properly
    at the end of statement parsing. So we are introducing new function
    which will be called from parser.
    We also calculate number of tables from which we are going to perform
    deletions there and store this number for later usage in
    LEX::table_count.
    Also removed some no longer needed code.
sql/sql_prepare.cc:
  mysql_test_multidelete():
    Now multi_delete_precheck() takes only two arguments, so we don't
    need to pass fake third parameter.
sql/sql_yacc.yy:
  delete:
    In order to make multi-delete SP friendly we need to have all table 
    locks for the elements of main statement table list properly set 
    at the end of parsing.
2005-06-09 01:07:52 +04:00
unknown
936688feb5 A followup patch for Bug#7306 (limit in prepared statements):
don't evaluate subqueries during statement prepare, even if they
are not correlated.
With post-review fixes.


sql/mysql_priv.h:
  Add UNCACHEABLE_PREPARE to mark subqueries as non-constant in 
  mysql_stmt_prepare
sql/sql_lex.cc:
  Add a missing assert: noone can call unit::set_limit from 
  mysql_stmt_prepare.
sql/sql_lex.h:
  Comment fixed.
sql/sql_parse.cc:
  Mark new SELECT_LEXes as uncacheable if they created during 
  statement prepare.
sql/sql_prepare.cc:
  Switch off the uncacheable flag when prepare is done.
2005-06-08 00:34:53 +04:00
unknown
ed5b5420dc Merge mysql.com:/home/bkroot/mysql-5.0 into mysql.com:/home/bk/mysql-5.0
mysql-test/r/sp_trans.result:
  Auto merged
mysql-test/t/sp_trans.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-06-07 16:48:38 +02:00
unknown
e77314572d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/opt/local/work/mysql-5.0-7306-final


sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-07 16:28:08 +04:00
unknown
06a948c36b Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/dlenev/src/mysql-5.0-bg10015


sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-07 14:54:48 +04:00
unknown
49357ae8f0 Fix for bug #10015 "Crash in InnoDB if stored routines are used".
We should not allow explicit or implicit transaction commits inside
of stored functions or triggers (so in autocommit mode we should not
do commits after execution of sub-statement).
Also since we don't support nested statement transactions in 5.0,
we shouldn't commit or rollback stmt transactions while we are inside
stored functions or triggers. This should be fixed in later (>=5.1)
releases.


mysql-test/r/sp_trans.result:
  Added test for bug #10015 "Crash in InnoDB if stored routines are used"
  and for general transaction handling inside of functions.
mysql-test/t/sp_trans.test:
  Added test for bug #10015 "Crash in InnoDB if stored routines are used"
  and for general transaction handling inside of functions.
sql/handler.cc:
  ha_trans_commit()/ha_trans_rollback():
    Since we don't support nested statement transactions in 5.0,
    we can't commit or rollback stmt transactions while we are inside
    stored functions or triggers. So we simply do nothing now.
    This should be fixed in later ( >= 5.1) releases.
sql/item_func.cc:
  Item_func_sp::execute():
    Set THD::transaction.in_sub_stmt flag to TRUE during stored function
    execution to prevent commits and rollbacks for statement level
    transactions, since doing them will ruin such transaction for
    stateemtn which calls this function.
sql/share/errmsg.txt:
  Added error message which says that statements doing explicit or implicit
  commits are disallowed in triggers and stored functions.
sql/sql_base.cc:
  close_thread_tables():
    Clarified comment about committing of statement transactions in
    prelocked mode.
sql/sql_class.h:
  THD::transaction:
    Added in_sub_stmt method which indicates that we are executing
    statements from trigger or stored function now, and thus
    statement transaction belongs to statement which invoked this
    routine and we should not commit or rollback it while executing
    these sub-statements.
sql/sql_parse.cc:
  end_active_trans()/begin_trans()/end_trans():
    We should not commit or rollback global (non-stmt) transaction
    if we are executing stored function or trigger. These checks will
    catch situation when we are trying to do commit or rollback in stored
    procedure which is called from function or trigger.
sql/sql_trigger.h:
  Table_triggers_list::process_triggers():
    Set THD::transaction.in_sub_stmt flag to TRUE during trigger
    execution to prevent commits and rollbacks for statement level
    transactions, since doing them will ruin such transaction for
    stateemtn which invokes this trigger.
sql/sql_yacc.yy:
  Prohibited usage of statements which do explicit or implicit commit or
  rollback inside of stored functions and triggers.
2005-06-07 14:53:08 +04:00
unknown
edb38786c9 Manual merge.
sql/item.h:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
2005-06-07 14:50:45 +04:00
unknown
c3c199938d Merge b6883-mysql-4.1 -> 5.0
BitKeeper/etc/ignore:
  auto-union
BitKeeper/etc/logging_ok:
  auto-union
myisam/mi_key.c:
  Auto merged
mysql-test/r/ctype_utf8.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/r/innodb.result:
  Manual merge
sql/sql_parse.cc:
  Manual merge
2005-06-07 12:30:32 +02:00
unknown
5188f031ae Patch two (the final one) for Bug#7306 "the server side preparedStatement
error for LIMIT placeholder".
The patch adds grammar support for LIMIT ?, ? and changes the
type of ST_SELECT_LEX::select_limit,offset_limit from ha_rows to Item*,
so that it can point to Item_param.


mysql-test/include/ps_modify.inc:
  Fix existing tests: now LIMIT can contain placeholders.
mysql-test/include/ps_query.inc:
  Fix existing tests: now LIMIT can contain placeholders.
mysql-test/r/ps.result:
  Add basic test coverage for LIMIT ?, ? and fix test results.
mysql-test/r/ps_2myisam.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_3innodb.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_4heap.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_5merge.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_6bdb.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/r/ps_7ndb.result:
  Fix test results: now LIMIT can contain placeholders.
mysql-test/t/ps.test:
  Add basic test coverage for LIMIT ?, ?.
sql/item.h:
  Add a short-cut for (ulonglong) val_int() to Item.
  Add a constructor to Item_int() that accepts ulonglong.
  Simplify Item_uint constructor by using the c-tor above.
sql/item_subselect.cc:
  Now select_limit has type Item *.
  We can safely create an Item in Item_exists_subselect::fix_length_and_dec():
  it will be allocated in runtime memory root and freed in the end of
  execution.
sql/sp_head.cc:
  Add a special initalization state for stored procedures to 
  be able to easily distinguish the first execution of a stored procedure
  from prepared statement prepare.
sql/sql_class.h:
  Introduce new state 'INITIALIZED_FOR_SP' to be able to easily distinguish
  the first execution of a stored procedure from prepared statement prepare.
sql/sql_derived.cc:
  - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
    evreryplace. Add a warning about use of set_limit in 
  mysql_derived_filling.
sql/sql_error.cc:
  - use unit->set_limit() to set unit->select_limit_cnt, offset_limit_cnt
    evreryplace.
  - this change is also aware of bug#11095 "show warnings limit 0 returns 
  all rows instead of zero rows", so the one who merges the bugfix from
  4.1 can use local version of sql_error.cc.
sql/sql_handler.cc:
  - use unit->set_limit() to initalize 
  unit->select_limit_cnt,offset_limit_cnt everyplace.
sql/sql_lex.cc:
  Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_lex.h:
  Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_parse.cc:
  - use unit->set_limit() to initalize 
  unit->select_limit_cnt,offset_limit_cnt everyplace. 
  - we can create an Item_int to set global limit of a statement:
  it will be created in the runtime mem root and freed in the end of
  execution.
sql/sql_repl.cc:
  Use unit->set_limit to initialize limits.
sql/sql_select.cc:
  - select_limit is now Item* so the proper way to check for default value
  is to compare it with NULL.
sql/sql_union.cc:
  Evaluate offset_limit_cnt using the new type of ST_SELECT_LEX::offset_limit
sql/sql_view.cc:
  Now ST_SELECT_LEX::select_limit, offset_limit have type Item *
sql/sql_yacc.yy:
  Add grammar support for LIMIT ?, ? clause.
2005-06-07 14:11:36 +04:00
unknown
6dc86a20c1 Merge mysql.com:/home/bkroot/mysql-4.1
into mysql.com:/home/bk/b6883-mysql-4.1


mysql-test/r/innodb.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
2005-06-07 11:54:31 +02:00
unknown
f337dd79b9 BUG#6883: Changed comment, style
sql/sql_parse.cc:
  Changed comment, style
2005-06-07 11:47:59 +02:00
unknown
e90b64cda4 After merge fixes
mysql-test/r/innodb.result:
  Update results
mysql-test/r/warnings.result:
  Update results
sql/item.cc:
  Simple optimization
sql/item_func.cc:
  After merge fix
sql/item_sum.cc:
  Fixes for group_concat and rollup (From Ramil)
sql/sql_parse.cc:
  Remove compiler warning
sql/sql_select.cc:
  Fixed problem with rollup
2005-06-07 05:43:59 +03:00
unknown
bd47a7df59 Merge with 4.1
BitKeeper/etc/logging_ok:
  auto-union
client/sql_string.cc:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/olap.result:
  Auto merged
mysql-test/r/warnings.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/warnings.test:
  Auto merged
mysys/raid.cc:
  Auto merged
scripts/make_binary_distribution.sh:
  Auto merged
sql/field.cc:
  Auto merged
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
sql/ha_berkeley.cc:
  Auto merged
sql/ha_blackhole.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_geofunc.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/tztime.cc:
  Auto merged
strings/ctype-win1250ch.c:
  Auto merged
mysql-test/r/func_gconcat.result:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/r/innodb.result:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/func_gconcat.test:
  merge & ensure that 4.1 and 5.0 source have tests in same order
mysql-test/t/innodb.test:
  merge & ensure that 4.1 and 5.0 source have tests in same order
sql/item_func.cc:
  merge
sql/mysqld.cc:
  merge
sql/opt_range.cc:
  merge
sql/sql_parse.cc:
  merge
  Give better name to goto labels
sql/sql_select.cc:
  merge
2005-06-07 00:31:53 +03:00
unknown
4eb26350cb merge
client/mysql.cc:
  Auto merged
libmysql/libmysql.c:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_bitmap.h:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
2005-06-05 17:19:50 +03:00
unknown
b08b3a1555 Cleanup during review
Simple optimization for 2 argument usage to function of variable arguments
Fix stack overrun when using 1+1+1+1+1+1+1+....
Update crash-me results for 5.0
Don't call post_open if pre_open() fails (optimization)



sql-bench/limits/mysql-4.1.cfg:
  Rename: sql-bench/limits/mysql.cfg -> sql-bench/limits/mysql-4.1.cfg
libmysql/libmysql.c:
  More portable define
mysql-test/mysql-test-run.sh:
  Write also InnoDB warnings to warnings.log
mysql-test/t/type_newdecimal.test:
  Don't get errors if innodb is not defined
mysys/my_alloc.c:
  Cleanup comments
mysys/thr_lock.c:
  Cleanup comments
sql/item.h:
  Remove not needed initializer
sql/item_func.cc:
  Simple optimization for 2 argument usage to function of variable arguments
sql/mysql_priv.h:
  We use more stackspace with the introduction of int_op() etc.
  This change ensures we don't run out of stack when doing 1+1+1+1...
  (Tested on x86, 32 bit)
sql/sp_head.cc:
  Don't call post_open if pre_open() fails
sql/sp_rcontext.cc:
  More comments
  Change so that post_open() doesn't have to be called if pre_open() fails
sql/sql_parse.cc:
  Fold long lines
sql/sql_select.cc:
  Simple reorganization to reduce number of if's
  Ensure that table_map is updated for where clause (fixed warning from valgrind)
2005-06-05 17:01:20 +03:00
unknown
74f3014cf7 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-06-03 01:16:29 +03:00
unknown
1b99948246 Removed duplicated and wrong merged code
sql/sql_base.cc:
  Fixed wrong comment
2005-06-03 01:15:56 +03:00
unknown
892032a2c2 Give Item_arena::is_stmt_prepare a more descriptive name (it marks
the code that is active for SP as well in 5.0)


sql/item.cc:
  Rename of an Item_arena method.
sql/item_subselect.cc:
  Rename of an Item_arena method.
sql/sql_class.h:
  Rename of an Item_arena method.
sql/sql_parse.cc:
  Rename of an Item_arena method.
sql/sql_union.cc:
  Rename of an Item_arena method.
2005-06-03 00:02:47 +04:00
unknown
f629af609b Merge of 4.1->5.0. This contained the fixes for GCC 4.0
BitKeeper/deleted/.del-ha_isam.cc~4dce65904db2675e:
  Auto merged
BitKeeper/deleted/.del-ha_isammrg.cc~dc682e4755d77a2e:
  Auto merged
client/mysqladmin.cc:
  Auto merged
client/sql_string.cc:
  Auto merged
mysys/raid.cc:
  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/log_event.cc:
  Auto merged
sql/opt_range.h:
  Auto merged
sql/procedure.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_map.cc:
  Auto merged
sql/sql_olap.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/tztime.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Merge fix
sql/mysqld.cc:
  Hand merge
sql/opt_range.cc:
  Hand Merge
sql/sql_acl.cc:
  Hand Merge
2005-06-01 21:56:30 -07:00
unknown
e2bf6b04a6 Merge
sql/ha_heap.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/examples/ha_archive.cc:
  Auto merged
sql/examples/ha_example.cc:
  Auto merged
sql/examples/ha_tina.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_repl.cc:
  SCCS merged
2005-06-01 18:48:29 -07:00
unknown
0218ecf7af Mainly cleanups for gcc 4.0. Some small pieces from looking at -Wall. Removed a number of dumb things in ha_tina.
client/mysqladmin.cc:
  gcc 4.0 fix
sql/examples/ha_archive.cc:
  Bunch of little cleanups from -Wall and gcc 4.0 fixes
sql/examples/ha_example.cc:
  Noticed that the error call was not quite right.
sql/examples/ha_tina.cc:
  Bunch of cleanups (many of which were quite dumb of me... and I have no earthly idea how they missed everyone's notice).
sql/ha_heap.cc:
  Removed unused variable (-Wall find)
sql/item_subselect.cc:
  Removed unused label.
sql/mysqld.cc:
  Cleanup of unused function and gcc 4.0 bit.
sql/opt_range.h:
  Cleanup for gcc 4.0
sql/repl_failsafe.cc:
  Cleanup for gcc 4.0
sql/slave.cc:
  Cleanup for gcc 4.0
sql/sql_acl.cc:
  Cleanup for gcc 4.0
sql/sql_insert.cc:
  Cleanedup for gcc 4.0
sql/sql_parse.cc:
  Cleanedup for gcc 4.0
sql/sql_repl.cc:
  Removed unused variable
sql/sql_select.cc:
  Cleanedup for gcc 4.0
2005-06-01 17:34:10 -07: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
388d9df13e Bug#10224 - ANALYZE TABLE crashing with simultaneous CREATE ... SELECT statement.
After merge fixes.
2005-06-01 13:22:17 +02:00