Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-2757

Column tables behave differently when column names are provided

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • WT2.9.0, 3.2.10, 3.3.11
    • Affects Version/s: WT2.8.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Debian Jessie

      I attach a patch with a test that demonstrate the problem against master.

      What works:

      • Create a table with a single record column as key and whatever as value column
      • Open a cursor in append mode
      • Set value
      • Insert
      • Retrieve record number with cursor->get_key()

      In this case cursor->uri is file:terms.wt

      What doesn't work:

      • Create a table with a single record column as key and whatever as value column and *give a name to the columns*.
      • Open a cursor in append mode
      • Set value
      • Insert
      • cursor->get_key() will raise the following exception:
      ======================================================================
      ERROR: test_bug016.test_bug016.test_with_column_names
      Insert a row into a table *with* column names
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/amirouche/src/c/wiredtiger/test/suite/test_bug016.py", line 31, in test_with_column_names
          self.assertEqual(cursor.get_key(), 1)
        File "/home/amirouche/src/c/wiredtiger/lang/python/wiredtiger/__init__.py", line 269, in get_key
          k = self.get_keys()
        File "/home/amirouche/src/c/wiredtiger/lang/python/wiredtiger/__init__.py", line 281, in get_keys
          return [self._get_recno(),]
      WiredTigerError: Invalid argument
      
      ----------------------------------------------------------------------
      

      In this case cursor->uri is table:terms.

            Assignee:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Reporter:
            amz3 Amirouche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: