bug/mysql-postgresql-checks #20

Merged
MicheleC merged 4 commits from bug/mysql-postgresql-checks into master 4 years ago
Collaborator

Changes to:

  • add akode library path to link_directories
  • make the includes for the mysql headers in collectiondb.cpp consistent with how they are tested for by cmake
  • add a secondary check for PostgreSQL by asking pkg-config
  • add the PostgreSQL library path to link_directories
Changes to: - add akode library path to link_directories - make the includes for the mysql headers in collectiondb.cpp consistent with how they are tested for by cmake - add a secondary check for PostgreSQL by asking pkg-config - add the PostgreSQL library path to link_directories
Poster
Collaborator

OK, a couple of explanatory notes...

The supplied PostgreSQL check that cmake supplies engages in searching around in various directories and hoping it finds something rather than just asking pgk-config or pg_config where things are. Since this wasn't working well, I added a secondary test using pg_config based on the mysql_config check. Since the mysql_config check was not very well formatted, I decided to tidy the indentation up before I copied it. I subsequently found out that pg_config does not report the required libraries for correctly linking so wound up changing the test to use pkg-config instead. Seemed a shame to waste the reformatting on the mysql stuff, so I left it.

The collectiondb.cpp includes for mysql were looking in a subdirectory (i.e. "#include <mysql/mysql.h> rather than "#include <mysql.h>". There are a couple of compile tests in ConfigureChecks.cmake which use the non subdirectory format, so if mysql_config has supplied the correct path the tests work but the compile of collectiondb.cpp fails later if there's no "mysql" subdirectory. This arrangement would work if mysql is installed in /usr with the mysql subdirectory as the implicit inclusion of /usr/include would allow both sets of compiles to work.

OK, a couple of explanatory notes... The supplied PostgreSQL check that cmake supplies engages in searching around in various directories and hoping it finds something rather than just asking pgk-config or pg_config where things are. Since this wasn't working well, I added a secondary test using pg_config based on the mysql_config check. Since the mysql_config check was not very well formatted, I decided to tidy the indentation up before I copied it. I subsequently found out that pg_config does not report the required libraries for correctly linking so wound up changing the test to use pkg-config instead. Seemed a shame to waste the reformatting on the mysql stuff, so I left it. The collectiondb.cpp includes for mysql were looking in a subdirectory (i.e. "#include <mysql/mysql.h> rather than "#include <mysql.h>". There are a couple of compile tests in ConfigureChecks.cmake which use the non subdirectory format, so if mysql_config has supplied the correct path the tests work but the compile of collectiondb.cpp fails later if there's no "mysql" subdirectory. This arrangement would work if mysql is installed in /usr with the mysql subdirectory as the implicit inclusion of /usr/include would allow both sets of compiles to work.
Owner

Oh, thank you, I was very surprised what modifications for MySQL / MariaDB are in the patch for PostgreSQL. Fortunately, it is possible to turn on ignoring changes in white space here… But the question arises whether to do changes the formatting of the MySQL / MariaDB test as a separate commit – that is, split the commit into two?

Oh, thank you, I was very surprised what modifications for MySQL / MariaDB are in the patch for PostgreSQL. Fortunately, it is possible to turn on ignoring changes in white space here… But the question arises whether to do changes the formatting of the MySQL / MariaDB test as a separate commit – that is, split the commit into two?
Poster
Collaborator

It seemed simpler; the formatting changes and the PostgreSQL test changes are in the same file. Am I correct in assuming that it would be possible to change a file, commit it, make more changes to the file, and commit that separately?

It seemed simpler; the formatting changes and the PostgreSQL test changes are in the same file. Am I correct in assuming that it would be possible to change a file, commit it, make more changes to the file, and commit that separately?
Owner

It seemed simpler; the formatting changes and the PostgreSQL test changes are in the same file. Am I correct in assuming that it would be possible to change a file, commit it, make more changes to the file, and commit that separately?

You can use git rebase with the -i option, then you can use git reset HEAD~1, revert part of the patch, do a separate commit for the first part, and then reapply the second part of the patch and do the second commit.

> It seemed simpler; the formatting changes and the PostgreSQL test changes are in the same file. Am I correct in assuming that it would be possible to change a file, commit it, make more changes to the file, and commit that separately? You can use `git rebase` with the `-i` option, then you can use `git reset HEAD~1`, revert part of the patch, do a separate commit for the first part, and then reapply the second part of the patch and do the second commit.
Poster
Collaborator

Done! Nearly lost the formatting changes... good job 'joe' does a backup!

Done! Nearly lost the formatting changes... good job 'joe' does a backup!
MicheleC closed this pull request 4 years ago
MicheleC deleted branch bug/mysql-postgresql-checks 4 years ago
Owner

Thanks @aneejit1

Thanks @aneejit1
MicheleC added this to the R14.0.9 release milestone 4 years ago
The pull request has been merged as 6b36c71829.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/amarok#20
Loading…
There is no content yet.