Changes between Initial Version and Version 1 of Ticket #24800, comment 5
- Timestamp:
- 01/30/2014 08:10:04 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #24800, comment 5
initial v1 9 9 > }}} 10 10 11 This has broken some things. I noticed that some unit tests for one of my plugins were giving strange results. In one unit test for multisite, a blog would be created using `$this->factory->blog->create()`. Then stuff would fly apart in the next unit test, because for some reason the changes were being committed instead of rolled-back by MySQL. I eventually traced this down to the fact that the `CREATE TABLE` queries for new a new blog will have a leading newline. That is causing the `CREATE TABLE` query not to be converted to a `CREATE TEMPORARY TABLE` query. It worked before, because it was a simple `str_replace()`. Now it will ignore the query if there is leading whitespace.11 This has broken some things. I noticed that some unit tests for one of my plugins were giving strange results. In one unit test for multisite, a blog would be created using `$this->factory->blog->create()`. Then stuff would fly apart in the next unit test, because for some reason the changes were being committed instead of rolled-back by MySQL. I eventually traced this down to the fact that the `CREATE TABLE` queries for new a new blog will have a leading newline. That is causing the `CREATE TABLE` query not to be converted to a `CREATE TEMPORARY TABLE` query. And a `CREATE TABLE` query will automatically cause a commit. It worked before, because it was a simple `str_replace()`. Now it will ignore the query if there is leading whitespace. 12 12 13 13 I'll attach a patch with a possible fix.