Commit a542476
authored
Three root causes fixed:
1. Query serialization (OracleConnection.swift)
OracleNIO doesn't support concurrent queries on a single connection.
Add QueryGate actor to serialize all executeQuery calls, preventing
state-machine corruption when fetchColumns/fetchForeignKeys run in
parallel with the main query.
2. Remove DBMS_METADATA.GET_DDL (OraclePlugin.swift)
GET_DDL with wrong object type (e.g. 'TABLE' for a materialized view)
triggers ORA-31603, which corrupts OracleNIO's channel handler state.
Build DDL manually from column info instead.
3. Remove DATA_DEFAULT from column queries (OraclePlugin.swift)
DATA_DEFAULT in ALL_TAB_COLUMNS is LONG type. OracleNIO crashes when
decoding non-NULL LONG values. Also use DBMS_METADATA.GET_DDL('VIEW')
for fetchViewDefinition, and add view fallback in fetchTableMetadata.
Note: OracleNIO 1.0.0-rc.4 has a force-unwrap bug at
OracleChannelHandler.swift:441 (self.rowStream!) that requires a
library-level patch — tracked separately for upstream fix.
1 parent 674944a commit a542476
File tree
2 files changed
+46
-16
lines changed- Plugins/OracleDriverPlugin
2 files changed
+46
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
42 | 68 | | |
43 | 69 | | |
44 | 70 | | |
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
| 74 | + | |
48 | 75 | | |
49 | 76 | | |
50 | 77 | | |
| |||
143 | 170 | | |
144 | 171 | | |
145 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
146 | 177 | | |
147 | 178 | | |
148 | 179 | | |
| |||
183 | 214 | | |
184 | 215 | | |
185 | 216 | | |
| 217 | + | |
186 | 218 | | |
187 | 219 | | |
188 | 220 | | |
| |||
192 | 224 | | |
193 | 225 | | |
194 | 226 | | |
| 227 | + | |
195 | 228 | | |
196 | 229 | | |
| 230 | + | |
197 | 231 | | |
198 | 232 | | |
| 233 | + | |
199 | 234 | | |
200 | 235 | | |
| 236 | + | |
201 | 237 | | |
202 | 238 | | |
203 | 239 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
405 | 404 | | |
406 | 405 | | |
407 | 406 | | |
| |||
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | | - | |
428 | | - | |
| 426 | + | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
| |||
434 | 432 | | |
435 | 433 | | |
436 | 434 | | |
437 | | - | |
| 435 | + | |
438 | 436 | | |
439 | 437 | | |
440 | 438 | | |
| |||
509 | 507 | | |
510 | 508 | | |
511 | 509 | | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
521 | 514 | | |
522 | 515 | | |
523 | 516 | | |
| |||
535 | 528 | | |
536 | 529 | | |
537 | 530 | | |
538 | | - | |
539 | | - | |
540 | | - | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
541 | 535 | | |
542 | 536 | | |
543 | 537 | | |
| |||
0 commit comments