![]() With MySQL being our primary database platform, in D7 we implemented a workaround for SQLite but missed PostgreSQL and InnoDB 5.1.0 - 5.1.24. This has been reverted with MySQL #29157, so InnoDB again matches MyISAM starting with MySQL versions 5.1.24 and 5.5. ![]() In line with the ANSI SQL standard, both PostgreSQL and SQLite define "affected rows" as all rows matched by the query.įor MySQL, the definition however depends: While MyISAM always returned the number of rows that really had to be changed, on InnoDB it used to be the same, but starting with MySQL 5.1 this changed to returning all rows matched by the query. ![]() It turned out that PDO's number of affected rows was highly dependent on the database engine and therefore not reliable: When updating a database record in D7, according to the documentation UpdateQuery->execute() returned "the number of rows affected by the update", relying on PDO's return value.
0 Comments
Leave a Reply. |