Commit graph

26 commits

Author SHA1 Message Date
unknown
4c197d99a1 Now when we create or drop trigger we will open only subject table and not
all tables suggested by prelocking algorithm.
Added test for bug #11889 "Server crashes when dropping trigger using stored
routine" (which was fixed by previous patch).


mysql-test/r/trigger.result:
  Since we are using open_ltable() now to open table for trigger creation, code
  for error when we try to create trigger on view has changed to equivalent one.
  Added test for bug #11889 "Server crashes when dropping trigger using stored
  routine".
mysql-test/t/trigger.test:
  Since we are using open_ltable() now to open table for trigger creation, code
  for error when we try to create trigger on view has changed to equivalent one.
  Added test for bug #11889 "Server crashes when dropping trigger using stored
  routine".
sql/sql_trigger.cc:
  mysql_create_or_drop_trigger():
    It is better to open only table for which we are going to create or drop
    trigger with open_ltable() since we don't really need working prelocking
    in this case.
2005-07-13 23:51:09 +04:00
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
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
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
dc41e6e001 Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-5.0
into quadita2.mysql.com:/nfstmp1/guilhem/mysql-5.0-4ita


sql/sql_trigger.cc:
  Auto merged
2005-05-07 17:26:01 +02:00
unknown
6f83de163b Dmitri please review. Fix for BUG#10417 "CREATE TRIGGER not written to binlog":
writing DROP and CREATE TRIGGER to binlog, disabling binlogging
of substatements, testing.


mysql-test/r/rpl_sp.result:
  result update
mysql-test/t/rpl_sp.test:
  removing useless lines, plus testing replication of triggers
sql/sql_trigger.cc:
  trigger can be used to destroy slave, so only SUPER can create it by default.
  If create|drop goes ok, binlog CREATE TRIGGER and DROP TRIGGER.
