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" -->
|
||||
Reference in New Issue
Block a user