poggit / libasynql

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

Select queries (using variables) taking a very long time. #88

Closed TacoError closed 1 year ago

TacoError commented 1 year ago

Describe the bug Select queries (using variables) taking a very long time.

Prepared statement that I'm using:

-- #{ get.players
-- # :player string
SELECT * FROM players WHERE player=:player;
-- #}

Code

Main::getInstance()->database->executeSelect(
            "skyblock.get.players",
            ["player" => $player->getName()],
            function(array $rows) : void {
                var_dump("give me something i beg");
            },
            function($e) : void {
                var_dump("gelp");
            }
        );

SQLite File: https://anonfiles.com/7bw2D4J4yc/data_sqlite Prepared Statements File: https://anonfiles.com/Zdx8DfJ8y0/sqlite_sql

Expected behavior Either "give me something i beg" or "gelp" gets printed to the console.

Neither gets printed, even after waiting 5 minutes.

Server does not freeze or lag.

The IGN is in the database

Environment OS: Windows 10 (Version 10.0.19042) PocketMine version: 4.10.1

SOF3 commented 1 year ago

please don't use anonfiles.com. Zip your files and upload them to GitHub directly.

SOF3 commented 1 year ago

also turn on debug logging, $connector->setLoggingQueries(true);

TacoError commented 1 year ago

debug logging doesn't log anything

SOF3 commented 1 year ago

then that means you didn't execute your query at all

TacoError commented 1 year ago

My initial queries execute and dont log anything either. Also why isnt it executing anything anyways.