Skip to content

Commit 4a2812a

Browse files
committed
FS-11727: [mod_mariadb] Add MariaDB (MySQL) support
1 parent 65cd6ec commit 4a2812a

23 files changed

+1598
-4
lines changed

Freeswitch.2017.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Databases", "Databases", "{
584584
EndProject
585585
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_pgsql", "src\mod\databases\mod_pgsql\mod_pgsql.2017.vcxproj", "{1BA65811-5453-46F6-8190-9ECEEFEB7DF2}"
586586
EndProject
587+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_mariadb", "src\mod\databases\mod_mariadb\mod_mariadb.2017.vcxproj", "{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}"
588+
EndProject
587589
Global
588590
GlobalSection(SolutionConfigurationPlatforms) = preSolution
589591
All|Win32 = All|Win32
@@ -2675,6 +2677,18 @@ Global
26752677
{1BA65811-5453-46F6-8190-9ECEEFEB7DF2}.Release|Win32.Build.0 = Release|Win32
26762678
{1BA65811-5453-46F6-8190-9ECEEFEB7DF2}.Release|x64.ActiveCfg = Release|x64
26772679
{1BA65811-5453-46F6-8190-9ECEEFEB7DF2}.Release|x64.Build.0 = Release|x64
2680+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.All|Win32.ActiveCfg = Release|Win32
2681+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.All|Win32.Build.0 = Release|Win32
2682+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.All|x64.ActiveCfg = Release|x64
2683+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.All|x64.Build.0 = Release|x64
2684+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Debug|Win32.ActiveCfg = Debug|Win32
2685+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Debug|Win32.Build.0 = Debug|Win32
2686+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Debug|x64.ActiveCfg = Debug|x64
2687+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Debug|x64.Build.0 = Debug|x64
2688+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Release|Win32.ActiveCfg = Release|Win32
2689+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Release|Win32.Build.0 = Release|Win32
2690+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Release|x64.ActiveCfg = Release|x64
2691+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC}.Release|x64.Build.0 = Release|x64
26782692
EndGlobalSection
26792693
GlobalSection(SolutionProperties) = preSolution
26802694
HideSolutionNode = FALSE
@@ -2886,6 +2900,7 @@ Global
28862900
{B19AE6FC-BFFF-428D-B483-3BBEAECCC618} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
28872901
{BC1FD72E-1CD5-4525-A7F5-17C5740BFDED} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
28882902
{1BA65811-5453-46F6-8190-9ECEEFEB7DF2} = {31C2761D-20E0-4BF8-98B9-E32F0D8DD6E1}
2903+
{0B612F84-7533-4DEC-AEDD-5C9CBCF15EAC} = {31C2761D-20E0-4BF8-98B9-E32F0D8DD6E1}
28892904
EndGlobalSection
28902905
GlobalSection(ExtensibilityGlobals) = postSolution
28912906
SolutionGuid = {09840DE7-9208-45AA-9667-1A71EE93BD1E}

build/modules.conf.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ codecs/mod_opus
7979
#codecs/mod_silk
8080
#codecs/mod_siren
8181
#codecs/mod_theora
82+
#databases/mod_mariadb
8283
databases/mod_pgsql
8384
dialplans/mod_dialplan_asterisk
8485
#dialplans/mod_dialplan_directory

build/modules.conf.most

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ codecs/mod_sangoma_codec
7676
codecs/mod_silk
7777
codecs/mod_siren
7878
codecs/mod_theora
79+
#databases/mod_mariadb
7980
databases/mod_pgsql
8081
dialplans/mod_dialplan_asterisk
8182
dialplans/mod_dialplan_directory
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<configuration name="pre_load_modules.conf" description="Modules">
22
<modules>
33
<!-- Databases -->
4+
<!-- <load module="mod_mariadb"/> -->
45
<load module="mod_pgsql"/>
56
</modules>
67
</configuration>

