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

dbug_print_table_row is broken: prints empty rows in debugger

Details

    Description

      dbug_print_table_row() function was introduced to allow printing rows from debugger:

      Example:

      create table t1 (a int, b varchar(10));
      insert into t1 values (1,'yksi'), (2,'kaksi');
      

      Now in debugger:

      b rr_sequential
      

      Then run a query:

      select * from t1;
      

      in debugger:

        Thread 17 "mysqld" hit Breakpoint 1, rr_sequential (info=0x7fff180193d8) at 
      ..../sql/records.cc:519
      (gdb) next
      (gdb) p dbug_print_table_row(info->table)
        $3 = 0x555557adcb20 <dbug_print_row_buff> "t1(a,b)=(1,yksi)"
      

      This worked until this patch:

      commit e1e1e50bbaf3fd96ac0b5ca4fcd28a458132e9bd
      Author: Aleksey Midenkov <midenok@gmail.com>
      Date:   Mon Jan 13 15:40:59 2025 +0300
       
          MDEV-35343 DML debug logging
      
      

      After that, I get empty rows printed:

        $6 = 0x7fff180665c0 "t1()=()"
      

      The columns are not printed because the above patch makes the print out function think no columns are in the read set.

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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