|
|
@ -193,7 +193,7 @@ public abstract class RedissonObject implements RObject {
|
|
|
|
List<Object> args = new LinkedList<>();
|
|
|
|
List<Object> args = new LinkedList<>();
|
|
|
|
args.add(keys.get(0));
|
|
|
|
args.add(keys.get(0));
|
|
|
|
args.add(keys.get(1));
|
|
|
|
args.add(keys.get(1));
|
|
|
|
if (database > 0) {
|
|
|
|
if (database >= 0) {
|
|
|
|
args.add("DB");
|
|
|
|
args.add("DB");
|
|
|
|
args.add(database);
|
|
|
|
args.add(database);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -213,11 +213,12 @@ public abstract class RedissonObject implements RObject {
|
|
|
|
+ "else "
|
|
|
|
+ "else "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'db', ARGV[1]); "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'db', ARGV[1]); "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
|
|
|
|
+ "if ARGV[2] == '1' then "
|
|
|
|
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'replace'); "
|
|
|
|
|
|
|
|
+ "else "
|
|
|
|
+ "else "
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j]); "
|
|
|
|
+ "if ARGV[2] == '1' then "
|
|
|
|
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j], 'replace'); "
|
|
|
|
|
|
|
|
+ "else "
|
|
|
|
|
|
|
|
+ "res = res + redis.call('copy', KEYS[j], KEYS[newKeysIndex + j]); "
|
|
|
|
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "end; "
|
|
|
|
+ "return math.min(res, 1); ",
|
|
|
|
+ "return math.min(res, 1); ",
|
|
|
|