Showing entries 61 to 70 of 72
« 10 Newer Entries | 2 Older Entries »
Displaying posts with tag: stored procedure (reset)
These past weeks

Ever since I submitted the "External Language Stored Procedures" project which Eric and myself have been working on to be listed on FreshMeat, it has gained a small number of interested users and we have just started to get some feedback. Yay! Always nice to know when people are using your code. Okay, so one of the emails contained a feature request: Support for PHP stored procedures. I think I

Stuff since the last update

The Thanksgiving break was a welcome change of pace... and on the idle driving up and down the Californian coastline, I had a few moments to work on the MySQL External Stored Procedures project. I think I pretty much have Perl functioning fully and a couple of minor problems were resolved.Yesterday, I completed the first draft of the all-revised-from-scratch WL#3771, now titled as the Plugable

10 Minute HOW-TO

This question seems to crop up again and again... In the words of one comment to my blog: "I've downloaded your External Language Stored Procedures package and am interested in trying out the JAVA part. Would appreciate if you could explain how use the downloaded stuff."Ok, on my download page, I have provided 2 different downloads which are automatically created from our source repository. A

Proposed a talk for UC2008

Well, we did it. In between his SCRUM meeting and my compiling MySQL on Windows, Eric and I bashed out a proposal for the MySQL Users Conference 2008 and have submitted it. The content of the talk, well... It is entitled "Tour of External language stored procedures for MySQL" and we're going to talk about our little project. On Kaj's blog, he suggests that submissions should be creative,

The context of external language procedure's queries

Perhaps it wasn't entirely clear what the last posting meant by "reentrant". It means that the external language stored procedure can issue a query within the same thread context that executed the stored procedure.

Thanks to the question posed by Bill Karwin, I have tested this scenarios to demonstrate:mysql> lock table mysql.proc write; Query OK, 0 rows affected (0.00 sec)

mysql> call test2('

A few fun ideas... XML-RPC as a Stored Procedure.

Wouldn't it be fun to be able to embed web-service routines into MySQL as if they are stored procedures?

CREATE FUNCTION xml_current_time() RETURNS DATETIME NO SQL
LANGUAGE XMLRPC
EXTERNAL NAME "xmlrpc://time.userland.com/RPC2;currentTime.getCurrentTime";


Perhaps not a completely useful example... but an interesting goal to achieve. I have written up some code and pushed it to the experimental repository. I haven't tested it yet but I may do later today if I don't get too preoccupied catching up watching NBC's "Heroes". Snapshots created automagically at midnight, Pacific time.

External Language Stored Procedures

Yay! It's the weekend!

Why does the weekend make me cheerful? I get time to spend on personal projects, although my sweet wife does complain that my 'personal projects' don't look much different than my day job.

This project, I have been doodling with for quite a while. It spawned from a little project that Eric Herman and myself started to look at 2 years ago with what we called "MySQL UDF v2". At the time, it included a whole plug-in and unit testing framework. Since we have to work with what is in the server, we dropped our plug-in and unit test framework after the current MySQL 5.1 plug-in system suddenly appeared: Somehow, I ended up maintaining it but that's another story.

A more modern and sane system for user-defined functions is still our goal. One part of our concept is to minimize the amount of 'heavy lifting' that needs to be …

[Read more]
Update on XML_RPC

Wow, it actually worked with only minor changes to the code. Check this out:


mysql> create function xml_get_state(id int) returns text
-> no sql language xmlrpc external name
-> 'xmlrpc://betty.userland.com/RPC2;examples.getStateName';
Query OK, 0 rows affected (0.00 sec)

mysql> select xml_get_state(40);
+-------------------+
| xml_get_state(40) |
+-------------------+
| South Carolina |
+-------------------+
1 row in set (0.42 sec)


Now I just need to check that it works for more complex resultsets... Trawl the web for open-access trivial XML-RPC services or build a test XML-RPC server?

Reentrant MySQL with External Stored Procedures

Ok, this is a late late blog post because the code was done and pushed into the work tree not last weekend, but the weekend before. I think it is a pretty significant feature to blog about but for some strange reason, it completely slipped my mind.

Check this out:mysql> call test2('select count(*) from mysql.user; select count(*) from mysql.proc'); +----------+ | count(*) | +----------+ | 3

Hiding SQL in a Stored Procedure

I recently wrote a blog entry (on my Postgres blog) about hiding SQL in a stored procedure, Hiding SQL in a Stored Procedure. I decided to see if I could convert that same concept to a MySQL stored procedure.

It doesn't work exactly the same. For one, the syntax is a little different. I expected that and the syntax differences really aren't that bad. Minor tweaks really.

The second issue is the major one. While I could write the proc and return a result set, I am not, as far as I can tell, able to treat the procedure as a table. In Postgres, I created a function with a set output. Unfortunately, MySQL does not allow sets as a function result. You can return a set from a procedure though, as odd as that sounds.

So here is what I found.

My create table command and inserts ran …

[Read more]
Showing entries 61 to 70 of 72
« 10 Newer Entries | 2 Older Entries »