Skip to content

Commit bf99ced

Browse files
committed
MDEV-39806: Add a per-push/per-pull-request checker for Markdown API docs
Create a GitHub action into the MariaDB server tree to build the Markdown documentation using the cmake target provided by MDEV-39718. This workflow generates API documentation for the plugin using a Docker container packed with all the extra doxygen/moxygen tools. Fixed some more doxygen problems.
1 parent da18481 commit bf99ced

3 files changed

Lines changed: 34 additions & 3 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Generate Plugin API Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
jobs:
11+
generate-docs:
12+
runs-on: ubuntu-latest
13+
container:
14+
image: quay.io/mariadb-foundation/bb-ecosystem:mariadb-doc-gen
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v7
18+
19+
- name: Generate documentation
20+
shell: bash
21+
run: |
22+
set -euo pipefail
23+
git config --global --add safe.directory `pwd`
24+
git submodule update --init --recursive libmariadb
25+
mkdir -p bld/docs/plugin-api
26+
target_dir=$(pwd)/bld/docs/plugin-api
27+
cd include/mysql
28+
. generate_plugin_api_docs.sh "$target_dir"
29+
cd ../..

include/mysql/generate_plugin_api_docs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
# Note: target_dir is created if not present.
1313
# Note: requires at least moxygen 2.1.11
1414

15+
set -euo pipefail
16+
set -x
17+
1518
# If no target_dir is specified, the current directory is used.
1619
if [ -n "$1" ]; then
1720
TARGET_DIR="$1"

include/mysql/psi/psi.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,15 +1544,13 @@ typedef void (*unbind_table_v1_t)
15441544
Rebind a table handle to the current thread.
15451545
This operation happens when a table from the open table cache
15461546
is reused for a thread.
1547-
@param table the table to unbind
15481547
*/
15491548
typedef PSI_table* (*rebind_table_v1_t)
15501549
(PSI_table_share *share, const void *identity, PSI_table *table);
15511550

15521551
/**
15531552
Close an instrumentation table handle.
15541553
Note that the table handle is invalid after this call.
1555-
@param table the table handle to close
15561554
*/
15571555
typedef void (*close_table_v1_t)(struct TABLE_SHARE *server_share,
15581556
struct PSI_table *table);
@@ -1586,6 +1584,7 @@ typedef int (*spawn_thread_v1_t)(PSI_thread_key key,
15861584
Create instrumentation for a thread.
15871585
@param key the registered key
15881586
@param identity an address typical of the thread
1587+
@param thread_id the id of the thread
15891588
@return an instrumented thread
15901589
*/
15911590
typedef struct PSI_thread* (*new_thread_v1_t)
@@ -2020,6 +2019,7 @@ typedef void (*end_stage_v1_t) (void);
20202019
@param state data storage for the locker
20212020
@param key the statement instrumentation key
20222021
@param charset client character set
2022+
@param sp_share the share
20232023
@return a statement locker, or NULL
20242024
*/
20252025
typedef struct PSI_statement_locker* (*get_thread_statement_locker_v1_t)
@@ -2348,7 +2348,6 @@ typedef void (*set_socket_thread_owner_v1_t)(struct PSI_socket *socket);
23482348

23492349
/**
23502350
Get a prepare statement.
2351-
@param locker a statement locker for the running thread.
23522351
*/
23532352
typedef PSI_prepared_stmt* (*create_prepared_stmt_v1_t)
23542353
(void *identity, uint stmt_id, PSI_statement_locker *locker,

0 commit comments

Comments
 (0)