summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c56
1 files changed, 0 insertions, 56 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 28b3cf274bc..f8b2a3ecbee 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -883,57 +883,6 @@ static my_bool is_NT(void)
}
#endif
-
-#ifdef CHECK_LICENSE
-/**
- Check server side variable 'license'.
-
- If the variable does not exist or does not contain 'Commercial',
- we're talking to non-commercial server from commercial client.
-
- @retval 0 success
- @retval !0 network error or the server is not commercial.
- Error code is saved in mysql->net.last_errno.
-*/
-
-static int check_license(MYSQL *mysql)
-{
- MYSQL_ROW row;
- MYSQL_RES *res;
- NET *net= &mysql->net;
- static const char query[]= "SELECT @@license";
- static const char required_license[]= STRINGIFY_ARG(LICENSE);
-
- if (mysql_real_query(mysql, query, sizeof(query)-1))
- {
- if (net->last_errno == ER_UNKNOWN_SYSTEM_VARIABLE)
- {
- set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate,
- ER(CR_WRONG_LICENSE), required_license);
- }
- return 1;
- }
- if (!(res= mysql_use_result(mysql)))
- return 1;
- row= mysql_fetch_row(res);
- /*
- If no rows in result set, or column value is NULL (none of these
- two is ever true for server variables now), or column value
- mismatch, set wrong license error.
- */
- if (!net->last_errno &&
- (!row || !row[0] ||
- strncmp(row[0], required_license, sizeof(required_license))))
- {
- set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate,
- ER(CR_WRONG_LICENSE), required_license);
- }
- mysql_free_result(res);
- return net->last_errno;
-}
-#endif /* CHECK_LICENSE */
-
-
/**************************************************************************
Shut down connection
**************************************************************************/
@@ -2977,11 +2926,6 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
if (mysql->client_flag & CLIENT_COMPRESS) /* We will use compression */
net->compress=1;
-#ifdef CHECK_LICENSE
- if (check_license(mysql))
- goto error;
-#endif
-
if (db && !mysql->db && mysql_select_db(mysql, db))
{
if (mysql->net.last_errno == CR_SERVER_LOST)