After upgrading to osC 2.3.3.2 and applying the changes to amDB.class.php above, AttributeManager throws an error when adding options and values.
1062 - Duplicate entry '1-2' for key 'PRIMARY'
insert into products_options (products_options_id, language_id, products_options_name, products_options_track_stock) values ('1', '2', 'Vikt', '0')
[TEP STOP]
1062 - Duplicate entry '1-2' for key 'PRIMARY'
insert into products_options_values (products_options_values_id, language_id, products_options_values_name) values ('1', '2', 'Blå245')
[TEP STOP]
I.e. it seems that AttributeManager has a problem fetching the next auto increment value from the products_options and product_options_values tables. To fetch the new id's the functions in attributeManager.class.php call the amDB::getNextAutoValue() function in amDB.class.php, and id 0 is returned the $id is set to 1 resulting in the error above (if this entry already exists in the database).
Doing any changes in admin/includes/database.php is a bad idea so we'll have to work out what to change in amDB.class.php I guess...