Commit e835807
committed
Fix RAND() implementation and add plugin compatibility layer
- Translate parameter-less RAND() natively to SQLite for better performance
- Fix seeded RAND(N) to correctly delegate to the PHP UDF, resolving a TypeError
- Update rand() UDF to return a float (0.0-1.0) and support optional seeds
- Add plugin compatibility integration (integrations/plugin-compatibility/)
to strip FOR UPDATE/SKIP LOCKED/NOWAIT and rewrite Action Scheduler queries
- Update RAND() test metadata to reflect correct DOUBLE return type1 parent 783790c commit e835807
5 files changed
Lines changed: 84 additions & 11 deletions
File tree
- integrations/plugin-compatibility
- tests
- wp-includes
- sqlite-ast
- sqlite
| 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 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9068 | 9068 | | |
9069 | 9069 | | |
9070 | 9070 | | |
9071 | | - | |
9072 | | - | |
9073 | | - | |
| 9071 | + | |
| 9072 | + | |
9074 | 9073 | | |
9075 | 9074 | | |
9076 | 9075 | | |
9077 | | - | |
9078 | | - | |
| 9076 | + | |
| 9077 | + | |
9079 | 9078 | | |
9080 | 9079 | | |
9081 | 9080 | | |
| |||
9084 | 9083 | | |
9085 | 9084 | | |
9086 | 9085 | | |
9087 | | - | |
| 9086 | + | |
9088 | 9087 | | |
9089 | 9088 | | |
9090 | 9089 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4287 | 4287 | | |
4288 | 4288 | | |
4289 | 4289 | | |
| 4290 | + | |
| 4291 | + | |
| 4292 | + | |
| 4293 | + | |
4290 | 4294 | | |
4291 | | - | |
| 4295 | + | |
4292 | 4296 | | |
4293 | | - | |
| 4297 | + | |
4294 | 4298 | | |
4295 | 4299 | | |
4296 | 4300 | | |
| |||
4366 | 4370 | | |
4367 | 4371 | | |
4368 | 4372 | | |
| 4373 | + | |
| 4374 | + | |
| 4375 | + | |
| 4376 | + | |
| 4377 | + | |
| 4378 | + | |
4369 | 4379 | | |
4370 | 4380 | | |
4371 | 4381 | | |
| |||
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
180 | 182 | | |
181 | | - | |
182 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
0 commit comments