I want test the behavior of various dbsrv16 -ufd option settings when server-level and database-level assertions occur. I don't care what the assertion codes are, so fakes are OK. asked 14 Mar '13, 09:29 Breck Carter Volker Barth |
One way to generate assertions would be to create a database and then corrupt it by changing the checksum on one of the database pages. WARNING: DO NOT DO THIS ON ANY DATABASE WITH REAL DATA !! dbinit bad.db perl corrupt_the_database.pl bad.db where corrupt_the_database.pl is the perl script containing:
When you start the database on bad.db (e.g. "dbeng16 bad.db") the server will generate a "Checksum failure" assertion. answered 14 Mar '13, 10:01 Mark Culp Presumably, that is a permanent error condition. Is there any way to cause a transient assertion, one that would allow dbsrv16 -ufd restart to successfully restart the database?
(14 Mar '13, 10:09)
Breck Carter
Replies hidden
Yes, the corrupted checksum failure would be a permanent condition and therefore the restart attempt would fail. I do not know of any publicly available way of causing a temporary assertion. Perhaps one way would be to create a user table, put some data in it, add an index, shutdown the database, and then corrupt the index using a method similar to the above process. Starting the database on such a table would succeed but accessing the table may cause an assertion if the corruption was "just right". Again this type of corruption would be permanent but the restart of the database would succeed.
(14 Mar '13, 10:30)
Mark Culp
Comment Text Removed
Soooo... a valuable new feature exists with no way to prove it... :)
(14 Mar '13, 10:54)
Breck Carter
2
Well, we've proved it in house... but I'm working on a method for you to prove it to yourself... give me a few more
(14 Mar '13, 11:19)
Mark Culp
Take all the time you need, take weeks!
(14 Mar '13, 17:02)
Breck Carter
|
Well, the typical EBF readme does contain several bug fixes for (temporary) assertions - some of them are declared with "under very rare circumstances" and the like, others sound reproducable. Is that a starting point? Yes, I know, v16 is brandnew, so there are no EBFs and readmes available yet... answered 14 Mar '13, 10:47 Volker Barth @Breck: Are you working on "The top 10 cool features of SQL Anywhere 16"? (In case that allows for a publicly available answer:))
(14 Mar '13, 10:48)
Volker Barth
Replies hidden
Well, someone seems to have just done that: Top 10 Cool New Features in SAP Sybase SQL Anywhere 16... Isn't that a smart "nearly-invisible announcement":)
(08 Apr '13, 05:52)
Volker Barth
|
Agreed, it would be handy if one could "fake an assertion" just as one might want to fake a "database validation error" when testing a backup/validation plan - IIRC, the latter has been asked in the past...