Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-40632

fprintf in trx_print_low prints a different format for windows

    XMLWordPrintable

Details

    • Not for Release Notes
    • Q3/2026 Server Development

    Description

      marko mentioned:

      According to the MS documentation, "%#lx" ought to output a 0x prefix. In my opinion, the pointer value should not be output in the first place, but that’s how it has been for years.

      in relation to trx_print_low, which causes innodb.autoinc_debug,table_lock introduced in MDEV-24813 to fail in windows, see e.g. https://buildbot.mariadb.org/#/builders/234/builds/53475

      /* in trx_print_low: */
      	if (const trx_id_t id = trx->id) {
      		fprintf(f, "TRANSACTION " TRX_ID_FMT, id);
      	} else {
      		fprintf(f, "TRANSACTION (%p)", trx);
      	}
      

      innodb.autoinc_debug 'table_lock'        w10 [ fail ]
              Test ended at 2026-08-05 04:09:17
       
      CURRENT_TEST: innodb.autoinc_debug
      --- C:/buildbot/workers/prod/amd64-windows/build/mysql-test/suite/innodb/r/autoinc_debug,table_lock.result~	2026-08-05 04:09:13.613208800 +0200
      +++ C:\buildbot\workers\prod\amd64-windows\build\mysql-test\suite\innodb\r\autoinc_debug,table_lock.reject	2026-08-05 04:09:16.816837200 +0200
      @@ -140,7 +140,7 @@
       Level	Code	Message
       Note	1213	TIMESTAMP 0xTHD
       *** (1) TRANSACTION:
      -TRANSACTION (0xTHD), ACTIVE N sec starting index read
      +TRANSACTION (0000024954B60B80), ACTIVE N sec starting index read
       mysql tables in use 2, locked 2
       LOCK WAIT N lock struct(s), heap size N, N row lock(s)
       MariaDB thread id TID, OS thread handle TID, query id QID localhost root Sending data
      

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 2h 52m
                  2h 52m
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.25h Time Not Required
                  0.25h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.