![]() the elif len(table.key) = 1 and column.name in table.key case) I think not, but I thought I should flag this. Should the AUTOINCREMENT also be applied to integer primary keys if the auto_increment keyword is not specified? (i.e.But I have a few questions on the proposed solution and on the tests: If this is determined to be a bug, attachment:ticket-11378-with-test.diff provides a (currently failing) regression test and a fix. Was the omission of AUTOINCREMENT a deliberate decision, or is this a bug? Your application does not need these properties, you should probably stay with theĭefault behavior since the use of AUTOINCREMENT requires additional work to be doneĪs each row is inserted and thus causes INSERTs to run a little slower. These are important properties in certain applications. And the automatically generated ROWIDs are guaranteed to be With AUTOINCREMENT, rows with automatically selected ROWIDsĪre guaranteed to have ROWIDs that have never been used before by the same table in ![]() The behavior implemented by the AUTOINCREMENT keyword is subtly different from ![]() The SQLite documentation does explain that using the AUTOINCREMENT keyword means slower INSERTs: For example I found out about this while looking into a TracPastePlugin bug, th:#4265, which exhibits the same behavior - the ID of a deleted paste will be reused by a new paste, if and only if the deleted paste is the most recently created, and the site is using the sqlite backend. This does not only affect tickets, and does not only affect Trac core - any plugin that defines a database table with a Column(., auto_increment=True) is also affected. I believe this behavior only occurs with the SQLite backend. If you had instead deleted ticket #1 in step 6 above, the newly created ticket in step 7 would be #3. The newly created ticket will be #2, instead of #3.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |