Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-675

Bytes and fixed setters don't update datum size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • c
    • None
    • Reviewed

    Description

      The setter methods for bytes and fixed datum instances don't update the size field. So, for instance, if you create a datum:

      avro_datum_t datum = avro_wrapbytes(NULL, 0);

      Then later you update that datum to point to a different buffer:

      avro_wrapbytes_set(datum, "hello", 5);

      If you write that datum out to a file, you'll get a zero-length value in the output, since the size pointer didn't get updated from 0 to 5.

      Attachments

        1. avro-675.patch
          3 kB
          Douglas Creager

        Activity

          People

            dcreager Douglas Creager
            dcreager Douglas Creager
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified