New MySQL toys
This commit is contained in:
41
2006-01-25-new-mysql-toys.html
Normal file
41
2006-01-25-new-mysql-toys.html
Normal file
@@ -0,0 +1,41 @@
|
||||
<!--# set var="title" value="New MySQL toys" -->
|
||||
<!--# set var="date" value="January 25, 2006" -->
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
<p>In 5.1.5:</p>
|
||||
|
||||
<pre><code>SELECT ExtractValue(’<a>foo<b>bar</b></a>’, ‘//b’);
|
||||
|
||||
bar
|
||||
|
||||
SELECT UpdateXML(’<a>foo<b>bar</b></a>’, ‘//b’, ‘zig’);
|
||||
|
||||
<a>foozig</a>
|
||||
</code></pre>
|
||||
|
||||
<p>XSLT implementation on its way, maybe? :)</p>
|
||||
|
||||
<p>In 5.1.6:</p>
|
||||
|
||||
<pre><code>CREATE EVENT e
|
||||
ON SCHEDULE EVERY 1 DAY
|
||||
ON COMPLETION PRESERVE
|
||||
DO INSERT INTO log VALUES (1);
|
||||
</code></pre>
|
||||
|
||||
<p><em>(think cron)</em></p>
|
||||
|
||||
<p>And:</p>
|
||||
|
||||
<pre><code>CREATE EVENT e
|
||||
ON SCHEDULE AT ‘2006-01-01 03:00:00′
|
||||
ON COMPLETION NOT PRESERVE
|
||||
DO OPTIMIZE TABLE foo;
|
||||
</code></pre>
|
||||
|
||||
<p><em>(think at)</em></p>
|
||||
|
||||
<p>The server variable “event_scheduler” has to be set to 1 for these to work.</p>
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
@@ -40,6 +40,7 @@
|
||||
<li>2009-Sep-11: <a href="2009-09-11-confusing-bind-with-cnames.html">Confusing BIND with CNAMEs</a></li>
|
||||
<li>2009-Feb-19: <a href="2019-02-19-the-odd-case-of-my-mugging.html">The odd case of my mugging</a></li>
|
||||
<li>2009-Feb-03: <a href="2009-02-03-5-packet-tcp-connection.html">5-packet TCP connection?</a></li>
|
||||
<li>2006-Jan-25: <a href="2006-01-25-new-mysql-toys.html">New MySQL toys</a></li>
|
||||
<li>2006-Jan-24: <a href="2006-01-24-finally-sane-mysql-clustering.html">Finally, sane MySQL clustering</a></li>
|
||||
<li>2006-Jan-23: <a href="2006-01-23-ibm-thinkcentre-a50-slowdown.html">IBM ThinkCentre A50 Slowdown</a></li>
|
||||
<li>2006-Jan-23: <a href="2006-01-23-ssh-tunnelling-101.html">SSH Tunnelling 101</a></li>
|
||||
|
||||
38
markdown/2006-01-25-new-mysql-toys.md
Normal file
38
markdown/2006-01-25-new-mysql-toys.md
Normal file
@@ -0,0 +1,38 @@
|
||||
<!--# set var="title" value="New MySQL toys" -->
|
||||
<!--# set var="date" value="January 25, 2006" -->
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
In 5.1.5:
|
||||
|
||||
SELECT ExtractValue(’<a>foo<b>bar</b></a>’, ‘//b’);
|
||||
|
||||
bar
|
||||
|
||||
SELECT UpdateXML(’<a>foo<b>bar</b></a>’, ‘//b’, ‘zig’);
|
||||
|
||||
<a>foozig</a>
|
||||
|
||||
XSLT implementation on its way, maybe? :)
|
||||
|
||||
In 5.1.6:
|
||||
|
||||
CREATE EVENT e
|
||||
ON SCHEDULE EVERY 1 DAY
|
||||
ON COMPLETION PRESERVE
|
||||
DO INSERT INTO log VALUES (1);
|
||||
|
||||
_(think cron)_
|
||||
|
||||
And:
|
||||
|
||||
CREATE EVENT e
|
||||
ON SCHEDULE AT ‘2006-01-01 03:00:00′
|
||||
ON COMPLETION NOT PRESERVE
|
||||
DO OPTIMIZE TABLE foo;
|
||||
|
||||
_(think at)_
|
||||
|
||||
The server variable “event\_scheduler” has to be set to 1 for these to work.
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
@@ -39,6 +39,7 @@
|
||||
1. 2009-Sep-11: [Confusing BIND with CNAMEs](2009-09-11-confusing-bind-with-cnames.html)
|
||||
1. 2009-Feb-19: [The odd case of my mugging](2019-02-19-the-odd-case-of-my-mugging.html)
|
||||
1. 2009-Feb-03: [5-packet TCP connection?](2009-02-03-5-packet-tcp-connection.html)
|
||||
1. 2006-Jan-25: [New MySQL toys](2006-01-25-new-mysql-toys.html)
|
||||
1. 2006-Jan-24: [Finally, sane MySQL clustering](2006-01-24-finally-sane-mysql-clustering.html)
|
||||
1. 2006-Jan-23: [IBM ThinkCentre A50 Slowdown](2006-01-23-ibm-thinkcentre-a50-slowdown.html)
|
||||
1. 2006-Jan-23: [SSH Tunnelling 101](2006-01-23-ssh-tunnelling-101.html)
|
||||
|
||||
Reference in New Issue
Block a user