---
drizzled/sql_yacc.yy | 4 ++++
drizzled/table_proto_write.cc | 5 +++--
2 files changed, 7 insertions(+), 2 deletions(-)
Index: drizzled/sql_yacc.yy
===================================================================
--- drizzled/sql_yacc.yy.orig 2009-11-04 15:20:45.244173082 +1100
+++ drizzled/sql_yacc.yy 2009-11-04 15:20:47.044163407 +1100
@@ -1552,6 +1552,10 @@ field_spec:
{
LEX *lex=Lex;
statement::CreateTable *statement= (statement::CreateTable
*)Lex->statement;
+
+ if (statement->current_proto_field)
+ statement->current_proto_field->set_name($1.str);
+
if (add_field_to_list(lex->session, &$1, (enum enum_field_types)
$3,
lex->length,lex->dec,lex->type,
statement->column_format,
Index: drizzled/table_proto_write.cc
===================================================================
--- drizzled/table_proto_write.cc.orig 2009-11-04 15:20:45.304191975 +1100
+++ drizzled/table_proto_write.cc 2009-11-04 15:20:47.044163407 +1100
@@ -78,11 +78,12 @@ int fill_table_proto(message::Table *tab
constraints= attribute->mutable_constraints();
constraints->set_is_nullable(false);
}
+
+ attribute->set_name(field_arg->field_name);
}
assert((!(field_arg->flags & NOT_NULL_FLAG)) ==
attribute->constraints().is_nullable());
-
- attribute->set_name(field_arg->field_name);
+ assert(strcmp(attribute->name().c_str(), field_arg->field_name)==0);
switch (field_arg->sql_type) {
case DRIZZLE_TYPE_LONG:
--
Stewart Smith
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp