ZF-7629: Zend_Db_Adapter_Pdo_Mssql should pass @table_owner to sp_pkeys


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.



Just correcting, the procedure name is sp_pkeys.

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?

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

Fix provided in trunk at r17739, please test.

Support for catalogs in ZF is also very limited, see (similar bug)

Fixed in release branch 1.9