1. 13 Apr, 2018 1 commit
    • Daniel Black's avatar
      defaults-group-suffix in print_defaults · 88ac368f
      Daniel Black authored
      Also clarify which --{no-,}default* options, must be first.
      
      Sample output:
      $  client/mysql --help
      client/mysql  Ver 15.1 Distrib 5.5.59-MariaDB, for Linux (x86_64) using readline 5.1
      Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
      
      Usage: client/mysql [OPTIONS] [database]
      
      Default options are read from the following files in the given order:
      /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
      The following groups are read: mysql client client-server client-mariadb
      The following options may be given as the first argument:
      --print-defaults          Print the program argument list and exit.
      --no-defaults             Don't read default options from any option file.
      The following specify which files/groups are read (specified before other options):
      --defaults-file=#         Only read default options from the given file #.
      --defaults-extra-file=#   Read this file after the global files are read.
      --defaults-group-suffix=# Additionally read default groups with # appended as a suffix.
      
      tests running from build directory:
      TEST: print defaults ignored as not first
      $ sql/mysqld  --no-defaults --print-defaults --lc-messages-dir=${PWD}/sql/share
      
      TEST: no startup occurs as --print-defaults specified
      $ sql/mysqld  --print-defaults --lc-messages-dir=${PWD}/sql/share
      sql/mysqld would have been started with the following arguments:
      --lc-messages-dir=/home/dan/repos/build-mariadb-5.5/sql/share
      
      TEST: default args can't be anywhere
      $ client/mysql --user=bob  --defaults-file=/etc/my.cnf
      client/mysql: unknown variable 'defaults-file=/etc/my.cnf'
      $ client/mysql --user=bob  --defaults-group-suffix=.group
      client/mysql: unknown variable 'defaults-group-suffix=.group'
      
      /etc/my.cnf:
      [client-server.group]
      socket=/var/lib/mysql-multi/group/mysqld.sock
      user=bob
      
      /etc/my.other.cnf:
      socket=/var/lib/mysql-other/mysqld.sock
      
      TEST: defaults file read and suffix also applied
      $  client/mysql  --defaults-file=/etc/my.other.cnf  --defaults-group-suffix=.group
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql-other/mysqld.sock' (2)
      
      TEST: defaults extra file
      $ client/mysql  --defaults-extra-file=/etc/my.other.cnf  --defaults-group-suffix=.group
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql-other/mysqld.sock' (2)
      88ac368f
  2. 08 Apr, 2018 1 commit
  3. 07 Apr, 2018 1 commit
  4. 04 Apr, 2018 1 commit
  5. 03 Apr, 2018 3 commits
  6. 27 Mar, 2018 2 commits
  7. 21 Mar, 2018 3 commits
  8. 20 Mar, 2018 2 commits
  9. 19 Mar, 2018 1 commit
    • Eugene Kosov's avatar
      MDEV-15030 Add ASAN instrumentation · 75c76dbb
      Eugene Kosov authored
      Learn both valgrind and asan to catch this bug:
      
        mem_heap_t* heap = mem_heap_create(1024);
        byte* p = reinterpret_cast<byte*>(heap) + sizeof(mem_heap_t);
        *p = 123;
      
      Overflows of the last allocation in a block will be catched too.
      
      mem_heap_create_block(): poison newly allocated memory
      75c76dbb
  10. 14 Mar, 2018 1 commit
  11. 11 Mar, 2018 1 commit
  12. 24 Feb, 2018 1 commit
  13. 15 Feb, 2018 1 commit
  14. 14 Feb, 2018 2 commits
  15. 11 Feb, 2018 2 commits
  16. 30 Jan, 2018 3 commits
  17. 29 Jan, 2018 1 commit
    • Marko Mäkelä's avatar
      Do not SET DEBUG_DBUG=-d,... in tests · 547ec8ce
      Marko Mäkelä authored
      To disable debug instrumentation, save and restore the original value
      of the variable DEBUG_DBUG. Assigning -d,... will enable the output of
      a lot of unrelated DBUG messages to the server error log.
      547ec8ce
  18. 24 Jan, 2018 3 commits
  19. 23 Jan, 2018 10 commits
    • Marko Mäkelä's avatar
      Add ASAN instrumentation (and more strict Valgrind) to InnoDB · 8637931f
      Marko Mäkelä authored
      mem_heap_free_heap_top(): Remove UNIV_MEM_ASSERT_W() and unpoison
      the memory region first, because part of it may have been poisoned
      by an earlier mem_heap_free_top() call.
      Poison the address range at the end.
      
      mem_heap_block_free(): Poison the address range at the end.
      
      UNIV_MEM_ASSERT_AND_ALLOC(): Replace with UNIV_MEM_ALLOC().
      We want to keep the address ranges poisoned (unaccessible) as
      long as possible.
      
      UNIV_MEM_ASSERT_AND_FREE(): Replace with UNIV_MEM_FREE().
      8637931f
    • Marko Mäkelä's avatar
      Silence -Wimplicit-fallthrough · 70a9b12d
      Marko Mäkelä authored
      70a9b12d
    • Oleksandr Byelkin's avatar
      MDEV-14786: Server crashes in Item_cond::transform on 2nd execution of SP querying from a view · ba8d0fa7
      Oleksandr Byelkin authored
      MDEV-14957: JOIN::prepare gets unusable "conds" as argument
      
      Do not touch merged derived (it is irreversible)
      
      Fix first argument of in_optimizer for calls possible before fix_fields()
      ba8d0fa7
    • Oleksandr Byelkin's avatar
      11408a69
    • Sachin Setiya's avatar
      MDEV-14586 Assertion `0' failed in retrieve_auto_increment ... · 94da1cb4
      Sachin Setiya authored
      Problem:-
       If we create table using myisam/aria then this crashes the server.
        CREATE TABLE t1(a bit(1), b int auto_increment , index(a,b));
        insert into t1 values(1,1);
       Or this query
        CREATE TABLE t1 (b BIT(1), pk INTEGER AUTO_INCREMENT PRIMARY KEY);
        ALTER TABLE t1 ADD INDEX(b,pk);
        INSERT INTO t1 VALUES (1,b'1');
        ALTER TABLE t1 DROP PRIMARY KEY;
      
      Reason:-
       The reason for this is
       1st- find_ref_key() finds what key an auto_increment field belongs to by
        comparing key_part->offset and field->ptr. But BIT fields might have
        zero length in the record, so a key might have many key parts with the
        same offset. That is, comparing offsets cannot uniquely identify the
        correct key part.
       2nd- Since next_number_key_offset is zero it myisam/aria will think that
        auto_increment is in first part of key.
       3nd- myisam/aria will call retrieve_auto_key which will see first key_part
        field as a bit field and call assert(0)
      
      Solution:-
        Many key parts might have the same offset, but BIT fields do not
        support auto_increment. So, we can skip all key parts over BIT fields,
        and then comparing offsets will be unambiguous.
      94da1cb4
    • Daniel Black's avatar
      cc315541
    • Karim Geiger's avatar
      Fix error message typo · 701c7e77
      Karim Geiger authored
      701c7e77
    • Daniel Black's avatar
    • Daniel Black's avatar
      c98906e4
    • Eugene Kosov's avatar
      fix build for recent clang · 3532a421
      Eugene Kosov authored
      /home/kevg/work/mariadb/sql/sql_partition.cc:286:47: error: cannot initialize a parameter of type 'HA_CREATE_INFO *' (aka 'st_ha_create_information *') with an rvalue of type 'ulonglong' (aka 'unsigned long long')
                                                    (ulonglong)0, (uint)0);
                                                    ^~~~~~~~~~~~
      /home/kevg/work/mariadb/sql/partition_info.h:281:72: note: passing argument to parameter 'info' here
        bool set_up_defaults_for_partitioning(handler *file, HA_CREATE_INFO *info,
                                                                             ^
      3532a421