1. 14 Apr, 2022 2 commits
    • Rucha Deodhar's avatar
      vcol.wrong_arena failing on buildbot when current date is '2022-03-17' · e6511a39
      Rucha Deodhar authored
      Analysis: When current date is '2022-03-17', dayname() gives 'Thursday'. The
      previous json state is PS_KEYX which means key started with quote.
      So now json parser for path is supposed to parse the key.
      The keyname starts with 'T'. But the path transition table has JE_SYN when
      previous state is PS_KEYX and next letter is 'T'. So it gives error.
      Fix: We want to continue parsing the quoted keyname. So JE_SYN is incorrect.
      Replaced it with PS_KNMX.
      e6511a39
    • Rucha Deodhar's avatar
      MDEV-27911: Implement range notation for json path · c781cefd
      Rucha Deodhar authored
      Range can be thought about in similar manner as wildcard (*) where
      more than one elements are processed. To implement range notation, extended
      json parser to parse the 'to' keyword and added JSON_PATH_ARRAY_RANGE for
      path type. If there is 'to' keyword then use JSON_PATH_ARRAY range for
      path type along with existing type.
      This new integer to store the end index of range is n_item_end.
      When there is 'to' keyword, store the integer in n_item_end else store in
      n_item.
      c781cefd
  2. 13 Apr, 2022 6 commits
    • Rucha Deodhar's avatar
      MDEV-27972: Unexpected behavior with negative zero (-0) in · abe97121
      Rucha Deodhar authored
      JSON Path
      
      Analysis: When we have '-' followed by 0, then the state is
      changed to JE_SYN, meaning syntax error.
      Fix: Change the state to PS_INT instead, because we are
      reading '0' next (integer) and it is not a syntax error.
      abe97121
    • Rucha Deodhar's avatar
      MDEV-22224: Support JSON Path negative index · dfcbb30a
      Rucha Deodhar authored
      This patch can be viewed as combination of two parts:
      1) Enabling '-' in the path so that the parser does not give out a warning.
      2) Setting the negative index to a correct value and returning the
         appropriate value.
      
      1) To enable using the negative index in the path:
      To make the parser not return warning when negative index is used in path
      '-' needs to be allowed in json path characters. P_NEG is added
      to enable this and is made recognizable by setting the 45th index of
      json_path_chr_map[] to P_NEG (instead of previous P_ETC)
      because 45 corresponds to '-' in unicode.
      When the path is being parsed and '-' is encountered, the parser should
      recognize it as parsing '-' sign, so a new json state PS_NEG is required.
      When the state is PS_NEG, it means that a negative integer is
      going to be parsed so set is_negative_index of current step to 1 and
      n_item is set accordingly when integer is encountered after '-'.
      Next proceed with parsing rest of the path and get the correct path.
      Next thing is parsing the json and returning correct value.
      
      2) Setting the negative index to a correct value and returning the value:
      While parsing json if we encounter array and the path step for the array
      is a negative index (n_item < 0), then we can count the number of elements
      in the array and set n_item to correct corresponding value. This is done in
      json_skip_array_and_count.
      dfcbb30a
    • Marko Mäkelä's avatar
      Merge 10.8 into 10.9 · e98013cb
      Marko Mäkelä authored
      e98013cb
    • Nayuta Yanagisawa's avatar
      Merge 10.7 into 10.8 · cbf9d8a8
      Nayuta Yanagisawa authored
      cbf9d8a8
    • KiyoshiTakeda's avatar
      MDEV-27981 Deprecate spider_internal_limit · e87c710d
      KiyoshiTakeda authored
      The variable spider_internal_limit is for specifying the number of
      records acquired by Spider from each remote server. 
      
      There seems not to be much use of the variable. Thus, we deprecate it
      and the corresponding table options. 
      Reviewed-by: default avatarNayuta Yanagisawa <nayuta.yanagisawa@hey.com>
      e87c710d
    • Daniel Black's avatar
      MDEV-27791: rocksdb_log_dir test postfix · bea47a6f
      Daniel Black authored
      We can only remove a subdirectory in mtr on an installed instance
      
      Example failure previously:
      
      CURRENT_TEST: rocksdb.rocksdb_log_dir
      mysqltest: At line 15: Path '/usr/local/mariadb-10.9.0-linux-systemd-x86_64/mysql-test/var/tmp/1' is not a subdirectory of MYSQLTEST_VARDIR '/usr/local/mariadb-10.9.0-linux-systemd-x86_64/mysql-test/var/1'or MYSQL_TMP_DIR '/usr/local/mariadb-10.9.0-linux-systemd-x86_64/mysql-test/var/tmp/1'
      bea47a6f
  3. 12 Apr, 2022 10 commits
  4. 11 Apr, 2022 5 commits
    • Tuukka Pasanen's avatar
      MDEV-27033: Clean lintian 'duplicate-override-context' warnings · e858fc89
      Tuukka Pasanen authored
      Fix Debian lintian warnings:
        W: mariadb-10.7 source: duplicate-override-context version-substvar-for-external-package (lines 12 13) [debian/source/lintian-overrides:13]
        W: mariadb-10.7 source: duplicate-override-context version-substvar-for-external-package (lines 14 15) [debian/source/lintian-overrides:15]
        W: mariadb-10.7 source: duplicate-override-context version-substvar-for-external-package (lines 16 17) [debian/source/lintian-overrides:17]
        W: mariadb-10.7 source: duplicate-override-context version-substvar-for-external-package (lines 18 19) [debian/source/lintian-overrides:19]
        W: mariadb-10.7 source: duplicate-override-context version-substvar-for-external-package (lines 20 21) [debian/source/lintian-overrides:21]
        W: mariadb-10.7 source: duplicate-override-context version-substvar-for-external-package (lines 4 5) [debian/source/lintian-overrides:5]
      by removing duplicate override lines
      e858fc89
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-26578 ERROR: AddressSanitizer: heap-use-after-free around dict_table_t::is_temporary_name · f61f58e7
      Thirunarayanan Balathandayuthapani authored
      - Purge thread is trying to access the table name when other thread
      does rename of the table name. It leads to heap use after free error
      by purge thread. purge thread should check whether the table name
      is temporary while holding dict_sys.mutex.
      f61f58e7
    • Marko Mäkelä's avatar
      MDEV-28289 fts_optimize_sync_table() is acquiring dict_sys.latch while holding it · 840bab85
      Marko Mäkelä authored
      dict_acquire_mdl_shared(): Invoke the correct variant
      dict_table_t::parse_name<true>() also when trylock=true,
      that is, we are being called from fts_optimize_sync_table().
      
      Ever since commit 82b7c561 (MDEV-24258)
      this code was prone to a hang. If another thread requested an
      exclusive dict_sys.latch between the time
      dict_acquire_mdl_shared<trylock=true>() acquired a shared dict_sys.latch
      and dict_table_t::parse_name<false>() was trying to acquire another
      shared dict_sys.latch, InnoDB would get into an infinite livelock
      of threads, because the futex-based srw-lock implementation prioritizes
      exclusive latch requests.
      
      dict_table_t::parse_name(): Rename the template parameter dict_locked
      into dict_frozen.
      840bab85
    • Marko Mäkelä's avatar
      MDEV-28274 Assertion s <= READ_FIX failed in buf_page_t::set_state · 7bccf3dd
      Marko Mäkelä authored
      buf_page_t::set_state(): Relax a debug assertion. It is fine to update
      a read-fixed block descriptor to be both read-fixed and buffer-fixed.
      
      buf_pool_t::watch_unset(): Fix some incorrect logic that was implemented
      in commit e9e6db93.
      
      Thanks to Elena Stepanova for the test case.
      7bccf3dd
    • Vladislav Vaintroub's avatar
      MDEV-10183 implement service_manager_extend_timeout on Windows · 5a4a3707
      Vladislav Vaintroub authored
      The implementation calls SetServiceStatus() with updated
      SERVICE_STATUS::dwHint and SERVICE_STATUS::dwCheckpoint
      5a4a3707
  5. 10 Apr, 2022 2 commits
  6. 09 Apr, 2022 2 commits
  7. 08 Apr, 2022 2 commits
  8. 07 Apr, 2022 9 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 6645b1d2
      Marko Mäkelä authored
      6645b1d2
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 7b957316
      Marko Mäkelä authored
      7b957316
    • Daniel Black's avatar
      deb: make --output-sync=target · dea4e178
      Daniel Black authored
      Rather than Debian logs containing a barely decipherable mix
      of build command and the output of some other command, we
      use the make option --output-sync=target. This make the compile
      line and the output stay together in the output stream.
      
      This option exists even in the make version in debian;stretch
      so should work everywhere.
      
      Test on debian:stretch, ubuntu:18.04, the two lowest version that
      use the debian/rules.
      dea4e178
    • Daniel Black's avatar
      MDEV-28153: Debian autobake to generate control · 8990ffe6
      Daniel Black authored
      Without doing the full build.
      
      Autobake now includes a dependency on lsb-release.
      
      As the BB CI images
      (https://github.com/MariaDB/mariadb.org-tools/blob/master/buildbot.mariadb.org/ci_build_images/debian.Dockerfile)
      have explicit dependencies, there's no point maintaining them in
      two places. We don't want do the full autobake-deb.sh there, just enough
      to have the control file containing the correct dependencies.
      
      Helps: https://github.com/MariaDB/mariadb.org-tools/pull/130
      8990ffe6
    • Jan Lindström's avatar
      MDEV-28247 : Disable background ibuf merge during Galera SST · 3c99a48d
      Jan Lindström authored
      This failure was caused by MDEV-25975, which removed the parameter
      innodb_disallow_writes.
      
      Added a check for wsrep_sst_disable_writes to the function
      ibuf_merge_in_background().
      3c99a48d
    • Daniel Black's avatar
      MDEV-28250 aix test case failure innodb_zip.innochecksum_3,4k,crc32,innodb · 4ee00a29
      Daniel Black authored
      As discovered by tracing, but also presenting in AIX fseeko
      documentation, seeking beyond the EOF is acceptable, as you can write
      there.
      
      To display the same error in AIX to other implementations that return
      errors on seek, we take the EFBIG error code on reading and error the
      same way.
      
      An AIX truss of an aspect of the test:
      
      truss extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
      
        statx("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", 0x0FFFFFFFFFFFF610, 176, 010) = 0
        kopen("./mysql-test/var/log/innodb_zip.innochecksum_3-4k,crc32,innodb/mysqld.1/data//test/tab1.ibd", O_RDONLY|O_LARGEFILE) = 3
        kfcntl(3, 12, 0x00000001100006C8)               = 0
        kfcntl(3, F_GETFL, 0x00000001100A6CF8)          = 67108864
        kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
        klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0)             = 0
        kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
        kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096)    = 4096
        klseek(3, 0, 1, 0x0FFFFFFFFFFFF450)             = 0
        klseek(3, 17592186040320, 0, 0x0FFFFFFFFFFFF450) = 0
        klseek(3, 0, 1, 0x0FFFFFFFFFFFF3F0)             = 0
        kread(3, "DEADBEEF\0\0\0\0FFFFFFFF".., 4096)    Err#27 EFBIG
      
      An equivalent Linux trace:
      
      ltrace extra/innochecksum --page=18446744073709551615 $MYSQLD_DATADIR/test/tab1.ibd
      
        stat64(0x7fff10ea2dc3, 0x7fff10ea0670, 88, 0x8026be41)         = 0
        open64("./mysql-test/var/log/innodb_zip."..., 0, 02072403160)  = 3
        fcntl64(3, 6, 0x139f180, 1)                                    = 0
        fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 0)                = 0
        fseeko64(0x615000000080, 0xffffffff000, 0, 5 <unfinished ...>
        pthread_getspecific(0, 0x4d0eb8, 0x7fff10ea0490, 0)            = 0x7f7b2806d000
        <... fseeko64 resumed> )                                       = 0
        fgetpos64(0x615000000080, 0x7fff10ea0760, 1, 1)                = 0
        feof(0x615000000080)                                           = 0
        feof(0x615000000080)                                           = 1
        Error: Unable to seek to necessary offset
      4ee00a29
    • Daniel Black's avatar
      e84e134a
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-27783 InnoDB: Failing assertion: table->get_ref_count() == 0 upon ALTER... · 27b0030b
      Thirunarayanan Balathandayuthapani authored
      MDEV-27783 InnoDB: Failing assertion: table->get_ref_count() == 0 upon ALTER TABLE ... MODIFY COLUMN
      
      - There is a race condition occurs between purge thread and DDL.
      So purge thread can increment n_ref_count even after DDL does
      purge_sys_t::stop_FTS().
      
      - dict_table_open_on_id for purge thread should check
      purge_sys.must_wait_FTS() before acquring the table.
      
      - purge_sys.stop_FTS() does acquire dict_sys.latch for setting
      the purge system flag and check table ref count on auxilary tables.
      27b0030b
    • Alexander Barkov's avatar
  9. 06 Apr, 2022 2 commits