SQLite Forum

Integer overflow risk in sqlite3_changes and underlying counter?
Is there an internal limit in SQLite that prevents more than INT_MAX rows being altered in a table?

The reason I worry, from a boundary case point of view, is that a table can clearly have more than INT_MAX rows (2147483647 on Intel x86) and yet the sqlite3 struct and some API calls around it track and return an "int" e.g., the function:

   int sqlite3_changes(sqlite3*)

and its underlying counter in sqlite3 struct: 

   int nChange

Can I assume that even in a huge table SQLite won't change more than INT_MAX rows? Or do I have to worry about an overflow 'wrap' giving me the wrong answer? If overflow is impossible, does SQLite truncate a SQL transaction at INT_MAX rows, or do I have to trap some specific error code to alert me to overflow being prevented by SQLite limiting things internally?

Thanks for the feedback.