Review main Abandoned

36859[BUGFIX] Map table names in ext_tables_static+adt.sql in Install Tool

Andreas Kienast CR 0 V 0 Easy +11 −4 updated 12/04/15, 13:32

Commit message

Due to a wrong database object, the INSERT statements are not mapped if
the query is run in Install Tool. Other parts use $TYPO3_DB, so change
it to this object.

Also, the mapping done in the switch in admin_query() for INSERT and
TRUNCATE is dropped, since the tables and fields are mapped again in
exec_* methods.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 14

  1. Andreas Kienast uploaded patch set 1 02/12/15, 11:17

  2. Andreas Kienast updated the commit message in patch set 2 02/12/15, 11:22

  3. Michael Oehlhof commented on patch set 2 02/13/15, 01:37

    DatabaseData.php:134

    Better use a call to the function 'getDatabaseConnection' here, which has to be added to the class DatabaseData. /** * Return DatabaseConnection * * @return \TYPO3\CMS\Core\Database\DatabaseConnection */ protected function getDatabaseConnection() { return $GLOBALS['TYPO3_DB']; }
  4. Andreas Kienast uploaded patch set 3 02/13/15, 07:08

  5. Michael Oehlhof voted on patch set 3 CR +1 02/14/15, 21:27

  6. Stefan Neufeind commented on patch set 3 02/16/15, 12:26

    DatabaseConnection.php:2900

    shouldn't this be above the this case? The fall-through is from INSERT to TRUNCATETABLE

    DatabaseData.php:110

    Can be removed here.
  7. Andreas Kienast commented on patch set 3 02/16/15, 12:32

    DatabaseConnection.php:2900 Reply

    insert and truncate do the mapping on it's own, so both can fall-through.

    DatabaseData.php:110 Reply

    Oops, I have overwritten the method accidentally. I'm on it
  8. Andreas Kienast uploaded patch set 4 02/16/15, 12:33

  9. Andy Grunwald commented on patch set 4 V +1 02/16/15, 20:55

    Github tests: success Pull request: https://github.com/typo3-ci/TYPO3.CMS-pre-merge-tests/pull/23 Service: continuous-integration/travis-ci Description: The Travis CI build passed URL: https://travis-ci.org/typo3-ci/TYPO3.CMS-pre-merge-tests/builds/50994906
  10. Wouter Wolters commented on patch set 4 02/27/15, 23:23

    DatabaseData.php:110

    can be removed now?
  11. Andreas Kienast commented on patch set 4 03/01/15, 12:00

    DatabaseData.php:110 Reply

    I fear no. The method creates a new database connection, if there is not already one. I did not test if everything works after removing the call.
  12. Xavier Perseguers commented on patch set 4 05/31/15, 07:18

    DatabaseData.php:145

    Did not test but looks odd to have this method here. Wouldn't it be possible to write our database object to $GLOBALS['TYPO3_DB'] in getDatabaseConnection() and then not create this weird method? I don't really like its strange name when the whole core is using getDatabaseConnection() to retrieve $GLOBALS['TYPO3_DB']
  13. Andreas Kienast commented on patch set 4 CR -2 05/31/15, 18:07

    DatabaseData.php:145 Reply

    Thanks for digging out this patch. I'll have to take a further look what's wrong in getDatabaseConnection(), as it seems that $TYPO3_DB is not (over)written properly, making this patch necessary. I'll setup a VM with PostgreSQL soon and rethink the approach. Meanwhile, I'll block this patch.
  14. Andreas Kienast abandoned the change 12/04/15, 13:32

    Will come up with another solution...