What does this statement do?

Consider the statement:
CREATE TABLE t1 (a INT) PARTITION BY KEY
/*150611 ALGORITHM = 1*/
What does this statement do?
A. Create the t1 table partitioned by KEY with the default algorithm in all versions.
B. Create the t1 table partitioned by KEY using algorithm 1 only in MYSQL version 5.6.11 and the default algorithm in other versions.
C. Create the t1 table partitioned by KEY using algorithm 1 only in MYSQL versions 5.6.11 or newer and the default algorithm in older versions.
D. Create the t1 table partitioned by KEY using algorithm 1 only if the preceding statement returned error condition 50611.

Download Printable PDF. VALID exam to help you PASS.

6 thoughts on “What does this statement do?

  1. If you add a version number after the ! character, the syntax within the comment is executed only if the MySQL version is greater than or equal to the specified version number. The KEY_BLOCK_SIZE keyword in the following comment is executed only by servers from MySQL 5.1.10 or higher:

  2. All I could find is this(and I am still confused) but it looks like C is correct. You can use Algorithm=1 in newer versions to step back to older versions of 5.1.

    https://dev.mysql.com/doc/refman/5.6/en/alter-table-partition-operations.html

    MySQL 5.6.11 and later supports an ALGORITHM option with [SUB]PARTITION BY [LINEAR] KEY. ALGORITHM=1 causes the server to use the same key-hashing functions as MySQL 5.1 when computing the placement of rows in partitions; ALGORITHM=2 means that the server employs the key-hashing functions implemented and used by default for new KEY partitioned tables in MySQL 5.5 and later.

    Correct Answer is C.

    https://dev.mysql.com/doc/refman/5.6/en/create-table.html

    This causes MySQL 5.6.10 and earlier servers to ignore the option

  3. C is correct.
    You can use Algorithm=1 in newer versions to step back to older versions of 5.1.

    https://dev.mysql.com/doc/refman/5.6/en/alter-table-partition-operations.html

    MySQL 5.6.11 and later supports an ALGORITHM option with [SUB]PARTITION BY [LINEAR] KEY. ALGORITHM=1 causes the server to use the same key-hashing functions as MySQL 5.1 when computing the placement of rows in partitions; ALGORITHM=2 means that the server employs the key-hashing functions implemented and used by default for new KEY partitioned tables in MySQL 5.5 and later.

    Correct Answer is C.

    https://dev.mysql.com/doc/refman/5.6/en/create-table.html

    This causes MySQL 5.6.10 and earlier servers to ignore the option

  4. All I could find is this(and I am still confused) but it looks like C is correct. You can use Algorithm=1 in newer versions to step back to older versions of 5.1.

    https://dev.mysql.com/doc/refman/5.6/en/alter-table-partition-operations.html

    MySQL 5.6.11 and later supports an ALGORITHM option with [SUB]PARTITION BY [LINEAR] KEY. ALGORITHM=1 causes the server to use the same key-hashing functions as MySQL 5.1 when computing the placement of rows in partitions; ALGORITHM=2 means that the server employs the key-hashing functions implemented and used by default for new KEY partitioned tables in MySQL 5.5 and later.


    Correct Answer is C.

    https://dev.mysql.com/doc/refman/5.6/en/create-table.html

    This causes MySQL 5.6.10 and earlier servers to ignore the option

  5. C is correct. You can use Algorithm=1 in newer versions to step back to older versions of 5.1.

    https://dev.mysql.com/doc/refman/5.6/en/alter-table-partition-operations.html

    MySQL 5.6.11 and later supports an ALGORITHM option with [SUB]PARTITION BY [LINEAR] KEY. ALGORITHM=1 causes the server to use the same key-hashing functions as MySQL 5.1 when computing the placement of rows in partitions; ALGORITHM=2 means that the server employs the key-hashing functions implemented and used by default for new KEY partitioned tables in MySQL 5.5 and later.

    https://dev.mysql.com/doc/refman/5.6/en/create-table.html

    This causes MySQL 5.6.10 and earlier servers to ignore the option

Leave a Reply

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


The reCAPTCHA verification period has expired. Please reload the page.