Bug #102042 | MySQL Server Mock cannot serve queries | ||
---|---|---|---|
Submitted: | 21 Dec 2020 15:58 | Modified: | 4 May 2022 13:36 |
Reporter: | Natallia Savelyeva | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Router | Severity: | S6 (Debug Builds) |
Version: | 8.0 | OS: | Any |
Assigned to: | CPU Architecture: | x86 | |
Tags: | mock |
[21 Dec 2020 15:58]
Natallia Savelyeva
[22 Dec 2020 18:43]
Frederic Descamps
Just to confirm that using the js file in router/tests/component/data it works as expected: $ mysql_server_mock --filename simple-client.js --port 5500 -B 127.0.0.1 --verbose $ mysql -h 127.0.0.1 -P 5500 Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 0 Server version: 8.0.5-mock community Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
[29 Dec 2020 12:05]
Natallia Savelyeva
I have built version 8.0.21 from sources but unfortunately I still cannot connect and get the predefined response. Maybe this is because I use different options for make when building from sources. @Frederic Descamps: what make-options did you use? It would be great if you could publish your debug build in the docker image. Details are listed below. Connect error: root@d49827c65f65:/# /usr/local/mysql/bin/mysql -h 127.0.0.1 -P 5500 ERROR 1064 (HY000): #reader error: at /opt/mysql-server/router/src/mock_server/src/duk_module_shim.c:562: Error: Cannot find module: common_statements at [anon] (/opt/mysql-server/router/src/mock_server/src/duk_module_shim.c:562) internal at [anon] () native strict preventsyield at require () native strict preventsyield at eval (/opt/mysql-server/router/tests/component/data/simple-client.js:1) preventsyield Location of the common_statements file: root@d49827c65f65:/# find / -name common_statements* /opt/mysql-server/router/tests/component/data/local_modules/common_statements.js Full Debug output of the mock: docker run -v $PWD/mock_data:/data -p 5500:5500 -it mymysql:8.0.21 /opt/build/runtime_output_directory/mysql_server_mock --filename /opt/mysql-server/router/tests/component/data/simple-client.js --port 5500 -B 0.0.0.0 --verbose 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] plugin 'logger' init exit ok 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] plugin 'router_protobuf' doesn't implement init() 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] plugin 'mock_server' initializing 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] plugin 'mock_server' init exit ok 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] Starting all plugins. 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] plugin 'logger:' doesn't implement start() 2020-12-29 11:52:26 main DEBUG [7fa0b3d37700] plugin 'mock_server:classic' starting 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] plugin 'router_protobuf:' doesn't implement start() 2020-12-29 11:52:26 mock_server INFO [7fa0b3d37700] Starting to handle connections on port: 5500 2020-12-29 11:52:26 main DEBUG [7fa0b7054400] Running. 2020-12-29 11:55:16 mock_server ERROR [7fa0b2d35700] at /opt/mysql-server/router/src/mock_server/src/duk_module_shim.c:562: Error: Cannot find module: common_statements at [anon] (/opt/mysql-server/router/src/mock_server/src/duk_module_shim.c:562) internal at [anon] () native strict preventsyield at require () native strict preventsyield at eval (/opt/mysql-server/router/tests/component/data/simple-client.js:1) preventsyield Versions: root@8de518b01275:/# /opt/build/runtime_output_directory/mysql_server_mock --version 8.0.21 root@8de518b01275:/# /usr/local/mysql/bin/mysql --version /usr/local/mysql/bin/mysql Ver 8.0.21 for Linux on x86_64 (Source distribution)