Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
40990c04
提交
40990c04
authored
9月 05, 2011
作者:
Jeff Lenk
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
FS-3527 --resolve Syntax Error when using MSSQL in core
上级
2da308c1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
7 行增加
和
5 行删除
+7
-5
switch_core_sqldb.c
src/switch_core_sqldb.c
+7
-5
没有找到文件。
src/switch_core_sqldb.c
浏览文件 @
40990c04
...
...
@@ -1640,6 +1640,7 @@ static char create_registrations_sql[] =
" reg_user VARCHAR(256),
\n
"
" realm VARCHAR(256),
\n
"
" token VARCHAR(256),
\n
"
/* If url is modified please check for code in switch_core_sqldb_start for dependencies for MSSQL" */
" url TEXT,
\n
"
" expires INTEGER,
\n
"
" network_ip VARCHAR(256),
\n
"
...
...
@@ -1942,17 +1943,18 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_
switch_cache_db_test_reactive
(
dbh
,
"select call_uuid, read_bit_rate, sent_callee_name from channels"
,
"DROP TABLE channels"
,
create_channels_sql
);
switch_cache_db_test_reactive
(
dbh
,
"select * from detailed_calls where sent_callee_name=''"
,
"DROP VIEW detailed_calls"
,
detailed_calls_sql
);
switch_cache_db_test_reactive
(
dbh
,
"select * from basic_calls where sent_callee_name=''"
,
"DROP VIEW basic_calls"
,
basic_calls_sql
);
if
(
runtime
.
odbc_dbtype
==
DBTYPE_DEFAULT
)
{
switch_cache_db_test_reactive
(
dbh
,
"select call_uuid from calls"
,
"DROP TABLE calls"
,
create_calls_sql
);
if
(
runtime
.
odbc_dbtype
==
DBTYPE_DEFAULT
)
{
switch_cache_db_test_reactive
(
dbh
,
"delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'"
,
"DROP TABLE registrations"
,
create_registrations_sql
);
}
else
{
char
*
tmp
=
switch_string_replace
(
create_calls_sql
,
"function"
,
"call_function"
);
switch_cache_db_test_reactive
(
dbh
,
"select call_uuid from calls"
,
"DROP TABLE calls"
,
tmp
);
char
*
tmp
=
switch_string_replace
(
create_registrations_sql
,
"url TEXT"
,
"url VARCHAR(max)"
);
switch_cache_db_test_reactive
(
dbh
,
"delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'"
,
"DROP TABLE registrations"
,
tmp
);
free
(
tmp
);
}
switch_cache_db_test_reactive
(
dbh
,
"select ikey from interfaces"
,
"DROP TABLE interfaces"
,
create_interfaces_sql
);
switch_cache_db_test_reactive
(
dbh
,
"select hostname from tasks"
,
"DROP TABLE tasks"
,
create_tasks_sql
);
switch_cache_db_test_reactive
(
dbh
,
"delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'"
,
"DROP TABLE registrations"
,
create_registrations_sql
);
if
(
runtime
.
odbc_dbtype
==
DBTYPE_DEFAULT
)
{
switch_cache_db_execute_sql
(
dbh
,
"begin;delete from channels where hostname='';delete from channels where hostname='';commit;"
,
&
err
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论