Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-4944

QueryStats Doesn't Automatically Work When Turned On - used to in CS 1.2.5

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 6.1.1
    • 6.2.3
    • None
    • None
    • 2021-16

    Description

      QueryStats does not automatically log each query calGetTrace() results like it used to even when enabled. On top of having a undocumented requirement of the cross engine user needing INSERT grant to `infinidb_querystats`.*
      partial work around exists by adding to .cnf - init-connect='select calSetTrace(1);'
      however init-connect doesnt work for root user

      Expected:
      When QueryStats is enabled, every query gets logged to infinidb_querystats.querystats without having to run select calSetTrace(1); before

      Actual:
      Until select calSetTrace(1); is ran, nothing is logged to infinidb_querystats.querystats

      Reproduction:

      mcsSetConfig QueryStats Enabled Y
      systemctl stop mariadb-columnstore
      systemctl stop mariadb
      systemctl start mariadb
      systemctl start mariadb-columnstore
      mcsGetConfig -a | grep -i Cross
      cej=$(mcsGetConfig CrossEngineSupport User)
      pwd=$(mcsGetConfig CrossEngineSupport Password)
      host=$(mcsGetConfig CrossEngineSupport Host)
      # Make sure you have these grants
      # GRANT SELECT,PROCESS ON *.* TO 'cross_engine'@'127.0.0.1';
      # GRANT INSERT on `infinidb_querystats`.* TO 'cross_engine'@'127.0.0.1';
      mariadb -h $host -u $cej -p$pwd -qse "select * from infinidb_querystats.querystats;"
      # Confirm grants are good
      # mariadb -h $host -u $cej -p$pwd -e "insert into infinidb_querystats.querystats (queryID)  values (1);"
      mariadb -e "CREATE DATABASE IF NOT EXISTS test; USE test; CREATE TABLE IF NOT EXISTS t3 (a int) engine=columnstore;INSERT INTO t3 VALUES(1);INSERT INTO t3 VALUES(2);"
      mariadb -h $host -u $cej -p$pwd test -e "SELECT * FROM t3 WHERE a=1;"
      mariadb -h $host -u $cej -p$pwd -qse "select * from infinidb_querystats.querystats;"
      # Notice queries dont automatically enter infinidb_querystats.querystats until you manually run "select calSetTrace(1);"
      # Work around - add to /etc/my.cnf.d/server.cnf - init-connect='select calSetTrace(1);'
      # However work around still doesnt work for root user
      

      Attachments

        Issue Links

          Activity

            People

              dleeyh Daniel Lee (Inactive)
              allen.herrera Allen Herrera
              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.