Re: [Maria-discuss] R: GSOC 2015 :UDFs returning arrays

2015-03-11 Thread Justin Swanhart
Hi,

Right, my point was that UDF (classical UDF) really can't do arrays or table 
functions, you need a different type of UDF, and external procs are one type of 
new udf.  The other type of new UDF I would like to see my s Antony's other 
patch I linked to, which adds pluggable item functions.  Such functions could 
also use the same table function interface (be it via generator or temp table, 
or whatever).  The biggest advantage over classic UDF is that pluggable item 
functions  get a THD, can use SQL security, properly deal with character sets, 
etc, and it is a small patch.

I'd kind of like two or three type of table func:

One returns  a SQL statement and is evaluated like a dependent subquery - it 
doesn't have to be materialized, but if it is, it can be indexed.  This is like 
a dynamic view which is difficult to do without ugly hacks.  His would be the 
easiest to implement.

Another type would returns a temporary table name, and the temp table is used 
in the query.  These would be evaluated at start of execution like old 
dependent subqueries.  This would allow table functions with a varying number 
of columns, or that essentially can return more than one data type based in the 
input.  While conceptually similar to the first type, this type can get data 
from external sources and store it in the table. The temporary would be dropped 
in deinit() function.

Finally, generator functions would use fixed schema and could return big data 
sets, but they probably can't open any tables without locking problems (all 
table locks must be taken at query execution start).

I hope that makes sense.

Sent from my iPhone

 On Mar 11, 2015, at 7:35 AM, Sergei Golubchik s...@mariadb.org wrote:
 
 Hi, Justin!
 
 On Mar 10, Justin Swanhart wrote:
 wl#820 also has table functions in it:
 http://antbits.blogspot.com/2009/01/table-functions-in-mysql.html
 
 mysql INSTALL PLUGIN Deep_Thought SONAME 'psm_example.so';
 mysql CREATE FUNCTION test.FooAnswer()
- RETURNS TABLE(answer TEXT)
- NO SQL LANGUAGE Deep_Thought EXTERNAL NAME 'compute';
 mysql CREATE VIEW foobar AS SELECT * FROM TABLE(test.FooAnswer) AS wibble;
 mysql SELECT * FROM foobar WHERE answer LIKE 'F%';
 +---+
 | answer|
 +---+
 | Forty-Two |
 +---+
 
 Ah, indeed. Thanks.
 
 It's still an unrelated feature - I mean, there is no reason why a table
 function must necessarily be impemented as an external procedure.
 
 And the implementation - I believe - creates a temporary table and puts
 all the data into it. I would rather prefer a generator-like interface,
 that produces rows one by one. It works much better for big data sets.
 Or, may be, we can do both.
 
 Either way - this implementation can be very helpful. But it'll need at
 least to be updated to work in 10.1. And may be we add the generator
 interface.
 
 Regards,
 Sergei
 

___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] Enabling feedback pluging for MariaDB 10.1.4

2015-03-11 Thread Ian Gilfillan
I understand that the statistics would have some meaning, and understand 
that there's no actual data being sent, etc.


However, enabling the feedback plugin by default IS going to create a 
whole lot of negative publicity for MariaDB. Is the limited data the 
feedback plugin provides worthwhile? Look at the similar situation with 
Ubuntu/Canonical. No matter how much they argued there was no real risk, 
they suffered a huge amount of negative publicity and eventually 
reversed the decision.


You can argue that the data passed in that case was far more invasive 
and that they're unrelated, but there WILL be people who have a valid 
reason to be upset that their IP etc. has been unknowingly passed on, 
and saying that you should have switched it off or you shouldn't have 
been using a beta version is not a valid response after the fact. And 
then there will be even more people who have no reason to be upset, but 
will be anyway.


Why go through this pain? Rather use this as an opportunity to create a 
thorough survey (which can provide far more detailed and useful 
information than the plugin running on a beta version) and engage 
constructively with the community. The survey has other benefits too, as 
pointed out elsewhere in the thread - raising awareness of lesser-known 
features, and just spreading the survey will be marketing for MariaDB.


And by all means, give people an option to enable the plugin on 
installation, as long as it defaults to off.


ian

On 10/03/2015 13:54, Sergei Golubchik wrote:

A survey is a pretty good idea, thanks!

It may not provide a much better (as in representative sample) statistics,
but it will surely tell the users about the features.





___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


[Maria-discuss] MariaDB Galera Cluster 10.0.17 and 5.5.42 now available

