fintanr's weblog

Archives

« January 2009 »
MonTueWedThuFriSatSun
   
1
2
3
5
6
7
8
9
11
12
13
14
15
16
17
18
19
20
21
23
24
25
27
28
29
30
31
 
       
Today

the links




Twitter Updates

    follow me on Twitter
















    20090126 Monday January 26, 2009

    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.
    (2009-01-26 07:53:54.0) Permalink