QIbaseResult: null parameter follow up fix
a7deddba519fc1f6fd637496e92ca5daccf6d453 implemented a warning for disallowed null parameters. A check, was missing, if the argument is actually null. This patch adds the missing check. Fixes: QTBUG-114683 Change-Id: Iecbd636599a28284a0a9afe2987e48552f3658ff Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> (cherry picked from commit 634ef449bffad3e97a7141ca6c2df0795407b9fc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
90d96766af
commit
2461783ae9
@ -1052,8 +1052,11 @@ bool QIBaseResult::exec()
|
||||
// a value of 0 means non-null.
|
||||
*(d->inda->sqlvar[para].sqlind) = 0;
|
||||
} else {
|
||||
qWarning() << "QIBaseResult::exec: Null value replaced by zero for"_L1
|
||||
<< d->inda->sqlvar[para].ownname;
|
||||
if (QSqlResultPrivate::isVariantNull(val)) {
|
||||
qWarning() << "QIBaseResult::exec: Null value replaced by default (zero)"_L1
|
||||
<< "value for type of column"_L1 << d->inda->sqlvar[para].ownname
|
||||
<< ", which is not nullable."_L1;
|
||||
}
|
||||
}
|
||||
switch(d->inda->sqlvar[para].sqltype & ~1) {
|
||||
case SQL_INT64:
|
||||
|
Loading…
x
Reference in New Issue
Block a user