[MDEV-4502] INTERNAL FUNCTIONS - Add parse_url returning Dynamic Column Object Created: 2013-05-09 Updated: 2013-06-18 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Trivial |
| Reporter: | roberto spadim | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | 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: 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?
in other words, it return all rows that have USER=1234, this include users 12345,123456, and others kinds of url values what i was thinking... 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:
and do some analytic tools, COUNT(*), SUM(total time)... etc |
| Comments |
| Comment by Sergei Golubchik [ 2013-05-09 ] |
|
Sure, it's possible. Just write an UDF as described here: http://dev.mysql.com/doc/refman/5.6/en/adding-udf.html and parse the url any way you want. |