is00hcw / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 1 forks source link

derived tables need an alias exception #1089

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

trying to replicate from mysql

What is the expected output?

No exceptions

What do you see instead?

INFO   | jvm 1    | 2015/01/15 16:42:27 | 2015-01-16 00:42:27,902 [extractor - 
ConnectorHandler: initializing] INFO  thl.ConnectorHandler Client log checking 
disabled; not checking for diverging histories
INFO   | jvm 1    | 2015/01/15 17:00:25 | Jan 16, 2015 1:00:25 AM 
org.drizzle.jdbc.internal.mysql.MySQLProtocol executeQuery
INFO   | jvm 1    | 2015/01/15 17:00:25 | WARNING: Could not execute query 
org.drizzle.jdbc.internal.common.query.DrizzleParameterizedQuery@1ae2b9e5: 
Every derived table must have
 its own alias
INFO   | jvm 1    | 2015/01/15 17:00:25 | java.sql.SQLSyntaxErrorException: 
Every derived table must have its own alias
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
org.drizzle.jdbc.internal.SQLExceptionMapper.get(SQLExceptionMapper.java:99)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
org.drizzle.jdbc.DrizzlePreparedStatement.executeQuery(DrizzlePreparedStatement.
java:105)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
com.continuent.tungsten.replicator.extractor.parallel.ChunksGeneratorThread.chun
kVarcharPK(ChunksGeneratorThread.java:720)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
com.continuent.tungsten.replicator.extractor.parallel.ChunksGeneratorThread.gene
rateChunksForTable(ChunksGeneratorThread.java:37
2)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
com.continuent.tungsten.replicator.extractor.parallel.ChunksGeneratorThread.gene
rateChunksForSchema(ChunksGeneratorThread.java:3
18)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
com.continuent.tungsten.replicator.extractor.parallel.ChunksGeneratorThread.runT
ask(ChunksGeneratorThread.java:264)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
com.continuent.tungsten.replicator.extractor.parallel.ChunksGeneratorThread.run(
ChunksGeneratorThread.java:155)
INFO   | jvm 1    | 2015/01/15 17:00:25 | Caused by: 
org.drizzle.jdbc.internal.common.QueryException: Every derived table must have 
its own alias
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
org.drizzle.jdbc.internal.mysql.MySQLProtocol.executeQuery(MySQLProtocol.java:46
4)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       at 
org.drizzle.jdbc.DrizzlePreparedStatement.executeQuery(DrizzlePreparedStatement.
java:102)
INFO   | jvm 1    | 2015/01/15 17:00:25 |       ... 5 more

What version of the product are you using?

Tungsten Replicator 3.0.1 build 64

On what operating system?

mac

Other notes:

looks like on:
https://code.google.com/p/tungsten-replicator/source/browse/trunk/replicator/src
/java/com/continuent/tungsten/replicator/extractor/parallel/ChunksGeneratorThrea
d.java#719

it executes a sql statement that looks like:
"sqlBuf.append(") sub where ROWNUM <= ? ) where rnum >= ?");"

and it does indeed look like there is no alias for the derived table.

Original issue reported on code.google.com by tho...@pagerduty.com on 16 Jan 2015 at 5:55

GoogleCodeExporter commented 9 years ago
Please give us DETAILED info on how to reproduce the issue.
How did you install?
Which MySQL version in master and slave?
What query were you executing?

Add any detail useful to reproduce the problem.

Original comment by g.maxia on 16 Jan 2015 at 6:28