wecisecode vor 1 Tag
Ursprung
Commit
4989eade03

+ 41 - 0
odbctest/mql/basic/30conflict/25update.mql

@@ -0,0 +1,41 @@
+
+
+
+update /test/alert_status set test='aaa'
+/**
+output()
+**/
+;
+
+select id,test from /test/alert_status
+/**
+output()
+matchcount(id, "10667786883043395674", test, "aaa", 1)
+**/
+;
+
+update /test/alert_status set test='xxx' where id="10667786883043395674"
+/**
+output()
+**/
+;
+
+select id,test from /test/alert_status
+/**
+output()
+matchcount(id, "10667786883043395674", test, "xxx", 1)
+**/
+;
+
+update /test/alert_status set test='xxx' where id="10667786883043395674"
+/**
+output()
+**/
+;
+
+select id,test from /test/alert_status
+/**
+output()
+matchcount(id, "10667786883043395674", test, "xxx", 1)
+**/
+;

+ 75 - 0
odbctest/mql/basic/30conflict/26mupdate.mql

@@ -0,0 +1,75 @@
+
+
+
+insert into /test/malert_status (identifier, severity, lastoccurrence, maintenance, msg, type, agent, firstoccurrence, omni_class, nodealias, alertgroup, node, manager, originalseverity, summary, tags) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) on conflict update firstoccurrence=firstoccurrence, servicenowstate=servicenowstate, emailstatus=emailstatus, tally=tally+1
+/**
+params("xxx", 5, 1622249715000, 1, "设备:222.129.134.178电源整体功能恢复!", 1, "huawei mttrapd #1", 1622211715023, "300", "222.129.134.178", "huawei_power_func", "222.129.134.178", "MTTrapd Probe", 5, "设备:222.129.134.178电源整体功能恢复!", "xxx")
+**/
+;
+
+select count(*) from /test/malert_status
+/**
+output()
+matchcount("count", 10001, 1)
+**/
+;
+
+
+update /test/malert_status set summary='xxx' where identifier='xxx'
+/**
+output()
+**/
+;
+
+select class,id,identifier,summary from /test/malert_status where identifier='xxx'
+/**
+output()
+matchcount(identifier, "xxx", summary, "xxx", 1)
+**/
+;
+
+update /test/malert_status set summary='aaa' where id='9953570177941151804'
+/**
+output()
+**/
+;
+
+select id,summary from /test/malert_status where id='9953570177941151804'
+/**
+output()
+matchcount(id, "9953570177941151804", summary, "aaa", 1)
+**/
+;
+
+update /test/malert_status set summary='xxx' where id='9953570177941151804'
+/**
+output()
+**/
+;
+
+select id,summary from /test/malert_status where id='9953570177941151804'
+/**
+output()
+matchcount(id, "9953570177941151804", summary, "xxx", 1)
+**/
+;
+
+delete from /test/malert_status where identifier='xxx'
+/**
+output()
+**/
+;
+
+select class,id,identifier,summary from /test/malert_status where identifier='xxx'
+/**
+output()
+count(0)
+**/
+;
+
+select count(*) from /test/malert_status
+/**
+output()
+matchcount("count", 10000, 1)
+**/
+;