New MySQL toys

This commit is contained in:
Ian Gulliver
2019-04-21 17:00:27 +00:00
parent d914fc8a83
commit 482d395543
4 changed files with 81 additions and 0 deletions

View 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(&lt;a&gt;foo&lt;b&gt;bar&lt;/b&gt;&lt;/a&gt;, //b);
bar
SELECT UpdateXML(&lt;a&gt;foo&lt;b&gt;bar&lt;/b&gt;&lt;/a&gt;, //b, zig);
&lt;a&gt;foozig&lt;/a&gt;
</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" -->

View File

@@ -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>

View 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" -->

View File

@@ -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)