Skipped some tests when not has_bulk_insert and others only skip the asserts that depend on the explicit number of queries.
This is not the correct fix, all tests should be split into two tests, one which checks efficiency, and the other which checks correctness. The efficiency version should be only run on databases which support bulk insert.
What is the benefit of doing this split instead of skipping invalid inserts? Wouldn't it be better to not duplicate most of the code and time for some tests only to check another assert for some databases?
The benefit is that we have two tests for two different things which can then fail independently, and give us more information for when they break, which is the goal of a test suite.
Merge branch 'master', remote-tracking branch 'origin'
Fixed #18927 - Fix bulk_create tests when not has_bulk_insert
Updated the pull request to split the efficiency tests.