---
drizzled/sql_yacc.yy | 9 ++++++++-
drizzled/table_proto_write.cc | 5 ++++-
2 files changed, 12 insertions(+), 2 deletions(-)
Index: drizzled/sql_yacc.yy
===================================================================
--- drizzled/sql_yacc.yy.orig 2009-11-04 15:20:47.044163407 +1100
+++ drizzled/sql_yacc.yy 2009-11-04 15:20:48.884156729 +1100
@@ -1804,7 +1804,14 @@ attribute:
lex->type|= UNIQUE_KEY_FLAG;
statement->alter_info.flags.set(ALTER_ADD_INDEX);
}
- | COMMENT_SYM TEXT_STRING_sys { ((statement::AlterTable
*)Lex->statement)->comment= $2; }
+ | COMMENT_SYM TEXT_STRING_sys
+ {
+ statement::AlterTable *statement= (statement::AlterTable
*)Lex->statement;
+ statement->comment= $2;
+
+ if (statement->current_proto_field)
+ statement->current_proto_field->set_comment($2.str);
+ }
| COLLATE_SYM collation_name
{
if (Lex->charset && !my_charset_same(Lex->charset,$2))
Index: drizzled/table_proto_write.cc
===================================================================
--- drizzled/table_proto_write.cc.orig 2009-11-04 15:20:47.044163407 +1100
+++ drizzled/table_proto_write.cc 2009-11-04 15:20:48.894164499 +1100
@@ -235,7 +235,10 @@ int fill_table_proto(message::Table *tab
return(1);
}
- attribute->set_comment(field_arg->comment.str);
+ if (! use_existing_fields)
+ attribute->set_comment(field_arg->comment.str);
+
+ assert(strcmp(attribute->comment().c_str(), field_arg->comment.str)==0);
}
if(field_arg->unireg_check == Field::NEXT_NUMBER)
--
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