- Notifications
You must be signed in to change notification settings - Fork5
Commitb08e86d
committed
The attached patch fixes problems with the JDBC driver handling long
null terminated strings. The FE/BE protocol sends in some cases nullterminated strings to the client. The docs for the FE/BE protocol statethat there is no limit on the size of a null terminated string sent tothe client and a client should be coded using an expanding buffer todeal with large strings. The old code did not do this and gave an errorif a null terminated string was greater than either 4 or 8K. It appearsthat with the advent of TOAST very long SQL statements are becoming morecommon, and apparently some error messages from the backend include theSQL statement thus easily exceeding the 8K limit in the old code.In fixing I also cleaned up some calls in the JDBC fastpath code thatwere not doing character set conversion under multibyte, and removedsome methods that were no longer needed. I also removed a potentialthreading problem with a shared variable that was being used inConnection.java.Thanks to Steve Wampler for discovering the problem and sending theinitial diffs that were the basis of this patch.thanks,--Barry1 parent4046e58 commitb08e86d
File tree
3 files changed
+35
-68
lines changed- src/interfaces/jdbc/org/postgresql
- fastpath
3 files changed
+35
-68
lines changedLines changed: 10 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 | 85 |
| |
91 | 86 |
| |
92 | 87 |
| |
| |||
167 | 162 |
| |
168 | 163 |
| |
169 | 164 |
| |
170 |
| - | |
171 |
| - | |
| 165 | + | |
172 | 166 |
| |
173 | 167 |
| |
174 | 168 |
| |
| |||
238 | 232 |
| |
239 | 233 |
| |
240 | 234 |
| |
241 |
| - | |
242 |
| - | |
| 235 | + | |
243 | 236 |
| |
244 | 237 |
| |
245 | 238 |
| |
| |||
251 | 244 |
| |
252 | 245 |
| |
253 | 246 |
| |
254 |
| - | |
| 247 | + | |
255 | 248 |
| |
256 | 249 |
| |
257 | 250 |
| |
| |||
491 | 484 |
| |
492 | 485 |
| |
493 | 486 |
| |
494 |
| - | |
| 487 | + | |
495 | 488 |
| |
496 | 489 |
| |
497 | 490 |
| |
| |||
502 | 495 |
| |
503 | 496 |
| |
504 | 497 |
| |
505 |
| - | |
| 498 | + | |
506 | 499 |
| |
507 | 500 |
| |
508 | 501 |
| |
| |||
544 | 537 |
| |
545 | 538 |
| |
546 | 539 |
| |
547 |
| - | |
| 540 | + | |
548 | 541 |
| |
549 | 542 |
| |
550 | 543 |
| |
| |||
559 | 552 |
| |
560 | 553 |
| |
561 | 554 |
| |
562 |
| - | |
| 555 | + | |
563 | 556 |
| |
564 | 557 |
| |
565 |
| - | |
| 558 | + | |
566 | 559 |
| |
567 | 560 |
| |
568 | 561 |
| |
| |||
595 | 588 |
| |
596 | 589 |
| |
597 | 590 |
| |
598 |
| - | |
| 591 | + | |
599 | 592 |
| |
600 | 593 |
| |
601 | 594 |
| |
|
Lines changed: 22 additions & 48 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
26 | 27 |
| |
27 | 28 |
| |
28 | 29 |
| |
| |||
200 | 201 |
| |
201 | 202 |
| |
202 | 203 |
| |
203 |
| - | |
204 |
| - | |
205 |
| - | |
| 204 | + | |
| 205 | + | |
206 | 206 |
| |
207 |
| - | |
208 |
| - | |
209 |
| - | |
210 |
| - | |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 |
| - | |
215 |
| - | |
216 |
| - | |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 |
| - | |
233 |
| - | |
234 |
| - | |
235 |
| - | |
236 |
| - | |
237 |
| - | |
238 |
| - | |
239 |
| - | |
240 |
| - | |
241 |
| - | |
242 | 207 |
| |
243 | 208 |
| |
244 |
| - | |
| 209 | + | |
245 | 210 |
| |
246 |
| - | |
| 211 | + | |
247 | 212 |
| |
248 | 213 |
| |
249 | 214 |
| |
250 |
| - | |
251 |
| - | |
252 |
| - | |
253 |
| - | |
254 |
| - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
255 | 221 |
| |
256 | 222 |
| |
257 | 223 |
| |
258 | 224 |
| |
259 | 225 |
| |
| 226 | + | |
260 | 227 |
| |
261 |
| - | |
| 228 | + | |
262 | 229 |
| |
263 | 230 |
| |
264 |
| - | |
265 |
| - | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
266 | 239 |
| |
267 | 240 |
| |
268 | 241 |
| |
| 242 | + | |
269 | 243 |
| |
270 | 244 |
| |
271 | 245 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
92 |
| - | |
| 92 | + | |
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| |||
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 |
| - | |
| 126 | + | |
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
| 131 | + | |
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
|
0 commit comments
Comments
(0)