250+ TOP MCQs on Writing Clients That Include SSL Support and Answers

MySQL Assessment Questions and Answers focuses on “Writing Clients That Include SSL Support”.

1. What enables encrypted connections to be established?
a) exec_stmt_ssl
b) exec_ssl_stmt
c) exec_stmnt_ssl
d) exec_ssl_stmnt

Answer: a
Clarification: For the ‘exec_stmt_ssl’ to work properly, MySQL must have been built with SSL support, and the server must be started with the proper options that identify its certificate and key files.

2. The exec_stmt_ssl is written in _______________
a) C++
b) C
c) Python
d) Perl

Answer: b
Clarification: In MySQL, the ‘sampdb’ distribution contains a source file named ‘exec_stmt_ssl.c’ from which the client program ‘exec_stmt_ssl’ can be built. There is a procedure to build this file.

3. On failure, ‘mysql_query()’ returns _______________
a) 0
b) 1
c) -1
d) a non-zero value

Answer: d
Clarification: Both of the functions named ‘mysql_query()’ and ‘mysql_real_query()’ return zero for statements that succeed. They return non zero for failure. A statement is successfully executed if the server accepts it.

4. Input handling cannot be customized with MySQL.
a) True
b) False

Answer: b
Clarification: With mysql, raw SQL statements can be entered. With MySQL programs input methods can be provided for the user that are more intuitive and easier to be used. So input handling is customized.

5. By default, MySQL does not clip out of range numeric values to the nearest fit value.
a) True
b) False

Answer: b
Clarification: For the numeric or TIME columns, the values that are outside the legal range are clipped to the nearest endpoint of the range. The resulting value is stored. This is the method to handle defaults for numerics.

  250+ TOP MCQs on Working with Sequences and Answers

6. Which mode prevents MySQL to perform full checking of date parts?
a) PREVENT_DATE_CHECK
b) STOP_DATES_CHECK
c) ALLOW_DATES_INVALID
d) ALLOW_INVALID_DATES

Answer: d
Clarification: In MySQL, it is also possible to selectively weaken the strict mode in some places. If the ALLOW_INVALID_DATES SQL mode is enabled, MySQL doesn’t perform full checking of the date parts.

7. Which statement is used to determine the storage engine for individual tables?
a) SHOW TABLE STATUS
b) SHOW DEFAULT STATUS
c) SHOW STATUS OF TABLE
d) SHOW STATUS TABLE

Answer: a
Clarification: MySQL provides a method to determine the storage engine for each table with the ‘SHOW TABLE STATUS’ statement. The output of this statement is the name of the storage engine indicator.

8. Which table in the ‘INFORMATION_SCHEMA’ stores information about storage engines and server plugins?
a) ENGINES, PLUGINS
b) FILES, PLUGINS
c) PLUGINS, STATISTICS
d) ENGINES, FILES

Answer: a
Clarification: The ‘INFORMATION_SCHEMA’ is very useful in MySQL. It has many tables each serving its individual purpose. The storage engine information is stored in ENGINES and plugin information in PLUGINS.

9. How many of the following is (are) considered as a special character by ‘mysql_real_escape_string()’?

null byte, single quote, backslash

a) 3
b) 1
c) 2
d) 0

Answer: a
Clarification: The characters that ‘mysql_real_escape_string()’ considers special are the null byte, single quote, double quote, ‘backslash’, ‘newline’, ‘carriage return’ and the ‘Control-Z’.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top