diff options
author | unknown <monty@narttu.mysql.fi> | 2007-01-29 01:57:07 +0200 |
---|---|---|
committer | unknown <monty@narttu.mysql.fi> | 2007-01-29 01:57:07 +0200 |
commit | 533497d8c901c5da6d51f3e83d1dcc74395a5b22 (patch) | |
tree | 3ff9359ad636b9a01cb6be281ae346ff2e192b3e /sql/sql_insert.cc | |
parent | 6db6be5a06d79d03836e8d84198e51562f50d6cb (diff) | |
parent | f40e0cc0d0606c3f06151763a6445bfa4682eb77 (diff) | |
download | mariadb-git-533497d8c901c5da6d51f3e83d1dcc74395a5b22.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/my/mysql-5.1
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
configure.in:
Auto merged
include/m_ctype.h:
Auto merged
mysql-test/t/myisam.test:
Auto merged
mysql-test/t/ndb_basic.test:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/opt_range.cc:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
storage/myisam/mi_open.c:
Auto merged
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp:
Auto merged
BUILD/SETUP.sh:
manual merge
sql/item_cmpfunc.cc:
manual merge
sql/item_subselect.cc:
manual merge
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 4ad8e5ee128..aaffa09b978 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -60,7 +60,6 @@ #include "sql_select.h" #include "sql_show.h" -static int check_null_fields(THD *thd,TABLE *entry); #ifndef EMBEDDED_LIBRARY static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list); static int write_delayed(THD *thd, TABLE *table, enum_duplicates dup, @@ -190,11 +189,11 @@ static int check_insert_fields(THD *thd, TABLE_LIST *table_list, #ifndef NO_EMBEDDED_ACCESS_CHECKS if (grant_option) { - Field_iterator_table fields; - fields.set_table(table); + Field_iterator_table field_it; + field_it.set_table(table); if (check_grant_all_columns(thd, INSERT_ACL, &table->grant, table->s->db.str, table->s->table_name.str, - &fields)) + &field_it)) return -1; } #endif @@ -351,13 +350,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, bool ignore) { int error, res; - /* - log_on is about delayed inserts only. - By default, both logs are enabled (this won't cause problems if the server - runs without --log-update or --log-bin). - */ - bool log_on= ((thd->options & OPTION_BIN_LOG) || - (!(thd->security_ctx->master_access & SUPER_ACL))); bool transactional_table, joins_freed= FALSE; bool changed; uint value_count; @@ -371,6 +363,13 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, Name_resolution_context_state ctx_state; #ifndef EMBEDDED_LIBRARY char *query= thd->query; + /* + log_on is about delayed inserts only. + By default, both logs are enabled (this won't cause problems if the server + runs without --log-update or --log-bin). + */ + bool log_on= ((thd->options & OPTION_BIN_LOG) || + (!(thd->security_ctx->master_access & SUPER_ACL))); #endif thr_lock_type lock_type = table_list->lock_type; Item *unused_conds= 0; @@ -791,7 +790,6 @@ static bool check_view_insertability(THD * thd, TABLE_LIST *view) Field_translator *trans_start= view->field_translation, *trans_end= trans_start + num; Field_translator *trans; - Field **field_ptr= table->field; uint used_fields_buff_size= bitmap_buffer_size(table->s->fields); uint32 *used_fields_buff= (uint32*)thd->alloc(used_fields_buff_size); MY_BITMAP used_fields; @@ -3145,8 +3143,9 @@ void select_create::send_error(uint errcode,const char *err) ("Current statement %s row-based", thd->current_stmt_binlog_row_based ? "is" : "is NOT")); DBUG_PRINT("info", - ("Current table (at 0x%lu) %s a temporary (or non-existant) table", - table, + ("Current table (at 0x%lx) %s a temporary (or non-existing) " + "table", + (ulong) table, table && !table->s->tmp_table ? "is NOT" : "is")); DBUG_PRINT("info", ("Table %s prior to executing this statement", |