Zend Framework

Zend_Db_Adapter_Pdo_Mssql should pass @table_owner to sp_pkeys

Details

  • Type: Patch Patch
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.1
  • Fix Version/s: 1.9.2
  • Component/s: Zend_Db
  • Labels:
    None

Description

In mssql if you don't pass variable @table_owner it will guess the table is in dbo schema.
So in attachment is a patch to fix that.
I'm also using that in sp_columns because is the right to do. If I have a 2 tables with the same name and different schemas, that will be confusing.

Activity

Hide
Jayson Santos dos Reis added a comment -

Patch

Show
Jayson Santos dos Reis added a comment - Patch
Hide
Jayson Santos dos Reis added a comment -

Just correcting, the procedure name is sp_pkeys.

Show
Jayson Santos dos Reis added a comment - Just correcting, the procedure name is sp_pkeys.
Hide
Ralph Schindler added a comment -

I am not sure what you are proposing. How do you expect to call describeTable() to trigger this functionality? Currently, the $schemaName is not used in the lookup. Why would schemaName be dotted? What does that represent?

Show
Ralph Schindler added a comment - I am not sure what you are proposing. How do you expect to call describeTable() to trigger this functionality? Currently, the $schemaName is not used in the lookup. Why would schemaName be dotted? What does that represent?
Hide
Jayson Santos dos Reis added a comment -

Hi Ralph, there are to problems that patch solve.
First: When you have two tables in different schemas, procedures like sp_pkeys and sp_columns will get only one.
Second: sp_pkeys need specify the schema or it will search in dbo, if that does not exist in dbo, will return a blank rowset.

And about the schema name using dot is because some times you need specify another database to do a join, because of that we use in schemaName db.schema.

Thank you

Show
Jayson Santos dos Reis added a comment - Hi Ralph, there are to problems that patch solve. First: When you have two tables in different schemas, procedures like sp_pkeys and sp_columns will get only one. Second: sp_pkeys need specify the schema or it will search in dbo, if that does not exist in dbo, will return a blank rowset. And about the schema name using dot is because some times you need specify another database to do a join, because of that we use in schemaName db.schema. Thank you
Hide
Ralph Schindler added a comment -

Fix provided in trunk at r17739, please test.

Show
Ralph Schindler added a comment - Fix provided in trunk at r17739, please test.
Hide
Alexandre Gomes Gaigalas added a comment -

Support for catalogs in ZF is also very limited, see http://framework.zend.com/issues/browse/ZF-6665 (similar bug)

Show
Alexandre Gomes Gaigalas added a comment - Support for catalogs in ZF is also very limited, see http://framework.zend.com/issues/browse/ZF-6665 (similar bug)
Hide
Ralph Schindler added a comment -

Fixed in release branch 1.9

Show
Ralph Schindler added a comment - Fixed in release branch 1.9

People

Vote (3)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:

Time Tracking

Estimated:
1h 30m
Original Estimate - 1 hour, 30 minutes
Remaining:
1h 30m
Remaining Estimate - 1 hour, 30 minutes
Logged:
Not Specified
Time Spent - Not Specified