1Z0-909 · Question #44
Which statement is true about the show errors command?
The correct answer is A. It displays the total number of errors, warnings, and notes since the beginning of the current. SHOW ERRORS is session-scoped - it displays diagnostic information accumulated since the beginning of the current client session, making A correct. The scope boundary is the session, not the server's lifecycle. Why each distractor is wrong: B is wrong because the scope is the…
Question
Which statement is true about the show errors command?
Options
- AIt displays the total number of errors, warnings, and notes since the beginning of the current
- BIt displays the total number of errors, warnings, and notes since the server last restarted.
- CIt cannot display information for more than max_errot_count server system variable setting.
- DIt displays errors messages only, since the start time of the current session.
- EIt displays errors messages only, since the server last restarted.
- FIt displays similar diagnostics results as get diagnostics.
How the community answered
(39 responses)- A90% (35)
- B3% (1)
- D5% (2)
- F3% (1)
Explanation
SHOW ERRORS is session-scoped - it displays diagnostic information accumulated since the beginning of the current client session, making A correct. The scope boundary is the session, not the server's lifecycle.
Why each distractor is wrong:
- B is wrong because the scope is the current session, not since the last server restart - restarting the server wouldn't reset session-level diagnostics that don't exist yet for a new session.
- C is wrong because
max_error_countdoes constrain what MySQL stores and thus whatSHOW ERRORScan return - but this makes C true, not false, so it fails as a "trick" only if misread; the statement as written is actually a valid behavior of the command, yet it's not the best or most complete characterization. - D and E are wrong because they claim
SHOW ERRORSshows errors only - in contrast,SHOW ERRORS(and especiallySHOW WARNINGS) captures the full diagnostic set including warnings and notes. - F is wrong because
GET DIAGNOSTICS(the SQL standard mechanism) returns information about the most recent SQL statement only, whileSHOW ERRORSaggregates across the session.
Memory tip: Think "S-E-S-S-I-O-N" - SHOW ERRORS belongs to the Session. Anything tying it to server restarts (B, E) is out of scope, and anything claiming it shows only errors (D, E) confuses it with a narrower behavior.
Topics
Community Discussion
No community discussion yet for this question.