hellios78 / flexviews

Automatically exported from code.google.com/p/flexviews
0 stars 0 forks source link

CALL flexviews.enable (@mvid) failed. #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. setup Server version: 5.5.14-rel20.5-log Percona Server with XtraDB (GPL), 
Release rel20.5, Revision 149. install flexviews, and it's all ok.
2. use consumer/add_tabel.php add test.demo ,use instruct by 
http://www.mysqlperformanceblog.com/2011/03/25/using-flexviews-part-two-change-d
ata-capture/
3. use convert.php to populate mv sql:
[/opt/flexviews.1.7.1] $ php convert.php test < t.sql 
CALL flexviews.create('test', 'demo_1', 'INCREMENTAL');
SET @mvid := LAST_INSERT_ID();
CALL flexviews.add_expr(@mvid,'COLUMN','c1','c1');
CALL flexviews.add_expr(@mvid,'COLUMN','c2','c2');

CALL flexviews.add_table(@mvid,'test','demo','test.demo',NULL);
CALL flexviews.enable(@mvid);

at last statement,issued a error:
mysql> CALL flexviews.enable(@mvid)
    -> \G
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that 
corresponds to your MySQL server version for the right syntax to use near '' at 
line 1

What is the expected output? What do you see instead?
the last sql:CALL flexviews.enable(@mvid) can works.

What version of the product are you using? On what operating system?
Server version: 5.5.14-rel20.5-log Percona Server with XtraDB (GPL), Release 
rel20.5,

Please provide any additional information below.
flexview 1.7.1

Original issue reported on code.google.com by xia...@gmail.com on 1 Sep 2011 at 12:53

GoogleCodeExporter commented 9 years ago
i have resolved this issue by myself.
the root caused is doc misunderstand.

[/opt/flexviews.1.7.1] $ cat t.sql 
create table v_demo as 
select c1,
sum(c2) as totcal_c2
from test.demo;

default table alias will let table alias to "test.demo as test.demo", is mysql 
syntax error.

I have already reproduce my command,it's works.thanks.

Original comment by xia...@gmail.com on 1 Sep 2011 at 6:01

GoogleCodeExporter commented 9 years ago

Original comment by greenlion@gmail.com on 13 Mar 2012 at 8:29