SQLResultSet.rowsAffected not cleared
https://bugs.webkit.org/show_bug.cgi?id=46070

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-10
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

SQLResultSet.rowsAffected is supposed to return the number
of rows that were changed by the statement. For "SELECT"
statements, it should return 0.

However, our implementation currently relies on sqlite3_changes()
to compute this value. sqlite3_changes() returns the number of
direct row changes in the most recent INSERT, UPDATE, or DELETE
statement within the same trigger context. Unfortunately, the
most recent INSERT, UPDATE, or DELETE statement may not be the
last statement. As a consequence, if you INSERT 1 row, then
do a SELECT, SQLResultSet.rowsAffected will be 1 for both the
INSERT and the SELECT statements.

The proposed solution is to use sqlite3_total_changes() instead
of sqlite3_changes(). sqlite3_total_changes() returns the number
of row changes caused by INSERT, UPDATE or DELETE statements since
the database connection was opened. We now store the value
returned by sqlite3_total_changes() before each statement in
order to return the count difference in
SQLiteDatabase::lastChanges().

Test: storage/websql/execute-sql-rowsAffected.html

* platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::SQLiteDatabase):
(WebCore::SQLiteDatabase::updateLastChangesCount):
(WebCore):
(WebCore::SQLiteDatabase::lastChanges):
* platform/sql/SQLiteDatabase.h:
(SQLiteDatabase):
* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::step):

LayoutTests:

Add layout test to check that SQLResultSet.rowsAffected is
correct in executeSql() success callback.

* storage/websql/execute-sql-rowsAffected-expected.txt: Added.
* storage/websql/execute-sql-rowsAffected.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130891 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Update some pixel expectations for the new Cairo, and add more baselines for other tests.

* platform/efl/fast/block/positioning/vertical-rl/fixed-positioning-expected.png:
* platform/efl/fast/borders/border-radius-valid-border-clipping-expected.png: Added.
* platform/efl/fast/borders/border-shadow-large-radius-expected.png: Added.
* platform/efl/fast/borders/fieldsetBorderRadius-expected.png:
* platform/efl/fast/canvas/canvas-composite-fill-repaint-expected.png: Added.
* platform/efl/fast/canvas/canvas-imageSmoothingEnabled-patterns-expected.png: Added.
* platform/efl/fast/canvas/canvas-resize-after-paint-without-layout-expected.png: Added.
* platform/efl/fast/css/color-correction-on-text-expected.png: Removed.
* platform/efl/fast/css/color-correction-on-text-expected.txt: Removed.
* platform/efl/fast/css/square-button-appearance-expected.png: Added.
* platform/efl/fast/css/text-overflow-ellipsis-text-align-center-expected.png: Added.
* platform/efl/fast/css/text-overflow-ellipsis-text-align-justify-expected.png: Added.
* platform/efl/fast/css/text-overflow-ellipsis-text-align-left-expected.png: Added.
* platform/efl/fast/css/text-overflow-ellipsis-text-align-right-expected.png: Added.
* platform/efl/fast/css/vertical-text-overflow-ellipsis-text-align-center-expected.png: Added.
* platform/efl/fast/css/vertical-text-overflow-ellipsis-text-align-justify-expected.png: Added.
* platform/efl/fast/css/vertical-text-overflow-ellipsis-text-align-left-expected.png: Added.
* platform/efl/fast/css/vertical-text-overflow-ellipsis-text-align-right-expected.png: Added.
* platform/efl/fast/events/context-no-deselect-expected.png: Added.
* platform/efl/fast/forms/datalist/input-appearance-range-with-padding-with-datalist-expected.png: Added.
* platform/efl/fast/forms/datalist/input-appearance-range-with-transform-expected.png: Added.
* platform/efl/fast/forms/input-placeholder-paint-order-expected.png: Added.
* platform/efl/fast/forms/textarea: Added.
* platform/efl/fast/forms/textarea/textarea-placeholder-paint-order-expected.png: Added.
* platform/efl/fast/gradients/border-image-gradient-sides-and-corners-expected.png: Added.
* platform/efl/fast/html/details-marker-style-expected.png: Added.
* platform/efl/fast/images/image-css3-content-data-expected.png: Added.
* platform/efl/fast/images/imagemap-focus-ring-zoom-expected.png: Added.
* platform/efl/fast/images/paint-subrect-expected.png: Added.
* platform/efl/fast/images/paint-subrect-grid-expected.png: Added.
* platform/efl/fast/images/repaint-subrect-grid-expected.png: Added.
* platform/efl/fast/images/rgb-jpeg-with-adobe-marker-only-expected.png: Added.
* platform/efl/fast/images/rgb-png-with-cmyk-color-profile-expected.png: Added.
* platform/efl/fast/images/ycbcr-with-cmyk-color-profile-expected.png: Added.
* platform/efl/fast/js: Added.
* platform/efl/fast/js/exception-linenums-in-html-3-expected.png: Added.
* platform/efl/fast/js/missing-style-end-tag-js-expected.png: Added.
* platform/efl/fast/js/missing-title-end-tag-js-expected.png: Added.
* platform/efl/fast/layers/scroll-with-transform-composited-layer-expected.png: Added.
* platform/efl/fast/layers/scroll-with-transform-layer-expected.png: Added.
* platform/efl/fast/multicol/shrink-to-column-height-for-pagination-expected.png: Added.
* platform/efl/fast/multicol/shrink-to-column-height-for-pagination-expected.txt: Added.
* platform/efl/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-rl-expected.png: Added.
* platform/efl/fast/regions/webkit-flow-inlines-inside-regions-bounds-vertical-rl-expected.txt: Added.
* platform/efl/fast/repaint/overflow-auto-in-overflow-auto-scrolled-expected.png: Added.
* platform/efl/fast/repaint/overflow-scroll-in-overflow-scroll-scrolled-expected.png: Added.
* platform/efl/fast/repaint/table-overflow-auto-in-overflow-auto-scrolled-expected.png: Added.
* platform/efl/fast/repaint/table-overflow-hidden-in-overflow-hidden-scrolled-expected.png: Added.
* platform/efl/fast/repaint/table-overflow-scroll-in-overflow-scroll-scrolled-expected.png: Added.
* platform/efl/fast/scrolling: Added.
* platform/efl/fast/scrolling/scrollbar-tickmarks-styled-expected.png: Added.
* platform/efl/fast/table/colspanMinWidth-vertical-expected.png: Added.
* platform/efl/fast/table/table-row-focus-ring-paint-expected.png: Added.
* platform/efl/fast/text/text-shadow-no-default-color-expected.png: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130892 268f45cc-cd09-0410-ab3c-d52691b4dbfc