Lucas-307 commented on issue #7922:
URL: https://github.com/apache/shardingsphere/issues/7922#issuecomment-718322217
> > > @Lucas-307
> > > ```
> > > String sql = "INSERT INTO
t_order_item(order_id,user_id,status,creation_date) VALUES (2112,21,' init','
2017-08-31')";
> > > try (Connection conn = DriverManager.getConnection(url,
username, password);
> > > PreparedStatement ps = conn.prepareStatement(sql,
Statement.RETURN_GENERATED_KEYS)) {
> > > ps.executeUpdate();
> > > ResultSet rs = ps.getGeneratedKeys();
> > > return rs.next() ? rs.getLong(1) : -1;
> > > }
> > > ```
> > >
> > >
> > > result is -1
> > > connect MySQL directly:
> > > result is correct!
> >
> >
> > @shihuizhen I can get id by this function in `master` version, I'm
**not** sure if it is ok in `v4`.
>
> Which do you using for this test? mysql-jdbc or sharding-jdbc?
> mysql-jdbc connect to sharding-proxy_v4.1.1 is not OK.
sharding-jdbc master version.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]