Skip to content

Commit

Permalink
remove a redundant duplicate of plugin_auth.h
Browse files Browse the repository at this point in the history
  • Loading branch information
vuvova committed Feb 4, 2024
1 parent 2f6b5a5 commit 5c9eab5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 112 deletions.
1 change: 0 additions & 1 deletion include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ IF(NOT IS_SUBPROJECT)
ENDIF()
SET(MYSQL_ADDITIONAL_INCLUDES
${CC_SOURCE_DIR}/include/mysql/client_plugin.h
${CC_SOURCE_DIR}/include/mysql/plugin_auth_common.h
${CC_SOURCE_DIR}/include/mysql/plugin_auth.h
)
SET(MARIADB_ADDITIONAL_INCLUDES
Expand Down
2 changes: 1 addition & 1 deletion include/mysql/client_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ typedef struct st_mariadb_client_plugin_PVIO
} MARIADB_PVIO_PLUGIN;

/******** authentication plugin specific declarations *********/
#include <mysql/plugin_auth_common.h>
#include <mysql/plugin_auth.h>

struct st_mysql_client_plugin_AUTHENTICATION
{
Expand Down
110 changes: 0 additions & 110 deletions include/mysql/plugin_auth_common.h

This file was deleted.

4 comments on commit 5c9eab5

@danel1
Copy link

@danel1 danel1 commented on 5c9eab5 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vuvova I tried building Maria 10.6.18 on FreeBSD (Ports) and received the following error: Missing: include/mysql/mysql/plugin_auth_common.h
The file is currently in the pkg-plist: https://cgit.freebsd.org/ports/tree/databases/mariadb106-client/pkg-plist#n67
Then i found this commit, where the file has been removed. plugin_auth_common.h still exists here: https://github.com/MariaDB/server/blob/10.6/include/mysql/plugin_auth_common.h (same content). Could you maybe clear me up, how these files relate to eachother? Is it correct, that the 2nd file still exists?

@vuvova
Copy link
Member Author

@vuvova vuvova commented on 5c9eab5 May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's correct. Authentication plugins were added back in 2011 (?), there was no MariaDB Connector/C yet, there was libmysqlclient, all headers were in include/. Definitions for server authentication plugins were in include/mysql/plugin_auth.h, definitions for client plugins were in include/mysql/client_plugin.h. Definitions common to both server and client authentication plugins were in include/mysql/plugin_auth_common.h

Then MariaDB Connector/C was created. Now all client code is in C/C, client plugins are all there. When moving declarations in apparently plugin_auth_common.h was copied as is and plugin_auth.h was modified to include client definitions. This made plugin_auth_common.h redundant, indeed, it is "common" with what? I've deleted it when I noticed that. But it is not redundant in the server repo.

@danel1
Copy link

@danel1 danel1 commented on 5c9eab5 May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your Feedback @vuvova

Just that i get it correct: plugin_auth_common.h was removed from MariaDB Connector/C because it's already in plugin_auth.h. For the server part, plugin_auth_common.h is still required and is still in the repo here.

  • For the FreeBSD-Client-Port this would mean: We can remove include/mysql/mysql/plugin_auth_common.h(Line 67) from the pkg-plist as include/mysql/mysql/plugin_auth.h (Line 66) is already present and the file isn't needed anymore.

  • For the FreeBSD-Server-Port this would mean: We can keep include/mysql/server/mysql/plugin_auth_common.h (Line 106) from the server pkg-plist as it is, as its still the right path and still needed.

Right? :-)

@vuvova
Copy link
Member Author

@vuvova vuvova commented on 5c9eab5 May 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, this is correct. thanks for doing it!

Please sign in to comment.