Mysql: how to reset the conn from the conn pool.

Created on 21 Oct 2016  ·  3Comments  ·  Source: go-sql-driver/mysql

Issue description

i write a conn pool to restore the db's conn, but i founf a problem,
i found that,at first Cli-b open a conn ,and set the time_zone as utc time ,then putconn back.
and then cli-a get the conn from pool and the status has been changed it's time-zone is utc time not system time,
i think it will make cli confused .

Example code

If possible, please enter some example code here to reproduce the issue.

Error log

If you have an error log, please paste it here.

Configuration

_Driver version (or git SHA):_

_Go version:_ run go version in your console

_Server version:_ E.g. MySQL 5.6, MariaDB 10.0.20

_Server OS:_ E.g. Debian 8.1 (Jessie), Windows 10

question

Most helpful comment

It's not a bug. It's a fundamental limitation.
If you don't like that's behavior, you must not use connection pool.

All 3 comments

It's not a bug. It's a fundamental limitation.
If you don't like that's behavior, you must not use connection pool.

is that means that if i want it goes well , some limitition must add in the cli side ?

What is cli? Command Line Interface? CLIent? (or Common Language Infrastructure?)

Was this page helpful?
0 / 5 - 0 ratings