lizg 1 settimana fa
parent
commit
c3490347d2

+ 31 - 0
odbctest/mql/basic/30conflict/00clear.mql

@@ -0,0 +1,31 @@
+
+delete from /test/alert_status with version ;
+/**
+onerror(continue,`not exist`,`not find`,`not found`,` Not Found`)
+**/
+;
+
+delete from /test/malert_status with version ;
+/**
+onerror(continue,`not exist`,`not find`,`not found`,` Not Found`)
+**/
+;
+
+
+delete from /test/malert_status_memdb with version ;
+/**
+onerror(continue,`not exist`,`not find`,`not found`,` Not Found`)
+**/
+;
+
+delete from /test/malert_status_cache with version ;
+/**
+onerror(continue,`not exist`,`not find`,`not found`,` Not Found`)
+**/
+;
+        
+delete from /test/malert_status_seq with version ;
+/**
+onerror(continue,`not exist`,`not find`,`not found`,` Not Found`)
+**/
+;

File diff suppressed because it is too large
+ 7 - 0
odbctest/mql/basic/30conflict/11data.mql


+ 7 - 0
odbctest/mql/basic/30conflict/14update_tags.mql

@@ -27,3 +27,10 @@ fork(a)
 wait(a)
 sleep(2s)
 **/;
+
+select tags FROM /test/alert_status refresh
+/**
+output()
+matchcount("tags.len",1,4)
+**/
+;

+ 2 - 6
odbctest/mql/basic/30conflict/15concur.mql

@@ -1,12 +1,8 @@
 
-
-
-
-
 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
 /**
-loop(10000)
-parallel(1000)
+loop(1000)
+parallel(100)
 beforerun(
     set(ct,now),
     add(ct,1,second),

+ 8 - 0
odbctest/mql/basic/30conflict/20valid.mql

@@ -16,3 +16,11 @@ output()
 matchcount("tags.len",1,4)
 **/
 ;
+
+select id, identifier, lastoccurrence from /test/alert_status
+where severity < 1 and manager=? and lastoccurrence > 1622249714000
+/**
+output()
+params(nil)
+**/
+;

+ 0 - 9
odbctest/mql/basic/30conflict/23valid.mql

@@ -1,9 +0,0 @@
-
-
-select id, identifier, lastoccurrence from /test/alert_status
-where severity < 1 and manager=? and lastoccurrence > 1622249714000
-/**
-output()
-params(nil)
-**/
-;