poggit / libasynql

Asynchronous MySQL access library for PocketMine plugins.
https://poggit.github.io/libasynql
Apache License 2.0
132 stars 44 forks source link

Fixed null parameter not handled in MySQL prepared statement #59

Closed matcracker closed 2 years ago

SOF3 commented 3 years ago

Why is it s to be specific?

matcracker commented 3 years ago

it shouldn't make any difference because mysql will automatically handle behind the scenes.

SOF3 commented 3 years ago

I'm thinking if it's better to add a ? modifier to the PSF syntax so that null is not allowed normally.

speaking of that... I thought I already added that? or did I misremember?

matcracker commented 3 years ago

oh wait, I didn't rightly specify in the PR description. This bug is only generated when using raw functions. The null value is already handled in the PSF (like ?string)

SOF3 commented 3 years ago

What is passed from the normal execute functions if it is nullable?

matcracker commented 3 years ago

It is passed as "NULL" . I tried to do the same but it always considers it as string.

SOF3 commented 3 years ago

But why is this different from the usual one? That sounds fishy.