39807[!!!][BUGFIX] Check for existing index column in exec_SELECTgetRows()
Commit message
Review
-
Code review CR +2
- Frank Nägler +2
- Andreas Kienast +1
-
Verified V +2
- Frank Nägler +2
- Andreas Kienast +1
Issues 1
Files 2
Review log 26
Show 1 earlier messages
-
Markus Klein uploaded patch set 1 05/29/15, 21:18
-
Stephan Großberndt commented on patch set 1 CR -1 05/29/15, 22:20
result is not freed if exception is thrown -
Markus Klein uploaded patch set 2 05/29/15, 22:23
-
Markus Klein commented on patch set 1 05/29/15, 22:23
args... thanks good catch -
Andreas Kienast voted on patch set 2 CR +1 V +1 05/31/15, 18:15
-
Andreas Kienast commented on patch set 2 05/31/15, 18:17
DatabaseConnection.php:386I didn't test this special case: What happens if a value in the DB has stored "NULL"? The the field exists, but isset() will fail. -
Andreas Kienast voted on patch set 2 V 0 05/31/15, 18:24
-
Markus Klein commented on patch set 2 05/31/15, 21:55
DatabaseConnection.php:386ReplyTo my knowledge mysqli with non-strict mysql connection never returns null, but only an empty string, that's why I chose isset() here. In any case we could go for array_key_exists here. -
Andreas Kienast commented on patch set 2 06/01/15, 06:48
DatabaseConnection.php:386ReplyI tested it on a default MySQL 5.5 and got NULL. Anyway, I'll push a new patch set. -
Andreas Kienast uploaded patch set 3 06/01/15, 06:51
-
Andreas Kienast commented on patch set 3 06/01/15, 06:52
For the sake of performance I added array_key_exists and kept isset being the first condition. -
Markus Klein commented on patch set 3 06/01/15, 07:26
Thanks -
Stephan Großberndt uploaded patch set 4 06/01/15, 07:52
-
Stephan Großberndt commented on patch set 4 CR +1 06/01/15, 07:59
Rather than making each call expensive (there will be lots!) check for key only on first record. Also an empty result and even NULL maybe a valid value for $uidIndexField resulting in an ''-index. No need to throw exceptions here. While at it - $this->debug() gets called from exec_SELECTquery() already - either the additional calls in exec_SELECTgetRows() and exec_SELECTgetSingleRow() have to be changed to have their names as parameters (but even then its called twice for a query) or be removed (as I did) -
Stephan Großberndt uploaded patch set 5 06/01/15, 08:01
-
Stephan Großberndt commented on patch set 5 CR +1 06/01/15, 08:02
And since I hate seeing "See exec_SELECTquery()" instead of a proper PHPDoc, lets fix that too ;) -
Andreas Kienast voted on patch set 5 CR +1 06/02/15, 10:01
-
Wouter Wolters voted on patch set 5 CR +1 06/03/15, 11:43
-
Andreas Kienast voted on patch set 5 V +1 06/05/15, 06:04
-
Frank Nägler commented on patch set 5 CR -1 06/05/15, 08:06
throwing an exception is a breaking change, we need a rst file and [!!!] prefix. -
Markus Klein commented on patch set 5 06/05/15, 08:17
will do -
Markus Klein uploaded patch set 6 06/05/15, 08:23
-
Andreas Kienast voted on patch set 6 V +1 CR +1 06/05/15, 08:26
-
Frank Nägler voted on patch set 6 CR +1 06/05/15, 08:32
-
Frank Nägler voted on patch set 6 V +2 CR +2 06/05/15, 08:44
-
Frank Nägler merged patch set 6 06/05/15, 08:44