[MDEV-12335] Server should not update 'innodb_defragment_fill_factor_n_recs' when wrong system variable provided Created: 2017-03-22  Updated: 2017-03-22  Resolved: 2017-03-22

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Venu Matcha Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

OS : Linux ubuntu16 4.4.0-66-generic #87-Ubuntu SMP Fri Mar 3 15:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
bison :(GNU Bison) 3.0.4
gcc : version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
GNU Make: 4.1 (Built for x86_64-pc-linux-gnu)
cmake : version 3.5.1
libncurses : 6.0+20160213-1ubuntu1
libevent-dev: 2.0.21-stable-2ubuntu0.16.04.1
gnutls-cli : 3.4.10
YaSSL : 2.4.2
OpenSSL : 1.0.2g 1 Mar 2016


Attachments: Text File vmatcha_ubuntu_mysqld_10.2.4-logerror_1.txt     Text File vmatcha_ubuntu_mysqld_10.2.4-logerror_2.txt    

 Description   

Steps:
Followed the below steps to check the invalid system parameters innodb_defragment_fill_factor! and innodb_defragment_fill_factor-. Both are invalid. Server startup ABORTS as expected for innodb_defragment_fill_factor! but not for innodb_defragment_fill_factor-

  1. Downloaded the source from https://downloads.mariadb.org/interstitial/mariadb-10.2.4/source/mariadb-10.2.4.tar.gz
  2. Compile and Install MariaDB10.2.4 debug build. Use the build script ./BUILD/compile-pentium64-debug-max
  3. Change directory to 'mariadb-10.2.4/sql' folder. Run the following commands, change the datadir and log-error parameters path matching to the current installation
  4. Execute the following command with invalid server system variable innodb_defragment_fill_factor!

    ./mysqld  --innodb_defragment_fill_factor!=29 --datadir=/home/vmatcha/sw/mariadb-10.2.4/data/ --log-error=../data/vmatcha_ubuntu_mysqld_10.2.4-logerror_1.txt &
    

  5. Server startup aborts correctly with the following error about invalid server system variable:

    [ERROR] ./mysqld: unknown variable 'innodb_defragment_fill_factor!=29' 

    Attached the log vmatcha_ubuntu_mysqld_10.2.4-logerror_1.txt

  6. Execute the following command with a different invalid server system variable innodb_defragment_fill_factor-

    ./mysqld  --innodb_defragment_fill_factor-=29 --datadir=/home/vmatcha/sw/mariadb-10.2.4/data/ --log-error=../data/vmatcha_ubuntu_mysqld_10.2.4-logerror_2.txt & 

Actual Result:

  1. For step 6, Server started successfully with the wrong system variable innodb_defragment_fill_factor-
  2. A different server variable innodb_defragment_fill_factor_n_recs got updated with value provided in the wrong command line system variable innodb_defragment_fill_factor-

MariaDB [(none)]> SHOW VARIABLES LIKE 'innodb_defragment_fill_factor%';
+--------------------------------------+----------+
| Variable_name                        | Value    |
+--------------------------------------+----------+
| innodb_defragment_fill_factor        | 0.900000 |
| innodb_defragment_fill_factor_n_recs | 29       |
+--------------------------------------+----------+
2 rows in set (0.00 sec)
 
MariaDB [(none)]>

Attached the log vmatcha_ubuntu_mysqld_10.2.4-logerror_2.txt

Expected Result:

  1. For step 6, Server startup should have aborted with unknown variable error for innodb_defragment_fill_factor-
  2. Server should not update a different server variable innodb_defragment_fill_factor_n_recs when wrong server variable innodb_defragment_fill_factor- provided at command line


 Comments   
Comment by Elena Stepanova [ 2017-03-22 ]

Historically, MySQL/MariaDB server by default accepts unambiguous option prefixes – incomplete option names which uniquely identify the implied variable. With the current set of variables, innodb-defragment-fill-factor- is such a prefix for innodb-defragment-fill-factor-n-recs.

This capability is considered a rather unfortunate legacy, and using it is discouraged, which is what the first line in vmatcha_ubuntu_mysqld_10.2.4-logerror_2.txt says:

2017-03-22 17:29:43 140209659250496 [Note] Using unique option prefix 'innodb_defragment_fill_factor-' is error-prone and can break in the future. Please use the full name 'innodb-defragment-fill-factor-n-recs' instead.

It can be turned off by using the startup option getopt-prefix-matching=0

Generated at Thu Feb 08 07:56:55 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.