Menu

#2264 (ok 2.9.1) bug in Table.class.php

2.9.0
fixed
1
2013-06-11
2006-09-30
No

if you have a db `Test` with any table and a db `test`
with no table (which is default in many distributions)
you get:

Fatal error: Using $this when not in object context in
/srv/http/pma.cihar.com/STABLE/libraries/Table.class.php
on line 139

if you choose `test` in Navi frame (or invoke
index.php?db=test)

Discussion

1 2 > >> (Page 1 of 2)
  • Jürgen Wind

    Jürgen Wind - 2006-09-30
    • priority: 5 --> 3
     
  • Marc Delisle

    Marc Delisle - 2006-10-01
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2006-10-01

    Logged In: YES
    user_id=210714

    I can see the effects on my server :) debugging now...

     
  • Marc Delisle

    Marc Delisle - 2006-10-01

    Logged In: YES
    user_id=210714

    The problem happens because selecting from
    information_schema for some value in TABLE_SCHEMA finds test
    and also Test.
    Working on a patch.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01

    Logged In: YES
    user_id=1383652

    the only workaround is using "show databases" here!

    use `information_schema`;
    SELECT * FROM `TABLES`;

    gives only

    TABLE_CATALOG TABLE_SCHEMA TABLE_NAME
    ....
    NULL Test tt

    whereas "show databases" displays both `Test` and `test` as
    well.
    ....
    but not
    ....
    NULL test
    ....

    but there is no equivalent for show databases in
    information_scheme!

    using information_scheme mysql scans databases
    caseinsensitive and grabs the first non empty table even if
    it belongs to a different database.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01

    Logged In: YES
    user_id=1383652

    rephrase:
    use `information_schema`;
    SELECT * FROM `TABLES`;

    gives only

    TABLE_CATALOG TABLE_SCHEMA TABLE_NAME
    ....
    NULL Test tt
    ....

    but not
    ....
    NULL test
    ....

    whereas "show databases" displays both `Test` and
    `test` as
    well.
    -----

    using information_scheme mysql scans databases
    caseinsensitive and grabs the first non empty table even if
    it belongs to a different database.

    this can be reproduced by creating a db `Test2` with no
    tables and `test2` with any table

    no fatal error, but wrong table list in db `Test2`

     
  • Marc Delisle

    Marc Delisle - 2006-10-01

    Logged In: YES
    user_id=210714

    Please have a look at what I just merged in QA_2_9.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01

    Logged In: YES
    user_id=1383652

    i only have access to HEAD :(
    is there a Tortoise setting?

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01

    Logged In: YES
    user_id=1383652

    yes,
    BINARY is the "magic solution",
    but i can't test it locally on my win box (for obvious reason ;)
    could you merge it in HEAD too?

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01
    • priority: 3 --> 1
     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01

    Logged In: YES
    user_id=1383652

    fixed in
    http://pma.cihar.com/QA_2_9/index.php?db=test

     
  • Marc Delisle

    Marc Delisle - 2006-10-01
    • priority: 1 --> 3
     
  • Marc Delisle

    Marc Delisle - 2006-10-01

    Logged In: YES
    user_id=210714

    Merged to HEAD.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01

    Logged In: YES
    user_id=1383652

    well,
    the bug is fixed for tux, but reinduces a win/mysql bug:
    if you have a db `Dummy` with some "alpha" named tables in
    it, the tables don't appear any longer neither in Navi frame
    or in structure. (one can only work with "digit only" tables
    like '127')

    information_schema.tables says:
    TABLE_SCHEMA TABLE_NAME
    Dummy 127
    Dummy db1__a
    Dummy db1__b
    Dummy db~2
    Dummy db~a
    Dummy default_userdb
    ....

    (win2k,pmaHEAD,mysql5024a)
    [the old mysql 5.0.18 bug was fixed as of 5.0.23]

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-01
    • priority: 3 --> 5
     
  • Marc Delisle

    Marc Delisle - 2006-10-03

    Logged In: YES
    user_id=210714

    Juergen,
    I tried PMA 2.9.0.2 with a version of XAMPP containing MySQL
    5.0.20. With lower_case_table_names set to 1, 0 or 2, I had
    no problem with a db "Dummy" with a table "alpha" in it:
    listed in left panel and in db structure.

    Please help me reproduce your problem.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-03

    Logged In: YES
    user_id=1383652

    >containing MySQL 5.0.20.
    it's only in mysql 5.0.24a, (mysql 5.0.22 working well here
    on w2k)
    as mysql fixed the above mentioned bug as of 5.0.23
    (reported by Sebastian som month ago)

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-03

    Logged In: YES
    user_id=1383652

    pma290 (2006-09-20) is working with mysql5022 and 5024a as well.

     
  • Marc Delisle

    Marc Delisle - 2006-10-04

    Logged In: YES
    user_id=210714

    Juergen,
    I made an error by testing 2.9.0.2. Of course, my latest
    patch about case sensitivity is not part of it. I retested,
    this time with QA_2_9 and the latest XAMPP (MySQL 5.0.24a)
    and with all possibilities of lower_case_table_names (0, 1,
    2), and I have no problem with a db Dummy and a table alpha
    in it.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-04
    • status: open --> pending
     
  • Jürgen Wind

    Jürgen Wind - 2006-10-04

    Logged In: YES
    user_id=1383652

    ok, maybe someone else can reproduce this.
    I only happend to have this db from debugging some month ago.
    As it is of minimal relevance i will set this tracker to
    pending for now. No need to waste your precious time on this.

     
  • Jürgen Wind

    Jürgen Wind - 2006-10-04
    • priority: 5 --> 1
    • status: pending --> open
     
  • Jürgen Wind

    Jürgen Wind - 2006-10-04
    • status: open --> pending
     
1 2 > >> (Page 1 of 2)