File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -3778,6 +3778,7 @@ mariadb_st_prepare_sv(
3778
3778
imp_sth -> done_desc = FALSE;
3779
3779
imp_sth -> result = NULL ;
3780
3780
imp_sth -> currow = 0 ;
3781
+ imp_sth -> row_num = 0 ;
3781
3782
3782
3783
if (DBIc_TRACE_LEVEL (imp_xxh ) >= 2 )
3783
3784
PerlIO_printf (DBIc_LOGPIO (imp_xxh ),
@@ -4127,6 +4128,9 @@ bool mariadb_st_more_results(SV* sth, imp_sth_t* imp_sth)
4127
4128
imp_sth -> result = NULL ;
4128
4129
}
4129
4130
4131
+ imp_sth -> currow = 0 ;
4132
+ imp_sth -> row_num = 0 ;
4133
+
4130
4134
if (DBIc_ACTIVE (imp_sth ))
4131
4135
DBIc_ACTIVE_off (imp_sth );
4132
4136
@@ -4169,10 +4173,10 @@ bool mariadb_st_more_results(SV* sth, imp_sth_t* imp_sth)
4169
4173
return FALSE;
4170
4174
}
4171
4175
4172
- imp_sth -> row_num = mysql_affected_rows (imp_dbh -> pmysql );
4173
-
4174
4176
if (imp_sth -> result == NULL )
4175
4177
{
4178
+ imp_sth -> row_num = mysql_affected_rows (imp_dbh -> pmysql );
4179
+
4176
4180
imp_dbh -> insertid = imp_sth -> insertid = mysql_insert_id (imp_dbh -> pmysql );
4177
4181
/* No "real" rowset*/
4178
4182
DBIS -> set_attr_k (sth , sv_2mortal (newSVpvs ("NUM_OF_FIELDS" )), 0 ,
@@ -4182,8 +4186,7 @@ bool mariadb_st_more_results(SV* sth, imp_sth_t* imp_sth)
4182
4186
else
4183
4187
{
4184
4188
/* We have a new rowset */
4185
- imp_sth -> currow = 0 ;
4186
-
4189
+ imp_sth -> row_num = mysql_num_rows (imp_sth -> result );
4187
4190
4188
4191
/* delete cached handle attributes */
4189
4192
/* XXX should be driven by a list to ease maintenance */
You can’t perform that action at this time.
0 commit comments