~ubuntu-branches/ubuntu/gutsy/mysql-dfsg-5.0/gutsy

« back to all changes in this revision

Viewing changes to sql/unireg.cc

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-04-03 09:43:01 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20070403094301-fnjhfr59hu72pvtg
Tags: 5.0.38-0ubuntu1
* Package the Enterprise version again (.37 was a community version), since
  Debian and we have always done so. This brings in a few more bug fixes and
  makes functional derivations less likely.
* debian/README.Maintainer: Add pointer to upstream download URL, since it
  is very hard to find the Enterprise versions.
* Disable 33_scripts__mysql_create_system_tables__no_test.dpatch, since that
  script was removed upstream.
* debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch: Adapted to
  changed formatting in new upstream version.
* Remove debian/patches/86_PATH_MAX.dpatch, fixed upstream.
* Add debian/patches/90_org_tables_definition.dpatch: Fix local variable
  declaration in libmysqld/sql_parse.cc to fix compilation with
  EMBEDDED_LIBRARY.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
  uchar fileinfo[64],forminfo[288],*keybuff;
83
83
  TYPELIB formnames;
84
84
  uchar *screen_buff;
85
 
  char buff[2];
 
85
  char buff[128];
86
86
  DBUG_ENTER("mysql_create_frm");
87
87
 
88
88
  formnames.type_names=0;
149
149
                                              create_info->comment.length, 60);
150
150
  if (tmp_len < create_info->comment.length)
151
151
  {
152
 
    char buff[128];
153
152
    (void) my_snprintf(buff, sizeof(buff), "Too long comment for table '%s'",
154
153
                       table);
155
154
    if ((thd->variables.sql_mode &
178
177
    goto err;
179
178
 
180
179
  int2store(buff, create_info->connect_string.length);
181
 
  if (my_write(file, (const byte*)buff, sizeof(buff), MYF(MY_NABP)) ||
 
180
  if (my_write(file, (const byte*)buff, 2, MYF(MY_NABP)) ||
182
181
      my_write(file, (const byte*)create_info->connect_string.str,
183
182
               create_info->connect_string.length, MYF(MY_NABP)))
184
183
      goto err;
185
184
 
186
185
  int2store(buff, str_db_type.length);
187
 
  if (my_write(file, (const byte*)buff, sizeof(buff), MYF(MY_NABP)) ||
 
186
  if (my_write(file, (const byte*)buff, 2, MYF(MY_NABP)) ||
188
187
      my_write(file, (const byte*)str_db_type.str,
189
188
               str_db_type.length, MYF(MY_NABP)))
190
189
    goto err;
474
473
  create_field *field;
475
474
  while ((field=it++))
476
475
  {
477
 
 
478
476
    uint tmp_len= system_charset_info->cset->charpos(system_charset_info,
479
477
                                                     field->comment.str,
480
478
                                                     field->comment.str +
481
 
                                                     field->comment.length, 255);
 
479
                                                     field->comment.length,
 
480
                                                     255);
482
481
    if (tmp_len < field->comment.length)
483
482
    {
484
483
      char buff[128];
547
546
        for (uint pos= 0; pos < field->interval->count; pos++)
548
547
        {
549
548
          char *dst;
550
 
          uint length= field->save_interval->type_lengths[pos], hex_length;
551
549
          const char *src= field->save_interval->type_names[pos];
 
550
          uint hex_length;
 
551
          length= field->save_interval->type_lengths[pos];
552
552
          hex_length= length * 2;
553
553
          field->interval->type_lengths[pos]= hex_length;
554
554
          field->interval->type_names[pos]= dst= sql_alloc(hex_length + 1);
839
839
                               field->field_name,
840
840
                               &table);
841
841
    if (!regfield)
 
842
    {
 
843
      error= 1;
842
844
      goto err;                                 // End of memory
 
845
    }
843
846
 
844
847
    if (!(field->flags & NOT_NULL_FLAG))
845
848
    {