Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
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
certo
mariadb
Commits
ad8aaeb2
Commit
ad8aaeb2
authored
Oct 28, 2022
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed MySQL to MariaDB in CWMP configuration to avoid clash with MySQL connection config
parent
8ba49413
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
38 deletions
+38
-38
mariadb
mariadb
+38
-38
No files found.
mariadb
View file @
ad8aaeb2
...
@@ -8,24 +8,24 @@
...
@@ -8,24 +8,24 @@
# Entry point functuons #
# Entry point functuons #
#############################
#############################
prefix_list
=
"
$prefix_list
$DMROOT
.M
ySQL
."
prefix_list
=
"
$prefix_list
$DMROOT
.M
ariaDB
."
entry_execute_method_list
=
"
$entry_execute_method_list
entry_execute_method_root_M
ySQL
"
entry_execute_method_list
=
"
$entry_execute_method_list
entry_execute_method_root_M
ariaDB
"
entry_execute_method_list_forcedinform
=
"
$entry_execute_method_list_forcedinform
entry_execute_method_root_M
ySQL
"
entry_execute_method_list_forcedinform
=
"
$entry_execute_method_list_forcedinform
entry_execute_method_root_M
ariaDB
"
entry_execute_method_root_M
ySQL
()
{
entry_execute_method_root_M
ariaDB
()
{
case
"
$1
"
in
""
|
"
$DMROOT
."
|
"
$DMROOT
.M
ySQL
."
*
)
case
"
$1
"
in
""
|
"
$DMROOT
."
|
"
$DMROOT
.M
ariaDB
."
*
)
common_execute_method_obj
"
$DMROOT
.M
ySQL
."
"0"
common_execute_method_obj
"
$DMROOT
.M
ariaDB
."
"0"
common_execute_method_param
"
$DMROOT
.M
ySQL.RootPassword"
"1"
""
"mysql
_set_root_password"
common_execute_method_param
"
$DMROOT
.M
ariaDB.RootPassword"
"1"
""
"mariadb
_set_root_password"
common_execute_method_param
"
$DMROOT
.M
ySQL.SafeToBootstrap"
"1"
"mysql_get_safe_to_bootstrap"
"mysql
_set_safe_to_bootstrap"
"xsd:boolean"
common_execute_method_param
"
$DMROOT
.M
ariaDB.SafeToBootstrap"
"1"
"mariadb_get_safe_to_bootstrap"
"mariadb
_set_safe_to_bootstrap"
"xsd:boolean"
common_execute_method_param
"
$DMROOT
.M
ySQL.GaleraBootstrap"
"1"
""
"mysql
_galera_bootstrap"
"xsd:boolean"
common_execute_method_param
"
$DMROOT
.M
ariaDB.GaleraBootstrap"
"1"
""
"mariadb
_galera_bootstrap"
"xsd:boolean"
common_execute_method_param
"
$DMROOT
.M
ySQL.GaleraClusterAddress"
"1"
"mysql_get_cluster_address"
"mysql
_set_cluster_address"
common_execute_method_param
"
$DMROOT
.M
ariaDB.GaleraClusterAddress"
"1"
"mariadb_get_cluster_address"
"mariadb
_set_cluster_address"
common_execute_method_param
"
$DMROOT
.M
ySQL.GaleraClusterOptions"
"1"
"mysql_get_cluster_options"
"mysql
_set_cluster_options"
common_execute_method_param
"
$DMROOT
.M
ariaDB.GaleraClusterOptions"
"1"
"mariadb_get_cluster_options"
"mariadb
_set_cluster_options"
common_execute_method_param
"
$DMROOT
.M
ySQL.GaleraNodeAddress"
"1"
"mysql_get_node_address"
"mysql
_set_node_address"
common_execute_method_param
"
$DMROOT
.M
ariaDB.GaleraNodeAddress"
"1"
"mariadb_get_node_address"
"mariadb
_set_node_address"
common_execute_method_param
"
$DMROOT
.M
ySQL.ServerID"
"1"
"mysql_get_server_id"
"mysql
_set_server_id"
common_execute_method_param
"
$DMROOT
.M
ariaDB.ServerID"
"1"
"mariadb_get_server_id"
"mariadb
_set_server_id"
common_execute_method_param
"
$DMROOT
.M
ySQL.WSREPGTIDdomainID"
"1"
"mysql_get_wsrep_gtid_domain_id"
"mysql
_set_wsrep_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.M
ariaDB.WSREPGTIDdomainID"
"1"
"mariadb_get_wsrep_gtid_domain_id"
"mariadb
_set_wsrep_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.M
ySQL.GTIDdomainID"
"1"
"mysql_get_gtid_domain_id"
"mysql
_set_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.M
ariaDB.GTIDdomainID"
"1"
"mariadb_get_gtid_domain_id"
"mariadb
_set_gtid_domain_id"
common_execute_method_param
"
$DMROOT
.M
ySQL.BinLogDoDB"
"1"
"mysql_get_binlog_do_db"
"mysql
_set_binlog_do_db"
common_execute_method_param
"
$DMROOT
.M
ariaDB.BinLogDoDB"
"1"
"mariadb_get_binlog_do_db"
"mariadb
_set_binlog_do_db"
common_execute_method_param
"
$DMROOT
.M
ySQL.BinLogIgnoreDB"
"1"
"mysql_get_binlog_ignore_db"
"mysql
_set_binlog_ignore_db"
common_execute_method_param
"
$DMROOT
.M
ariaDB.BinLogIgnoreDB"
"1"
"mariadb_get_binlog_ignore_db"
"mariadb
_set_binlog_ignore_db"
return
0
;
return
0
;
;;
;;
esac
esac
...
@@ -36,12 +36,12 @@ entry_execute_method_root_MySQL() {
...
@@ -36,12 +36,12 @@ entry_execute_method_root_MySQL() {
# Data model parameters functions #
# Data model parameters functions #
#######################################
#######################################
m
ysql
_set_root_password
()
{
m
ariadb
_set_root_password
()
{
local
pass
=
"
$1
"
local
pass
=
"
$1
"
echo
"GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '
$pass
' WITH GRANT OPTION"
| mysql
echo
"GRANT ALL ON *.* TO 'root'@'%' IDENTIFIED BY '
$pass
' WITH GRANT OPTION"
| mysql
}
}
m
ysql
_get_safe_to_bootstrap
()
{
m
ariadb
_get_safe_to_bootstrap
()
{
if
[
-f
/var/lib/mysql/grastate.dat
]
;
then
if
[
-f
/var/lib/mysql/grastate.dat
]
;
then
local
safe
=
`
grep
-c
'safe_to_bootstrap: 1'
/var/lib/mysql/grastate.dat
`
local
safe
=
`
grep
-c
'safe_to_bootstrap: 1'
/var/lib/mysql/grastate.dat
`
if
[
$safe
=
1
]
;
then
if
[
$safe
=
1
]
;
then
...
@@ -55,7 +55,7 @@ mysql_get_safe_to_bootstrap() {
...
@@ -55,7 +55,7 @@ mysql_get_safe_to_bootstrap() {
return
0
return
0
}
}
m
ysql
_set_safe_to_bootstrap
()
{
m
ariadb
_set_safe_to_bootstrap
()
{
if
[
-f
/var/lib/mysql/grastate.dat
]
;
then
if
[
-f
/var/lib/mysql/grastate.dat
]
;
then
if
[
$1
=
"true"
]
;
then
if
[
$1
=
"true"
]
;
then
sed
-i
's/^safe_to_bootstrap: ./safe_to_bootstrap: 1/'
/var/lib/mysql/grastate.dat
sed
-i
's/^safe_to_bootstrap: ./safe_to_bootstrap: 1/'
/var/lib/mysql/grastate.dat
...
@@ -65,7 +65,7 @@ mysql_set_safe_to_bootstrap() {
...
@@ -65,7 +65,7 @@ mysql_set_safe_to_bootstrap() {
fi
fi
}
}
m
ysql
_galera_bootstrap
()
{
m
ariadb
_galera_bootstrap
()
{
local
safe
=
`
mysql_get_safe_to_bootstrap
`
local
safe
=
`
mysql_get_safe_to_bootstrap
`
if
[
$safe
=
"true"
]
;
then
if
[
$safe
=
"true"
]
;
then
systemctl stop mariadb
systemctl stop mariadb
...
@@ -75,11 +75,11 @@ mysql_galera_bootstrap() {
...
@@ -75,11 +75,11 @@ mysql_galera_bootstrap() {
return
0
return
0
}
}
m
ysql
_get_cluster_address
()
{
m
ariadb
_get_cluster_address
()
{
echo
`
$UCI_GET
mariadb.galera.cluster_address
`
echo
`
$UCI_GET
mariadb.galera.cluster_address
`
}
}
m
ysql
_set_cluster_address
()
{
m
ariadb
_set_cluster_address
()
{
local
address
=
`
$UCI_GET
mariadb.galera.cluster_address
`
local
address
=
`
$UCI_GET
mariadb.galera.cluster_address
`
if
[
"
$address
"
!=
"
$1
"
]
;
then
if
[
"
$address
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.cluster_address
=
"
$1
"
$UCI_SET
mariadb.galera.cluster_address
=
"
$1
"
...
@@ -89,11 +89,11 @@ mysql_set_cluster_address() {
...
@@ -89,11 +89,11 @@ mysql_set_cluster_address() {
fi
fi
}
}
m
ysql
_get_cluster_options
()
{
m
ariadb
_get_cluster_options
()
{
echo
`
$UCI_GET
mariadb.galera.cluster_options
`
echo
`
$UCI_GET
mariadb.galera.cluster_options
`
}
}
m
ysql
_set_cluster_options
()
{
m
ariadb
_set_cluster_options
()
{
local
options
=
`
$UCI_GET
mariadb.galera.cluster_options
`
local
options
=
`
$UCI_GET
mariadb.galera.cluster_options
`
if
[
"
$options
"
!=
"
$1
"
]
;
then
if
[
"
$options
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.cluster_options
=
"
$1
"
$UCI_SET
mariadb.galera.cluster_options
=
"
$1
"
...
@@ -103,11 +103,11 @@ mysql_set_cluster_options() {
...
@@ -103,11 +103,11 @@ mysql_set_cluster_options() {
fi
fi
}
}
m
ysql
_get_node_address
()
{
m
ariadb
_get_node_address
()
{
echo
`
$UCI_GET
mariadb.galera.node_address
`
echo
`
$UCI_GET
mariadb.galera.node_address
`
}
}
m
ysql
_set_node_address
()
{
m
ariadb
_set_node_address
()
{
local
address
=
`
$UCI_GET
mariadb.galera.node_address
`
local
address
=
`
$UCI_GET
mariadb.galera.node_address
`
if
[
"
$address
"
!=
"
$1
"
]
;
then
if
[
"
$address
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.node_address
=
"
$1
"
$UCI_SET
mariadb.galera.node_address
=
"
$1
"
...
@@ -117,11 +117,11 @@ mysql_set_node_address() {
...
@@ -117,11 +117,11 @@ mysql_set_node_address() {
fi
fi
}
}
m
ysql
_get_server_id
()
{
m
ariadb
_get_server_id
()
{
echo
`
$UCI_GET
mariadb.galera.server_id
`
echo
`
$UCI_GET
mariadb.galera.server_id
`
}
}
m
ysql
_set_server_id
()
{
m
ariadb
_set_server_id
()
{
local
server_id
=
`
$UCI_GET
mariadb.galera.server_id
`
local
server_id
=
`
$UCI_GET
mariadb.galera.server_id
`
if
[
"
$server_id
"
!=
"
$1
"
]
;
then
if
[
"
$server_id
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.server_id
=
"
$1
"
$UCI_SET
mariadb.galera.server_id
=
"
$1
"
...
@@ -131,11 +131,11 @@ mysql_set_server_id() {
...
@@ -131,11 +131,11 @@ mysql_set_server_id() {
fi
fi
}
}
m
ysql
_get_wsrep_gtid_domain_id
()
{
m
ariadb
_get_wsrep_gtid_domain_id
()
{
echo
`
$UCI_GET
mariadb.galera.wsrep_gtid_domain_id
`
echo
`
$UCI_GET
mariadb.galera.wsrep_gtid_domain_id
`
}
}
m
ysql
_set_wsrep_gtid_domain_id
()
{
m
ariadb
_set_wsrep_gtid_domain_id
()
{
local
wsrep_gtid_domain_id
=
`
$UCI_GET
mariadb.galera.wsrep_gtid_domain_id
`
local
wsrep_gtid_domain_id
=
`
$UCI_GET
mariadb.galera.wsrep_gtid_domain_id
`
if
[
"
$wsrep_gtid_domain_id
"
!=
"
$1
"
]
;
then
if
[
"
$wsrep_gtid_domain_id
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.wsrep_gtid_domain_id
=
"
$1
"
$UCI_SET
mariadb.galera.wsrep_gtid_domain_id
=
"
$1
"
...
@@ -145,11 +145,11 @@ mysql_set_wsrep_gtid_domain_id() {
...
@@ -145,11 +145,11 @@ mysql_set_wsrep_gtid_domain_id() {
fi
fi
}
}
m
ysql
_get_gtid_domain_id
()
{
m
ariadb
_get_gtid_domain_id
()
{
echo
`
$UCI_GET
mariadb.galera.gtid_domain_id
`
echo
`
$UCI_GET
mariadb.galera.gtid_domain_id
`
}
}
m
ysql
_set_gtid_domain_id
()
{
m
ariadb
_set_gtid_domain_id
()
{
local
gtid_domain_id
=
`
$UCI_GET
mariadb.galera.gtid_domain_id
`
local
gtid_domain_id
=
`
$UCI_GET
mariadb.galera.gtid_domain_id
`
if
[
"
$gtid_domain_id
"
!=
"
$1
"
]
;
then
if
[
"
$gtid_domain_id
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.galera.gtid_domain_id
=
"
$1
"
$UCI_SET
mariadb.galera.gtid_domain_id
=
"
$1
"
...
@@ -159,11 +159,11 @@ mysql_set_gtid_domain_id() {
...
@@ -159,11 +159,11 @@ mysql_set_gtid_domain_id() {
fi
fi
}
}
m
ysql
_get_binlog_do_db
()
{
m
ariadb
_get_binlog_do_db
()
{
echo
`
$UCI_GET
mariadb.binlog.do_db
`
echo
`
$UCI_GET
mariadb.binlog.do_db
`
}
}
m
ysql
_set_binlog_do_db
()
{
m
ariadb
_set_binlog_do_db
()
{
local
binlog_do_db
=
`
$UCI_GET
mariadb.binlog.do_db
`
local
binlog_do_db
=
`
$UCI_GET
mariadb.binlog.do_db
`
if
[
"
$binlog_do_db
"
!=
"
$1
"
]
;
then
if
[
"
$binlog_do_db
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.binlog.do_db
=
"
$1
"
$UCI_SET
mariadb.binlog.do_db
=
"
$1
"
...
@@ -173,11 +173,11 @@ mysql_set_binlog_do_db() {
...
@@ -173,11 +173,11 @@ mysql_set_binlog_do_db() {
fi
fi
}
}
m
ysql
_get_binlog_ignore_db
()
{
m
ariadb
_get_binlog_ignore_db
()
{
echo
`
$UCI_GET
mariadb.binlog.ignore_db
`
echo
`
$UCI_GET
mariadb.binlog.ignore_db
`
}
}
m
ysql
_set_binlog_ignore_db
()
{
m
ariadb
_set_binlog_ignore_db
()
{
local
binlog_ignore_db
=
`
$UCI_GET
mariadb.binlog.ignore_db
`
local
binlog_ignore_db
=
`
$UCI_GET
mariadb.binlog.ignore_db
`
if
[
"
$binlog_ignore_db
"
!=
"
$1
"
]
;
then
if
[
"
$binlog_ignore_db
"
!=
"
$1
"
]
;
then
$UCI_SET
mariadb.binlog.ignore_db
=
"
$1
"
$UCI_SET
mariadb.binlog.ignore_db
=
"
$1
"
...
...
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