Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e696da7b
Commit
e696da7b
authored
Jul 01, 2011
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed check_license() function
parent
95cba104
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
56 deletions
+0
-56
sql-common/client.c
sql-common/client.c
+0
-56
No files found.
sql-common/client.c
View file @
e696da7b
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment