Project

General

Profile

Actions

Bug #55095

closed

Replace SHOW DATABASE by query to schema

Added by Alexander Opitz over 10 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
Start date:
2014-01-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In #53761 the usage of deprecated "mysql_list_dbs()" was replaced by "mysql_query('SHOW DATABASES', ...". But this isn't the best way as it may be that the user is restricted. You should better select the information_schema as already done for "admin_get_dbs()" in core, see #47744 for more information.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #53761: Deprecated function call mysql_list_dbs in dbalClosed2013-11-19

Actions
Related to TYPO3 Core - Bug #47744: Fatal error: Call to a member function fetch_object() on a non-object in ClosedAlexander Opitz2013-04-30

Actions
Actions #1

Updated by Ingo Schmitt over 10 years ago

The user also could be restricted that he could not query the information_schema.

Actions #2

Updated by Alexander Opitz over 10 years ago

From MySQL Manual
http://dev.mysql.com/doc/refman/5.7/en/information-schema.html

Each MySQL user has the right to access these tables, but can see only the rows in the tables that correspond to objects for which the user has the proper access privileges.
In some cases (for example, the ROUTINE_DEFINITION column in the INFORMATION_SCHEMA.ROUTINES table), users who have insufficient privileges will see NULL. 

So this is the way to go and we don't need two different implementations in core.

Actions #3

Updated by Mathias Schreiber over 9 years ago

  • Target version set to 7.4 (Backend)
Actions #4

Updated by Morton Jonuschat almost 9 years ago

  • Assignee set to Morton Jonuschat
Actions #5

Updated by Morton Jonuschat almost 9 years ago

  • Status changed from New to Closed

Duplicate, change already implemented in #47744
Change: https://review.typo3.org/#/c/23637/

Actions

Also available in: Atom PDF