Bug #20166 mysql-test-run.pl does not test system privilege tables creation
Submitted: 31 May 2006 12:38 Modified: 9 Mar 2007 5:01
Reporter: Jani Tolonen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S2 (Serious)
Version:4.0, 4.1, 5.0, 5.1 OS:Any (All)
Assigned to: Magnus Blåudd

[31 May 2006 12:38] Jani Tolonen
Description:
mysql-test-run.pl, Perl version of the mysql-test-run, uses it's own file for system tables creation, mysql-test/lib/init_db.sql. The shell version is script/mysql_create_system_tables.sh, which is used in real-life when creating the tables. So if there is a bug in the shell version of the system tables script, it will not be noticed by the Perl version 'mysql-test-run.pl'

How to repeat:
mysql-test-run.pl does not test scripts/mysql_create_system_tables.sh.

Suggested fix:
Make mysql-test-run.pl use output from scripts/mysql_create_system_tables.sh instead of using it's own.
[15 Nov 2006 14:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15355

ChangeSet@1.2556, 2006-11-15 15:15:19+01:00, msvensson@neptunus.(none) +4 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Build mysql_create_system_tables.sql from the output
     of "mysql_create_system_tables test"
   - Remove mysql-test/init_db.sql and mysql-test/lib/init_db.sql
   - Leave netware/init_db.sql until 5.0 where we should soon have possibility
     to test with mysql-test-run.pl
[15 Nov 2006 14:20] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15356

ChangeSet@1.2556, 2006-11-15 15:19:53+01:00, msvensson@neptunus.(none) +5 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Build mysql_create_system_tables.sql from the output
     of "mysql_create_system_tables test"
   - Remove mysql-test/init_db.sql and mysql-test/lib/init_db.sql
   - Leave netware/init_db.sql until 5.0 where we should soon have possibility
     to test with mysql-test-run.pl
[16 Nov 2006 13:08] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/15417

ChangeSet@1.2297, 2006-11-16 13:36:40+01:00, msvensson@neptunus.(none) +10 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Change to use the file mysql_create_system_tables.sql as the original
     for all system tables creation
   - Remove mysql_create_system_tables.sh
[21 Nov 2006 16:41] Magnus Blåudd
While tinkering with this I found a bug in the "INSERT INTO user..." statement used when  generating the default user privilegs for windows. It has too few columns and thus returns error "1136: Column count doesn't match value count at row 1" - this seems to have slipped by undetected for a long time as mysqld does not complain for errors in the bootsrtap file. This will have to change.
[14 Feb 2007 17:42] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/19909

ChangeSet@1.2298, 2007-02-14 18:33:30+01:00, msvensson@neptunus.(none) +19 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Bootstrap mysqld with mysql_system_tables.sql
   - Add new system variable @@hostname
   - Make mysql_system_tables.sql the default file for bootstrapping
     a mysql system database
   - Add test for bootstrap
   - Add test for mysql_install_db if running from bindist
   - Remove mysql-test/init_db.sql and mysql-test/lib/init_db.sql
[20 Feb 2007 10:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20165

ChangeSet@1.2426, 2007-02-20 12:48:15+01:00, msvensson@pilot.blaudden +4 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Add test of bootstrap mode
   - Make mysqld return error if bootstrap failed
[20 Feb 2007 14:12] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20177

ChangeSet@1.2427, 2007-02-20 16:12:14+01:00, msvensson@pilot.blaudden +3 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Part 2, add @@hostname system variable
[20 Feb 2007 14:25] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20185

ChangeSet@1.2427, 2007-02-20 16:24:38+01:00, msvensson@pilot.blaudden +5 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Part 2, add @@hostname system variable
[20 Feb 2007 14:30] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20187

ChangeSet@1.2445, 2007-02-20 16:29:56+01:00, msvensson@pilot.blaudden +2 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Fixes for 5.1
[26 Feb 2007 10:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20557

ChangeSet@1.2428, 2007-02-26 11:48:22+01:00, msvensson@pilot.blaudden +29 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Use mysql_system_tables.sql to create MySQL system tables in
     all places where we create them(mysql_install_db, mysql-test-run-pl
     and mysql_fix_privilege_tables.sql)
[26 Feb 2007 10:49] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20558

ChangeSet@1.2428, 2007-02-26 11:49:24+01:00, msvensson@pilot.blaudden +31 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Use mysql_system_tables.sql to create MySQL system tables in
     all places where we create them(mysql_install_db, mysql-test-run-pl
     and mysql_fix_privilege_tables.sql)
[27 Feb 2007 10:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20635

ChangeSet@1.2447, 2007-02-27 11:39:29+01:00, msvensson@pilot.blaudden +3 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Updates for 5.1
[27 Feb 2007 13:10] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20643

ChangeSet@1.2431, 2007-02-27 14:10:27+01:00, msvensson@pilot.blaudden +1 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Escape undercore character in mysql.db to only allow
    access test_% and not test%
[28 Feb 2007 13:27] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20768

ChangeSet@1.2450, 2007-02-28 14:26:58+01:00, msvensson@pilot.blaudden +6 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Split out initial data in mysql_system_tables.sql to  it's own file
   - Use file from mysql_install_db and mysql-test-run
[28 Feb 2007 13:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20773

ChangeSet@1.2474, 2007-02-28 14:58:19+01:00, msvensson@pilot.blaudden +1 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
[28 Feb 2007 14:03] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20774

ChangeSet@1.2624, 2007-02-28 15:03:47+01:00, msvensson@pilot.blaudden +4 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Build lib/init-db.sql from the output of mysql_create_system_tables
   - Remove mysql-test/init_db.sql and mysql-test/lib/init_db.sql
   - Leave netware/init_db.sql until 5.0 where we should soon have possibility
     to test with mysql-test-run.pl
[28 Feb 2007 14:15] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20778

ChangeSet@1.2452, 2007-02-28 15:15:38+01:00, msvensson@pilot.blaudden +2 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Null merge 4.1 patch
[28 Feb 2007 19:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20815

ChangeSet@1.2479, 2007-02-28 20:33:59+01:00, msvensson@pilot.blaudden +5 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Additional fixes caused by running without anonymous users
[28 Feb 2007 19:44] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/20817

ChangeSet@1.2455, 2007-02-28 20:44:49+01:00, msvensson@pilot.blaudden +2 -0
  Bug #20166 mysql-test-run.pl does not test system privilege tables creation
   - No .sql files in mysql-test/lib/ anymore, don't copy them
[9 Mar 2007 5:01] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 4.1.23, 5.0.38, and 56.1.17 changelogs.
[9 Mar 2007 5:02] Jon Stephens
5.1.17, not 56.1.17. :)
[16 Mar 2007 16:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/22162

ChangeSet@1.2402, 2007-03-16 17:28:32+01:00, msvensson@pilot.blaudden +9 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Build sql files for netware from the mysql_system_tables*.sq files
   - Fix comments about mysql_create_system_tables.sh
   - Use mysql_install_db.sh to create system tables for mysql_test-run-shell
   - Fix mysql-test-run.pl to also look in share/mysql for the msyql_system*.sql files
[16 Mar 2007 19:56] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/22180

ChangeSet@1.2485, 2007-03-16 20:56:16+01:00, joerg@trift2. +9 -0
  Bug#20166 mysql-test-run.pl does not test system privilege tables creation
   - Build sql files for netware from the mysql_system_tables*.sq files
   - Fix comments about mysql_create_system_tables.sh
   - Use mysql_install_db.sh to create system tables for mysql_test-run-shell
   - Fix mysql-test-run.pl to also look in share/mysql for the msyql_system*.sql files
  
  Changeset coded today by Magnus Svensson, just the application to 5.0.38 is by Joerg Bruehe.