yiisoft/yii2 — pull request #3545 by myqlarson (2014-05-22 11:22:53+00:00)
Title: Update sqlite/QueryBuilder.php: batchInsert() limit

Using `UNION SELECT` to perform batch inserts in SQLite is [limited to a maximum of 500](http://www.sqlite.org/limits.html#max_compound_select) rows at a time, so add a $row length check.

Also, as of [3.7.11 (2012-03-20)](http://www.sqlite.org/releaselog/3_7_11.html),

> the INSERT syntax to allow multiple rows to be inserted via the VALUES clause.

I haven't changed the code to use that format because I don't know if you are supporting the legacy format intentionally or not.

Ideally the SQLite QueryBuilder should check for the version of SQLite in use and make use of newer features if they are available.