View Ticket
Not logged in
Ticket UUID: f8dbab8bafb21fce32da631fba110aa35de67c6b
Title: SQLiteCommand.ExecuteReader(CommandBehavior.SchemaOnly) applies the results of CREATE statements to the database.
Status: Closed Type: Code_Defect
Severity: Severe Priority: Medium
Subsystem: Data_Reader Resolution: Fixed
Last Modified: 2013-09-16 20:42:51
Version Found In:
User Comments:
anonymous added on 2013-09-12 20:05:48:
When the CommandText property of a SQLiteCommand is set to a CREATE statement (e.g., "CREATE INDEX foo ON [table_name] ([column_name])"), calling SQLiteCommand.ExecuteReader(CommandBehavior.SchemaOnly) will actually create the specified item on the database. While I haven't tested it, I would imagine that this extends to DROP, ALTER, and other statements that modify the database.

I had expected that the item would not be created, but that the returned reader would provide information about what it would look like if the statement had been successfully applied.

mistachkin added on 2013-09-13 00:42:05:
Issue confirmed.  This impacts all versions of System.Data.SQLite from the start
of the project up to

mistachkin added on 2013-09-13 01:00:57:
Preliminary fix checked-in [30e2ba0f43].

mistachkin added on 2013-09-14 00:35:59:
Fixed in trunk via check-in [0474af7d87].

mistachkin added on 2013-09-16 20:42:51:
Confirmed fixed by reporter.