php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77138 Errors creating db schema for web/master
Submitted: 2018-11-11 07:31 UTC Modified: 2019-02-06 02:14 UTC
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:0 of 0 (0.0%)
From: zach at zrhoffman dot net Assigned:
Status: Open Package: Systems problem
PHP Version: Irrelevant OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zach at zrhoffman dot net
New email:
PHP Version: OS:

 

 [2018-11-11 07:31 UTC] zach at zrhoffman dot net
Description:
------------
In web/master, there are 4 SQL files to create the db schema for the
"phpmasterdb" database. The import works successfully in MySQL 4 but not MySQL
5.

Test script:
---------------
for sql in *.sql; do echo "$sql"; mysql -udocker -pdocker -hdb docker <"$sql"; done;

Expected result:
----------------
Expect successful database import

Actual result:
--------------
In MySQL 5.5 and up, you get the following errors when trying to import the SQL:

zrhoffman: [0]$ for sql in *.sql; do echo "$sql"; mysql -udocker -pdocker -hdb docker <"$sql"; done;
event.sql
ERROR 1064 (42000) at line 5: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 21
mirrors.sql
ERROR 1064 (42000) at line 5: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 29
note.sql
ERROR 1064 (42000) at line 16: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM PACK_KEYS=1' at line 14
users.sql
ERROR 1064 (42000) at line 25: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 27

Patches

update_schema_for_5.7.patch (last revision 2018-11-11 07:45 UTC by zach at zrhoffman dot net)
update_schema_for_5.5.patch (last revision 2018-11-11 07:45 UTC by zach at zrhoffman dot net)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-11-11 07:50 UTC] zach at zrhoffman dot net
-Status: Open +Status: Assigned
 [2018-11-11 07:50 UTC] zach at zrhoffman dot net
I did not see a php/web-master repo on GitHub, so I will submit patches here.

These 2 patches fix issues importing the db schema for MySQL versions up through
5.7.

• Fixed in 95f045c1ff: `ERROR 1064 (42000) at line 5: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 21`

• Fixed in 95f045c1ff: `ERROR 1426 (42000) at line 31: Too big precision 14 specified for 'updated'. Maximum is 6`

• Fixed in b07abd2dcb: `ERROR 1067 (42000) at line 5: Invalid default value for 'created'`
 [2018-11-25 07:25 UTC] petk@php.net
Thank you for the patches. I've opened a request for the mirror here https://bugs.php.net/bug.php?id=77196 since it would be really useful to have it one day.
 [2018-11-25 19:31 UTC] zach at zrhoffman dot net
Thanks Peter!
 [2019-01-04 06:07 UTC] zach at zrhoffman dot net
-Status: Assigned +Status: Open -Package: Website problem +Package: Systems problem
 [2019-01-04 06:07 UTC] zach at zrhoffman dot net
Changing package to "Systems problem"
 [2019-02-06 02:11 UTC]
The following pull request has been associated:

Patch Name: Bug #77138: Update DB schema syntax
On GitHub:  https://github.com/php/web-master/pull/1
Patch:      https://github.com/php/web-master/pull/1.patch
 [2019-02-06 02:14 UTC] zach at zrhoffman dot net
Thanks to johannes for getting web/master on GitHub! There is a PR for this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 12:01:29 2024 UTC