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

mariadb 10.11.5 bulk insert: Index for table 'sbtest24' is corrupt; try to repair it

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.11.5
    • N/A
    • N/A
    • None
    • system: CentOS 8.1 x86_64
      kernel: 4.18.0-147.el8.x86_64
      gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)

    Description

      Compile mariadb 10.11.5 in cengos 8.1 x86_64 environment and run it, then use sysbench to perform stress test. When importing data, an error message appears: Index for table 'sbtest24' is corrupt; try to repair it

      1. Environmental Check

      [root@dbtestamd01v data]# cat /etc/os-release 
      NAME="CentOS Linux"
      VERSION="8 (Core)"
      ID="centos"
      ID_LIKE="rhel fedora"
      VERSION_ID="8"
      PLATFORM_ID="platform:el8"
      PRETTY_NAME="CentOS Linux 8 (Core)"
      ANSI_COLOR="0;31"
      CPE_NAME="cpe:/o:centos:centos:8"
      HOME_URL="https://www.centos.org/"
      BUG_REPORT_URL="https://bugs.centos.org/"
       
      CENTOS_MANTISBT_PROJECT="CentOS-8"
      CENTOS_MANTISBT_PROJECT_VERSION="8"
      REDHAT_SUPPORT_PRODUCT="centos"
      REDHAT_SUPPORT_PRODUCT_VERSION="8"
      

      [root@dbtestamd01v mariadb3306]# cat /etc/redhat-release 
      CentOS Linux release 8.1.1911 (Core)
       
      [root@dbtestamd01v data]# uname -r
      4.18.0-147.el8.x86_64
       
      [root@dbtestamd01v data]# gcc --version
      gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10)
      Copyright (C) 2018 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
       
      [root@dbtestamd01v data]# 
      

      2. Prepare

      yum install git gcc gcc-c++ tar make cmake bison ncurses-devel openssl openssl-devel
       
      yum install valgrind libcurl-devel gzip zlib-devel lz4-devel lzo-devel bzip2-devel libxml2-devel libevent-devel libaio-devel boost pcre2-devel systemd-devel rpm-build libaio-devel zstd pam-devel checkpolicy galera
       
      yum install gnutls-devel
       
      rpm -ivh snappy-devel-1.1.7-5.el8.aarch64.rpm
       
      policycoreutils-python  Not installed
      

      3. Compile

      cmake -DCMAKE_INSTALL_PREFIX=/opt/mariadb3306 -DMYSQL_DATADIR=/opt/mariadb3306/data -DSYSCONFDIR=/opt/mariadb3306/config -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITHOUT_TOKUDB=1 .
       
      make -j4
       
      make install
      

      4. start up

      /opt/mariadb3306/scripts/mysql_install_db --defaults-file=/opt/mariadb3306/config/my.cnf --basedir=/opt/mariadb3306 --datadir=/opt/mariadb3306/data --user=mariadb --verbos
       
      systemctl start mariadb3306
       
      /opt/mariadb3306/bin/mysql -S /tmp/.mariadb3306.sock
       
      mysql> create database sysbench;
      

      5. sysbench

      sysbench /usr/share/sysbench/oltp_read_write.lua --time=300 --mysql-socket=/tmp/.mariadb3306.sock --mysql-user=root --mysql-password='' --mysql-db=sysbench --table-size=10000000 --tables=30 --threads=30 prepare
      

      6. error

      Inserting 10000000 records into 'sbtest5'
      Inserting 10000000 records into 'sbtest6'
      Inserting 10000000 records into 'sbtest18'
      Inserting 10000000 records into 'sbtest9'
      Inserting 10000000 records into 'sbtest17'
      Inserting 10000000 records into 'sbtest24'
      Inserting 10000000 records into 'sbtest22'
      Inserting 10000000 records into 'sbtest29'
      Inserting 10000000 records into 'sbtest19'
      Inserting 10000000 records into 'sbtest30'
      Inserting 10000000 records into 'sbtest27'
      Inserting 10000000 records into 'sbtest4'
      Inserting 10000000 records into 'sbtest28'
      FATAL: mysql_drv_query() returned error 1034 (Index for table 'sbtest24' is corrupt; try to repair it) for query 'INSERT INTO sbtest24(k, c, pad) VALUES(5542047, '67462487984-82541933372-45795782919-21269395294-33837478291-55215978475-19725963336-64695976120-31113520545-80298385916', '06221671572-03970727898-26019241769-12694252313-21196783734'),(5027142, '33648206053-09782369508-55071512593-58496640363-60314624711-24061846961-40459149583-88267986802-00743675392-90650156159', '86823080692-93957966889-52376949846-75365005389-84448618549'),(4761525, '14170170086-42791551759-63063162143-11611912823-03324956386-00733615000-70163975697-38477828037-14296466027-87806516751', '02622342245-22941050850-21606830227-30287866248-37688096653'),(4986342, '69933682559-51733700420-87445042922-52981060548-45802296068-37659334276-02252376211-62718015884-80204360439-30720196757', '38164802476-69709576131-49249997256-95150203211-69789786799'),(5049638, '12930839302-49524754460-07982091906-70586747771-11788675925-07978945448-52336231462-71126273418-15393873113-19253753299', '48552775625-33182448093-89265020258-17079323199-59720903281'),(6160318, '94795021351-09814200781-41392099783-24014635290-72042789427-56406619849-42940428951-05945785818-19962668136-22542538547', '27773143389-06104140011-99911080628-39507542208-32610001412'),(5048704, '79053074191-40514662564-29859337140-30051249933-97097831622-76666502397-08124377431-69341860534-81108478065-36792419338', '21719807049-15557225104-30058658266-76105669573-65274914889'),(5046974, '81304945158-25687265518-29379610052-76705160801-73584258538-81734030939-30806211680-42473601854-86138829351-47478418668', '44091373995-06537526668-51325203282-50948118754-22956474902'),(5601822, '09424013921-12225513101-17278707897-25555654599-72283727555-24013147953-16898571583-03958297961-29938694730-04905254158', '33757610271-86288113062-66105003112-99038378437-39682634682'),(4558206, '64656432376-72145991312-37051386085-89558711807-86915885452-00059417199-31728454217-48767415910-44939398498-58955304676', '96897813635-03065201705-93861351233-51813878116-82199422649'),(5341075, '61033985701-88305813587-50716714793-76462014532-81084221292-63713418513-62607731125-78299201925-26255770076-84330611279', '39699792809-12848716626-57845613098-15921241323-58923834040'),(5981977, '49515470328-83412711607-50909954053-87264140526-99883000478-22800253993-77477310291-57488226942-34137414738-79383127685', '23892148454-75065402725-19695250249-41331247465-63645812892'),(5049900, '36684005458-95294182384-04309422193-37577669524-61289068284-73764642344-69388725155-28442347794-84545400247-61536030633', '91165379112-47102662605-71364946362-08533862580-66152121920'),(5027543, '55176209702-70747237336-44258191741-75269132056-35081753700-18537740911-69169155277-84189725741-89288318768-55686099945', '96527904303-69561596575-88545762781-16435718494-73538374467'),(5043429, '63670838959-34816188285-80959847932-23076075891-05013792938-77184312085-19088980408-48096875748-17645604987-15045183135', '40151499704-36090309569-38923068467-45035156768-37623801956'),(5298928, '97182617938-83814296225-70382962318-39221450547-66785567353-12662114299-58653255821-48147040508-62488773317-15891131251', '59966173721-89103161638-96210825703-09920119264-94425867940'),(4983477, '67033757280-86612496269-26559608102-12758586736-62572443978-49218696548-96512118738-18922296619-59811127198-98564192994', '83218381552-25579783427-48967150042-33160939047-19389356755'),(5000429, '30350328068-39320107206-75508188947-10710557306-39366248716-39500350376-13869178986-40370105573-32512860408-38219038357', '69604120311-80364447274-49915612406-47065782100-63300944672'),(5023871, '49813010974-60530399851-34668073175-53785686370-65965153780-82119645337-15698884240-26052638151-46207086942-18332785430', '75320418192-20817247094-94699961532-01960667182-61050221081'),(5032812, '67553452998-14853777049-09283554791-70567066786-64986567898-84527135763-64103874399-53431332348-96030311880-91711269484', '04079569599-23270583197-25238074680-73452891870-82295854635'),(6486371, '23003049123-5627118FATAL: `sysbench.cmdline.call_command' function failed: /usr/local/share/sysbench/oltp_common.lua:230: db_bulk_insert_next() failed
      

      Attachments

        1. error.log
          56 kB
        2. my.cnf
          7 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ls ls
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.