Fixed default fetch mode (0 == NULL, dohh!) and improved insert / upsert
+ test.