View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
97 | PHPOF2 | Default | public | 19 Sep 2008 09:40 | 5 Jan 2009 16:33 |
Reporter | mrosenquist | Assigned To | timj | ||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Target Version | 0.11.0 | Fixed in Version | 0.11.0 | ||
Summary | 97: the optimized "tableDiscoverSchema" does not check for PEAR errors | ||||
Description | the optimized "tableDiscoverSchema" does not check PEAR::isError($result), This is very important as it is the first query run on a table in many cases, and does not allow for standard pear error handling | ||||
Tags | No tags attached. | ||||
Attached Files | optimized-mysqli.php.patch (875 bytes)
--- mysqli.php.orig 2008-09-19 09:41:40.000000000 +0100 +++ mysqli.php 2008-09-19 09:44:27.000000000 +0100 @@ -30,6 +30,10 @@ { $res = $table->db->query("DESCRIBE $table->name"); + if (PEAR::isError($res)) { + throw new Exception ("MDB2 error whilst getting definitions for table '$rable->name': ".$res->getMessage()); + } + $autoinc = array(); while ($field = $res->fetchRow(MDB2_FETCHMODE_ASSOC)) { $fieldname = $field['field']; @@ -54,6 +58,11 @@ // Get foreign keys $res = $table->db->query('SHOW CREATE TABLE ' . $table->name); + + if (PEAR::isError($res)) { + throw new Exception ("MDB2 error whilst getting table creation information for table '$table->name': ".$res->getMessage()); + } + $field = $res->fetchRow(MDB2_FETCHMODE_ASSOC); $create_table = $field['create table']; // lowercase due to MDB2 normalisation | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
19 Sep 2008 09:40 | mrosenquist | New Issue | |
19 Sep 2008 09:47 | mrosenquist | File Added: optimized-mysqli.php.patch | |
19 Sep 2008 10:17 | mrosenquist | File Added: optimized-mysqli.php.patch.use_this | |
19 Sep 2008 10:28 | timj | Target Version | => 0.10.2 |
21 Dec 2008 22:28 | timj | Target Version | 0.10.2 => 0.11.0 |
21 Dec 2008 22:28 | timj | Status | new => assigned |
21 Dec 2008 22:28 | timj | Assigned To | => timj |
29 Dec 2008 17:07 | timj | Target Version | 0.11.0 => |
29 Dec 2008 17:28 | timj | Relationship added | related to 98 |
29 Dec 2008 18:54 | timj | Status | assigned => resolved |
29 Dec 2008 18:54 | timj | Fixed in Version | => 0.11.0 |
29 Dec 2008 18:54 | timj | Resolution | open => fixed |
29 Dec 2008 18:54 | timj | Target Version | => 0.11.0 |
29 Dec 2008 18:54 | timj | Summary | the optimized "tableDiscoverSchema" does not check PEAR::isError($result), => the optimized "tableDiscoverSchema" does not check for PEAR errors |
5 Jan 2009 16:33 | timj | Status | resolved => closed |