Skip to content

Commit 2753f6e

Browse files
kesmit13claude
andcommitted
Fix MYSQL_TYPE_NULL data pointer advancement in call_function_rowdat_1
The MYSQL_TYPE_NULL case in call_function_rowdat_1 was missing the `data += 1` advancement after reading the null flag byte. This caused data stream desynchronization for all subsequent columns and rows, leading to data corruption or crashes. The fix aligns with the existing behavior in load_rowdat_1 and load_rowdat_1_numpy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 548edcc commit 2753f6e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

accel.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4911,6 +4911,7 @@ static PyObject *call_function_accel(PyObject *self, PyObject *args, PyObject *k
49114911

49124912
switch (ctypes[i]) {
49134913
case MYSQL_TYPE_NULL:
4914+
data += 1;
49144915
Py_INCREF(Py_None);
49154916
CHECKRC(PyTuple_SetItem(py_row, i, Py_None));
49164917
break;

0 commit comments

Comments
 (0)