sql/sql_trigger.h:
  disable binlogging of substatements of triggers (even if now triggers
  can't do updates)
2005-05-06 18:52:19 +02:00
unknown
ab54e16705 Fixes while reviewing new code
Added option --count to mysqlshow (to show number of rows)
Fixed possible core dump in information schema


client/client_priv.h:
  --count for mysqlshow
client/mysqlshow.c:
  Added option --count to be used when the user want's number of rows per table in the output
  (We shouldn't use count(*) as default as this can be a slow operation)
mysys/my_thr_init.c:
  Correct comment
sql/ha_berkeley.cc:
  Remove not used variable
sql/ha_berkeley.h:
  Remove not used variable
sql/ha_innodb.cc:
  Remove not used function
sql/ha_ndbcluster.cc:
  false -> FALSE
  true -> TRUE
sql/handler.cc:
  Added and fixed comments
  Remove 'strange' code to remove compiler warnings (better to do things like this with attribute)
sql/item.cc:
  false -> FALSE
sql/item_cmpfunc.cc:
  Fixed indentation
sql/item_cmpfunc.h:
  marked BETWEEN as a bool function
sql/item_func.cc:
  Simple optimzation
sql/key.cc:
  Removed wrong code
sql/log.cc:
  Check result from open_index_file()
sql/mysql_priv.h:
  Simplyfy some test of netware
sql/mysqld.cc:
  Fixed indentation
  Check result form open_index_file()
  Simplify code with IF_NETWARE()
sql/opt_range.cc:
  false -> FALSE
  true -> TRUE
  Fixed indentation
sql/opt_sum.cc:
  Fixed comments
sql/sp_head.cc:
  Simple optimzation
  Move variable declarations to begining of blocks
sql/sql_acl.cc:
  Fix long lines
  Rename xx -> column
  Move declaration to beginning of block
sql/sql_parse.cc:
  Removed comment
sql/sql_select.cc:
  Indentation fixes
sql/sql_show.cc:
  Fixed reference outside of array (possible core dump)
sql/sql_table.cc:
  Simplify code
  Combine common code
sql/sql_test.cc:
  false -> FALSE
sql/sql_trigger.cc:
  false -> false
  true -> TRUE
sql/sql_yacc.yy:
  Simpler test
sql/unireg.cc:
  Added comment
2005-05-06 11:39:30 +03:00
unknown
2c5d427c87 Fix for bugs #5859 "DROP TABLE does not drop triggers" and
#6559 "DROP DATABASE forgets to drop triggers".

If we drop table we should also drop all triggers associated with it.
To do this we have to check for existence of .TRG file when we are 
dropping table and delete it too.


mysql-test/r/trigger.result:
  Added tests for bugs #5859 "DROP TABLE does not drop triggers"
  and #6559 "DROP DATABASE forgets to drop triggers".
mysql-test/t/trigger.test:
  Added tests for bugs #5859 "DROP TABLE does not drop triggers"
  and #6559 "DROP DATABASE forgets to drop triggers".
sql/handler.cc:
  Added .TRG to the list of known extensions of files associated with 
  tables.
sql/mysql_priv.h:
  Added declaration of constant holding extension for trigger files.
sql/sql_table.cc:
  mysql_rm_table_part2():
    If we drop table we should also drop all triggers associated with it.
    To do this we have to check for existence of .TRG file and delete it
    (until the moment when we will store trigger definitions in the same
     .FRM file as table description).
sql/sql_trigger.cc:
  Made constant holding extension for trigger files externally visible.
2005-03-27 16:15:21 +04:00
unknown
e3bc9d82e6 Fix for yet another memleak caused by SP-locking patch.
Improved handling of situations when we encounter error during
CREATE PROCEDURE (FUNCTION/TRIGGER/...) and bail out of yyparse()
without restoring proper THD::lex.


sql/sp.cc:
  We do not need to call sp_head::restore_lex() explicitly to restore right
  value of THD::lex in case when we have encountered error during parsing.
  Now we do this in sp_head::~sp_head() instead.
sql/sp_head.cc:
  sp_head::destroy():
   Fixed cleaning up of stack of auxilary LEXes. 
   We also restore right value of THD::lex during this process now.
sql/sql_parse.cc:
  We do not need to call sp_head::restore_lex() explicitly to restore right
  value of THD::lex in case when we have encountered error during parsing.
  Now we do this in sp_head::~sp_head() instead.
sql/sql_prepare.cc:
  We do not need to call sp_head::restore_lex() explicitly to restore right
  value of THD::lex in case when we have encountered error during parsing.
  Now we do this in sp_head::~sp_head() instead.
sql/sql_trigger.cc:
  We do not need to call sp_head::restore_lex() explicitly to restore right
  value of THD::lex in case when we have encountered error during parsing.
  Now we do this in sp_head::~sp_head() instead.
2005-03-05 16:31:58 +03:00
unknown
2d8b51991c manually merged
client/mysqlbinlog.cc:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
include/my_pthread.h:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
mysql-test/include/varchar.inc:
  Auto merged
mysql-test/r/bdb.result:
  Auto merged
mysql-test/r/myisam.result:
  Auto merged
mysql-test/r/mysqlbinlog2.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/user_var.test:
  Auto merged
mysys/hash.c:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/set_var.h:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_repl.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_trigger.cc:
  Auto merged
mysql-test/r/ctype_ucs.result:
  ul
mysql-test/r/drop_temp_table.result:
  ul
mysql-test/r/innodb.result:
  ul
mysql-test/r/insert_select.result:
  ul
mysql-test/r/mix_innodb_myisam_binlog.result:
  ul
mysql-test/r/rpl_change_master.result:
  ul
mysql-test/r/rpl_charset.result:
  ul
mysql-test/r/rpl_error_ignored_table.result:
  ul
mysql-test/r/rpl_flush_log_loop.result:
  ul
mysql-test/r/rpl_flush_tables.result:
  ul
mysql-test/r/rpl_loaddata.result:
  ul
mysql-test/r/rpl_loaddata_rule_m.result:
  ul
mysql-test/r/rpl_log.result:
  ul
mysql-test/r/rpl_max_relay_size.result:
  ul
mysql-test/r/rpl_relayrotate.result:
  ul
mysql-test/r/rpl_replicate_do.result:
  ul
mysql-test/r/rpl_rotate_logs.result:
  ul
mysql-test/r/rpl_temporary.result:
  ul
mysql-test/r/rpl_timezone.result:
  ul
mysql-test/r/rpl_until.result:
  ul
mysql-test/r/rpl_user_variables.result:
  ul
mysql-test/r/user_var.result:
  ul
2005-02-14 21:50:09 +01:00
unknown
91db48e35a Precision Math implementation
BitKeeper/etc/ignore:
  Added client/decimal.c client/my_decimal.cc client/my_decimal.h to the ignore list
2005-02-09 02:50:45 +04:00
unknown
88bd301d36 XA (not completely polished out yet)
include/my_pthread.h:
  cleanup. don't use gcc extensions
innobase/include/trx0sys.ic:
  Jan's fix for innobase_xa_prepare
innobase/read/read0read.c:
  Jan's fix for innobase_xa_prepare
innobase/trx/trx0trx.c:
  Jan's fix for innobase_xa_prepare
mysql-test/include/varchar.inc:
  test fix
mysql-test/r/ctype_ucs.result:
  new log event - all binlog positions are changed :(
mysql-test/r/drop_temp_table.result:
  new log event - all binlog positions are changed :(
mysql-test/r/insert_select.result:
  new log event - all binlog positions are changed :(
mysql-test/r/mix_innodb_myisam_binlog.result:
  new log event - all binlog positions are changed :(
mysql-test/r/myisam.result:
  test fix
mysql-test/r/rpl000015.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_change_master.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_charset.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_error_ignored_table.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_flush_log_loop.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_flush_tables.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_loaddata.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_loaddata_rule_m.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_loaddata_rule_s.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_log.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_log_pos.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_max_relay_size.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_relayrotate.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_replicate_do.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_reset_slave.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_rotate_logs.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_server_id1.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_server_id2.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_temporary.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_timezone.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_until.result:
  new log event - all binlog positions are changed :(
mysql-test/r/rpl_user_variables.result:
  new log event - all binlog positions are changed :(
mysql-test/r/user_var.result:
  new log event - all binlog positions are changed :(
mysql-test/t/ctype_ucs.test:
  new log event - all binlog positions are changed :(
mysql-test/t/mix_innodb_myisam_binlog.test:
  new log event - all binlog positions are changed :(
mysql-test/t/mysqlbinlog.test:
  new log event - all binlog positions are changed :(
mysql-test/t/mysqlbinlog2.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_charset.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_error_ignored_table.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_loaddata_rule_m.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_loaddata_rule_s.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_log.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_log_pos.test:
  new log event - all binlog positions are changed :(
mysql-test/t/rpl_user_variables.test:
  new log event - all binlog positions are changed :(
mysql-test/t/user_var.test:
  new log event - all binlog positions are changed :(
mysys/hash.c:
  typo fixed
sql/ha_berkeley.cc:
  handlerton framework
sql/ha_berkeley.h:
  handlerton framework
sql/ha_innodb.cc:
  handlerton framework
sql/ha_innodb.h:
  handlerton framework
sql/handler.cc:
  new transaction handling, handlerton framework, two-phase commit, XA support
sql/handler.h:
  new transaction handling, handlerton framework, two-phase commit, XA support
sql/lex.h:
  XA commands
sql/log.cc:
  new transaction handling, handlerton framework, two-phase commit,
  XA support, tc-logging, TC_LOG_MMAP class
sql/log_event.cc:
  Xid_log_event
sql/log_event.h:
  Xid_log_event, LOG_EVENT_BINLOG_CLOSED_F flag
sql/mysql_priv.h:
  wrapper for query_id++
sql/mysqld.cc:
  new command-line options --log-tc, --log-tc-size, --tc-heuristic-recover,
  new status variables Tc_log_page_size, Tc_log_max_pages_used, Tc_log_page_waits.
  init/stop tc logging
sql/set_var.h:
  warning fixed
sql/share/errmsg.txt:
  XA error messages
sql/sp_head.cc:
  s/query_id++/next_query_id()/
sql/sql_base.cc:
  typo fixed. new transaction handling.
sql/sql_class.cc:
  cleanup of THD.transaction
sql/sql_class.h:
  TC_LOG classes, new status variables, new savepoint handling, XA support
sql/sql_insert.cc:
  comments
sql/sql_lex.cc:
  s/found_colon/found_semicolon/
sql/sql_lex.h:
  SQLCOM_XA_xxx, XA related changes in Lex
sql/sql_parse.cc:
  cleanup, XA commands, new savepoint handling
sql/sql_repl.cc:
  two functions moved to log.cc
sql/sql_repl.h:
  two functions moved to log.cc
sql/sql_trigger.cc:
  s/lex.name_and_length/lex.ident/
sql/sql_yacc.yy:
  XA commands, cleanup
2005-01-16 13:16:23 +01:00
unknown
acf76e3b88 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name


include/myisam.h:
  Added const before names
mysql-test/r/group_min_max.result:
  Make results repeatable
mysql-test/t/group_min_max.test:
  Make results repeatable
sql/field.cc:
  Created Field::make_field() and made Field_num::make_field() to call this
  Use TABLE_SHARE
  Use sql_strmake() instead of sql_memdup() to simplify code
sql/field.h:
  Changed table_name to be pointer to table_name. This allows us to change alias for all fields by just changing one pointer.
  Use TABLE_SHARE
sql/field_conv.cc:
  Use TABLE_SHARE
sql/filesort.cc:
  Use TABLE_SHARE
sql/ha_berkeley.cc:
  Use TABLE_SHARE
sql/ha_heap.cc:
  Use TABLE_SHARE
sql/ha_innodb.cc:
  Use TABLE_SHARE
sql/ha_myisam.cc:
  Use TABLE_SHARE
sql/ha_myisammrg.cc:
  Use TABLE_SHARE
  Change some pointer handling to use const char*
sql/ha_ndbcluster.cc:
  Use TABLE_SHARE
sql/handler.cc:
  Use TABLE_SHARE
sql/item.cc:
  Use TABLE_SHARE
sql/item_func.cc:
  Use TABLE_SHARE
sql/item_subselect.cc:
  Use TABLE_SHARE
sql/item_sum.cc:
  Use TABLE_SHARE
sql/key.cc:
  Use TABLE_SHARE
sql/lock.cc:
  Use TABLE_SHARE
sql/log_event.cc:
  real_name -> table_name
sql/mysql_priv.h:
  Use TABLE_SHARE
sql/opt_range.cc:
  Use TABLE_SHARE
sql/opt_sum.cc:
  Use TABLE_SHARE
sql/records.cc:
  Use TABLE_SHARE
sql/repl_failsafe.cc:
  real_name -> table_name
sql/slave.cc:
  Use TABLE_SHARE
sql/sp.cc:
  Use TABLE_SHARE
sql/sp_head.cc:
  real_name -> table_name
sql/sql_acl.cc:
  Use TABLE_SHARE
  removed unnecessary assert
  fixed indentation
  changed some char * -> const char*
sql/sql_acl.h:
  changed some char* -> const char*
sql/sql_base.cc:
  Use TABLE_SHARE
sql/sql_cache.cc:
  Use TABLE_SHARE
sql/sql_class.cc:
  Use TABLE_SHARE
sql/sql_db.cc:
  real_name -> table_name
sql/sql_delete.cc:
  Use TABLE_SHARE
sql/sql_derived.cc:
  Use TABLE_SHARE
sql/sql_handler.cc:
  Use TABLE_SHARE
sql/sql_help.cc:
  Use TABLE_SHARE
sql/sql_insert.cc:
  Use TABLE_SHARE
sql/sql_load.cc:
  Use TABLE_SHARE
sql/sql_parse.cc:
  Use TABLE_SHARE
sql/sql_rename.cc:
  real_name -> table_name
sql/sql_select.cc:
  Use TABLE_SHARE
  table->blob_fields now points to field offsets, not fields
  tmp_table->table_name now points to alias name
sql/sql_show.cc:
  Use TABLE_SHARE
sql/sql_table.cc:
  Use TABLE_SHARE
sql/sql_test.cc:
  Use TABLE_SHARE
sql/sql_trigger.cc:
  Use TABLE_SHARE
sql/sql_udf.cc:
  Use TABLE_SHARE
sql/sql_union.cc:
  real_name -> table_name
sql/sql_update.cc:
  Use TABLE_SHARE
sql/sql_view.cc:
  Use TABLE_SHARE
sql/table.cc:
  Split TABLE to TABLE and TABLE_SHARE
  Changed blob_field to be field offsets instead of pointer to fields
  Only initialize table->s->default_values with default record (not all table->record[#])
  Some indentation changes
sql/table.h:
  Split TABLE to TABLE and TABLE_SHARE
sql/tztime.cc:
  real_name -> table_name
sql/unireg.cc:
  Use TABLE_SHARE
sql/unireg.h:
  Use TABLE_SHARE
2005-01-06 13:00:13 +02:00
unknown
2e8d13c73e After merge fixes
config/ac-macros/character_sets.m4:
  Added latin1_spanish_ci
dbug/dbug_analyze.c:
  Remove compiler warnings
include/my_handler.h:
  Reorder structure arguments to be more optimal
innobase/dict/dict0load.c:
  Fixed wrong define tag (for MySQL 5.0)
innobase/fil/fil0fil.c:
  Fixed compiler warning
innobase/os/os0file.c:
  Fixed compiler warning
myisam/ft_boolean_search.c:
  Fixed compiler warning
myisam/ft_static.c:
  Update to use new HA_KEYSEG structure
myisam/mi_open.c:
  Simple optimization
myisammrg/myrg_static.c:
  Removed compiler warning
mysql-test/r/grant.result:
  Update results after merge
mysql-test/r/index_merge.result:
  Update results after merge
mysql-test/r/information_schema_inno.result:
  Add missing drop table
mysql-test/r/lowercase_table.result:
  safety fix
mysql-test/r/multi_update.result:
  safety fix
mysql-test/r/ps_1general.result:
  safety fix
mysql-test/r/ps_2myisam.result:
  Update results after merge
  (set is not anymore of binary type)
mysql-test/r/ps_3innodb.result:
  Update results after merge
mysql-test/r/ps_4heap.result:
  Update results after merge
mysql-test/r/ps_5merge.result:
  Update results after merge
mysql-test/r/ps_6bdb.result:
  Update results after merge
mysql-test/r/show_check.result:
  Update results after merge
mysql-test/r/subselect.result:
  Update results after merge
  (added missing quotes)
mysql-test/r/timezone2.result:
  Update results after merge
mysql-test/r/view.result:
  Update results after merge
  (note that INSERT IGNORE will work again after next merge from 4.1)
mysql-test/t/derived.test:
  Removed empty line
mysql-test/t/grant.test:
  Update results after merge
mysql-test/t/information_schema_inno.test:
  added missing drop table
mysql-test/t/lowercase_table.test:
  safety fix
mysql-test/t/multi_update.test:
  safety fix
mysql-test/t/ps_1general.test:
  safety fix
mysql-test/t/view.test:
  update error codes after merge
ndb/src/mgmsrv/main.cpp:
  after merge fix
ndb/tools/ndb_test_platform.cpp:
  removed compiler warnings
regex/main.c:
  remove compiler warnings
sql/field.cc:
  Remove compiler warning
sql/gen_lex_hash.cc:
  Added DBUG support
sql/ha_myisam.cc:
  Removed warning from valgrind
sql/ha_ndbcluster.cc:
  Remove compiler warning
sql/item_cmpfunc.cc:
  Better to use val_int() instead of val_real() as we don't want Item_func_nop_all to return different value than the original ref element
sql/mysqld.cc:
  Remove compiler warning
sql/sql_acl.cc:
  More debugging
sql/sql_lex.cc:
  Remove unnecessary 'else'
sql/sql_parse.cc:
  After merge fixes
  Simplify reset of thd->server_status for SQLCOM_CALL
sql/sql_prepare.cc:
  After merge fixes
  Removed possible core dump in mysql_stmt_fetch()
sql/sql_update.cc:
  After merge fixes (together with Sanja)
strings/ctype-czech.c:
  Remove compiler warning
strings/ctype-ucs2.c:
  Remove compiler warning
strings/ctype-win1250ch.c:
  Remove compiler warning
strings/xml.c:
  Remove compiler warning
tests/client_test.c:
  Fix test to work with 5.0
vio/test-sslserver.c:
  Portability fix
2004-12-31 00:44:00 +02:00
unknown
c3da2d12f7 Fix for bug #5888 "Triggers with nonexistent columns cause packets
out of order". (final version)

Now instead of binding Item_trigger_field to TABLE objects during
trigger definition parsing at table open, we perform pass through
special list of all such objects in trigger. This allows easily check
all references to fields in old/new version of row in trigger during
execution of CREATE TRIGGER statement (this is more courtesy for users
since we can't check everything anyway).
We also report that such reference is bad by returning error from
Item_trigger_field::fix_fields() method (instead of setup_field())
This means that if trigger is broken we will bark during trigger
execution instead of trigger definition parsing at table open.
(i.e. now we allow to open tables with broken triggers).


mysql-test/r/trigger.result:
  Added test which attempts to create trigger for table referencing to
  field which does not exist in this table.
mysql-test/t/trigger.test:
  Added test which attempts to create trigger for table referencing to
  field which does not exist in this table.
sql/item.cc:
  Item_trigger_field::setup_field() now returns void. If any error
  will occur we will report it at fix_fields() stage.
sql/item.h:
  Item_trigger_field:
  - Added next_trg_field member for linking all such objects in trigger
    in one list.
  - Also setup_field() now returns void. If any error will occur we will
    report it at fix_fields() stage.
sql/mysql_priv.h:
  Added SQL_LIST::push_back() method which allows to add another SQL_LIST
  to the end of this SQL_LIST.
sql/sp_head.cc:
  sp_head::init()/reset_lex()/restore_lex():
   In order to fill global LEX::trg_table_fields (list of all 
   Item_trigger_field objects for trigger) we should init the same list
   in LEX of substatement before its parsing and merge it to global list
   after parsing.
sql/sp_head.h:
  sp_instr_trigger_field:
    Made trigger_field member public to be able to add it more easily to
    global list of all Item_trigger_field objects in trigger.
sql/sql_lex.cc:
  LEX::trg_table was removed.
sql/sql_lex.h:
  Now we are binding Item_trigger_field's to TABLE object by passing
  through specially constructed list of all such objects in this trigger
  instead of doing this during trigger definition parsing at table open.
  So we no longer need LEX::trg_table, we use LEX::trg_table_fields list
  instead.
sql/sql_parse.cc:
  mysql_execute_command():
    Since now we use trigger body for some checks in
    mysql_create_or_drop_trigger() we should destroy it only
    after calling this function.
sql/sql_trigger.cc:
  Now instead of binding Item_trigger_field to TABLE objects during
  trigger definition parsing at table open, we perform pass through
  special list of all such objects in trigger. This allows easily check
  all references to fields in old/new version of row in trigger during
  execution of CREATE TRIGGER statement (this is more courtesy for users
  since we can't check everything anyway).
  We also report that such reference is bad by returning error from
  Item_trigger_field::fix_fields() method (instead of setup_field())
  This means that if trigger is broken we will bark during trigger
  execution instead of trigger definition parsing at table open.
  (i.e. now we allow to open tables with broken triggers).
  
  Table_triggers_list::prepare_old_row_accessors() method was added to be
  able to reuse code creating Field objects referencing TABLE::record[1]
  buffer instead of TABLE::record[0].
sql/sql_trigger.h:
  Added Table_triggers_list::prepare_old_row_accessors() method to be
  able to reuse code creating Field objects referencing to TABLE::record[1]
  instead of record[0].
sql/sql_yacc.yy:
  Now instead of performing binding of Item_trigger_field objects
  to TABLE object during trigger definition parsing at table open,
  we perform this binding by passing through specially constructed
  list of all such items in trigger.
  We also check value returned from memory allocation functions.
2004-11-24 12:24:02 +03:00
unknown
8d71bcec21 now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement


include/mysqld_error.h:
  newerror messages
mysql-test/t/key.test:
  unknown error replaced with real error
mysys/my_error.c:
  my_error & my_printf_error use my_vsprintf
sql/field_conv.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/ha_innodb.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/handler.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/item.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/item_cmpfunc.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/item_func.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/item_strfunc.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/lock.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/log.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/parse_file.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/procedure.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/protocol.cc:
  no need reset thd->lex->found_colon to break multiline sequance now, send_error called too late
sql/repl_failsafe.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/set_var.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/share/czech/errmsg.txt:
  new errors converted from unknown error
sql/share/danish/errmsg.txt:
  new errors converted from unknown error
sql/share/dutch/errmsg.txt:
  new errors converted from unknown error
sql/share/english/errmsg.txt:
  new errors converted from unknown error
sql/share/estonian/errmsg.txt:
  new errors converted from unknown error
sql/share/french/errmsg.txt:
  new errors converted from unknown error
sql/share/german/errmsg.txt:
  new errors converted from unknown error
sql/share/greek/errmsg.txt:
  new errors converted from unknown error
sql/share/hungarian/errmsg.txt:
  new errors converted from unknown error
sql/share/italian/errmsg.txt:
  new errors converted from unknown error
sql/share/japanese/errmsg.txt:
  new errors converted from unknown error
sql/share/korean/errmsg.txt:
  new errors converted from unknown error
sql/share/norwegian-ny/errmsg.txt:
  new errors converted from unknown error
sql/share/norwegian/errmsg.txt:
  new errors converted from unknown error
sql/share/polish/errmsg.txt:
  new errors converted from unknown error
sql/share/portuguese/errmsg.txt:
  new errors converted from unknown error
sql/share/romanian/errmsg.txt:
  new errors converted from unknown error
sql/share/russian/errmsg.txt:
  new errors converted from unknown error
sql/share/serbian/errmsg.txt:
  new errors converted from unknown error
sql/share/slovak/errmsg.txt:
  new errors converted from unknown error
sql/share/spanish/errmsg.txt:
  new errors converted from unknown error
sql/share/swedish/errmsg.txt:
  new errors converted from unknown error
sql/share/ukrainian/errmsg.txt:
  new errors converted from unknown error
sql/slave.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sp.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sp_head.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_acl.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_analyse.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_base.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_class.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_db.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_delete.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_handler.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_insert.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_load.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_map.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_parse.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
  multi-row command fixed
sql/sql_prepare.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
  remover send_error ingected from 4.1
sql/sql_rename.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_repl.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_select.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_show.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_table.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_trigger.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_udf.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_update.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_view.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/sql_yacc.yy:
  now my_printf_error is not better then my_error, but my_error call is shorter
sql/table.cc:
  now my_printf_error is not better then my_error, but my_error call is shorter
strings/my_vsnprintf.c:
  * format support added to my_vsprint
2004-11-13 19:35:51 +02:00
unknown
067863e184 merge
include/mysqld_error.h:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/r/rpl_charset.result:
  Auto merged
mysql-test/r/sp.result:
  Auto merged
mysql-test/t/rpl_charset.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_innodb.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_row.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/item_uniq.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/parse_file.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/protocol.h:
  Auto merged
sql/protocol_cursor.cc:
  Auto merged
sql/repl_failsafe.cc:
  Auto merged
sql/repl_failsafe.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/slave.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_error.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_load.cc:
  Auto merged
sql/sql_repl.h:
  Auto merged
sql/sql_select.h:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/share/czech/errmsg.txt:
  Auto merged
sql/share/danish/errmsg.txt:
  Auto merged
sql/share/dutch/errmsg.txt:
  Auto merged
sql/share/english/errmsg.txt:
  Auto merged
sql/share/estonian/errmsg.txt:
  Auto merged
sql/share/french/errmsg.txt:
  Auto merged
sql/share/german/errmsg.txt:
  Auto merged
sql/share/greek/errmsg.txt:
  Auto merged
sql/share/hungarian/errmsg.txt:
  Auto merged
sql/share/italian/errmsg.txt:
  Auto merged
sql/share/japanese/errmsg.txt:
  Auto merged
sql/share/korean/errmsg.txt:
  Auto merged
sql/share/norwegian-ny/errmsg.txt:
  Auto merged
sql/share/norwegian/errmsg.txt:
  Auto merged
sql/share/polish/errmsg.txt:
  Auto merged
sql/share/portuguese/errmsg.txt:
  Auto merged
sql/sql_udf.cc:
  Auto merged
sql/sql_view.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
sql/share/romanian/errmsg.txt:
  Auto merged
sql/share/russian/errmsg.txt:
  Auto merged
sql/share/serbian/errmsg.txt:
  Auto merged
sql/share/slovak/errmsg.txt:
  Auto merged
sql/share/spanish/errmsg.txt:
  Auto merged
sql/share/swedish/errmsg.txt:
  Auto merged
sql/share/ukrainian/errmsg.txt:
  Auto merged
2004-11-12 15:36:31 +02:00
unknown
9e921615a1 post-review fixes
mysql-test/r/rpl_rotate_logs.result:
  removed host dependence in error messages
mysql-test/t/rpl_rotate_logs.test:
  removed host dependence in error messages
mysys/my_error.c:
  comment about using my_error family functions
sql/filesort.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/ha_innodb.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/handler.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_cmpfunc.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_func.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_strfunc.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_subselect.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/item_sum.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/lock.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/log.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/mysql_priv.h:
  error check moved to fill_record
sql/mysqld.cc:
  fixed error messages
sql/parse_file.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/protocol_cursor.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/repl_failsafe.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/set_var.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/slave.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sp.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_head.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sp_rcontext.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_acl.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_analyse.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_base.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
  error check moved to fill_record
sql/sql_class.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_class.h:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_db.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_delete.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
  error check moved to fill_record
sql/sql_handler.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_help.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_insert.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
  error check moved to fill_record
sql/sql_lex.cc:
  layout fixed
sql/sql_load.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_map.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_parse.cc:
  error check moved to fill_record
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_prepare.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_rename.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_repl.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_select.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_show.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_table.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_trigger.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_udf.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_union.cc:
  error check moved to fill_record
sql/sql_update.cc:
  error check moved to fill_record
sql/sql_view.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/sql_yacc.yy:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/table.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
sql/unireg.cc:
  changing my_error on my_message and my_printf_error where if they are prefered
2004-11-12 14:34:00 +02:00
unknown
db67626196 After merge fixes
Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
(Before one had to change thd->mem_root ; push_back(); restore mem_root.


mysql-test/t/range.test:
  After merge fixRecR
sql/item_func.cc:
  After merge fix
sql/item_sum.cc:
  After merge fix
sql/opt_range.cc:
  After merge fix
sql/parse_file.cc:
  After merge fix
sql/sp.cc:
  After merge fix
sql/sp_head.cc:
  After merge fix
sql/sp_head.h:
  After merge fix
sql/sql_base.cc:
  After merge fix
sql/sql_class.h:
  After merge fix
sql/sql_list.h:
  Added push_back(void *, MEM_ROOT *) to make some list-handling code easier that needs to be allocated in a different mem-root
  (Before one had to change thd->mem_root ; push_back(); restore mem_root.
sql/sql_prepare.cc:
  After merge fix
sql/sql_select.cc:
  After merge fix
sql/sql_table.cc:
  After merge fix
  Fixed problem with OPTIMIZE on INNODB tables
sql/sql_trigger.cc:
  After merge fix
sql/sql_union.cc:
  After merge fix
sql/sql_view.cc:
  After merge fix
sql/sql_yacc.yy:
  After merge fix
sql/table.cc:
  After merge fix
2004-11-09 03:58:44 +02:00
unknown
f5a47f156b Fixes after merge with 4.1
FOUND is not a reserved keyword anymore
Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
Note that the 5.0 tree is not yet up to date: Sanja will have to fix multi-update-locks for this merge to be complete


BUILD/SETUP.sh:
  Portability fix
client/mysqltest.c:
  Portability fix
mysql-test/r/drop.result:
  updated results
mysql-test/r/func_str.result:
  New warnings (after merge)
mysql-test/r/insert.result:
  Updated tests
mysql-test/r/join_nested.result:
  Updated results (because of new column types in 5.0)
mysql-test/r/lock_multi.result:
  Temporarly wrong results until Sanja fixes multi-update-lock in 5.0
mysql-test/r/multi_update.result:
  Temporary fix until Sanja fixes multi-update locking
mysql-test/r/ps_1general.result:
  Update of results after merge
mysql-test/r/ps_2myisam.result:
  Update of results after merge
mysql-test/r/ps_3innodb.result:
  Update of results after merge
mysql-test/r/ps_4heap.result:
  Update of results after merge
mysql-test/r/ps_5merge.result:
  Update of results after merge
mysql-test/r/ps_6bdb.result:
  Update of results after merge
mysql-test/r/query_cache.result:
  Update of results after merge
mysql-test/r/range.result:
  New results for new tests
mysql-test/r/rpl_auto_increment.result:
  Update with new 4.0 information
mysql-test/r/rpl_charset.result:
  After merge fixes
mysql-test/r/subselect.result:
  After merge fixes
mysql-test/r/view.result:
  Temporary fix until multi-update-locking is fixed
mysql-test/t/drop.test:
  Safety fix
mysql-test/t/multi_update.test:
  Temporary fix until multi-update-locking is fixed
mysql-test/t/rpl_charset.test:
  More comments
mysql-test/t/sp-error.test:
  Updated comments
mysql-test/t/view.test:
  Temporary fix until multi-update-locking is fixed
scripts/mysql_fix_privilege_tables.sh:
  Better error message
sql-common/client.c:
  More debugging
sql/ha_ndbcluster.cc:
  After merge fixes
sql/handler.cc:
  After merge fixes
sql/item.cc:
  Simple optimization of creating item
  After merge fixed
  Added Item_field::set_no_const_sub() to be able to mark fields that can't be substituted
  The problem is that if you compare a string field to a binary string, you can't replace the field with a string constant as the binary comparison may then fail (The original field value may be in a different case)
sql/item.h:
  Added Item::set_no_const_sub() to be able to mark fields that can't be substituted
sql/item_cmpfunc.cc:
  Mark fields compared as binary to not be substituted.
sql/item_func.cc:
  After merge fix
sql/log_event.cc:
  After merge fix
sql/mysql_priv.h:
  After merge fix
sql/opt_range.cc:
  After merge fix
sql/protocol.cc:
  Made flags uint instead of int (as it's used as a bit mask)
sql/protocol.h:
  Made flags uint instead of int (as it's used as a bit mask)
sql/protocol_cursor.cc:
  Made flags uint instead of int (as it's used as a bit mask)
  Indentation cleanups
sql/sp.cc:
  After merge fixes
  Removed compiler warnings
sql/sp_head.cc:
  After merge fixes
sql/sql_base.cc:
  After merge fixes
  Removed 'send_error' from 'insert_fields()' as the error is sent higher up
sql/sql_class.cc:
  Give assert if set_n_backup_item_arena is used twice
sql/sql_class.h:
  Give assert if set_n_backup_item_arena is used twice
  After merge fixes
  Added 'simple_select' method to be able to quickly determinate if a select_result is a normal SELECT
sql/sql_handler.cc:
  After merge fixes
sql/sql_parse.cc:
  After merge fixes
sql/sql_prepare.cc:
  After merge fixes
sql/sql_select.cc:
  After merge fixes
  Moved 'build_equal_items' to optimize_cond() (logical place)
sql/sql_table.cc:
  After merge fixes
sql/sql_trigger.cc:
  After merge fixes
sql/sql_update.cc:
  After merge fixes
  (This should be fixed by Sanja to have lower granuality locking of tables in multi-update)
sql/sql_view.cc:
  After merge fixes
sql/sql_yacc.yy:
  After merge fixes
  Don't have FOUND as a reserved keyword
2004-11-03 12:39:38 +02:00
unknown
066c90563a errors without code removed
net_printf/send_error calls replaced by my_error family functions
-1/1 (sent/unsent) error reporting removed
(WL#2133)


include/mysqld_error.h:
  new errors added.
mysql-test/r/rpl_charset.result:
  new error
mysql-test/r/rpl_timezone.result:
  new error
mysql-test/r/sp-security.result:
  more clean error message
mysql-test/r/sp.result:
  now error state intercepted correctly
mysql-test/t/connect.test:
  new error message
mysql-test/t/rpl_charset.test:
  new error message
mysql-test/t/rpl_timezone.test:
  new error
mysql-test/t/sp-security.test:
  more correct error handling
mysql-test/t/sp.test:
  now error state intercepted correctly
sql/ha_innodb.cc:
  -1/1 (sent/unsent) error reporting removed
sql/ha_innodb.h:
  -1/1 (sent/unsent) error reporting removed
sql/item.cc:
  only boolean values should be returned by fix_fields()
sql/item_cmpfunc.cc:
  only boolean values should be returned by fix_fields()
sql/item_func.cc:
  only boolean values should be returned by fix_fields()
  net_printf/send_error calls replaced by my_error family functions
sql/item_row.cc:
  only boolean values should be returned by fix_fields()
sql/item_subselect.cc:
  only boolean values should be returned by fix_fields()
  -1/1 (sent/unsent) error reporting removed
sql/item_subselect.h:
  -1/1 (sent/unsent) error reporting removed
sql/item_sum.cc:
  only boolean values should be returned by fix_fields()
sql/item_timefunc.cc:
  only boolean values should be returned by fix_fields()
sql/item_uniq.h:
  only boolean values should be returned by fix_fields()
sql/mysql_priv.h:
  -1/1 (sent/unsent) error reporting removed
sql/mysqld.cc:
  net_printf/send_error calls replaced by my_error family functions
  changes in my_message_sql to support error handling correctly
sql/protocol.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/protocol_cursor.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/repl_failsafe.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/repl_failsafe.h:
  -1/1 (sent/unsent) error reporting removed
sql/set_var.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/share/czech/errmsg.txt:
  new error messages
sql/share/danish/errmsg.txt:
  new error messages
sql/share/dutch/errmsg.txt:
  new error messages
sql/share/english/errmsg.txt:
  new error messages
sql/share/estonian/errmsg.txt:
  new error messages
sql/share/french/errmsg.txt:
  new error messages
sql/share/german/errmsg.txt:
  new error messages
sql/share/greek/errmsg.txt:
  new error messages
sql/share/hungarian/errmsg.txt:
  new error messages
sql/share/italian/errmsg.txt:
  new error messages
sql/share/japanese/errmsg.txt:
  new error messages
sql/share/korean/errmsg.txt:
  new error messages
sql/share/norwegian-ny/errmsg.txt:
  new error messages
sql/share/norwegian/errmsg.txt:
  new error messages
sql/share/polish/errmsg.txt:
  new error messages
sql/share/portuguese/errmsg.txt:
  new error messages
sql/share/romanian/errmsg.txt:
  new error messages
sql/share/russian/errmsg.txt:
  new error messages
sql/share/serbian/errmsg.txt:
  new error messages
sql/share/slovak/errmsg.txt:
  new error messages
sql/share/spanish/errmsg.txt:
  new error messages
sql/share/swedish/errmsg.txt:
  new error messages
sql/share/ukrainian/errmsg.txt:
  new error messages
sql/slave.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/slave.h:
  -1/1 (sent/unsent) error reporting removed
sql/sp.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/sp_head.cc:
  new eror handling support
  net_printf/send_error calls replaced by my_error family functions
sql/sp_rcontext.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/sql_acl.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/sql_acl.h:
  -1/1 (sent/unsent) error reporting removed
sql/sql_base.cc:
  -1/1 (sent/unsent) error reporting removed
  net_printf/send_error calls replaced by my_error family functions
sql/sql_class.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/sql_class.h:
  my_messhage_sql now set/reset query_error flag
sql/sql_db.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_delete.cc:
  -1/1 (sent/unsent) error reporting removed
  net_printf/send_error calls replaced by my_error family functions
sql/sql_do.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_error.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_handler.cc:
  -1/1 (sent/unsent) error reporting removed
  net_printf/send_error calls replaced by my_error family functions
sql/sql_help.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/sql_insert.cc:
  -1/1 (sent/unsent) error reporting removed
  net_printf/send_error calls replaced by my_error family functions
sql/sql_lex.h:
  -1/1 (sent/unsent) error reporting removed
sql/sql_load.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_map.cc:
  errors without code removed
sql/sql_parse.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed from mysql_execute_command
sql/sql_prepare.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/sql_repl.cc:
  error messages fixed
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/sql_repl.h:
  -1/1 (sent/unsent) error reporting removed
sql/sql_select.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_select.h:
  -1/1 (sent/unsent) error reporting removed
sql/sql_show.cc:
  -1/1 (sent/unsent) error reporting removed
  net_printf/send_error calls replaced by my_error family functions
sql/sql_table.cc:
  net_printf/send_error calls replaced by my_error family functions
  -1/1 (sent/unsent) error reporting removed
sql/sql_trigger.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_udf.cc:
  net_printf/send_error calls replaced by my_error family functions
sql/sql_union.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_update.cc:
  -1/1 (sent/unsent) error reporting removed
  net_printf/send_error calls replaced by my_error family functions
sql/sql_view.cc:
  -1/1 (sent/unsent) error reporting removed
sql/sql_view.h:
  -1/1 (sent/unsent) error reporting removed
sql/sql_yacc.yy:
  net_printf/send_error calls replaced by my_error family functions
2004-10-20 04:04:37 +03:00
unknown
7c46c0d020 For now we will require super privilege for creating/dropping trigger because proper
privilege checking is not in place yet.
2004-09-24 17:55:43 +04:00
unknown
97cbcbb0d7 After merge fixes for WL#1218 "Triggers"
mysql-test/t/trigger.test:
  After merge fix, error codes corrected.
sql/sp_head.cc:
  After mrege fix. Fixed typo.
sql/sql_trigger.cc:
  After merge fix. wait_if_gloabl_read_lock has one more argument now.
2004-09-09 23:44:27 +04:00
unknown
12ce293a7f WL#1218 "Triggers"
After review and after merge fixes.


mysql-test/t/trigger.test:
  After merge fix. Updated error codes.
sql/sp_head.cc:
  After merge fix.
  To give some chances for functions/triggers we have to close tables during sp_instr_* 
  execution only if we have opened them before.
sql/sp_head.h:
  After merge fix. sp_instr constructor now takes one more argument.
sql/sql_trigger.cc:
  After merge and review fixes.
  Some variable renaming and optimizations.
sql/sql_yacc.yy:
  After merge fixes.
  sp_instr_* classes now require sp context as constructor parameter.
  Also we should be careful with adding table for which we are creating trigger to table 
  list. Some elements in trigger body can damage LEX::query_tables and so we should add this
  table to list only after parsing trigger body.
2004-09-09 00:46:01 +04:00
unknown
52ac4935e7 WL#1218 "Triggers". Some very preliminary version of patch.
Mostly needed for Monty for him getting notion what needed for triggers 
from new .FRM format. 

Things to be done:
- Right placement of trigger's invocations
- Right handling of errors in triggers (including transaction rollback)
- Support for priviliges
- Right handling of DROP/RENAME table (hope that it will be handled automatically
  with merging of .TRG into .FRM file)
- Saving/restoring some information critical for trigger creation and replication
  with their definitions (e.g. sql_mode, creator, ...)
- Replication

Already has some known bugs so probably not for general review.


include/mysqld_error.h:
  Added trigger related error codes.
sql/Makefile.am:
  Added sql_trigger.* files to list of sources from which mysqld is built.
sql/item.cc:
  Added Item_trigger_field class representing field of new/old version of row which is 
  inserted/updated/deleted and for which trigger is invoked.
sql/item.h:
  Added enums for describing trigger properties. (Here because of dependencies).
  Added Item_trigger_field class representing field of new/old version of row which is 
  inserted/updated/deleted and for which trigger is invoked.
sql/item_func.cc:
  Added Item_func_set_user_var::print_as_stmt() for printing of assignment to ser variable
  from stored procedures.
  Added comment clarifying why we don't need set no_send_ok when calling stored functions.
sql/item_func.h:
  Added Item_func_set_user_var::print_as_stmt() for printing of assignment to ser variable
  from stored procedures.
sql/lex.h:
  Symbols used in statements defining triggers were added.
sql/mysql_priv.h:
  Exported some functions needed for triggers implementation.
sql/parse_file.cc:
  Cleaned up FILE_OPTIONS_STRLIST handling (needed for triggers).
sql/parse_file.h:
  Cleaned up FILE_OPTIONS_STRLIST handling (needed for triggers).
sql/share/czech/errmsg.txt:
  Added trigger related error messages.
sql/share/danish/errmsg.txt:
  Added trigger related error messages.
sql/share/dutch/errmsg.txt:
  Added trigger related error messages.
sql/share/english/errmsg.txt:
  Added trigger related error messages.
sql/share/estonian/errmsg.txt:
  Added trigger related error messages.
sql/share/french/errmsg.txt:
  Added trigger related error messages.
sql/share/german/errmsg.txt:
  Added trigger related error messages.
sql/share/greek/errmsg.txt:
  Added trigger related error messages.
sql/share/hungarian/errmsg.txt:
  Added trigger related error messages.
sql/share/italian/errmsg.txt:
  Added trigger related error messages.
sql/share/japanese/errmsg.txt:
  Added trigger related error messages.
sql/share/korean/errmsg.txt:
  Added trigger related error messages.
sql/share/norwegian-ny/errmsg.txt:
  Added trigger related error messages.
sql/share/norwegian/errmsg.txt:
  Added trigger related error messages.
sql/share/polish/errmsg.txt:
  Added trigger related error messages.
sql/share/portuguese/errmsg.txt:
  Added trigger related error messages.
sql/share/romanian/errmsg.txt:
  Added trigger related error messages.
sql/share/russian/errmsg.txt:
  Added trigger related error messages.
sql/share/serbian/errmsg.txt:
  Added trigger related error messages.
sql/share/slovak/errmsg.txt:
  Added trigger related error messages.
sql/share/spanish/errmsg.txt:
  Added trigger related error messages.
sql/share/swedish/errmsg.txt:
  Added trigger related error messages.
sql/share/ukrainian/errmsg.txt:
  Added trigger related error messages.
sql/sp_head.cc:
  sp_head::init_strings(): added support for triggers 
    (we don't have most of strings for them)
  sp_head::execute_function(): triggers don't require RETURN
  sp_head::reset_lex(): added propagation of trigger properties to LEX used for 
   parsing of statements composing trigger body.
  Added two more SP instructions:
  - sp_instr_set_user_var for setting user variables in stored functions and triggers
    (we can't use sp_instr_stmt and "SET @a:=..." statement since it will close open 
    tables and thus break execution of calling statement.
  - sp_instr_set_trigger_field for assignment to fields of row being updated/inserted in
    triggers
sql/sp_head.h:
  Added new type of sp_head object - TYPE_ENUM_TRIGGER
  Added two more SP instructions:
  - sp_instr_set_user_var for setting user variables in stored functions and triggers
    (we can't use sp_instr_stmt and "SET @a:=..." statement since it will close open 
    tables and thus break execution of calling statement.
  - sp_instr_set_trigger_field for assignment to fields of row being updated/inserted in
    triggers
sql/sql_base.cc:
  Now freeing memory occupied by trigger related structures when closing tables.
  open_unireg_entry(): added loading of triggers for table.
  find_field_in_real_table() is now public since it required by Item_trigger_field in item.cc
sql/sql_delete.cc:
  Added triggers invocation for DELETE (should be fixed for sure :))
sql/sql_insert.cc:
  Added triggers invocation for INSERT (should be fixed for sure :))
sql/sql_lex.cc:
  Added trg_new_row_fake_var variable pointer to which is used for distinguishing between
  assignment to NEW row field (when parsing trigger definition) and structured variable.
  Added initialization of LEX->trg_table to lex_start(). (When triggers are parsed during
  opening of table it points to table object.)
sql/sql_lex.h:
  Added trigger related commands.
  Added st_trg_chistics structure describing properties of trigger being created
  (as struct and as LEX member).
  Added trg_new_row_fake_var variable pointer to which is used for
  distinguishing between assignment to NEW row field (when parsing trigger definition)
  and structured variable.
  Added LEX::trg_table which points to table being opened when we are parsing trigger
  definition while opening table.
sql/sql_parse.cc:
  Added support for CREATE/DROP TRIGGER commands.
sql/sql_table.cc:
  Cleanup. close_cached_table() always returns 0 and its result is not analyzed in most
  places so chenged its return type to void.
sql/sql_update.cc:
  Added triggers invocation for UPDATE (should be fixed for sure :))
sql/sql_yacc.yy:
  Added support for CREATE/DROP TRIGGER statements.
  Added support for OLD/NEW row identifiers in trigger.
  Made assignment to user variables not to break execution of stored function or trigger.
sql/table.h:
  Added TABLE::triggers member representing triggers for this table.
2004-09-07 16:29:46 +04:00