Commit 1786c44
authored
Fix: Babelfish: Connection with -U/-d flags fails for truncated identifiers (#4837)
Fix TDS login and database context handling for identifiers that exceed
PostgreSQL NAMEDATALEN (64 chars). TSQL allows up to 128 character login
and database names which are truncated using clip + MD5 hash.
Add JDBC test coverage for long login names (lowercase, mixed case,
multibyte, boundary), long database names, and combined scenarios.
Each database is created and dropped individually to avoid connection
conflicts. Use terminate-tsql-conn to properly release connections.
Issues Resolved
BABEL-6457
Authored-by: Anju Bharti <abanju@amazon.com>1 parent 9afe403 commit 1786c44
44 files changed
Lines changed: 727 additions & 7 deletions
File tree
- contrib/babelfishpg_tds/src/backend/tds
- test
- JDBC
- expected
- input/ownership
- upgrade
- 15_10
- 15_12
- 15_13
- 15_14
- 15_15
- 15_17
- 15_18
- 15_19
- 15_3
- 15_4
- 15_5
- 15_6
- 15_7
- 15_8
- 16_10
- 16_11
- 16_13
- 16_14
- 16_15
- 16_1
- 16_2
- 16_3
- 16_4
- 16_6
- 16_8
- 16_9
- 17_10
- 17_11
- 17_4
- 17_5
- 17_6
- 17_7
- 17_9
- 18_3
- 18_4
- latest
- python/expected/pyodbc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1165 | 1205 | | |
1166 | 1206 | | |
1167 | 1207 | | |
| |||
1251 | 1291 | | |
1252 | 1292 | | |
1253 | 1293 | | |
1254 | | - | |
1255 | | - | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1256 | 1299 | | |
1257 | | - | |
1258 | | - | |
1259 | 1300 | | |
1260 | | - | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
1261 | 1307 | | |
1262 | 1308 | | |
1263 | 1309 | | |
| |||
2043 | 2089 | | |
2044 | 2090 | | |
2045 | 2091 | | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
2046 | 2095 | | |
2047 | 2096 | | |
2048 | 2097 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments