Uploaded image for project: 'MariaDB Foundation Development'
  1. MariaDB Foundation Development
  2. MDBF-1244

API Plugin docs: 174 of 184 published function signatures have a doubled parameter list

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Documentation
    • None

    Description

      What

      Every PSI inline wrapper in the generated Plugin API reference publishes a parameter list that does not exist. The parameters are emitted twice.

      Source Published
      inline_mysql_file_fgetc(MYSQL_FILE *file)
      (psi/mysql_file.h:563)
      inline_mysql_file_fgetc(MYSQL_FILE * file, MYSQL_FILE * file)
      inline_mysql_memory_register(const char *category, PSI_memory_info *info, int count)
      (psi/mysql_memory.h:62)
      inline_mysql_memory_register(const char *category _attribute, void *info __attribute, int count __attribute, const char *category __attribute, void *info __attribute, int count __attribute_)

      174 of 184 published signatures are affected (95%). Two take no parameters. The 10 unaffected are plain mysql_ client functions in api.md; *every inline_mysql_* wrapper is doubled.

      Live example: https://mariadb.com/docs/server/reference/plugins/api-plugin/Memory_instrumentation

      It is not a PREDEFINED problem

      I formed that hypothesis and disproved it. inline_mysql_socket_bind has correct parameter types — HAVE_PSI_SOCKET_INTERFACE is one of the three macros Doxyfile.generated_docs_plugin_api:12 predefines — and it is still doubled:

      static inline int inline_mysql_socket_bind(const char * src_file, uint src_line, MYSQL_SOCKET mysql_socket, const struct sockaddr * addr, size_t len, const char * src_file, uint src_line, MYSQL_SOCKET mysql_socket, const struct sockaddr * addr, size_t len)

      So adding the missing macros will not fix this. It is a doxygen/moxygen output defect.

      Two related defects in the same output

      • _attribute((unused)) is truncated to attribute_ — 72 occurrences, zero correct ones. The argument is dropped, leaving invalid C.
      • The wrong build variant is documented. Doxyfile.generated_docs_plugin_api:12 predefines only HAVE_PSI_SOCKET_INTERFACE HAVE_PSI_1 USE_PSI_1, but 16 HAVE_PSI__INTERFACE macros exist under psi/. Socket therefore publishes the *instrumented signatures (16 occurrences of src_file/src_line); File, Memory, Thread and the other twelve publish the no-instrumentation fallback — zero occurrences, and void *info where the real type is PSI_memory_info *. This one is fixable in the doc-gen repo with no upstream dependency.

      Why this is worth raising upstream ahead of MDBF-1243

      MDBF-1243 asks moxygen to cap heading depth so GitBook can anchor the output — a request they can reasonably decline as CMS-specific. This is a correctness bug in their own C output, independent of any consumer, and is much harder to wave away. Suggest adding it to https://github.com/sourcey/moxygen/issues/136 or filing it alongside.

      Acceptance

      Published signatures match the header declarations, verified on a real workflow_dispatch run and against the rendered page.

      Related

      MDBF-1243 (heading levels / anchors), DOCS-6618 (our side), moxygen#136. Found during the 2026-09-10 published-quality review of all 14 generated pages.

      Attachments

        Activity

          People

            gkodinov Georgi Kodinov
            stefan.hinz Stefan Hinz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: