You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take note that in batchData there is field with null ('Alexa_Rank' => null). Then, because of continue at /src/QueryBuilder.php:304, it will generate wrong query:
It happens because $notNullColumns was filled at first correct batch item, but in case of second batch item, code just skips one value and does not bind anything.
And it results in SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: wrong number of values here near '), (-8263165427741034520, '0-infoweb.newsbank.com.henrietta.slwa.wa.gov.au', 0, 463318, 0, 1, 'television_factual tv_27_5', 1). There is indeed wrong binding placeholders (7) in second values group of the query.
What's expected?
I'm not sure. May be an exception? Not sure if sphinx or manticore allows NULL value. At least query
But I think it is not corresponding with the query building problem, because it anyways looks bad to generate query with wrong number of values. For example, in Mysql Query Builder there is no continue in values binding loop: vendor/yiisoft/yii2/db/QueryBuilder.php:462.
The text was updated successfully, but these errors were encountered:
I did some more research and found out that both sphinx and manticore can't store NULL values. So in this case we may just throw an exception.
In case of ActiveRecord maybe we can use rules() to cast to "null" value according to scheme.
What steps will reproduce the problem?
Take note that in batchData there is field with null ('Alexa_Rank' => null). Then, because of
continue
at/src/QueryBuilder.php:304
, it will generate wrong query:It happens because
$notNullColumns
was filled at first correct batch item, but in case of second batch item, code just skips one value and does not bind anything.And it results in
SQLSTATE[42000]: Syntax error or access violation: 1064 sphinxql: wrong number of values here near '), (-8263165427741034520, '0-infoweb.newsbank.com.henrietta.slwa.wa.gov.au', 0, 463318, 0, 1, 'television_factual tv_27_5', 1)
. There is indeed wrong binding placeholders (7) in second values group of the query.What's expected?
I'm not sure. May be an exception? Not sure if sphinx or manticore allows NULL value. At least query
results in
ERROR 1064 (42000): sphinxql: syntax error, unexpected NULL near 'null, 0, TRUE, 'television_factual tv_27_5', TRUE)'
. My index scheme:But I think it is not corresponding with the query building problem, because it anyways looks bad to generate query with wrong number of values. For example, in Mysql Query Builder there is no
continue
in values binding loop:vendor/yiisoft/yii2/db/QueryBuilder.php:462
.The text was updated successfully, but these errors were encountered: