An error occurred fetching the project authors.
  1. 20 Sep, 2024 1 commit
    • Oleg Smirnov's avatar
      MDEV-34860 Implement MAX_EXECUTION_TIME hint · 99f28694
      Oleg Smirnov authored
      It places a limit N (a timeout value in milliseconds) on how long
      a statement is permitted to execute before the server terminates it.
      
      Syntax:
      SELECT /*+ MAX_EXECUTION_TIME(milliseconds) */ ...
      
      Only top-level SELECT statements support the hint.
      99f28694
  2. 16 Sep, 2024 1 commit
    • Oleg Smirnov's avatar
      MDEV-33281 Make BNL() hint work for join_cache_levels from 0 to 3 · 824c20ae
      Oleg Smirnov authored
      BNL() hint effectively increases join_cache_level up to 4 if it is
      set to value less than 4.
      This commit also makes the BKA() hint override not only
      `join_cache_bka` optimizer switch but `join_cache_level` as well.
      I.e., BKA() hint enables BKA and BKAH join buffers both flat and
      incremental despite `join_cache_level` and `join_cache_bka` setting.
      824c20ae
  3. 06 Sep, 2024 1 commit
    • Oleg Smirnov's avatar
      MDEV-33281 Make BNL() hint work for join_cache_level=0 · c8ce9fbb
      Oleg Smirnov authored
      join_cache_level=0 disables join cache buffers, but the hint
      BNL() now allows to employ BNL(H) buffers for particular tables
      or query blocks.
      
      This commit also adds a number of test cases including
      OUTER JOINs to make sure hints do not break the rules of
      join buffers application
      c8ce9fbb
  4. 03 Sep, 2024 2 commits
    • Oleg Smirnov's avatar
      MDEV-33281 Implement optimizer hints · cee6796b
      Oleg Smirnov authored
      Forbid adding optimizer hints to view definitions.
      In the case when optimizer hints are added to the view definition
      at a `CREATE (OR REPLACE) VIEW`/`ALTER VIEW` statement, a warning is
      generated and the hints are ignored.
      
      This commit also disables ps-protocol for test cases where
      `Unresolved table/index name` warnings are generated. The reason
      for this is such warnings are generated during both PREPARE
      and EXECUTE stages. Since opt_hints.test has `--enable_prepare_warnings`,
      running it with `--ps-protocol` causes duplication of warning messages
      cee6796b
    • Oleg Smirnov's avatar
      MDEV-33281 Fix code review comments · 316c3378
      Oleg Smirnov authored
      316c3378
  5. 14 Aug, 2024 3 commits
    • Alexander Barkov's avatar
      MDEV-33281 Implement optimizer hints · 189c8eb9
      Alexander Barkov authored
      - Using Lex_ident_sys to scan identifiers, like the SQL parser does.
      
        This fixes handling of double-quote-delimited and backtick-delimited identifiers,
        as well as handling of non-ASCII identifiers.
      
        Unescaping and converting from the client character set to the system
        character set is now done using Lex_ident_cli_st and Lex_ident_sys,
        like it's done in the SQL tokenizer/parser.
        Adding helper methods to_ident_cli() and to_ident_sys()
        in Optimizer_hint_parser::Token.
      
      - Fixing the hint parser to report a syntax error when an empty identifiers:
          SELECT /*+ BKA(``) */ * FROM t1;
      
      - Moving a part of the code from opt_hints_parser.h to opt_hints_parser.cc
      
        Moving these method definitions:
        - Optimizer_hint_tokenizer::find_keyword()
        - Optimizer_hint_tokenizer::get_token()
      
        to avoid huge pieces of the code in the header file.
      
      - A Lex_ident_cli_st cleanup
        Fixing a few Lex_ident_cli_st methods to return Lex_ident_cli_st &
        instead of void, to use them easier in the caller code.
      
      - Fixing the hint parser to display the correct line number
      
        Adding a new data type Lex_comment_st
        (a combination of LEX_CSTRING and a line number)
        Using it in sql_yacc.yy
      
      - Getting rid of redundant dependencies on sql_hints_parser.h
      
        Moving void LEX::resolve_optimizer_hints() from sql_lex.h to sql_lex.cc
      
        Adding a class Optimizer_hint_parser_output, deriving from
        Optimizer_hint_parser::Hint_list. Fixing the hint parser to
        return a pointer to an allocated instance of Optimizer_hint_parser_output
        rather than an instance of Optimizer_hint_parser::Hint_list.
        This allows to use a forward declaration of Optimizer_hint_parser_output
        in sql_lex.h and thus avoid dependencies on sql_hints_parser.h.
      189c8eb9
    • Oleg Smirnov's avatar
      MDEV-33281 Implement optimizer hints · 64c90152
      Oleg Smirnov authored
          This commit introduces:
          - the infrastructure for optimizer hints;
          - hints for join buffering: BNL(), NO_BNL(), BKA(), NO_BKA();
          - NO_ICP() hint for disabling index condition pushdown;
          - MRR(), MO_MRR() hint for multi-range reads control;
          - NO_RANGE_OPTIMIZATION() for disabling range optimization;
          - QB_NAME() for assigning names for query blocks.
      64c90152
    • Alexander Barkov's avatar
      MDEV-33281 Implement optimizer hints · 8ba71c4c
      Alexander Barkov authored
      Implementing a recursive descent parser for optimizer hints.
      8ba71c4c