Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row._nulls can go away #216

Open
schveiguy opened this issue Feb 20, 2020 · 1 comment
Open

Row._nulls can go away #216

schveiguy opened this issue Feb 20, 2020 · 1 comment
Labels

Comments

@schveiguy
Copy link
Collaborator

This comment exists in mysql.result:

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.

@Abscissa
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants