6.0.0-beta1
7/4/25

[#9378] Unexpected values in sql result lead to duplicate inserts
Summary Unexpected values in sql result lead to duplicate inserts
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester d-fens (at) 00010111 (dot) de
Created 11/10/2010 (5350 days ago)
Due
Updated 09/06/2017 (2858 days ago)
Assigned 11/16/2010 (5344 days ago)
Resolved 01/09/2011 (5290 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/06/2017 08:18:18 AM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

commit fd715de866922ea875e2c6c9ed5aa46f6eb27e79
Author: Moritz Venn <ritzmo@php.net>
Date:   Thu Jul 12 19:16:13 2007 +0000

     Implemented #9378


     git-svn-id: 
https://svn.php.net/repository/pear/packages/Text_Wiki/trunk@239623 
c90b9560-bf6c-de11-be94-00142212c4b1

  Text/Wiki/Parse/Mediawiki/Preformatted.php | 16 +++++++++++++---
  1 file changed, 13 insertions(+), 3 deletions(-)

http://github.com/horde/horde/commit/fd715de866922ea875e2c6c9ed5aa46f6eb27e79
01/09/2011 05:00:23 PM Michael Rubinsky Comment #6
State ⇒ Resolved
Reply to this comment
Local tests show this is resolved, no feedback from OP, so resolving.
12/24/2010 05:54:27 PM Michael Rubinsky Comment #5
Assigned to Michael Rubinsky
Reply to this comment
Can original poster verify this is now fixed with the latest commit?
12/24/2010 05:53:48 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git for this ticket:

Fix creating the return structure for selectAssoc() in non-pdo drivers
Fixes Bug: 9378

http://git.horde.org/horde-git/-/commit/ba211c1639584dc0cac5425ffc2e343b67569564
11/23/2010 12:31:59 PM d-fens (at) 00010111 (dot) de Comment #3 Reply to this comment
hi,

i found out this only happens with database set to mysqli, with old 
mysql it works, so there must be a difference there
11/16/2010 06:40:47 AM Michael Rubinsky Comment #2
Priority ⇒ 1. Low
State ⇒ Feedback
Reply to this comment
I can't duplicate this.

Could this be the same issue from Bug: 9223 ?
11/10/2010 09:49:41 AM d-fens (at) 00010111 (dot) de Comment #1
Priority ⇒ 3. High
Type ⇒ Bug
Summary ⇒ Unexpected values in sql result lead to duplicate inserts
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
hi,

in horde/content/lib/Types/Manager.php line 70
foreach ($this->_db->selectAssoc('SELECT type_id, type_name FROM ' . 
$this->_t('types') . ' WHERE type_name IN ('.implode(',', 
array_map(array($this->_db, 'quote'), array_keys($typeName))).')') as 
$id => $type) {

returns
array(2) { ["calendar"]=>  bool(false) ["event"]=>  bool(false) }
but it seems its expected to be calendar=> 1, event => 2

so no entrys are found and the insert following leads to

INSERT INTO `rampage_types` (type_name) VALUES ('calendar') [pid 12751 
on line 761 of 
"/var/www/_horde/horde/framework/Db/lib/Horde/Db/Adapter/Base.php"]
2010-11-10T10:40:32+01:00 EMERG: HORDE [kronolith] QUERY FAILED: 
Duplicate entry 'calendar' for key 2


Saved Queries