summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.local>2007-01-15 13:10:07 +0300
committerunknown <kostja@bodhi.local>2007-01-15 13:10:07 +0300
commit408d7752495684425a96c32feaedb4cd865a826a (patch)
tree267e52364d28d1d17e8c9dd45c15c9917ce3be95 /sql/sql_insert.cc
parent31e01f0a74dd4988ab0628ff0d1b832a190340fe (diff)
parenta8103a89b4ad39031abd1db242beca1b4332c895 (diff)
downloadmariadb-git-408d7752495684425a96c32feaedb4cd865a826a.tar.gz
Manual merge.
mysql-test/r/sp.result: Auto merged mysql-test/t/sp.test: Auto merged sql/mysql_priv.h: 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_list.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index be6707c80a9..c60d3c307d0 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2616,11 +2616,11 @@ bool select_insert::send_eof()
temporary table flag)
create_table in Pointer to TABLE_LIST object providing database
and name for table to be created or to be open
- extra_fields in/out Initial list of fields for table to be created
- keys in List of keys for table to be created
+ alter_info in/out Initial list of columns and indexes for the table
+ to be created
items in List of items which should be used to produce rest
of fields for the table (corresponding fields will
- be added to the end of 'extra_fields' list)
+ be added to the end of alter_info->create_list)
lock out Pointer to the MYSQL_LOCK object for table created
(open) will be returned in this parameter. Since
this table is not included in THD::lock caller is
@@ -2642,8 +2642,8 @@ bool select_insert::send_eof()
static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
TABLE_LIST *create_table,
- List<create_field> *extra_fields,
- List<Key> *keys, List<Item> *items,
+ Alter_info *alter_info,
+ List<Item> *items,
MYSQL_LOCK **lock)
{
TABLE tmp_table; // Used during 'create_field()'
@@ -2682,7 +2682,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
DBUG_RETURN(0);
if (item->maybe_null)
cr_field->flags &= ~NOT_NULL_FLAG;
- extra_fields->push_back(cr_field);
+ alter_info->create_list.push_back(cr_field);
}
/*
create and lock table
@@ -2703,8 +2703,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
{
tmp_disable_binlog(thd);
if (!mysql_create_table(thd, create_table->db, create_table->table_name,
- create_info, *extra_fields, *keys, 0,
- select_field_count))
+ create_info, alter_info, 0, select_field_count))
{
/*
If we are here in prelocked mode we either create temporary table
@@ -2760,7 +2759,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
unit= u;
table= create_table_from_items(thd, create_info, create_table,
- extra_fields, keys, &values, &lock);
+ alter_info, &values, &lock);
if (!table)
DBUG_RETURN(-1); // abort() deletes table