OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 LOG_ERROR("Unable to set new version in database"); | 71 LOG_ERROR("Unable to set new version in database"); |
72 m_sqlError = SQLError::create(SQLError::UNKNOWN_ERR, "unable to set new
version in database"); | 72 m_sqlError = SQLError::create(SQLError::UNKNOWN_ERR, "unable to set new
version in database"); |
73 return false; | 73 return false; |
74 } | 74 } |
75 | 75 |
76 transaction->database()->setExpectedVersion(m_newVersion); | 76 transaction->database()->setExpectedVersion(m_newVersion); |
77 | 77 |
78 return true; | 78 return true; |
79 } | 79 } |
80 | 80 |
| 81 void ChangeVersionWrapper::handleCommitFailedAfterPostflight(SQLTransaction* tra
nsaction) |
| 82 { |
| 83 transaction->database()->setCachedVersion(m_oldVersion); |
| 84 } |
| 85 |
81 } // namespace WebCore | 86 } // namespace WebCore |
82 | 87 |
83 #endif // ENABLE(DATABASE) | 88 #endif // ENABLE(DATABASE) |
OLD | NEW |