public inbox for [email protected]
help / color / mirror / Atom feedFrom: Huang, Jun <[email protected]>
To: [email protected] <[email protected]>
Subject: There is an error when checking the major version of servers in schema diff
Date: Sun, 17 Jan 2021 12:58:32 +0000
Message-ID: <436f7edcc84e463fac5ed65866dc5ee3@G08CNEXMBPEKD06.g08.fujitsu.local> (raw)
Hi,
The function get_round_val() outputs the wrong value when major version is before 10.
For example,
Source server version: 90500
Target server version: 90502
Or
Source server version: 90502
Target server version: 90602
The attached patch shows the changes.
--
Thanks && regards
HuangJ
Attachments:
[application/octet-stream] check-major-version-of-servers.patch (577B, 2-check-major-version-of-servers.patch)
download | inline diff:
diff --git a/web/pgadmin/tools/schema_diff/__init__.py b/web/pgadmin/tools/schema_diff/__init__.py
index 7ca19d2d2..596b976ad 100644
--- a/web/pgadmin/tools/schema_diff/__init__.py
+++ b/web/pgadmin/tools/schema_diff/__init__.py
@@ -720,8 +720,8 @@ def check_version_compatibility(sid, tid):
'Advanced Server.')
def get_round_val(x):
- if x < 10000:
- return x if x % 100 == 0 else x + 100 - x % 100
+ if x < 100000:
+ return x + 100 - x % 100
else:
return x + 10000 - x % 10000
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: There is an error when checking the major version of servers in schema diff
In-Reply-To: <436f7edcc84e463fac5ed65866dc5ee3@G08CNEXMBPEKD06.g08.fujitsu.local>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox