An error occurred fetching the project authors.
  1. 23 Nov, 2020 2 commits
    • Vladislav Vaintroub's avatar
      Fix GCC warning/error. · 540e2f78
      Vladislav Vaintroub authored
      540e2f78
    • Vladislav Vaintroub's avatar
      MDEV-19237 Skip sending metadata when possible for binary protocol. · 295f3e4c
      Vladislav Vaintroub authored
      Do not resend metadata, if metadata does not change between prepare and
      execute of prepared statement, or between executes.
      
      Currently, metadata of *every* prepared statement will be checksummed,
      and change is detected once checksum changes.
      
      This is not from ideal, performance-wise. The code for
      better/faster detection of unchanged metadata, is already in place, but
      currently disabled due to PS bugs, such as MDEV-23913.
      295f3e4c
  2. 05 Nov, 2020 1 commit
  3. 29 Oct, 2020 1 commit
    • Lawrin Novitsky's avatar
      MDEV-19838 Wrong direxec param data caused crash · 4b854d47
      Lawrin Novitsky authored
      In case of direct execution(stmtid=-1, mariadb_stmt_execute_direct in C
      API) application is in control of how many parameters client sends to
      the server. In case this number is not equal to actual query parameters
      number, the server may start to interprete packet data incorrectly, e.g.
      starting from the size of null bitmap. And that could cause it to crash
      at some point. The commit introduces some additional COM_STMT_EXECUTE
      packet sanity checks:
      - checking that "types sent" byte is set, and the value is equal to 1.
        if it's not direct execution, then that value is 0 or 1.
      - checking that parameter type value is a valid type, and parameter
        flags value is 0 or only "unsigned" bit is set
      - added more checks that read does not go beyond the end of the packet
      4b854d47
  4. 23 Sep, 2020 1 commit
    • Marko Mäkelä's avatar
      Fix GCC 10.2.0 -Og -fsanitize=undefined -Wformat-overflow · 0448558a
      Marko Mäkelä authored
      For some reason, adding -fsanitize=undefined (cmake -DWITH_UBSAN=ON)
      to the compilation flags will cause even more warnings to be emitted.
      The warning was a bogus one:
      
      tests/mysql_client_test.c:8632:22: error: '%d' directive writing between
      1 and 11 bytes into a region of size 9 [-Werror=format-overflow=]
       8632 |     sprintf(field, "c%d int", i);
            |                      ^~
      tests/mysql_client_test.c:8632:20: note: directive argument
      in the range [-2147483648, 999]
      
      The warning does not take into account that the lower bound of the
      variable actually is 0. But, we can help the compiler and use an
      unsigned variable.
      0448558a
  5. 14 Jul, 2020 1 commit
  6. 01 Jul, 2020 1 commit
  7. 14 Jun, 2020 1 commit
    • Sergei Petrunia's avatar
      MDEV-22779: Crash: Prepared Statement with a '?' parameter inside a re-used CTE · 21e79331
      Sergei Petrunia authored
      When a prepared statement parameter '?' is used in a CTE that is used
      multiple times, the following happens:
      - The CTE definition is re-parsed multiple times.
      - There are multiple Item_param objects referring to the same "?" in
      the original query.
      - Prepared_statement::param has a pointer to the first of them, the
        others are "clones".
      - When prepared statement parameter gets the value, it should be passed
        over to clones with param->sync_clones() call.
      
      This call is made in insert_params(), etc. It was not made in
      insert_params_with_log().
      
      This would cause Item_param to not have any value which would confuse
      the query optimizer.
      
      Added the missing call.
      21e79331
  8. 12 May, 2020 1 commit
    • Alexander Barkov's avatar
      MDEV-20261 NULL passed to String::eq, SEGV, server crash, regression in 10.4 · 9f209681
      Alexander Barkov authored
      Type_handler_xxx::Item_const_eq() can handle only non-NULL values.
      The code in Item_basic_value::eq() did not take this into account.
      
      Adding a test to detect three different combinations:
      - Both values are NULLs, return true.
      - Only one value is NULL, return false.
      - Both values are not NULL, call Type_handler::Item_const_eq()
        to check equality.
      9f209681
  9. 10 Mar, 2020 1 commit
  10. 03 Jun, 2019 1 commit
    • Monty's avatar
      Ensure that tests and programs can restore variables · 76f14be1
      Monty authored
      - --default-character-set can now be disabled in mysqldump
      - --skip-resolve can be be disabled in mysqld
      - mysql_client_test now resets global variables it changes
      - mtr couldn't handle [mysqldump] in config files (wrong regexp used)
      76f14be1
  11. 16 May, 2019 1 commit
  12. 11 May, 2019 1 commit
  13. 25 Apr, 2019 1 commit
  14. 02 Apr, 2019 1 commit
  15. 21 Mar, 2019 1 commit
  16. 12 Mar, 2019 1 commit
  17. 07 Mar, 2019 1 commit
  18. 06 Mar, 2019 1 commit
  19. 25 Feb, 2019 1 commit
    • Alexander Barkov's avatar
      MDEV-18408 Assertion `0' failed in Item::val_native_result /... · b25ad1bc
      Alexander Barkov authored
      MDEV-18408 Assertion `0' failed in Item::val_native_result / Timestamp_or_zero_datetime_native_null::Timestamp_or_zero_datetime_native_null upon mysqld_list_fields after crash recovery
      
      The problem happened because Item_ident_for_show did not implement val_native().
      
      Solution:
      
      - Removing class Item_ident_for_show
      - Implementing a new method Protocol::send_list_fields() instead,
        which accepts a List<Field> instead of List<Item> as input.
        Now no any Item creation is done during mysqld_list_fields().
      
      Adding helper methods, to reuse the code easier:
      - Moved a part of Protocol::send_result_set_metadata(),
        responsible for sending an individual field metadata,
        into a new method Protocol_text::store_field_metadata().
        Reusing it in both send_list_fields() and send_result_set_metadata().
      - Adding Protocol_text::store_field_metadata()
      - Adding Protocol_text::store_field_metadata_for_list_fields()
      
      Note, this patch also automatically fixed another bug:
      
      MDEV-18685 mysql_list_fields() returns DEFAULT 0 instead of DEFAULT NULL for view columns
      
      The reason for this bug was that Item_ident_for_show::val_xxx() and get_date()
      did not check field->is_null() before calling field->val_xxx()/get_date().
      Now the default value is correctly sent by Protocol_text::store(Field*).
      b25ad1bc
  20. 03 Feb, 2019 1 commit
    • Igor Babaev's avatar
      MDEV-16188 Use in-memory PK filters built from range index scans · 658128af
      Igor Babaev authored
      This patch contains a full implementation of the optimization
      that allows to use in-memory rowid / primary filters built for range  
      conditions over indexes. In many cases usage of such filters reduce  
      the number of disk seeks spent for fetching table rows.
      
      In this implementation the choice of what possible filter to be applied  
      (if any) is made purely on cost-based considerations.
      
      This implementation re-achitectured the partial implementation of
      the feature pushed by Galina Shalygina in the commit
      8d5a1112.
      
      Besides this patch contains a better implementation of the generic  
      handler function handler::multi_range_read_info_const() that
      takes into account gaps between ranges when calculating the cost of
      range index scans. It also contains some corrections of the
      implementation of the handler function records_in_range() for MyISAM.
      
      This patch supports the feature for InnoDB and MyISAM.
      658128af
  21. 14 Dec, 2018 1 commit
  22. 05 Oct, 2018 1 commit
  23. 30 Apr, 2018 1 commit
  24. 26 Apr, 2018 1 commit
  25. 25 Apr, 2018 2 commits
  26. 19 Apr, 2018 1 commit
    • Sachin Setiya's avatar
      Mdev-10664 Add statuses about optimistic parallel replication stalls · 419385db
      Sachin Setiya authored
      In this commit we are adding three more status variable to SHOW SLAVE
      STATUS.  Slave_DDL_Events and Slave_Non_Transactional_Events.
      
      Slave_DDL_Groups:- This status variable counts the occurrence of DDL
      statements
      
      Slave_Non_Transactional_Groups:- This variable count the occurrence
      of non-transnational event group.
      
      Slave_Transactional_Groups:- This variable count the occurrence
      of transnational event group.
      
      Patch Credit:- Kristian Nielsen
      419385db
  27. 23 Mar, 2018 1 commit
  28. 16 Mar, 2018 2 commits
  29. 20 Feb, 2018 1 commit
  30. 16 Feb, 2018 1 commit
  31. 06 Feb, 2018 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from... · 6c279ad6
      Vladislav Vaintroub authored
      MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)
      
      Handle string length as size_t, consistently (almost always:))
      Change function prototypes to accept size_t, where in the past
      ulong or uint were used. change local/member variables to size_t
      when appropriate.
      
      This fix excludes rocksdb, spider,spider, sphinx and connect for now.
      6c279ad6
  32. 21 Nov, 2017 1 commit
    • Alexander Barkov's avatar
      MDEV-14454 Binary protocol returns wrong collation ID for SP OUT parameters · 563f1d89
      Alexander Barkov authored
      Item_param::set_value() did not set Item::collation and
      Item_param::str_value_ptr.str_charset properly. So both
      metadata and data for OUT parameters were sent in a wrong
      way to the client.
      
      This patch removes the old implementation of Item_param::set_value()
      and rewrites it using Type_handler::Item_param_set_from_value(),
      so now setting IN and OUT parameters share the a lot of code.
      
      1. Item_param::set_str() now:
        - accepts two additional parameters fromcs, tocs
        - sets str_value_ptr, to make sure it's always in sync with str_value,
          even without Item_param::convert_str_value()
        - does collation.set(tocs, DERIVATION_COERCIBLE),
          to make sure that DTCollation is valid even without
          Item_param::convert_str_value()
      
      2. Item_param::set_value(), which is used to set OUT parameters,
         now reuses Type_handler::Item_param_set_from_value().
      
      3. Cleanup: moving Item_param::str_value_ptr to private,
         as it's not needed outside.
      
      4. Cleanup: adding a new virtual method
         Settable_routine_parameter::get_item_param()
         and using it a few new DBUG_ASSERTs, where
         Item_param cannot appear.
      
      After this change:
      1. Assigning of IN parameters works as before:
      a. Item_param::set_str() is called and sets the value as a binary string
      b. The original value is sent to the query used for binary/general logging
      c. Item_param::convert_str_value() converts the value from the client
         character set to the connection character set
      
      2. Assigning of OUT parameters works in the new way:
      a. Item_param::set_str() and sets the value
         using the source Item's collation, so both Item::collation
         and Item_param::str_value_ptr.str_charset are properly set.
      b. Protocol_binary::send_out_parameters() sends the
         value to the client correctly:
         - Protocol::send_result_set_metadata() uses Item::collation.collation
           (which is now properly set), to detect if conversion is needed,
           and sends a correct collation ID.
         - Protocol::send_result_set_row() calls Type_handler::Item_send_str(),
           which uses Item_param::str_value_ptr.str_charset
           (which is now properly set) to actually perform the conversion.
      563f1d89
  33. 14 Oct, 2017 1 commit
  34. 28 Sep, 2017 1 commit
  35. 26 Aug, 2017 2 commits
  36. 23 Aug, 2017 1 commit