View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
1911 | RackTables | default | public | 2019-06-19 11:37 | 2019-06-19 16:36 |
Reporter | arkadi | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | duplicate | ||
Platform | linux | OS | debian | OS Version | stretch |
Product Version | 0.21.3 | ||||
Summary | 1911: MySQL 8 support | ||||
Description | Row is a reserved keyword in MySQL 8. When replacing all Row values to `Row` everything works. Is it possible to add this to the next release? | ||||
Steps To Reproduce | Install MySQL 8 | ||||
Tags | No tags attached. | ||||
duplicate of | 1909 | closed | Pdo exception: PDOException |
This had been reported recently, but I still do not have a simple way to reproduce the issue, which means someone will have to help me help them. So, what are the exact steps to get a working MySQL 8 server and/or what are the exact changes you have made to fix the issue? I would be happy to credit the fix to you, and the simplest way to accept the change would be through a GitHub pull request (although attaching the .patch file to this issue would work too). | |
Hi Please find the path file attached... If you need more information, just let me know! database.php.patch (1,962 bytes)
--- database.php 2019-06-19 11:31:19.879478942 +0200 +++ database.php.orig 2019-06-19 14:15:15.546326925 +0200 @@ -164,7 +164,7 @@ ), 'row' => array ( - 'table' => '`Row`', + 'table' => 'Row', 'columns' => array ( 'id' => 'id', @@ -277,13 +277,13 @@ function getRowInfo ($row_id) { $query = - "SELECT `Row`.id AS id, `Row`.name AS name, COUNT(Rack.id) AS count, " . + "SELECT Row.id AS id, Row.name AS name, COUNT(Rack.id) AS count, " . "IF(ISNULL(SUM(Rack.height)),0,SUM(Rack.height)) AS sum, " . "Location.id AS location_id, Location.name AS location " . - "FROM `Row` LEFT JOIN Rack ON Rack.row_id = `Row`.id " . - "LEFT OUTER JOIN Location ON `Row`.location_id = Location.id " . - "WHERE `Row`.id = ? " . - "GROUP BY `Row`.id, Location.id"; + "FROM Row LEFT JOIN Rack ON Rack.row_id = Row.id " . + "LEFT OUTER JOIN Location ON Row.location_id = Location.id " . + "WHERE Row.id = ? " . + "GROUP BY Row.id, Location.id"; $result = usePreparedSelectBlade ($query, array ($row_id)); if ($row = $result->fetch (PDO::FETCH_ASSOC)) return $row; @@ -301,7 +301,7 @@ { $result = usePreparedSelectBlade ( - 'SELECT R.id, R.name FROM `Row` R ' . + 'SELECT R.id, R.name FROM Row R ' . 'INNER JOIN EntityLink EL ON ' . "EL.parent_entity_type = 'location' " . "AND EL.child_entity_type = 'row' " . @@ -2990,7 +2990,7 @@ { $byName = getSearchResultByField ( - '`Row`', + 'Row', array ('id'), 'name', $terms, @@ -3555,7 +3555,7 @@ { $ret = array(); $subject = array(); - $subject[] = array ('q' => 'select count(*) from `Row`', 'txt' => 'Rows'); + $subject[] = array ('q' => 'select count(*) from Row', 'txt' => 'Rows'); $subject[] = array ('q' => 'select count(*) from Rack', 'txt' => 'Racks'); $subject[] = array ('q' => 'select avg(height) from Rack', 'txt' => 'Average rack height'); $subject[] = array ('q' => 'select sum(height) from Rack', 'txt' => 'Total rack units in field'); |
|
The next version 0.21.4 will include your bugfix (commit fc92cbc). This issue will be closed as a duplicate, and the original report will be closed as fixed. Thank you! | |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-06-19 11:37 | arkadi | New Issue | |
2019-06-19 14:02 | infrastation | Relationship added | duplicate of 1909 |
2019-06-19 14:09 | infrastation | Note Added: 0003975 | |
2019-06-19 14:19 | arkadi | File Added: database.php.patch | |
2019-06-19 14:19 | arkadi | Note Added: 0003977 | |
2019-06-19 15:45 | infrastation | Sticky Issue | No => Yes |
2019-06-19 15:46 | infrastation | Sticky Issue | Yes => No |
2019-06-19 16:36 | infrastation | Status | new => closed |
2019-06-19 16:36 | infrastation | Resolution | open => duplicate |
2019-06-19 16:36 | infrastation | Note Added: 0003979 |