Details
Description
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.