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
I have been agitating for some kind of null indicator that can be set for a
Variant without destroying its inherent type information. If this were the
case, then the bool array could disappear.
Looking at the code in mysql.comms, when a field is null, it's value is set to null, meaning the type information is gone anyway. Essentially you can replace _nulls[i] with _values[i].type == typeid(typeof(null)) and I think you can remove that array.
I would hold off until the safe update, as the code to do this is MUCH simpler and better performing when we are using MySQLVal instead of Variant (i.e. _values[i].kind == MySQLVal.Kind.Null). I don't want to do it in that PR since there's enough happening.
But I wanted to leave this enhancement in here so I don't forget.
The text was updated successfully, but these errors were encountered:
Just the help clarify the full context of this: FWIW, that comment is fairly ancient and dates back to Steve Teale's original release. I've been keeping the comment in there, avoiding deleting it, probably for much the same reason you opened this ticket!
This comment exists in mysql.result:
Looking at the code in
mysql.comms
, when a field is null, it's value is set tonull
, meaning the type information is gone anyway. Essentially you can replace_nulls[i]
with_values[i].type == typeid(typeof(null))
and I think you can remove that array.I would hold off until the safe update, as the code to do this is MUCH simpler and better performing when we are using
MySQLVal
instead ofVariant
(i.e._values[i].kind == MySQLVal.Kind.Null
). I don't want to do it in that PR since there's enough happening.But I wanted to leave this enhancement in here so I don't forget.
The text was updated successfully, but these errors were encountered: