ldo/ShaderTools — comment on commit 2438d8ac3ee32ba48207e4b37132a925875d48ec
File:  line 0
By ldo:

The existing code does something which is generally considered a no-no in databases: assuming that, when a set of records is inserted in a certain order in a table, they will automatically be retrieved in the same order. We see this, for example, in retrieving the points in a colour ramp. Normally I would solve this by adding an explicit index-number field to the relevant tables, so that appending an “order by index_field” would ensure they came back in the right order. However so far I have refrained from making any changes to the database schema, in order to maintain compatibility with Karim’s materials database. So the next best thing I can think of is to assume that the primary keys are assigned sequentially, and specify ordering by that.

That’s probably still not foolproof, but I think it’s safer than the current implicit ordering assumption.

Look for a change like this to appear in a coming update...