1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00
BitKeeper/etc/logging_ok:
  auto-union
sql/ha_berkeley.cc:
  Auto merged
sql/ha_heap.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_help.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_class.h:
  SCCS merged
sql/sql_parse.cc:
  SCCS merged
This commit is contained in:
unknown
2004-09-15 22:36:57 +03:00
95 changed files with 2879 additions and 607 deletions

View File

@@ -19,6 +19,8 @@
#include "mysql_priv.h"
#include "sql_acl.h"
#include "sp_head.h"
#include "sql_trigger.h"
static int check_null_fields(THD *thd,TABLE *entry);
#ifndef EMBEDDED_LIBRARY
@@ -302,6 +304,12 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
break;
}
}
// FIXME: Actually we should do this before check_null_fields.
// Or even go into write_record ?
if (table->triggers)
table->triggers->process_triggers(thd, TRG_EVENT_INSERT, TRG_ACTION_BEFORE);
#ifndef EMBEDDED_LIBRARY
if (lock_type == TL_WRITE_DELAYED)
{
@@ -324,6 +332,9 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
if (error)
break;
thd->row_count++;
if (table->triggers)
table->triggers->process_triggers(thd, TRG_EVENT_INSERT, TRG_ACTION_AFTER);
}
/*
@@ -599,8 +610,7 @@ int mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, TABLE *table,
setup_fields(thd, 0, table_list, update_values, 0, 0, 0))))
DBUG_RETURN(-1);
if (find_table_in_global_list(table_list->next_global,
table_list->db, table_list->real_name))
if (unique_table(table_list, table_list->next_independent()))
{
my_error(ER_UPDATE_TABLE_USED, MYF(0), table_list->real_name);
DBUG_RETURN(-1);