Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How to know if a DBI connexion is read-only?

by Mr. Muskrat (Abbot)
on Oct 03, 2012 at 18:30 UTC ( #997114=note: print w/ replies, xml ) Need Help??


in reply to How to know if a DBI connexion is read-only?

The correct answer will depend on what what you mean by a read-only connection.

Setting the ReadOnly DBI attribute with a DBD::mysql database handle doesn't do anything useful; it's just advisory as explained in the section you linked.

If you want to check if the database is read-only (as is common on a slave), the user only has select priviledges or if the transaction is read-only then you will need to write the appropriate queries to figure those out.


Comment on Re: How to know if a DBI connexion is read-only?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://997114]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (15)
As of 2015-07-01 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (13 votes), past polls