2015-03-11 Thread Daniel Bartholomew
The MariaDB project is pleased to announce the immediate availability
of MariaDB Galera Cluster 10.0.17  5.5.42

Both are Stable (GA) releases. See the Release Notes and Changelog for
details.


- - Links  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

MariaDB Galera Cluster 10.0.17
 - Release Notes:
 https://mariadb.com/kb/en/mariadb-galera-cluster-10017-release-notes/
 - Changelog:
 https://mariadb.com/kb/en/mariadb-galera-cluster-10017-changelog/
 - Downloads: https://downloads.mariadb.org/mariadb-galera/10.0.17

MariaDB Galera Cluster 5.5.42
 - Release Notes:
 https://mariadb.com/kb/en/mariadb-galera-cluster-5542-release-notes/
 - Changelog:
 https://mariadb.com/kb/en/mariadb-galera-cluster-5542-changelog/
 - Downloads: https://downloads.mariadb.org/mariadb-galera/5.5.42

 About MariaDB Galera Cluster:
  - https://mariadb.com/kb/en/what-is-mariadb-galera-cluster/

 APT and YUM Repository Configuration Generator:
  - https://downloads.mariadb.org/mariadb/repositories/


- - MariaDB Webinars - - - - - - - - - - - - - - - - - - - - - - - - -

There are several upcoming MariaDB-focused webinars and many
previously held ones available to watch on an on-demand basis at:

 - https://mariadb.com/news-events/webinars


- - MariaDB Books  - - - - - - - - - - - - - - - - - - - - - - - - - -

There is an ever-growing library of MariaDB books available to help
you get the most out of MariaDB. See the MariaDB Books page for
details and links:

 - https://mariadb.com/kb/en/mariadb/books/


- - User Feedback plugin - - - - - - - - - - - - - - - - - - - - - - -

MariaDB includes a User Feedback plugin. This plugin is disabled by
default. If enabled, it submits basic, completely anonymous MariaDB
usage information. This information is used by the developers to track
trends in MariaDB usage to better guide development efforts.

If you would like to help make MariaDB better, please add
feedback=ON to your my.cnf or my.ini file!

See http://mariadb.com/kb/en/user-feedback-plugin for more
information.


- - Quality - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

The project always strives for quality, but in reality, nothing is
perfect. Please take time to report any issues you encounter at:

 - http://mariadb.org/jira


- - Support MariaDB - - - - - - - - - - - - - - - - - - - - - - - - - -

If you would like to contribute to the MariaDB Foundation, please see
the contributing and donations pages. We also have merchandise
available in a cafepress store. All proceeds go to support the MariaDB
Foundation.

 - https://mariadb.com/kb/en/contributing

 - https://mariadb.org/en/donate/

 - http://www.cafepress.com/mariadb


We hope you enjoy MariaDB!

--
MariaDB
Website - http://mariadb.org
Twitter - http://twitter.com/mariadb
Google+ - http://google.com/+mariadb
   Facebook - http://fb.com/MariaDB.dbms
 Knowledge Base - http://mariadb.com/kb

___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp


Re: [Maria-discuss] R: GSOC 2015 :UDFs returning arrays

2015-03-11 Thread Sergei Golubchik
Hi, Justin!

On Mar 10, Justin Swanhart wrote:
 wl#820 also has table functions in it:
 http://antbits.blogspot.com/2009/01/table-functions-in-mysql.html
 
 mysql INSTALL PLUGIN Deep_Thought SONAME 'psm_example.so';
 mysql CREATE FUNCTION test.FooAnswer()
 - RETURNS TABLE(answer TEXT)
 - NO SQL LANGUAGE Deep_Thought EXTERNAL NAME 'compute';
 mysql CREATE VIEW foobar AS SELECT * FROM TABLE(test.FooAnswer) AS wibble;
 mysql SELECT * FROM foobar WHERE answer LIKE 'F%';
 +---+
 | answer|
 +---+
 | Forty-Two |
 +---+
 
Ah, indeed. Thanks.

It's still an unrelated feature - I mean, there is no reason why a table
function must necessarily be impemented as an external procedure.

And the implementation - I believe - creates a temporary table and puts
all the data into it. I would rather prefer a generator-like interface,
that produces rows one by one. It works much better for big data sets.
Or, may be, we can do both.

Either way - this implementation can be very helpful. But it'll need at
least to be updated to work in 10.1. And may be we add the generator
interface.

Regards,
Sergei


___
Mailing list: https://launchpad.net/~maria-discuss
Post to : maria-discuss@lists.launchpad.net
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp