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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
6afb2a37
Commit
6afb2a37
authored
Oct 07, 2019
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-20768 Turn INET functions into a function collection plugin
parent
e0117f11
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
278 additions
and
193 deletions
+278
-193
libmysqld/CMakeLists.txt
libmysqld/CMakeLists.txt
+0
-2
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+1
-0
plugin/type_inet/CMakeLists.txt
plugin/type_inet/CMakeLists.txt
+18
-0
plugin/type_inet/item_inetfunc.cc
plugin/type_inet/item_inetfunc.cc
+2
-0
plugin/type_inet/item_inetfunc.h
plugin/type_inet/item_inetfunc.h
+1
-0
plugin/type_inet/mysql-test/type_inet/func_inet_plugin.result
...in/type_inet/mysql-test/type_inet/func_inet_plugin.result
+31
-0
plugin/type_inet/mysql-test/type_inet/func_inet_plugin.test
plugin/type_inet/mysql-test/type_inet/func_inet_plugin.test
+27
-0
plugin/type_inet/plugin.cc
plugin/type_inet/plugin.cc
+190
-0
plugin/type_inet/sql_type_inet.cc
plugin/type_inet/sql_type_inet.cc
+2
-0
plugin/type_inet/sql_type_inet.h
plugin/type_inet/sql_type_inet.h
+0
-0
sql/CMakeLists.txt
sql/CMakeLists.txt
+1
-2
sql/item_create.cc
sql/item_create.cc
+5
-189
No files found.
libmysqld/CMakeLists.txt
View file @
6afb2a37
...
@@ -116,9 +116,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
...
@@ -116,9 +116,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
../sql/sql_mode.cc
../sql/sql_mode.cc
../sql/sql_type_json.cc
../sql/sql_type_json.cc
../sql/sql_type_geom.cc
../sql/sql_type_geom.cc
../sql/sql_type_inet.cc
../sql/table_cache.cc ../sql/mf_iocache_encr.cc
../sql/table_cache.cc ../sql/mf_iocache_encr.cc
../sql/item_inetfunc.cc
../sql/wsrep_dummy.cc ../sql/encryption.cc
../sql/wsrep_dummy.cc ../sql/encryption.cc
../sql/item_windowfunc.cc ../sql/sql_window.cc
../sql/item_windowfunc.cc ../sql/sql_window.cc
../sql/sql_cte.cc
../sql/sql_cte.cc
...
...
mysql-test/mysql-test-run.pl
View file @
6afb2a37
...
@@ -203,6 +203,7 @@ my @DEFAULT_SUITES= qw(
...
@@ -203,6 +203,7 @@ my @DEFAULT_SUITES= qw(
rpl-
rpl-
sys_vars-
sys_vars-
sql_sequence-
sql_sequence-
type_inet-
unit-
unit-
vcol-
vcol-
versioning-
versioning-
...
...
plugin/type_inet/CMakeLists.txt
0 → 100644
View file @
6afb2a37
# Copyright (c) 2016-2019, MariaDB corporation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
MYSQL_ADD_PLUGIN
(
type_inet
plugin.cc item_inetfunc.cc sql_type_inet.cc
MANDATORY RECOMPILE_FOR_EMBEDDED
)
sql
/item_inetfunc.cc
→
plugin/type_inet
/item_inetfunc.cc
View file @
6afb2a37
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2019 MariaDB Corporation
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -14,6 +15,7 @@
...
@@ -14,6 +15,7 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#define MYSQL_SERVER
#include "mariadb.h"
#include "mariadb.h"
#include "item_inetfunc.h"
#include "item_inetfunc.h"
#include "sql_type_inet.h"
#include "sql_type_inet.h"
...
...
sql
/item_inetfunc.h
→
plugin/type_inet
/item_inetfunc.h
View file @
6afb2a37
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2019 MariaDB Corporation
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
...
plugin/type_inet/mysql-test/type_inet/func_inet_plugin.result
0 → 100644
View file @
6afb2a37
#
# Start of 10.5 tests
#
#
# MDEV-20768 Turn INET functions into a function collection plugin
#
SELECT
PLUGIN_NAME,
PLUGIN_VERSION,
PLUGIN_STATUS,
PLUGIN_TYPE,
PLUGIN_AUTHOR,
PLUGIN_DESCRIPTION,
PLUGIN_LICENSE,
PLUGIN_MATURITY,
PLUGIN_AUTH_VERSION
FROM INFORMATION_SCHEMA.PLUGINS
WHERE PLUGIN_TYPE='FUNCTION COLLECTION'
AND PLUGIN_NAME='func_inet';
PLUGIN_NAME func_inet
PLUGIN_VERSION 1.0
PLUGIN_STATUS ACTIVE
PLUGIN_TYPE FUNCTION COLLECTION
PLUGIN_AUTHOR MariaDB Corporation
PLUGIN_DESCRIPTION Function collection test
PLUGIN_LICENSE GPL
PLUGIN_MATURITY Experimental
PLUGIN_AUTH_VERSION 1.0
#
# End of 10.5 tests
#
plugin/type_inet/mysql-test/type_inet/func_inet_plugin.test
0 → 100644
View file @
6afb2a37
--
echo
#
--
echo
# Start of 10.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-20768 Turn INET functions into a function collection plugin
--
echo
#
--
vertical_results
SELECT
PLUGIN_NAME
,
PLUGIN_VERSION
,
PLUGIN_STATUS
,
PLUGIN_TYPE
,
PLUGIN_AUTHOR
,
PLUGIN_DESCRIPTION
,
PLUGIN_LICENSE
,
PLUGIN_MATURITY
,
PLUGIN_AUTH_VERSION
FROM
INFORMATION_SCHEMA
.
PLUGINS
WHERE
PLUGIN_TYPE
=
'FUNCTION COLLECTION'
AND
PLUGIN_NAME
=
'func_inet'
;
--
horizontal_results
--
echo
#
--
echo
# End of 10.5 tests
--
echo
#
plugin/type_inet/plugin.cc
0 → 100644
View file @
6afb2a37
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2019 MariaDB Corporation
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#define MYSQL_SERVER
#include "mariadb.h"
#include "sql_class.h"
#include "sql_type_inet.h"
#include "item_inetfunc.h"
#include <mysql/plugin_data_type.h>
#include <mysql/plugin_function_collection.h>
/*************************************************************************/
class
Create_func_inet_ntoa
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_inet_ntoa
(
thd
,
arg1
);
}
static
Create_func_inet_ntoa
s_singleton
;
protected:
Create_func_inet_ntoa
()
{}
virtual
~
Create_func_inet_ntoa
()
{}
};
class
Create_func_inet_aton
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_inet_aton
(
thd
,
arg1
);
}
static
Create_func_inet_aton
s_singleton
;
protected:
Create_func_inet_aton
()
{}
virtual
~
Create_func_inet_aton
()
{}
};
class
Create_func_inet6_aton
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_inet6_aton
(
thd
,
arg1
);
}
static
Create_func_inet6_aton
s_singleton
;
protected:
Create_func_inet6_aton
()
{}
virtual
~
Create_func_inet6_aton
()
{}
};
class
Create_func_inet6_ntoa
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_inet6_ntoa
(
thd
,
arg1
);
}
static
Create_func_inet6_ntoa
s_singleton
;
protected:
Create_func_inet6_ntoa
()
{}
virtual
~
Create_func_inet6_ntoa
()
{}
};
class
Create_func_is_ipv4
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv4
(
thd
,
arg1
);
}
static
Create_func_is_ipv4
s_singleton
;
protected:
Create_func_is_ipv4
()
{}
virtual
~
Create_func_is_ipv4
()
{}
};
class
Create_func_is_ipv6
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv6
(
thd
,
arg1
);
}
static
Create_func_is_ipv6
s_singleton
;
protected:
Create_func_is_ipv6
()
{}
virtual
~
Create_func_is_ipv6
()
{}
};
class
Create_func_is_ipv4_compat
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv4_compat
(
thd
,
arg1
);
}
static
Create_func_is_ipv4_compat
s_singleton
;
protected:
Create_func_is_ipv4_compat
()
{}
virtual
~
Create_func_is_ipv4_compat
()
{}
};
class
Create_func_is_ipv4_mapped
:
public
Create_func_arg1
{
public:
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
override
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv4_mapped
(
thd
,
arg1
);
}
static
Create_func_is_ipv4_mapped
s_singleton
;
protected:
Create_func_is_ipv4_mapped
()
{}
virtual
~
Create_func_is_ipv4_mapped
()
{}
};
Create_func_inet_ntoa
Create_func_inet_ntoa
::
s_singleton
;
Create_func_inet6_aton
Create_func_inet6_aton
::
s_singleton
;
Create_func_inet6_ntoa
Create_func_inet6_ntoa
::
s_singleton
;
Create_func_inet_aton
Create_func_inet_aton
::
s_singleton
;
Create_func_is_ipv4
Create_func_is_ipv4
::
s_singleton
;
Create_func_is_ipv6
Create_func_is_ipv6
::
s_singleton
;
Create_func_is_ipv4_compat
Create_func_is_ipv4_compat
::
s_singleton
;
Create_func_is_ipv4_mapped
Create_func_is_ipv4_mapped
::
s_singleton
;
#define BUILDER(F) & F::s_singleton
static
Native_func_registry
func_array
[]
=
{
{{
STRING_WITH_LEN
(
"INET_ATON"
)},
BUILDER
(
Create_func_inet_aton
)},
{{
STRING_WITH_LEN
(
"INET_NTOA"
)},
BUILDER
(
Create_func_inet_ntoa
)},
{{
STRING_WITH_LEN
(
"INET6_ATON"
)},
BUILDER
(
Create_func_inet6_aton
)},
{{
STRING_WITH_LEN
(
"INET6_NTOA"
)},
BUILDER
(
Create_func_inet6_ntoa
)},
{{
STRING_WITH_LEN
(
"IS_IPV4"
)},
BUILDER
(
Create_func_is_ipv4
)},
{{
STRING_WITH_LEN
(
"IS_IPV6"
)},
BUILDER
(
Create_func_is_ipv6
)},
{{
STRING_WITH_LEN
(
"IS_IPV4_COMPAT"
)},
BUILDER
(
Create_func_is_ipv4_compat
)},
{{
STRING_WITH_LEN
(
"IS_IPV4_MAPPED"
)},
BUILDER
(
Create_func_is_ipv4_mapped
)}
};
static
Plugin_function_collection
plugin_descriptor_function_collection_inet
(
MariaDB_FUNCTION_COLLECTION_INTERFACE_VERSION
,
Native_func_registry_array
(
func_array
,
array_elements
(
func_array
)));
/*************************************************************************/
maria_declare_plugin
(
type_inet
)
{
MariaDB_FUNCTION_COLLECTION_PLUGIN
,
// the plugin type (see include/mysql/plugin.h)
&
plugin_descriptor_function_collection_inet
,
// pointer to type-specific plugin descriptor
"func_inet"
,
// plugin name
"MariaDB Corporation"
,
// plugin author
"Function collection test"
,
// the plugin description
PLUGIN_LICENSE_GPL
,
// the plugin license (see include/mysql/plugin.h)
0
,
// Pointer to plugin initialization function
0
,
// Pointer to plugin deinitialization function
0x0100
,
// Numeric version 0xAABB means AA.BB veriosn
NULL
,
// Status variables
NULL
,
// System variables
"1.0"
,
// String version representation
MariaDB_PLUGIN_MATURITY_EXPERIMENTAL
// Maturity(see include/mysql/plugin.h)*/
}
maria_declare_plugin_end
;
sql
/sql_type_inet.cc
→
plugin/type_inet
/sql_type_inet.cc
View file @
6afb2a37
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2014 MariaDB Foundation
Copyright (c) 2019 MariaDB Corporation
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
...
@@ -14,6 +15,7 @@
...
@@ -14,6 +15,7 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
#define MYSQL_SERVER
#include "mariadb.h"
#include "mariadb.h"
#include "my_net.h"
#include "my_net.h"
#include "sql_class.h" // THD, SORT_FIELD_ATTR
#include "sql_class.h" // THD, SORT_FIELD_ATTR
...
...
sql
/sql_type_inet.h
→
plugin/type_inet
/sql_type_inet.h
View file @
6afb2a37
File moved
sql/CMakeLists.txt
View file @
6afb2a37
...
@@ -119,7 +119,7 @@ SET (SQL_SOURCE
...
@@ -119,7 +119,7 @@ SET (SQL_SOURCE
sql_profile.cc event_parse_data.cc sql_alter.cc
sql_profile.cc event_parse_data.cc sql_alter.cc
sql_signal.cc mdl.cc sql_admin.cc
sql_signal.cc mdl.cc sql_admin.cc
transaction.cc sys_vars.cc sql_truncate.cc datadict.cc
transaction.cc sys_vars.cc sql_truncate.cc datadict.cc
sql_reload.cc
item_inetfunc.cc
sql_reload.cc
# added in MariaDB:
# added in MariaDB:
sql_explain.cc
sql_explain.cc
...
@@ -137,7 +137,6 @@ SET (SQL_SOURCE
...
@@ -137,7 +137,6 @@ SET (SQL_SOURCE
semisync_master_ack_receiver.cc
semisync_master_ack_receiver.cc
sql_type.cc sql_mode.cc sql_type_json.cc
sql_type.cc sql_mode.cc sql_type_json.cc
sql_type_geom.cc
sql_type_geom.cc
sql_type_inet.cc
item_windowfunc.cc sql_window.cc
item_windowfunc.cc sql_window.cc
sql_cte.cc
sql_cte.cc
item_vers.cc
item_vers.cc
...
...
sql/item_create.cc
View file @
6afb2a37
...
@@ -33,7 +33,6 @@
...
@@ -33,7 +33,6 @@
#include "set_var.h"
#include "set_var.h"
#include "sp_head.h"
#include "sp_head.h"
#include "sp.h"
#include "sp.h"
#include "item_inetfunc.h"
#include "sql_time.h"
#include "sql_time.h"
#include "sql_type_geom.h"
#include "sql_type_geom.h"
#include <mysql/plugin_function_collection.h>
#include <mysql/plugin_function_collection.h>
...
@@ -92,7 +91,8 @@ class Plugin_find_native_func_builder_param
...
@@ -92,7 +91,8 @@ class Plugin_find_native_func_builder_param
bool
find_native_function_builder
(
THD
*
thd
,
bool
find_native_function_builder
(
THD
*
thd
,
const
Plugin_function_collection
*
pfc
)
const
Plugin_function_collection
*
pfc
)
{
{
return
((
builder
=
pfc
->
find_native_function_builder
(
thd
,
name
)))
==
NULL
;
// plugin_foreach() will stop iterating when this function returns TRUE
return
((
builder
=
pfc
->
find_native_function_builder
(
thd
,
name
)))
!=
NULL
;
}
}
static
my_bool
find_in_plugin
(
THD
*
thd
,
plugin_ref
plugin
,
void
*
data
)
static
my_bool
find_in_plugin
(
THD
*
thd
,
plugin_ref
plugin
,
void
*
data
)
{
{
...
@@ -111,7 +111,7 @@ class Plugin_find_native_func_builder_param
...
@@ -111,7 +111,7 @@ class Plugin_find_native_func_builder_param
{
}
{
}
Create_func
*
find
(
THD
*
thd
)
Create_func
*
find
(
THD
*
thd
)
{
{
if
(
plugin_foreach
(
thd
,
if
(
!
plugin_foreach
(
thd
,
Plugin_find_native_func_builder_param
::
find_in_plugin
,
Plugin_find_native_func_builder_param
::
find_in_plugin
,
MariaDB_FUNCTION_COLLECTION_PLUGIN
,
this
))
MariaDB_FUNCTION_COLLECTION_PLUGIN
,
this
))
return
NULL
;
return
NULL
;
...
@@ -907,110 +907,6 @@ class Create_func_ifnull : public Create_func_arg2
...
@@ -907,110 +907,6 @@ class Create_func_ifnull : public Create_func_arg2
};
};
class
Create_func_inet_ntoa
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_inet_ntoa
s_singleton
;
protected:
Create_func_inet_ntoa
()
{}
virtual
~
Create_func_inet_ntoa
()
{}
};
class
Create_func_inet_aton
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_inet_aton
s_singleton
;
protected:
Create_func_inet_aton
()
{}
virtual
~
Create_func_inet_aton
()
{}
};
class
Create_func_inet6_aton
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_inet6_aton
s_singleton
;
protected:
Create_func_inet6_aton
()
{}
virtual
~
Create_func_inet6_aton
()
{}
};
class
Create_func_inet6_ntoa
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_inet6_ntoa
s_singleton
;
protected:
Create_func_inet6_ntoa
()
{}
virtual
~
Create_func_inet6_ntoa
()
{}
};
class
Create_func_is_ipv4
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_is_ipv4
s_singleton
;
protected:
Create_func_is_ipv4
()
{}
virtual
~
Create_func_is_ipv4
()
{}
};
class
Create_func_is_ipv6
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_is_ipv6
s_singleton
;
protected:
Create_func_is_ipv6
()
{}
virtual
~
Create_func_is_ipv6
()
{}
};
class
Create_func_is_ipv4_compat
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_is_ipv4_compat
s_singleton
;
protected:
Create_func_is_ipv4_compat
()
{}
virtual
~
Create_func_is_ipv4_compat
()
{}
};
class
Create_func_is_ipv4_mapped
:
public
Create_func_arg1
{
public:
virtual
Item
*
create_1_arg
(
THD
*
thd
,
Item
*
arg1
);
static
Create_func_is_ipv4_mapped
s_singleton
;
protected:
Create_func_is_ipv4_mapped
()
{}
virtual
~
Create_func_is_ipv4_mapped
()
{}
};
class
Create_func_instr
:
public
Create_func_arg2
class
Create_func_instr
:
public
Create_func_arg2
{
{
public:
public:
...
@@ -3685,78 +3581,6 @@ Create_func_ifnull::create_2_arg(THD *thd, Item *arg1, Item *arg2)
...
@@ -3685,78 +3581,6 @@ Create_func_ifnull::create_2_arg(THD *thd, Item *arg1, Item *arg2)
}
}
Create_func_inet_ntoa
Create_func_inet_ntoa
::
s_singleton
;
Item
*
Create_func_inet_ntoa
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_inet_ntoa
(
thd
,
arg1
);
}
Create_func_inet6_aton
Create_func_inet6_aton
::
s_singleton
;
Item
*
Create_func_inet6_aton
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_inet6_aton
(
thd
,
arg1
);
}
Create_func_inet6_ntoa
Create_func_inet6_ntoa
::
s_singleton
;
Item
*
Create_func_inet6_ntoa
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_inet6_ntoa
(
thd
,
arg1
);
}
Create_func_inet_aton
Create_func_inet_aton
::
s_singleton
;
Item
*
Create_func_inet_aton
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_inet_aton
(
thd
,
arg1
);
}
Create_func_is_ipv4
Create_func_is_ipv4
::
s_singleton
;
Item
*
Create_func_is_ipv4
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv4
(
thd
,
arg1
);
}
Create_func_is_ipv6
Create_func_is_ipv6
::
s_singleton
;
Item
*
Create_func_is_ipv6
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv6
(
thd
,
arg1
);
}
Create_func_is_ipv4_compat
Create_func_is_ipv4_compat
::
s_singleton
;
Item
*
Create_func_is_ipv4_compat
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv4_compat
(
thd
,
arg1
);
}
Create_func_is_ipv4_mapped
Create_func_is_ipv4_mapped
::
s_singleton
;
Item
*
Create_func_is_ipv4_mapped
::
create_1_arg
(
THD
*
thd
,
Item
*
arg1
)
{
return
new
(
thd
->
mem_root
)
Item_func_is_ipv4_mapped
(
thd
,
arg1
);
}
Create_func_instr
Create_func_instr
::
s_singleton
;
Create_func_instr
Create_func_instr
::
s_singleton
;
Item
*
Item
*
...
@@ -5681,14 +5505,6 @@ static Native_func_registry func_array[] =
...
@@ -5681,14 +5505,6 @@ static Native_func_registry func_array[] =
{
{
STRING_WITH_LEN
(
"GREATEST"
)
},
BUILDER
(
Create_func_greatest
)},
{
{
STRING_WITH_LEN
(
"GREATEST"
)
},
BUILDER
(
Create_func_greatest
)},
{
{
STRING_WITH_LEN
(
"HEX"
)
},
BUILDER
(
Create_func_hex
)},
{
{
STRING_WITH_LEN
(
"HEX"
)
},
BUILDER
(
Create_func_hex
)},
{
{
STRING_WITH_LEN
(
"IFNULL"
)
},
BUILDER
(
Create_func_ifnull
)},
{
{
STRING_WITH_LEN
(
"IFNULL"
)
},
BUILDER
(
Create_func_ifnull
)},
{
{
STRING_WITH_LEN
(
"INET_ATON"
)
},
BUILDER
(
Create_func_inet_aton
)},
{
{
STRING_WITH_LEN
(
"INET_NTOA"
)
},
BUILDER
(
Create_func_inet_ntoa
)},
{
{
STRING_WITH_LEN
(
"INET6_ATON"
)
},
BUILDER
(
Create_func_inet6_aton
)},
{
{
STRING_WITH_LEN
(
"INET6_NTOA"
)
},
BUILDER
(
Create_func_inet6_ntoa
)},
{
{
STRING_WITH_LEN
(
"IS_IPV4"
)
},
BUILDER
(
Create_func_is_ipv4
)},
{
{
STRING_WITH_LEN
(
"IS_IPV6"
)
},
BUILDER
(
Create_func_is_ipv6
)},
{
{
STRING_WITH_LEN
(
"IS_IPV4_COMPAT"
)
},
BUILDER
(
Create_func_is_ipv4_compat
)},
{
{
STRING_WITH_LEN
(
"IS_IPV4_MAPPED"
)
},
BUILDER
(
Create_func_is_ipv4_mapped
)},
{
{
STRING_WITH_LEN
(
"INSTR"
)
},
BUILDER
(
Create_func_instr
)},
{
{
STRING_WITH_LEN
(
"INSTR"
)
},
BUILDER
(
Create_func_instr
)},
{
{
STRING_WITH_LEN
(
"ISNULL"
)
},
BUILDER
(
Create_func_isnull
)},
{
{
STRING_WITH_LEN
(
"ISNULL"
)
},
BUILDER
(
Create_func_isnull
)},
{
{
STRING_WITH_LEN
(
"IS_FREE_LOCK"
)
},
BUILDER
(
Create_func_is_free_lock
)},
{
{
STRING_WITH_LEN
(
"IS_FREE_LOCK"
)
},
BUILDER
(
Create_func_is_free_lock
)},
...
...
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