本随笔文章,由个人博客(鸟不拉屎)转移至博客园

发布时间: 2018 年 12 月 20 日

原地址:https://niaobulashi.com/archives/oracle-procedures-dynamicsql-update.html


花了我一下午时间,外加晚上加班

终于把存储过程的主要功能给写出来了!!!

emmmmm,做个笔记

后面有时间就细细分析下,先把代码贴一下。

create or replace procedure P_SYNC_TA_PRODUCT_TEST(v_res           OUT NUMBER,
v_errorCode OUT NVARCHAR2,
v_errorMsg OUT NVARCHAR2,
d_dateStartDate IN NVARCHAR2,
d_dateEndDate IN NVARCHAR2) IS
--查询是否存在已经同步的TA产品信息的个数
v_count_updatePolling number(8) := 0;
--收益率ID自动生成序列
v_yieldRateId NVARCHAR2(36);
--受益级别表的产品代码
v_productCode varchar2(36);
--受益级别表的受益级别
v_yieldLevelCode NVARCHAR2(10);
--受益级别表的预期年化收益率
v_yieldRate NVARCHAR2(20);
v_yieldRateStr NVARCHAR2(20);
--受益级别表的投资区间(开始)
v_investmentIntervalS NVARCHAR2(20);
v_investmentIntervalSStr NVARCHAR2(20);
--受益级别表的投资区间(结束)
v_investmentIntervalD NVARCHAR2(20);
v_investmentIntervalDStr NVARCHAR2(20);
--受益级别表的投资期限
v_dueTime NVARCHAR2(20);
--受益级别表的投资期限单位
v_dueTimeUnit NVARCHAR2(2);
--受益级别表的年化计算天数
v_annualDays NVARCHAR2(5);
--拼接的SQL语句
v_confirmSql varchar2(600);
v_confirmCommaSql varchar2(600);
v_updateYieldRateSql varchar2(700); --用于判断是否新增或更新
/*v_total_pro number(8) := 0;
--游标tfundInfos的个数
v_total number(8) := 0;
--入池产品ID
v_pollingProductId NVARCHAR2(36);
--用于判断产品表是否存在该产品
v_count_pollingProduct number(8) := 0;
--用于判断是否存在已入池且当日改动的产品
v_count_polling number(8) := 0;
--用于判断TA是否存在受益级别信息
v_count_productRateYiled number(8) := 0;*/ --1.定义游标:查询出产品名称、成立日、预计到期日其中和TA不一致的产品信息
CURSOR updateProductInfos IS
select t.c_fundcode as fundCode, --产品代码
t.c_fundname as fundName, --产品名称(TA)
to_char(t.d_setupdate, 'yyyy-MM-dd') as setupDateStr, --成立日(TA)
to_char(t.d_contractenddate, 'yyyy-MM-dd') as contractendDateStr --预计到期日期(TA)
from tfundinfo@HSTA t
inner join t_polling_product tpp
on tpp.c_product_code = t.c_fundcode
and tpp.delete_flag = '0'
where 1 = 1
and to_char(t.d_lastmodifydate, 'yyyy-MM-dd') >=
to_char(to_date(d_dateStartDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
and to_char(t.d_lastmodifydate, 'yyyy-MM-dd') <=
to_char(to_date(d_dateEndDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
and t.c_fundstatus <> '6'
and (t.c_fundname <> tpp.c_product_name
or to_char(t.d_setupdate, 'yyyy-MM-dd') <> to_char(tpp.c_found_date, 'yyyy-MM-dd')
or to_char(t.d_contractenddate, 'yyyy-MM-dd') <> to_char(tpp.c_end_date, 'yyyy-MM-dd'));
--排除已经结束的产品,0-募集期,1-正常,6-已结束 --2.定义游标:核对受益级别数据后更新或新增家族信托产品受益级别
CURSOR margeProductYieldRates IS
select t.c_fundcode AS fundCode, --产品代码
tp.c_profitclass AS profitClass, --收益级别
tp.f_profit*100 AS profit, --从TA获取的收益率需要乘以100
tp.f_amountmin AS amountMin, --投资下限(含)
tp.f_amountmax AS amountMax, --投资上限(不含)
tp.c_durationtime AS durationTime, --投资期限
case tp.c_durationtimeunit
when '0' then 'Y' --年
when '1' then 'M' --月
when '2' then 'D' --日
else ''
end as durationTimeUnit, --期限单位
case tp.c_bonusfrequency
when '0' then '04'
when '1' then '04'
when '2' then '04'
when '3' then '04'
when '4' then '04'
when '5' then '04' --特定周期
when '6' then '02' --到期一次性清算
when '7' then '03' --不定期
else ''
end as bonusFrequencyType, --分配频率类型
case tp.c_bonusfrequency
when '2' then 'M' --每月
when '3' then 'Q' --每季度
when '4' then 'H' --每半年
when '5' then 'Y' --每年
else ''
end as bonusFrequency, --分配频率_特定
tp.l_incomeyeardays as incomeYearDays, --年化天数
NVL(to_char(t.d_setupdate, 'yyyy-MM-dd'),
to_char(sysdate, 'yyyy-MM-dd')) AS yieldStartDateStr --有效开始日期
from tfundinfo@HSTA t
inner join ttrustfundprofit@HSTA tp
on tp.c_fundcode = t.c_fundcode
where 1 = 1
and to_char(t.d_lastmodifydate, 'yyyy-MM-dd') >=
to_char(to_date(d_dateStartDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
and to_char(t.d_lastmodifydate, 'yyyy-MM-dd') <=
to_char(to_date(d_dateEndDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
and t.c_fundstatus <> '6' and t.c_fundcode in ('CA0FX6','CA0FUC'); --排除已经结束的产品,0-募集期,1-正常,6-已结束 begin
--================================================================================
-------------------------------【执行sql文】--------------------------------------
--================================================================================
--开启日志输出缓冲
DBMS_OUTPUT.ENABLE(buffer_size => null);
DBMS_OUTPUT.put_line('----------------start------------------'); --1.查询是否存在已经同步的TA产品信息
select count(*)
into v_count_updatePolling
from tfundinfo@HSTA t
inner join t_polling_product tpp
on tpp.c_product_code = t.c_fundcode
where 1 = 1
and to_char(t.d_lastmodifydate, 'yyyy-MM-dd') >=
to_char(to_date(d_dateStartDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
and to_char(t.d_lastmodifydate, 'yyyy-MM-dd') <=
to_char(to_date(d_dateEndDate, 'yyyy-MM-dd'), 'yyyy-MM-dd')
and t.c_fundstatus <> '6'; --排除已经结束的产品,0-募集期,1-正常,6-已结束 --如果查询到存在
if v_count_updatePolling > 0 then --1.1 调用游标:查询出产品名称、成立日、预计到期日其中和TA不一致的产品信息
/*for updateProductInfo in updateProductInfos loop
--非空判断,如果查询到的数据存在,表示,存在家族信托和TA不一致的产品信息,进行更新处理
if updateProductInfo.Fundcode is not null then
--查询存在说明存在和TA不一致的产品基本信息,则更新和TA一致
update t_polling_product t
set t.c_product_name = updateProductInfo.Fundname,
t.c_end_date = to_date(updateProductInfo.Contractenddatestr, 'yyyy-MM-dd'),
t.update_time = sysdate,
t.c_found_date = to_date(updateProductInfo.Setupdatestr, 'yyyy-MM-dd')
where t.c_product_code = updateProductInfo.Fundcode;
end if;
end loop;*/ --1.2 调用游标:核对受益级别数据后更新或新增家族信托产品受益级别
for margeProductYieldRate IN margeProductYieldRates loop
if margeProductYieldRate.Fundcode is not null then
/*
* 1.2.1
* 查询TA中的受益级别,家族信托是否存在
* 若存在,则表示家族和TA都存在该受益级别,进行核对比较关键信息,发现不同则更新
* 若不存在,表示家族这边缺少TA的受益级别,需要从TA进行同步该受益级别
*/
select tpy.c_product_code,
tpy.c_yield_level_code,
tpy.c_yield_rate,
tpy.c_investment_interval_s,
tpy.c_investment_interval_d,
tpy.c_due_time,
tpy.c_due_time_unit,
tpy.c_annual_days
into v_productCode, --产品代码
v_yieldLevelCode, --受益级别
v_yieldRate, --预期收益率
v_investmentIntervalS, --投资下限
v_investmentIntervalD, --投资上限
v_dueTime, --投资期限
v_dueTimeUnit, --投资期限单位
v_annualDays --年化天数
from t_product_yield_rate tpy
where tpy.c_yield_level_code = margeProductYieldRate.Profitclass
and tpy.c_product_code = margeProductYieldRate.Fundcode
and tpy.delete_flag = '0'; --若存在,则表示家族和TA都存在该受益级别,进行核对比较关键信息,发现不同则更新
IF v_productCode is not null then
/*
* 将匹配的数据进行核对,发现关键字段不匹配的进行更新
* 对受益级别的关键字段进行一一对比
* 对比不一样的,进行拼接SQL
*/
dbms_output.put_line('开始拼接SQL,产品代码为:' || margeProductYieldRate.Fundcode||','||'受益级别为:'||margeProductYieldRate.Profitclass); --oracle 数据库 字段值为小于1的小数时,使用varchar2类型处理,会丢失小数点前面的0
v_yieldRateStr := to_char(v_yieldRate, 'fm99999999990.00');
v_investmentIntervalSStr := to_char(v_investmentIntervalS, 'fm99999999990.00');
v_investmentIntervalDStr := to_char(v_investmentIntervalD, 'fm99999999990.00'); dbms_output.put_line('1.收益率,family:' ||v_yieldRateStr||';'||'TA:'||to_char(margeProductYieldRate.Profit, 'fm99999999990.00'));
-- 比较年化收益率
if v_yieldRateStr is not null and margeProductYieldRate.Profit is not null then
if v_yieldRateStr <> to_char(margeProductYieldRate.Profit, 'fm99999999990.00') then
v_confirmSql := v_confirmSql||'t.c_yield_rate='||to_char(margeProductYieldRate.Profit, 'fm99999999990.00')||',';
end if;
elsif v_yieldRateStr is null and to_char(margeProductYieldRate.Profit, 'fm99999999990.00') is not null then
v_confirmSql := v_confirmSql||'t.c_yield_rate='||to_char(margeProductYieldRate.Profit, 'fm99999999990.00')||',';
elsif v_yieldRateStr is not null and to_char(margeProductYieldRate.Profit, 'fm99999999990.00') is null then
v_confirmSql := v_confirmSql||'t.c_yield_rate=null,';
end if;
--比较投资上限(含)
dbms_output.put_line('2.投资上限,family:' || v_investmentIntervalSStr||';'||'TA:'||to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00'));
if v_investmentIntervalSStr is not null and to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00') is not null then
if v_investmentIntervalSStr <> to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00') then
v_confirmSql := v_confirmSql||'t.c_investment_interval_s='||to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00')||',';
end if;
elsif v_investmentIntervalSStr is null and to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00') is not null then
v_confirmSql := v_confirmSql||'t.c_investment_interval_s='||to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00')||',';
elsif v_investmentIntervalSStr is not null and to_char(margeProductYieldRate.Amountmin, 'fm99999999990.00') is null then
v_confirmSql := v_confirmSql||'t.c_investment_interval_s=null,';
end if;
--比较投资下限(不含)
dbms_output.put_line('2.投资下限,family:' || v_investmentIntervalDStr||';'||'TA:'||to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00'));
if v_investmentIntervalDStr is not null and to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00') is not null then
if v_investmentIntervalDStr <> to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00') then
v_confirmSql := v_confirmSql||'t.c_investment_interval_d='||to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00')||',';
end if;
elsif v_investmentIntervalDStr is null and to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00') is not null then
v_confirmSql := v_confirmSql||'t.c_investment_interval_d='||to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00')||',';
elsif v_investmentIntervalDStr is not null and to_char(margeProductYieldRate.Amountmax, 'fm99999999990.00') is null then
v_confirmSql := v_confirmSql||'t.c_investment_interval_d=null,';
end if;
--比较投资期限
dbms_output.put_line('3.投资期限,family:' || v_dueTime||';'||'TA:'||margeProductYieldRate.Durationtime);
if v_dueTime is not null and margeProductYieldRate.Durationtime is not null then
if v_dueTime <> margeProductYieldRate.Durationtime then
v_confirmSql := v_confirmSql||'t.c_due_time='||margeProductYieldRate.Durationtime||',';
end if;
elsif v_dueTime is null and margeProductYieldRate.Durationtime is not null then
v_confirmSql := v_confirmSql||'t.c_due_time='||margeProductYieldRate.Durationtime||',';
elsif v_dueTime is not null and margeProductYieldRate.Durationtime is null then
v_confirmSql := v_confirmSql||'t.c_due_time=null,';
end if;
--比较投资期限单位
dbms_output.put_line('4.投资期限单位,family:' || v_dueTimeUnit||';'||'TA:'||margeProductYieldRate.Durationtimeunit);
if v_dueTimeUnit is not null and margeProductYieldRate.Durationtimeunit is not null then
if v_dueTimeUnit <> margeProductYieldRate.Durationtimeunit then
v_confirmSql := v_confirmSql||'t.c_due_time_unit='||''''||margeProductYieldRate.Durationtimeunit||''''||',';
end if;
elsif v_dueTimeUnit is null and margeProductYieldRate.Durationtimeunit is not null then
v_confirmSql := v_confirmSql||'t.c_due_time_unit='||''''||margeProductYieldRate.Durationtimeunit||''''||',';
elsif v_dueTimeUnit is not null and margeProductYieldRate.Durationtimeunit is null then
v_confirmSql := v_confirmSql||'t.c_due_time_unit=null,';
end if;
--比较年化计算天数
dbms_output.put_line('5.年化计算天数,family:' || v_annualDays||';'||'TA:'||margeProductYieldRate.Incomeyeardays);
if v_annualDays is not null and margeProductYieldRate.Incomeyeardays is not null then
if v_annualDays <> margeProductYieldRate.Incomeyeardays then
v_confirmSql := v_confirmSql||'t.c_annual_days'||''''||margeProductYieldRate.Incomeyeardays||''''||',';
end if;
elsif v_annualDays is null and margeProductYieldRate.Incomeyeardays is not null then
v_confirmSql := v_confirmSql||'t.c_annual_days='||''''||margeProductYieldRate.Incomeyeardays||''''||',';
elsif v_annualDays is not null and margeProductYieldRate.Incomeyeardays is null then
v_confirmSql := v_confirmSql||'t.c_annual_days=null,';
end if; --判断存在不一致的受益级别字段
if v_confirmSql is not null then
--将得到的拼接字符串,去掉最后的一个句号','
select substr(v_confirmSql,1,length(v_confirmSql)-1) into v_confirmCommaSql from dual;
v_updateYieldRateSql := 'update t_product_yield_rate t set '||v_confirmCommaSql||' where t.c_product_code=:1 and t.c_yield_level_code=:2';
dbms_output.put_line('拼接的SQL为:' || v_updateYieldRateSql); --执行更新SQL
execute immediate v_updateYieldRateSql USING margeProductYieldRate.Fundcode, margeProductYieldRate.Profitclass; --本条记录处理完成,将v_confirmSql、v_confirmSqlCount清空准备下条处理
v_confirmSql := '';
v_confirmCommaSql := '';
v_updateYieldRateSql := '';
end if; --若不存在,表示家族这边缺少TA的受益级别,需要从TA进行同步该受益级别
else
--生成收益率ID主键的序列号
select concat(to_char(sysdate, 'yyyyMMddHHmmss'),
trunc(dbms_random.value(100000, 999999)))
into v_yieldRateId
from dual;
dbms_output.put_line('存在新增的受益级别,产品代码为:'||margeProductYieldRate.Fundcode||',受益级别为:'||margeProductYieldRate.Profitclass);
--将该受益级别同步到家族信托中
insert into T_PRODUCT_YIELD_RATE
(T_PRODUCT_YIELD_RATE.C_YIELD_RATE_ID,
T_PRODUCT_YIELD_RATE.C_PRODUCT_CODE,
T_PRODUCT_YIELD_RATE.C_PRODUCT_MANAGER_CODE,
T_PRODUCT_YIELD_RATE.C_INVESTMENT_INTERVAL_S,
T_PRODUCT_YIELD_RATE.C_INVESTMENT_INTERVAL_D,
T_PRODUCT_YIELD_RATE.C_YIELD_RATE,
T_PRODUCT_YIELD_RATE.DELETE_FLAG,
T_PRODUCT_YIELD_RATE.CREATE_USER_ID,
T_PRODUCT_YIELD_RATE.CREATE_TIME,
T_PRODUCT_YIELD_RATE.UPDATE_USER_ID,
T_PRODUCT_YIELD_RATE.UPDATE_TIME,
T_PRODUCT_YIELD_RATE.C_YIELD_START_DATE,
T_PRODUCT_YIELD_RATE.C_YIELD_END_DATE,
T_PRODUCT_YIELD_RATE.C_CHANGE_REASON,
T_PRODUCT_YIELD_RATE.C_YIELD_LEVEL_CODE,
T_PRODUCT_YIELD_RATE.C_ALLOCATION_TYPE,
T_PRODUCT_YIELD_RATE.C_ALLOCATION_TYPE_SP,
T_PRODUCT_YIELD_RATE.C_ALLOCATION_TYPE_MD,
T_PRODUCT_YIELD_RATE.C_ANNUAL_DAYS,
T_PRODUCT_YIELD_RATE.C_DUE_TIME,
T_PRODUCT_YIELD_RATE.C_DUE_TIME_UNIT)
values
(v_yieldRateId,
margeProductYieldRate.Fundcode,
'0',
margeProductYieldRate.Amountmin,
margeProductYieldRate.Amountmax,
margeProductYieldRate.Profit,
'0',
'00000000000000000000',
sysdate,
'00000000000000000000',
sysdate,
to_date(margeProductYieldRate.Yieldstartdatestr, 'yyyy-MM-dd'),
to_date('9999-12-31', 'yyyy-MM-dd'),
'',
margeProductYieldRate.Profitclass,
margeProductYieldRate.Bonusfrequencytype,
margeProductYieldRate.Bonusfrequency,
'',
margeProductYieldRate.Incomeyeardays,
margeProductYieldRate.Durationtime,
margeProductYieldRate.Durationtimeunit);
end if;
end if;
end loop;
end if; --输出放回状态信息
v_res := 0;
v_errorCode := SQLCODE;
v_errorMsg := 'P_SYNC_TA_PRODUCT_TEST' || ':' || TO_CHAR(SQLERRM);
DBMS_OUTPUT.put_line('----------------end------------------');
--提交
COMMIT;
--异常处理
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('----------------error------------------');
--事务回滚
ROLLBACK;
v_res := -1;
v_errorCode := SQLCODE;
v_errorMsg := 'P_SYNC_TA_PRODUCT_TEST' || ':' || TO_CHAR(SQLERRM);
end P_SYNC_TA_PRODUCT_TEST;

oracle存储过程 关于update的动态SQL-工作心得的更多相关文章

  1. ORACLE中使用DBMS_SQL获取动态SQL执行结果中的列名和值

    1.获取动态SQL中的列名及类型 DECLARE l_curid INTEGER; l_cnt NUMBER; l_desctab dbms_sql.desc_tab; l_sqltext ); BE ...

  2. 使用Oracle的DBMS_SQL包执行动态SQL语句

    引用自:http://blog.csdn.net/ggjjzhzz/archive/2005/10/17/507880.aspx 在某些场合下,存储过程或触发器里的SQL语句需要动态生成.Oracle ...

  3. Oracle存储过程执行update语句不报错不生效问题

    转载链接:http://lin49940.iteye.com/blog/466626 今天一个同事写oracle 的存储过程遇到了一个问题, 他在里面update 操作不能完成更新的操作, 但是又不会 ...

  4. [转]oracle存储过程中update不成功的一个原因

    原文地址:http://lin49940.iteye.com/blog/466626 今天一个同事写oracle 的存储过程遇到了一个问题, 他在里面update 操作不能完成更新的操作, 但是又不会 ...

  5. 存储过程中update,然后用sql%判断update是否成功的存储过程

    --更新用户状态 PROCEDURE P_UPDATE_USER_STATUS ( v_SrcID IN NUMERIC, v_DstID IN NUMERIC, v_DstType IN NUMER ...

  6. MySQL存储过程中实现执行动态SQL语句

    sql语句中的任何部分都可以作为参数. DROP PROCEDURE if exists insertdata; delimiter //CREATE PROCEDURE insertdata(IN ...

  7. Oracle PLSQL Demo - 31.执行动态SQL拿一个返回值

    DECLARE v_sql ) := ''; v_count NUMBER; BEGIN v_sql := v_sql || 'select count(1) from scott.emp t'; E ...

  8. Oracle 存储过程动态建表

    动态sql,顾名思义就是动态执行的sql,也就是说在没执行之前是动态的拼接的. 任务 传入参数:新建的表名hd+当前的年和月,例如hd_201105表结构是:字段1:id ,类型是number,可以自 ...

  9. Oracle数据库之动态SQL

    Oracle数据库之动态SQL 1. 静态SQLSQL与动态SQL Oracle编译PL/SQL程序块分为两个种:一种为前期联编(early binding),即SQL语句在程序编译期间就已经确定,大 ...

随机推荐

  1. Scala学习——Brief Scala Tutorial

    因为Spark项目需要,学习Scala编程. 从官网文档入手:http://www.scala-lang.org/documentation/ 首先从他的Older Documentation入手. ...

  2. 1088. [SCOI2005]扫雷Mine【网格DP】

    Description 相信大家都玩过扫雷的游戏.那是在一个n*m的矩阵里面有一些雷,要你根据一些信息找出雷来.万圣节到了 ,“余”人国流行起了一种简单的扫雷游戏,这个游戏规则和扫雷一样,如果某个格子 ...

  3. Elasticsearch + logstash + kibana 配置

    Elasticsearch 配置 Elasticsearch不仅仅是Lucene和全文搜索,我们还能这样去描述它: 分布式的实时文件存储,每个字段都被索引并可被搜索 分布式的实时分析搜索引擎 可以扩展 ...

  4. 20155314 2016-2017-2 《Java程序设计》实验二 Java面向对象程序设计

    20155314 2016-2017-2 <Java程序设计>实验二 Java面向对象程序设计 实验内容 初步掌握单元测试和TDD 理解并掌握面向对象三要素:封装.继承.多态 初步掌握UM ...

  5. 打包dll发布到nuget服务器

    几个月前上传过一次nuget包,结果好久不用,今天想更新下,完全忘记了怎么用了,又是一顿查,所以决定记录下来,当然这可能不是一个傻瓜式的教程,但聪明的你们应该能够看明白的,因为整体操作还是很简单的 好 ...

  6. no.random.randn

    numpy中有一些常用的用来产生随机数的函数,randn就是其中一个,randn函数位于numpy.random中,函数原型如下: numpy.random.randn(d0, d1, ..., dn ...

  7. 【MySQL】一道MySQL综合题

    题:下表是一张商品出售统计表,写一段简单的sql查询,查询出每种商品类型每个月的出售总额,其中类型1为实体商品,类型2为虚拟商品.表名goods_count. id(自增id) sold_time(出 ...

  8. JS数组的赋值

    var test=[1,2,3,4,5,6,7];  var arr=test;  arr.splice(2,1);  alert(test);//1,2,4,5,6,7 JS数组实质上是对象.因此, ...

  9. C++ 函数的二义性

    函数二义性是一种编译时发生的错误,造成二义性调用的原因 是在函数匹配时两个或多个函数提供的匹配一样好,编译时找 不到唯一的最佳匹配. 列: #include <iostream> usin ...

  10. centos下安装myrocksdb

    承接上一篇,https://www.cnblogs.com/lunyu/p/10190364.html .编译安装myrocks的整个过程,特别是第2步和第7步,让人冗长难耐.因此编译安装成功后省去这 ...