Commit Graph

33 Commits

Author SHA1 Message Date
Ciro Spaciari
b616fe1db6 wip 2025-09-10 22:42:14 -07:00
Ciro Spaciari
324c72c537 more 2025-09-10 21:29:22 -07:00
Ciro Spaciari
019ccc338d queueMicrotask again 2025-09-10 21:18:02 -07:00
Ciro Spaciari
477aa56aa4 Ciro/fix onclose refactor (#22556)
### What does this PR do?

### How did you verify your code works?
2025-09-10 16:20:51 -07:00
Jarred Sumner
1a5660ba39 Merge branch 'main' into ciro/fix-onclose 2025-09-10 00:32:56 -07:00
Jarred Sumner
e1505b7143 Use JSC::Integrity:: auditCellFully in bindings (#22538)
### What does this PR do?

### How did you verify your code works?
2025-09-10 00:31:54 -07:00
Ciro Spaciari
8eb6b933b6 revert this 2025-09-09 22:56:10 -07:00
Ciro Spaciari
7d7c3daccf more 2025-09-09 22:50:21 -07:00
Ciro Spaciari
75fde6ce45 more 2025-09-09 21:48:55 -07:00
Ciro Spaciari
6d789e2eb7 opsie 2025-09-09 21:11:23 -07:00
Ciro Spaciari
09099b3747 test without microtask 2025-09-09 21:10:40 -07:00
taylor.fish
edf13bd91d Refactor BabyList (#22502)
(For internal tracking: fixes STAB-1129, STAB-1145, STAB-1146,
STAB-1150, STAB-1126, STAB-1147, STAB-1148, STAB-1149, STAB-1158)

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2025-09-09 20:41:10 -07:00
Ciro Spaciari
ec1fc80111 use bool instead of i32 here 2025-09-09 20:24:01 -07:00
Ciro Spaciari
054de551c2 maybe2 2025-09-09 19:42:46 -07:00
Ciro Spaciari
38a798baa8 maybe 2025-09-09 19:40:27 -07:00
Ciro Spaciari
08f3270203 dont timeout when disconnected 2025-09-09 17:38:00 -07:00
Ciro Spaciari
c4996b2d99 more 2025-09-09 17:30:24 -07:00
Ciro Spaciari
fa0febc520 opsie 2025-09-09 17:02:30 -07:00
Ciro Spaciari
f1a52633a3 opsie 2025-09-09 16:56:59 -07:00
Ciro Spaciari
b778121cf1 ok 2025-09-09 16:50:12 -07:00
Ciro Spaciari
3e84a2964d ensureStillAlive 2025-09-09 16:30:54 -07:00
Ciro Spaciari
7753820bd6 delay clos 2025-09-09 16:23:21 -07:00
Ciro Spaciari
c5fbe102e2 opsie 2025-09-09 15:16:39 -07:00
Ciro Spaciari
3d053712d4 more consistent 2025-09-09 15:06:12 -07:00
Ciro Spaciari
edeca4602d dont pass zero 2025-09-09 15:00:02 -07:00
Ciro Spaciari
f424308a31 fix disconnect inside finalie 2025-09-09 13:49:39 -07:00
Ciro Spaciari
6f125e0375 toError 2025-09-08 19:43:40 -07:00
Ciro Spaciari
4654a8a886 dont override this let it use binded value 2025-09-08 15:28:35 -07:00
Ciro Spaciari
b79bbfe289 fix(Bun.SQL) fix SSLRequest (#22378)
### What does this PR do?
Fixes https://github.com/oven-sh/bun/issues/22312
Fixes https://github.com/oven-sh/bun/issues/22313

The correct flow for TLS handshaking is:

Server sending
[Protocol::Handshake](https://dev.mysql.com/doc/dev/mysql-server/8.4.5/page_protocol_connection_phase_packets_protocol_handshake.html)
Client replying with
[Protocol::SSLRequest:](https://dev.mysql.com/doc/dev/mysql-server/8.4.5/page_protocol_connection_phase_packets_protocol_ssl_request.html)
The usual SSL exchange leading to establishing SSL connection
Client sends
[Protocol::HandshakeResponse:](https://dev.mysql.com/doc/dev/mysql-server/8.4.5/page_protocol_connection_phase_packets_protocol_handshake_response.html)

<img width="460" height="305" alt="Screenshot 2025-09-03 at 15 02 25"
src="https://github.com/user-attachments/assets/091bbc54-75bc-44ac-98b8-5996e8d69ed8"
/>

Source:
https://dev.mysql.com/doc/dev/mysql-server/8.4.5/page_protocol_connection_phase.html

### How did you verify your code works?
Tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-03 18:59:15 -07:00
Ciro Spaciari
1085908386 fix(Bun.SQL) MYSQL fix old auth and auth switch + add lastInsertRowid and affectedRows (#22132)
### What does this PR do?

add `lastInsertRowid` (matching SQLite)
add `affectedRows`
fix `mysql_native_password` deprecated authentication
fix AuthSwitch
Fixes:
https://github.com/oven-sh/bun/issues/22178#issuecomment-3228716080
### How did you verify your code works?
tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-08-29 01:03:17 -07:00
taylor.fish
437e15bae5 Replace catch bun.outOfMemory() with safer alternatives (#22141)
Replace `catch bun.outOfMemory()`, which can accidentally catch
non-OOM-related errors, with either `bun.handleOom` or a manual `catch
|err| switch (err)`.

(For internal tracking: fixes STAB-1070)

---------

Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2025-08-26 12:50:25 -07:00
Ciro Spaciari
26c0f324f8 improve(MySQL) optimize queue to skip running queries (#22136)
### What does this PR do?
optimize advance method
after this optimizations
100k req the query bellow in 1 connection takes 792ms instead of 6s
```sql
SELECT CAST(1 AS UNSIGNED) AS x
```
1mi req of the query bellow with 10 connections takes 57.41s - 62.5s
instead of 162.50s, mysql2 takes 1516.94s for comparison
```sql
SELECT * FROM users_bun_bench LIMIT 100
```

### How did you verify your code works?
Tested and benchmarked + CI
2025-08-25 21:12:12 -07:00
Ciro Spaciari
ecbf103bf5 feat(MYSQL) Bun.SQL mysql support (#21968)
### What does this PR do?
Add MySQL support, Refactor will be in a followup PR
### How did you verify your code works?
A lot of tests

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cirospaciari <6379399+cirospaciari@users.noreply.github.com>
2025-08-21 15:28:15 -07:00