Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11391

AliSQL: [Feature] Issue#6 SQL FILTER

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      Summary:
      --------
      This feature limit queries of SQL which contains key words.
      Only SELECT, UPDATE, DELETE can be limited.
       
      Usage:
      ------
      add a rule limit SELECT:
      SET GLOBAL sql_select_filter = '+,{CONC},KEY1~KEY2~KEY3...';
      keys seperated with '~'
      example: SET GLOBAL sql_select_filter = '+,1,t1~t2~t3'
      SQL contains 't1','t2','t3' can only have one conncetion at the same time
      sql_update_filter and sql_delete_filter for UPDATE and DELETE
       
      show rules:
      SHOW SQL_FILTERS;
      select * from information_schema.sql_filter_info;
       
      result example:
      TYPE    ITEM_ID CUR_CONC        MAX_CONC        KEY_NUM KEY_STR
      SELECT  2       0       0       2       +,0,a=1~a=2
      SELECT  1       0       1       2       +,1,a=1~a=2
       
      delete rules:
      SET GLOBAL sql_select_filter = '-,ITEM_ID1,ITEM_ID2,.....';
       
      delete all rules:
      SET GLOBAL reset_all_filter = 1;
      

      https://github.com/alibaba/AliSQL/commit/44a1da541f3bd97520322e4a6c1da1c8be5ab5e1

      Attachments

        Activity

          People

            Unassigned Unassigned
            svoj Sergey Vojtovich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.