Menu

#2424 (ok 2.10.2) Inserted Row Count is wrong

2.10.1
fixed
1
2013-06-11
2007-05-08
No

Hi,

After a row is inserted, the row count is wrong. It's 2 or 3, while I only inserted a single row.

Discussion

  • Sebastian Mendel

    • status: open --> pending
     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    cannot confirm

    please provide code/steps to reproduce
    and/or try on http://pma.cihar.com/STABLE/ (root, no pw)

     
  • Olaf van der Spek

    • status: pending --> open
     
  • Olaf van der Spek

    Logged In: YES
    user_id=30264
    Originator: YES

    Output (dutch):
    Ingevoegde rijen: 3
    Ingevoegde rij id: 7
    Warning (1364): Field 'info_hash' doesn't have a default value

    Input:
    SQL-query:
    INSERT INTO `testdb`.`xbt_files` (
    `fid` ,
    `leechers` ,
    `seeders` ,
    `completed` ,
    `flags` ,
    `mtime` ,
    `ctime`
    )
    VALUES (
    NULL , '0', '0', '0', '0', '', ''
    );

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    please add

    - MySQL server version
    - php-mysql library version
    - table structure

     
  • Sebastian Mendel

    • status: open --> pending
     
  • Olaf van der Spek

    Logged In: YES
    user_id=30264
    Originator: YES

    Don't you know what http://pma.cihar.com/STABLE/ is running?

     
  • Olaf van der Spek

    • status: pending --> open
     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    you did not said and i did not noticed that you created a test environment there ... i take a look ...

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    seems to be a php mysqli bug - reported

    http://bugs.php.net/41325

     
  • Marc Delisle

    Marc Delisle - 2007-05-08

    Logged In: YES
    user_id=210714
    Originator: NO

    Sebastian,
    on http://bugs.php.net/41325 there is a quote error in your code. You need something like:

    $sql = "INSERT INTO `test` (`int`, `int2`) VALUES ('', '')";

    I can reproduce the problem in phpMyAdmin, but your test script produces 1 on the same system (PHP 5.2.2, MySQL 5.0.37).

     
  • Marc Delisle

    Marc Delisle - 2007-05-08

    Logged In: YES
    user_id=210714
    Originator: NO

    Sebastian,
    it's a phpMyAdmin bug. In PMA_DBI_try_query() we should check for the number of affected rows and store it, before issuing the SHOW WARNINGS.

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    yes, i know - now

    see php bug report

     
  • Sebastian Mendel

    • assigned_to: nobody --> cybot_tm
     
  • Marc Delisle

    Marc Delisle - 2007-05-08

    Logged In: YES
    user_id=210714
    Originator: NO

    However I still don't see how your test script could say 2.

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    it does not ...

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    fixed in trunk and QA_2_10

     
  • Sebastian Mendel

    • summary: Inserted Row Count is wrong --> (ok 2.10.2) Inserted Row Count is wrong
    • priority: 5 --> 1
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-06-15
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed