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

insert log record is not written for compressed row format

    XMLWordPrintable

Details

    Description

      If we take a loot at the following code

              if (new_page_zip) {                                                     
                      mtr_set_log_mode(mtr, log_mode);                                
                      if (!page_zip_compress(new_page_zip,                            
                                             new_page,                                
                                             index,                                   
                                             page_zip_level,                          
                                             NULL, mtr)) {                            
                              /* Before trying to reorganize the page,                
                              store the number of preceding records on the page. */   
                              ulint   ret_pos                                         
                                      = page_rec_get_n_recs_before(ret);              
                              /* Before copying, "ret" was the successor of           
                              the predefined infimum record.  It must still           
                              have at least one predecessor (the predefined           
                              infimum record, or a freshly copied record              
                              that is smaller than "ret"). */                         
                              ut_a(ret_pos > 0);                                      
                              if (!page_zip_reorganize(new_block, index, mtr)) {      
                                      if (!page_zip_decompress(new_page_zip,          
                                                               new_page, FALSE)) {    
                                              ut_error;                               
                                      }                                               
                                      ut_ad(page_validate(new_page, index));          
                                      if (heap) {                                     
                                              mem_heap_free(heap);                    
                                      }                                               
                                      return(NULL);                                   
                              } else {                                                
      ...                                                                             
                              }                                                       
                      }                                                               
              }
      

      in page_copy_rec_list_end(), we will see that if both page_zip_compress() and page_zip_reorganize() returned false, then there no log records will be written for the page, despite uncompressed content is changed.

      Attachments

        Issue Links

          Activity

            People

              vlad.lesin Vladislav Lesin
              vlad.lesin Vladislav Lesin
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.