QIbaseResult: null parameter follow up fix
a7deddba51
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
Pick-to: 6.6 6.5
Change-Id: Iecbd636599a28284a0a9afe2987e48552f3658ff
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
This commit is contained in:
parent
9de8e7532b
commit
634ef449bf
@ -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…
Reference in New Issue
Block a user