Return detailed information about warnings as a sequence of tuples of (Level, Code, Message). This is only supported in MySQL-4.1 and up. If your server is an earlier version, an empty sequence is returned.
(self)
| 304 | self.store_result() |
| 305 | |
| 306 | def show_warnings(self): |
| 307 | """Return detailed information about warnings as a |
| 308 | sequence of tuples of (Level, Code, Message). This |
| 309 | is only supported in MySQL-4.1 and up. If your server |
| 310 | is an earlier version, an empty sequence is returned.""" |
| 311 | if self._server_version < (4,1): return () |
| 312 | self.query("SHOW WARNINGS") |
| 313 | r = self.store_result() |
| 314 | warnings = r.fetch_row(0) |
| 315 | return warnings |
| 316 | |
| 317 | Warning = Warning |
| 318 | Error = Error |