Ideas how to solve this?
That really depends upn what "this" is. Ie. What are you currently trying to achieve by sharing a DB handle?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
| [reply] |
Seems like a missed DB handle was created at a place it shouldn't be at...
| [reply] |
It's not clear to me from the above whether you have solved your problem or not?
The basic gist of the problem (from reading the error message you posted), is that your code created a db handle in one thread and then attempted to use from another.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
| [reply] |
Apparently, the DBD::mysql works fine, but as I understand it DBD::mysqlPP is better?
Where did you get that idea? DBD::mysqlPP has the ability to be installed without compilation but other than that I don't think it has any advantages over DBD::mysql. DBD::mysql is much faster and has more capabilities (recent ones with true prepare). DBD::mysqlPP was last updated over two and half years ago while DBD::mysql was updated over a dozen times in that period. One of the maintainers of DBD::mysql works for MySQL AB. I'm not knocking DBD::mysqlPP - it's a great hack for situations in which the other can't be installed (a situation that was much more common a few years ago) but for production work, I'd definitely recommend DBD::mysql, especially when using newer versions of MySQL.
| [reply] |