conf/rayo/autoload_configs/switch.conf.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@
168168
-->
169169
<!-- <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE' application_name='freeswitch'" /> -->
170170
<!-- <param name="core-db-dsn" value="postgresql://freeswitch:@127.0.0.1/freeswitch?options=-c%20client_min_messages%3DNOTICE&application_name=freeswitch" /> -->
171+
<!-- <param name="core-db-dsn" value="mariadb://Server=localhost;Database=freeswitch;Uid=freeswitch;Pwd=pass;" /> -->
171172
<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->
172173
<!--
173174
Allow to specify the sqlite db at a different location (In this example, move it to ramdrive for
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<configuration name="pre_load_modules.conf" description="Modules">
22
<modules>
33
<!-- Databases -->
4+
<!-- <load module="mod_mariadb"/> -->
45
<load module="mod_pgsql"/>
56
</modules>
67
</configuration>

conf/testing/autoload_configs/switch.conf.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@
173173
-->
174174
<!-- <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE'" /> -->
175175
<!-- <param name="core-db-dsn" value="postgresql://freeswitch:@127.0.0.1/freeswitch?options=-c%20client_min_messages%3DNOTICE" /> -->
176+
<!-- <param name="core-db-dsn" value="mariadb://Server=localhost;Database=freeswitch;Uid=freeswitch;Pwd=pass;" /> -->
176177
<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->
177178
<!--
178179
Allow to specify the sqlite db at a different location (In this example, move it to ramdrive for
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<configuration name="pre_load_modules.conf" description="Modules">
22
<modules>
33
<!-- Databases -->
4+
<!-- <load module="mod_mariadb"/> -->
45
<load module="mod_pgsql"/>
56
</modules>
67
</configuration>

conf/vanilla/autoload_configs/switch.conf.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@
182182
-->
183183
<!-- <param name="core-db-dsn" value="pgsql://hostaddr=127.0.0.1 dbname=freeswitch user=freeswitch password='' options='-c client_min_messages=NOTICE'" /> -->
184184
<!-- <param name="core-db-dsn" value="postgresql://freeswitch:@127.0.0.1/freeswitch?options=-c%20client_min_messages%3DNOTICE" /> -->
185+
<!-- <param name="core-db-dsn" value="mariadb://Server=localhost;Database=freeswitch;Uid=freeswitch;Pwd=pass;" /> -->
185186
<!-- <param name="core-db-dsn" value="dsn:username:password" /> -->
186187
<!--
187188
Allow to specify the sqlite db at a different location (In this example, move it to ramdrive for

configure.ac

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,11 @@ AC_SUBST([POSTGRESQL_CFLAGS], [$POSTGRESQL_CFLAGS])
705705
AC_SUBST([POSTGRESQL_LDFLAGS], [$POSTGRESQL_LDFLAGS])
706706
AC_SUBST([POSTGRESQL_LIBDIR], [$POSTGRESQL_LIBDIR])
707707

708+
709+
PKG_CHECK_MODULES([MARIADB], [libmariadb >= 3.0.9],[
710+
AM_CONDITIONAL([HAVE_MARIADB],[true])],[
711+
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_MARIADB],[false])])
712+
708713
AC_ARG_ENABLE(deprecated-core-db-events,
709714
[AS_HELP_STRING([--enable-deprecated-core-db-events], [Keep deprecated core db events])],,[enable_deprecated_core_db_events="no"])
710715

@@ -1925,6 +1930,7 @@ AC_CONFIG_FILES([Makefile
19251930
src/mod/codecs/mod_siren/Makefile
19261931
src/mod/codecs/mod_skel_codec/Makefile
19271932
src/mod/codecs/mod_theora/Makefile
1933+
src/mod/databases/mod_mariadb/Makefile
19281934
src/mod/databases/mod_pgsql/Makefile
19291935
src/mod/dialplans/mod_dialplan_asterisk/Makefile
19301936
src/mod/dialplans/mod_dialplan_directory/Makefile

0 commit comments

Comments
 (0)