From 482d3955439ced76f0be75fc66f426d6952444f8 Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 21 Apr 2019 17:00:27 +0000 Subject: [PATCH] New MySQL toys --- 2006-01-25-new-mysql-toys.html | 41 +++++++++++++++++++++++++++ index.html | 1 + markdown/2006-01-25-new-mysql-toys.md | 38 +++++++++++++++++++++++++ markdown/index.md | 1 + 4 files changed, 81 insertions(+) create mode 100644 2006-01-25-new-mysql-toys.html create mode 100644 markdown/2006-01-25-new-mysql-toys.md diff --git a/2006-01-25-new-mysql-toys.html b/2006-01-25-new-mysql-toys.html new file mode 100644 index 0000000..e17b63d --- /dev/null +++ b/2006-01-25-new-mysql-toys.html @@ -0,0 +1,41 @@ + + + + + +

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.

+ + diff --git a/index.html b/index.html index 1041361..caee785 100644 --- a/index.html +++ b/index.html @@ -40,6 +40,7 @@
  • 2009-Sep-11: Confusing BIND with CNAMEs
  • 2009-Feb-19: The odd case of my mugging
  • 2009-Feb-03: 5-packet TCP connection?
  • +
  • 2006-Jan-25: New MySQL toys
  • 2006-Jan-24: Finally, sane MySQL clustering
  • 2006-Jan-23: IBM ThinkCentre A50 Slowdown
  • 2006-Jan-23: SSH Tunnelling 101
  • diff --git a/markdown/2006-01-25-new-mysql-toys.md b/markdown/2006-01-25-new-mysql-toys.md new file mode 100644 index 0000000..8c0e176 --- /dev/null +++ b/markdown/2006-01-25-new-mysql-toys.md @@ -0,0 +1,38 @@ + + + + + +In 5.1.5: + + SELECT ExtractValue(’foobar’, ‘//b’); + + bar + + SELECT UpdateXML(’foobar’, ‘//b’, ‘zig’); + + foozig + +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. + + diff --git a/markdown/index.md b/markdown/index.md index 36a07da..b927df9 100644 --- a/markdown/index.md +++ b/markdown/index.md @@ -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)