Review main Abandoned

26783[BUGFIX] Missing column sys_file.fileinfo

Stefano Kowalke CR 0 V 0 Easy +20 −1 updated 12/07/14, 18:12

Commit message

The DB-Search searches a phrase inside every database table by compile a
LIKE query. The column names will be taken directly from the TCA array
without a check if the column exists in the database.

This patch introduce such a check.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 21

  1. Oliver Klee commented on patch set 1 01/13/14, 13:09

    QueryView.php:507

    tempList has an abbreviation (temp) and says nothing about its contents. I propose "verifiedColumnNames".

    QueryView.php:509

    Can't we use some of the native PHP array functions for this?
  2. Mr. Jenkins commented on patch set 1 01/13/14, 13:16

  3. Steffen Ritter commented on patch set 1 CR -1 01/13/14, 13:16

    the current implementation will slow down thing way more than it helps; please consider a more performant implementation

    QueryView.php:508

    this will do an extra query for each table... please think about introducing that for "multiple tables" at once
  4. Oliver Klee commented on patch set 1 01/13/14, 13:18

    QueryView.php:508 Reply

    … or we cache the fields for each table, e.g., in a static property.
  5. Oliver Klee commented on patch set 1 01/13/14, 13:19

    Or maybe the search should use only TCA columns that have certain (whitelisted) types that always will exist in the DB.
  6. Stefano Kowalke uploaded patch set 2 01/13/14, 14:31

  7. Mr. Jenkins commented on patch set 2 01/13/14, 14:43

  8. Oliver Klee commented on patch set 2 01/13/14, 15:05

    QueryView.php:499

    No abbr, pls. "stmt" is nt vry rdbl.
  9. Stefano Kowalke uploaded patch set 3 01/13/14, 18:22

  10. Mr. Jenkins commented on patch set 3 01/13/14, 18:34

  11. Alexander Opitz commented on patch set 3 CR -1 01/14/14, 09:49

    The SQL Statement is MySQL/PostgreSQL specific. "The Oracle equivalent for information_schema.COLUMNS is USER_TAB_COLS for tables owned by the current user, ALL_TAB_COLS or DBA_TAB_COLS for tables owned by all users." See also: http://stackoverflow.com/questions/8739203/oracle-query-to-fetch-column-names
  12. Georg Ringer commented on patch set 3 CR -1 01/14/14, 10:09

    this makes everything slower. If the query fails, show an error and it must be fixed in install tool with a compare or whatever. don't hide the problems which shouldn't be there
  13. Alexander Opitz commented on patch set 3 01/14/14, 10:14

    @Georg This isn't for hiding database fields which should be added by install tool. This is for "virtual fields", fields that are used in the TCA but don't need any database field.
  14. Stefano Kowalke commented on patch set 3 01/16/14, 13:24

    @Alexander: So its better to introduce a new method in DatabaseConnection to be able to use DBAL to translate this to other DBMS? @Georg: Its exactly like Alexander says. Its not a field which should add to the table.
  15. Alexander Opitz commented on patch set 3 01/16/14, 14:30

    @Stefano: I donÄt know what the best way is and who is responsible for DBAL. Maybe Ernesto knows whom to ask for this issue.
  16. Xavier Perseguers commented on patch set 3 01/17/14, 13:25

  17. Stefano Kowalke commented on patch set 3 01/18/14, 15:58

    Thanks Xavier for having a look on it. Your mentioned PatchSet is about removing it from ext:dbal but its abandoned. In Forge I found this [1] issue doing nearly the same beside other stuff. Was this issue simply forgotten? Its better to update the issue and get this into the core and dbal? [1] http://forge.typo3.org/issues/23051
  18. Xavier Perseguers commented on patch set 3 01/19/14, 15:23

    @Stefano, this is related, the ticket you mentioned needed a cached version of the columns. The abandonned patch was about moving the logic from DBAL where it had been initially developped to the Core to have it for MySQL as well.
  19. Steffen Ritter commented on patch set 3 06/11/14, 11:56

    why don't we use admin_get_fields() ??
  20. Xavier Perseguers commented on patch set 3 CR -2 06/11/14, 12:17

    This is a no-go in this form as it does not use a DBAL-compatible way to retrieve the list of columns. IIRC I pointed you to the Core method to be used.
  21. Georg Ringer abandoned the change 12/07/14, 18:12

    has been resolved with #63273