[MDEV-30576] Include spider error codes in extra/perror Created: 2023-02-06  Updated: 2023-05-27

Status: Open
Project: MariaDB Server
Component/s: Storage Engine - Spider
Fix Version/s: None

Type: Task Priority: Major
Reporter: Yuchen Pei Assignee: Yuchen Pei
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26543 Spider: [ERROR] Got error 12701 when ... Stalled
relates to MDEV-29583 Disallow Spider self/dual/multi/cross... Closed
relates to MDEV-31117 Spider UBSAN runtime error: applying ... Closed

 Description   

Requested by Roel.

$ ./extra/perror 12714
Illegal error code: 12714

Other observed codes: 12701, 12501



 Comments   
Comment by Yuchen Pei [ 2023-03-28 ]

I guess the proper way of fixing this should be moving spider errors from spd_err.h to errmsg-utf8.txt, which will also make it automatically localised.

Comment by Sergei Golubchik [ 2023-05-23 ]

no, the proper way would be to extend plugin API to allow plugins to have their own translated error messages.
Proper plugins should have nothing outside of the plugin source directory, and in particular should not leak into server's errmsg-utf8.txt

Comment by Yuchen Pei [ 2023-05-24 ]

serg I assume this rule applies to dynamic plugins only, i.e. those not in mysql_mandatory_plugins and mysql_optional_plugins, right? I mean there are plenty of things in the server code helping out builtin plugins like InnoDB, perfschema, aria etc.

Comment by Sergei Golubchik [ 2023-05-24 ]

it's a general rule with exception. there are few plugins who are more integrated into the server, unfortunately.
unix_socket plugin is compiled statically but it doesn't leak into the server. And rocksdb is compiled dynamically, but it does.

Spider could be, technically, compiled statically too, if you remove MODULE_ONLY from its CMakeLists.txt

Comment by Yuchen Pei [ 2023-05-25 ]

> Spider could be, technically, compiled statically too, if you remove MODULE_ONLY from its CMakeLists.txt

or do PLUGIN_SPIDER:STRING=STATIC in CMakeCache.txt

Comment by Roel Van de Paar [ 2023-05-27 ]

Another example here.

Generated at Thu Feb 08 10:17:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.