Review main Merged

24553[BUGFIX] Improve database connection smooth migration wizard

Nicole Hummel CR +2 V +2 Easy +14 −8 updated 10/17/13, 19:34

Commit message

This patch adds support for local database connections over ips applying
to mask 127.xxx.xxx.xxx as specified in RFC 790. Additionally the
support for non local host connections is improved by setting a default
port independent from host name.

Review

  • Code review CR +2
    • Christian Kuhn +2
    • Alexander Opitz +1
    • Philipp Gampe +1
  • Verified V +2
    • Christian Kuhn +2
    • Alexander Opitz +1
    • Philipp Gampe +1

Issues 1

Files 1

Review log 18

  1. Mr. Jenkins commented on patch set 1 10/11/13, 10:15

  2. Marcus Schwemer commented on patch set 1 V -1 10/11/13, 10:46

    See inline comment.

    DatabaseConnect.php:381

    Here ist the "problem". The comparison to localhost fails in my case, because my hostname ist "mysql5.netzwerkberatung.de". This is a convention at the german hoster domainFactory: mysql5.domain.de == 127.0.0.3 (connects to mysql5) mysql4.domain.de == 127.0.0.2 (connects to mysql4) mysql3.domain.de == 127.0.0.1 (connects to mysql3)
  3. Marcus Schwemer commented on patch set 1 10/11/13, 10:50

    A solution might be to dig / nslookup the hostname before and then test for 127.x.x.x ...
  4. Nicole Hummel commented on patch set 1 10/11/13, 10:51

    DatabaseConnect.php:381 Reply

    This shouldn't be no problem now as the port is set independent from any host name (see above). I tested this with name local.local Have you really tested the patch?
  5. Marcus Schwemer commented on patch set 1 V +1 CR +1 10/11/13, 11:26

    My fault ... while testing the "redirectCount" was still set to "9". Thx Nicole.

    DatabaseConnect.php:381 Reply

    Yes :-)
  6. Christian Kuhn commented on patch set 1 CR -1 10/11/13, 14:22

    DatabaseConnect.php:396

    -1: socket and port must not be configured at the same time.
  7. Nicole Hummel uploaded patch set 2 10/11/13, 20:49

  8. Nicole Hummel uploaded patch set 3 10/11/13, 21:04

  9. Mr. Jenkins commented on patch set 2 10/11/13, 21:31

  10. Philipp Gampe voted on patch set 3 V +1 CR +1 10/11/13, 21:54

  11. Mr. Jenkins commented on patch set 3 10/11/13, 22:07

  12. Alexander Opitz commented on patch set 3 V +1 CR +1 10/12/13, 22:03

    The point that it isn't a socket but a named pipe on windows (host= '.', socket='mysql') is not skope of this issue. So ok for me.
  13. Wouter Wolters wrote 10/16/13, 18:10

    Topic set to "install-tool".
  14. Stefan Neufeind commented on patch set 3 CR -1 10/17/13, 11:37

    That part about defaulting 127.anything to 127.0.0.1 seems weird to me - why not use the value provided?

    DatabaseConnect.php:382

    either this way or: 127.0.0.0/8 Maybe also consider ::1 (IPv6 localhost)? We could do that in a separate changeset though if you prefer :-)

    DatabaseConnect.php:389

    Why not use the provided value? At least in theory people might be using 127.0.0.1 and 127.0.0.2 both on a local machine and running different databases!
  15. Nicole Hummel commented on patch set 3 10/17/13, 11:44

    DatabaseConnect.php:389 Reply

    this sets 127.0.0.1 as default value. If there is any other local value nothing is changed at all. This allows databases on 127.0.0.2 eg
  16. Stefan Neufeind commented on patch set 3 CR 0 10/17/13, 12:16

    DatabaseConnect.php:389 Reply

    I missed the "not" in front :-) Thanks.
  17. Christian Kuhn commented on patch set 3 V +2 CR +2 10/17/13, 19:34

    Seems to work ... I'll merge for now.

    DatabaseConnect.php:382 Reply

    I can live with 127.*.*.* ... according to cmpIP tests it is valid and works. ipv6 is more or less left out here by intention to not handle even more complex cases here, the handling is already way too complicated for my feelings (at we already had tons of changes here).
  18. Christian Kuhn merged patch set 4 10/17/13, 19:34