Skip to content

bccomp() type error on certain MySQL column types #45

@Endermanbugzjfc

Description

@Endermanbugzjfc

Describe the bug

image

Fatal error: Uncaught TypeError: bccomp() expects parameter 1 to be string, int given in phar:///home/container/virions/libasynql.phar/src/poggit/libasynql/mysqli/MysqliThread.php:186
Stack trace:
#0 phar:///home/container/virions/libasynql.phar/src/poggit/libasynql/mysqli/MysqliThread.php(186): bccomp(1, '922337203685477...')
#1 phar:///home/container/virions/libasynql.phar/src/poggit/libasynql/mysqli/MysqliThread.php(224): poggit\libasynql\mysqli\MysqliThread->poggit\libasynql\mysqli\{closure}(1)
#2 phar:///home/container/virions/libasynql.phar/src/poggit/libasynql/mysqli/MysqliThread.php(155): poggit\libasynql\mysqli\MysqliThread->toSelectResult(Object(mysqli_result))
#3 phar:///home/container/virions/libasynql.phar/src/poggit/libasynql/base/SqlSlaveThread.php(85): poggit\libasynql\mysqli\MysqliThread->executeQuery(Object(mysqli), 3, 'SELECT record_i...', Array)
#4 [internal function]: poggit\libasynql\base\SqlSlaveThread->run()
#5 {main}
thrown in phar:///home/container/virions/libasynql.phar/src/poggit/libasynql/mysqli/MysqliThread.php on line 186

Sample code

-- # 			{ pre_registered
-- # 			  :username string
SELECT record_id
FROM pre_registered
WHERE username = :username
LIMIT 1;
-- # 			}

Expected behavior

record_id is a unsigned bigint, the error didn't occur when no result is selected

Environment

OS: linux and idk other stuffs (Same result on Windows10)
PocketMine version: 3.14.2
Libasynql version: 3.3.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions