Re: [Maria-developers] MDEV-8389 patch review (part#1)

2015-08-27 Thread Sergey Petrunia
Hi Diwas, On Thu, Aug 27, 2015 at 09:23:55PM +0530, Diwas Joshi wrote: > hello sergei, I am attaching two patches with this mail. > MDEV-8389_first is the original patch with mysql_create_table() method used > to create tables. I have fixed the crash that was occurring with queries > like select n

Re: [Maria-developers] MDEV-8389 patch review (part#1)

2015-08-27 Thread Sergey Petrunia
On Sat, Aug 22, 2015 at 02:10:58AM +0530, Diwas Joshi wrote: > Hello Sergei, sorry for late reply, i was busy finishing my office > work yesterday. Please find some of my doubts below (I would come on > irc to discuss but I am travelling today and will be working overnight > in the train, I hope to

Re: [Maria-developers] MDEV-8389 patch review

2015-08-19 Thread Sergey Petrunia
Also, I'm getting a crash when trying to debug a slightly complex example: delimiter | CREATE FUNCTION f10(param1 VARCHAR(11)) RETURNS TABLE return_table(name VARCHAR(11)) deterministic BEGIN insert into return_table values('foo'); END| DELIMITER ; select name from f21('aaa') where name like '

Re: [Maria-developers] MDEV-8389 patch review

2015-08-19 Thread Sergey Petrunia
On Wed, Aug 12, 2015 at 01:58:40AM +0530, Diwas Joshi wrote: > hello sergei, > After I mailed you the last patch, I kept working further. I guess the code > has come to a point where it is giving some results. So, I did the > following things: > Earlier we were storing all the parameters in a selec

Re: [Maria-developers] MDEV-8389 patch review

2015-08-19 Thread Sergey Petrunia
Hi Diwas, While playing around, I've found and filed: https://mariadb.atlassian.net/browse/MDEV-8649 https://mariadb.atlassian.net/browse/MDEV-8650 I've filed these separately because I think they are not related to MDEV-8389. BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporati

Re: [Maria-developers] MDEV-8389 patch review (part#1)

2015-08-19 Thread Sergey Petrunia
Hi Diwas, Please find part #1 of the review below. I'll provide more soon. > diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc > index 2998972..a9dc162 100644 > --- a/sql/sql_parse.cc > +++ b/sql/sql_parse.cc > @@ -2466,6 +2466,8 @@ static bool do_execute_sp(THD *thd, sp_head *sp) >lex->first

Re: [Maria-developers] MDEV-8389 patch review

2015-08-06 Thread Sergey Petrunia
Hi Diwas, On Wed, Aug 05, 2015 at 08:47:28PM +0530, Diwas Joshi wrote: > I have removed the errors from previous patch, I only got those errors when > i compiled with valgrind. Everything seems to be working fine now. Also I > have fixed the test case for select * from mysql.proc. Also added a > f

Re: [Maria-developers] MDEV-8389 patch review (question1)

2015-08-03 Thread Sergey Petrunia
More input on the patch: Let's debug a regular table function: delimiter | create function f10() returns int deterministic begin return 1+3; end | delimiter ; flush tables; select f10(); Let's put a breakpoint on 'parse_sql': Breakpoint 4, parse_sql (thd=0x5ac4aeb0, parser_state=0x77

Re: [Maria-developers] MDEV-8389 patch review

2015-08-03 Thread Sergey Petrunia
On Sun, Aug 02, 2015 at 08:51:44PM +0530, Diwas Joshi wrote: > So what would be the expected result of query select f1(1,'aa'). since it > will be a table shouldn't we use select * from f1(1,'aa'). I know it > shouldn't crash but what should be the output of that query? > My first guess is that si

Re: [Maria-developers] MDEV-8389 patch review

2015-08-02 Thread Sergey Petrunia
Hi Diwas, I've got a crash when trying the first example. The example was: CREATE FUNCTION f1(a INT, b VARCHAR(11)) RETURNS TABLE t1(id INT, name VARCHAR(11)) DETERMINISTIC BEGIN INSERT INTO t1 SELECT id, name FROM t2 WHERE id = a; END|; delimiter ; select f1(1,'aa'); The crash was: