Menu

#1698 (ok 2.11.1) error with \'-\' for disp. dupl. rows for index

2.6.4-pl2
fixed
Interface (555)
1
2013-06-11
2005-06-07
Nick
No

ehen defining a Primary key for a table, and you have
duplicate entries in this column then, in the warning it
gives me a button "Show me duplicates" (I dont know the
exact value of the button in english, i have the german
Version, there its simply called "Anzeigen" (Show me))

When i click on this button he shows me the duplicate
entries.

But if a "-" (without quotes) is in this value he dont show
me and the query is incorrect.

Example:

Double value: "foobar@foo-bar.net"

then the query only is:

SELECT *
FROM newsletteradressen
WHERE (
email LIKE 'foobar@foo-'
)
LIMIT 0 , 30

And there are no reults.

I found this bug in Version phpMyAdmin 2.6.2 running
with MySQL 4.0.22 on localhost.

Discussion

  • Nick

    Nick - 2005-06-07

    Logged In: YES
    user_id=1292843

    The first word is "when"

     
  • Nick

    Nick - 2005-06-07
    • priority: 5 --> 2
     
  • Marc Delisle

    Marc Delisle - 2005-06-12
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2005-06-12

    Logged In: YES
    user_id=210714

    Developers notes:
    This happens in libraries/common.lib.php in the logic
    starting at line 709. The "-" here is confused with the "-"
    separating 2 values returned in the error message when there
    is a key containing 2 fields.
    Another problem here is that only $mysql_error_values[0] is
    ever used. Even if we could separate correctly the values,
    we would have to find the index number returned in the
    (multi-lingual) MySQL error message, then use it to find the
    corresponding key fields to generate the LIKE clauses
    (instead of using all the table's fields in sequence).

     
  • Marc Delisle

    Marc Delisle - 2005-06-12
    • assigned_to: lem9 --> nobody
     
  • Sebastian Mendel

    • status: open --> open-accepted
     
  • Sebastian Mendel

    • assigned_to: nobody --> cybot_tm
    • milestone: --> 2.6.4-pl2
     
  • Sebastian Mendel

    • summary: Error with - and duplicate entries while trying to define an --> (in 2.7.0) error with '-' for disp. dupl. rows for index
    • priority: 2 --> 1
    • status: open-accepted --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2005-10-29

    Logged In: YES
    user_id=210714

    Sebastian,

    MySQL error 1062 can happen on INSERT if there is a
    duplicate entry, so doing a preg_match on ALTER TABLE does
    not solve the problem. Also, we have a warning because
    $error_table is empty.

     
  • Marc Delisle

    Marc Delisle - 2005-10-29
    • priority: 1 --> 5
     
  • Sebastian Mendel

    • summary: (in 2.7.0) error with '-' for disp. dupl. rows for index --> error with '-' for disp. dupl. rows for index
    • status: open-fixed --> open-accepted
     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    yes ... and

    UPDATE ...
    CREATE INDEX ...

    this is much more complicated ...

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580

    and of course the different formats for this statements ...
    and possible different error messages with different server
    versions and languages

    ... im working on, but it can take a little bit ...

     
  • Marc Delisle

    Marc Delisle - 2007-09-09
    • assigned_to: cybot_tm --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-09-09
    • summary: error with '-' for disp. dupl. rows for index --> (ok 2.11.1) error with '-' for disp. dupl. rows for index
    • priority: 5 --> 1
    • status: open-accepted --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-09-09

    Logged In: YES
    user_id=210714
    Originator: NO

    Minor feature removed due to its complexity.

     
  • Marc Delisle

    Marc Delisle - 2007-09-20
    • summary: (ok 2.11.1) error with '-' for disp. dupl. rows for index --> (ok 2.11.1) error with \'-\' for disp. dupl. rows for index
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

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