Menu

#127 Analyzer and column aliases

closed-accepted
None
5
2002-11-01
2002-10-19
No

This fixes the alias part of the bug 618272. I submit
it as a patch to get some feedback.

Discussion

  • Marc Delisle

    Marc Delisle - 2002-10-20

    Logged In: YES
    user_id=210714

    Version 2 of the patch finds tables, columns and their aliases.

     
  • Marc Delisle

    Marc Delisle - 2002-10-20

    Version 2: diff for sqlparser.lib.php3, display_tbl.lib.php3 and sql.php3

     
  • Robin Johnson

    Robin Johnson - 2002-10-22
    • assigned_to: nobody --> lem9
     
  • Robin Johnson

    Robin Johnson - 2002-10-22

    Logged In: YES
    user_id=30201

    This patch is good, baring one serious bug I have found.
    It totally doesn't handle the database being mentioned in the
    query.

    Eg,
    I might have two databases:
    bar, foo

    each with a table named mysql

    say I wanted to query them both
    SELECT * FROM bar.mysql, foo.mysql;

    This gets even more compex if the two tables have identical
    column names:
    SELECT bar.mysql.columnA, foo.mysql.columnB FROM
    bar.mysql, foo.mysql;

    Your code currently dies horribly with this, could you fix that?
    I'd consider this a nessecity for the patch to be accepted.

    I'll do all the optimization needed for the code, but that bit of
    functionality comes first.

     
  • Marc Delisle

    Marc Delisle - 2002-10-23

    Logged In: YES
    user_id=210714

    Yes I will work on this.

     
  • Marc Delisle

    Marc Delisle - 2002-10-24

    Logged In: YES
    user_id=210714

    Please have a look at sugg1.txt.

     
  • Marc Delisle

    Marc Delisle - 2002-10-29

    Suggestions 2 for analyzer

     
  • Marc Delisle

    Marc Delisle - 2002-10-31

    Version 3:diff for sqlparser.lib.php3, display_tbl.lib.php3 and sql.php3

     
  • Marc Delisle

    Marc Delisle - 2002-10-31

    Logged In: YES
    user_id=210714

    Version 3 of the patch analyzes correctly dbs, tables,
    columns, select expression aliases and table-ref table aliases.

     
  • Robin Johnson

    Robin Johnson - 2002-11-01

    v4: Unified diff for sqlparser.lib.php3, display_tbl.lib.php3 and sql.php3

     
  • Robin Johnson

    Robin Johnson - 2002-11-01

    Logged In: YES
    user_id=30201

    Unified updated diff attached.
    Performance improvements incorporated.

     
  • Marc Delisle

    Marc Delisle - 2002-11-01
    • status: open --> closed-accepted
     
  • Marc Delisle

    Marc Delisle - 2002-11-01

    Logged In: YES
    user_id=210714

    Merged.

     
MongoDB Logo MongoDB