Connector/J 5.0 to 5.1 gotcha


I moved a dev environment a little while back, and one of the gotchas I hit was a minor change between MySQL Connector/J 5.0 and 5.1. The support for select x as y type syntax is not actually valid under the jdbc api, but its something I tend to use a lot in various places. In 5.1 its been disabled by default. Anyway the work around is quite easy, although as I was moving envs (revved netbeans, mysql, OpenSolaris, connector j, glassfish, jmaki and a bunch of other things at the same time, call it optimism) I checked god knows how many other things first. Just add

useOldAliasMetadataBehavior=true

to your jdbc connection string and select as to your hearts content.

Comments:

Post a Comment:
Comments are closed for this entry.
About

fintanr

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today