~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/azio.cc

  • Committer: Brian Aker
  • Date: 2009-08-17 15:34:55 UTC
  • mto: (1117.1.9 merge)
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090817153455-emrlqx6cbxo9knfm
Fix for Stewart's patch (includes hack to solve MAX rows problem).

Show diffs side-by-side

added added

removed removed

Lines of Context:
997
997
/*
998
998
  Simple comment field
999
999
*/
1000
 
int azwrite_comment(azio_stream *s, char *blob, unsigned int length)
 
1000
int azwrite_comment(azio_stream *s, const char *blob, unsigned int length)
1001
1001
{
1002
1002
  if (s->mode == 'r')
1003
 
    return 1;
 
1003
    return -1;
1004
1004
 
1005
1005
  if (s->rows > 0)
1006
 
    return 1;
 
1006
    return -1;
1007
1007
 
1008
1008
  s->comment_start_pos= (uint) s->start;
1009
1009
  s->comment_length= length;
1012
1012
  ssize_t r= pwrite(s->file, (unsigned char*) blob,
1013
1013
                    s->comment_length, s->comment_start_pos);
1014
1014
  if (r != (ssize_t)s->comment_length)
1015
 
    return r;
 
1015
    return -1;
1016
1016
 
1017
1017
  write_header(s);
1018
1018
  s->pos= (size_t)lseek(s->file, 0, SEEK_END);