- 最后登录
- 2018-9-14
- 在线时间
- 47 小时
- 威望
- 205
- 金钱
- 2327
- 注册时间
- 2011-10-13
- 阅读权限
- 150
- 帖子
- 90
- 精华
- 0
- 积分
- 205
- UID
- 26
|
1#
发表于 2016-6-25 18:23:21
|
查看: 2518 |
回复: 0
本帖最后由 biotwang 于 2016-6-25 18:27 编辑
【dbdao.com MySQL OCP认证专题】- MySQL 5.6 - OCP 考题讲解
3.
You inherit a legacy database system when the previous DBA Bob, leaves the company. You are notified that users are getting the following error:- mysql> CALL film_in_stock (40, 2, @count);
- ERROR 1449 (HY000): The user specified as a definer ('bob'@'localhost') does not exist
复制代码 How would you identify all stored procedures that pose the same problem?
A.
Execute SELECT * FROM mysql.routines WHERE DEFINER='bob@localhost';.
B.
Execute SHOW ROUTINES WHERE DEFINER='bob@localhost'.
C.
Execute SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE DEFINER='bob@localhost';.
D.
Execute SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER='bob' and HOST='localhost';.
E.
Examine the Mysql error log for other ERROR 1449 messages.
----------------------------------------------------------------------------------
答案:C
分析:
routines表在库INFORMATION_SCHEMA下,因此A错。
可以登陆MySQL后,使用? show命令查看show语法。可知show无routine语句,B错。
可使用以下命令来查看routines:- pager less;
- select * from information_schema.routines\G
复制代码
可知C正确.
INFORMATION_SCHEMA.PROCESSLIST表中仅显示了当前正在运行的线程信息,D错。
Mysql error log是对报错信息的记录,并不会有所有存储过程的记录,E错。 |
|