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

INTERNAL FUNCTIONS - Add parse_url returning Dynamic Column Object

    XMLWordPrintable

Details

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

    Description

      Hi guys, could we develop a function to get information from a url, and 'convert' it to a dynamic column?

      i have a big apache log, with some fields:
      start time,total time,url,bytes in,bytes out

      and i do some searchs in this database, for example, try to get how many users was quering some url with some variable=xxx

      i do this search inside url value, it works, but it's not perfect

      what i do?

      SELECT * FROM log WHERE url LIKE '%USER=1234%'

      in other words, it return all rows that have USER=1234, this include users 12345,123456, and others kinds of url values
      ok, here i have some optimization from LIKE operator, but it's not perfect
      after, i run in php side a parse in url and check if it's from user 1234

      what i was thinking...
      a function that convert a string url, to a dynamic column, like
      http://www.php.net/manual/en/function.parse-url.php
      and a function that convert a string of GET http values, to dynamic column, like
      http://www.php.net/manual/en/function.parse-str.php

      could it be done? this realy made my log very easier to analyze

      the 'like' part is good to query just some rows, but this two functions could be done to optimize the php part

      i could done some search like:

      SELECT * FROM log WHERE 
      URL_PARSE_VAR(url,'USER')='1234' 
      AND
      URL_PARSE(url,'path')='some_file.php'

      and do some analytic tools, COUNT(*), SUM(total time)... etc

      Attachments

        Activity

          People

            Unassigned Unassigned
            rspadim roberto spadim
            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.