diff options
author | monty@mashka.mysql.fi <> | 2003-10-16 03:08:40 +0300 |
---|---|---|
committer | monty@mashka.mysql.fi <> | 2003-10-16 03:08:40 +0300 |
commit | e87c9f5ff8e94ababbed0161101cfd3616d20422 (patch) | |
tree | bd2eb4ac5dffdd3ac1af40b53a3680a0a9d78195 /sql/sql_insert.cc | |
parent | 0d34e50f39e1b7cb14170dabc08f7823cb50a2e9 (diff) | |
parent | 4d45ad98b966cf26b8aaf888deed7d1c4c61fc84 (diff) | |
download | mariadb-git-e87c9f5ff8e94ababbed0161101cfd3616d20422.tar.gz |
merge with 4.0
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b65245b04c1..9077d4c6a2d 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1553,6 +1553,14 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u) if (!table) DBUG_RETURN(-1); // abort() deletes table + if (table->fields < values.elements) + { + my_printf_error(ER_WRONG_VALUE_COUNT_ON_ROW, + ER(ER_WRONG_VALUE_COUNT_ON_ROW), + MYF(0),1); + DBUG_RETURN(-1); + } + /* First field to copy */ field=table->field+table->fields - values.elements; @@ -1611,7 +1619,7 @@ bool select_create::send_eof() */ if (!table->tmp_table) hash_delete(&open_cache,(byte*) table); - lock=0; + lock=0; table=0; VOID(pthread_mutex_unlock(&LOCK_open)); } @@ -1632,7 +1640,8 @@ void select_create::abort() enum db_type table_type=table->db_type; if (!table->tmp_table) hash_delete(&open_cache,(byte*) table); - quick_rm_table(table_type,db,name); + if (!create_info->table_existed) + quick_rm_table(table_type,db,name); table=0; } VOID(pthread_mutex_unlock(&LOCK_open)); |