<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>20219</bug_id>
          
          <creation_ts>2008-07-29 20:44:31 -0700</creation_ts>
          <short_desc>Databases pane doesn&apos;t recognize table creation/deletion</short_desc>
          <delta_ts>2019-08-09 14:13:45 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://webkit.org/misc/DatabaseExample.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Lilek">dev+webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aroben</cc>
    
    <cc>cjerdonek</cc>
    
    <cc>commit-queue</cc>
    
    <cc>dbates</cc>
    
    <cc>eric</cc>
    
    <cc>jmonte03</cc>
    
    <cc>joepeck</cc>
    
    <cc>mjs</cc>
    
    <cc>timothy</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87347</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Lilek">dev+webkit</who>
    <bug_when>2008-07-29 20:44:31 -0700</bug_when>
    <thetext>The Inspector&apos;s Databases panel doesn&apos;t recognize when a table is created or deleted.

1. Load &lt;http://webkit.org/misc/DatabaseExample.html&gt;
2. Open the Inspector and switch to the Databases panel
3. Expand the NoteTest database (notice the WebKitStickyNotes table) and then focus it
4. Enter the following in the db console: DROP TABLE WebKitStickyNotes

The WebKitStickyNotes table should disappear from the sidebar, instead, clicking on it brings up the stale datagrid and switching again gives an error that the table could not be read.  Two empty error lines are also added to the global console.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126502</commentid>
    <comment_count>1</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2009-06-17 11:19:21 -0700</bug_when>
    <thetext>CREATE/DELETE table statements aren&apos;t working at all at the moment in r44702:

  &gt; CREATE TABLE x (id REAL);
  An unexpected error 0 occured.
  &gt; DROP TABLE WebKitStickyNotes
  An unexpected error 0 occured.

Its worth mentioning that &quot;occured&quot; is a typo and should be spelled &quot;occurred&quot;!!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213670</commentid>
    <comment_count>2</comment_count>
      <attachid>53610</attachid>
    <who name="Juan C. Montemayor E">jmonte03</who>
    <bug_when>2010-04-17 14:53:46 -0700</bug_when>
    <thetext>Created attachment 53610
Proposed patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213673</commentid>
    <comment_count>3</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-04-17 14:58:11 -0700</bug_when>
    <thetext>Attachment 53610 did not pass style-queue:

Failed to run &quot;WebKitTools/Scripts/check-webkit-style&quot; exit_code: 1
Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213677</commentid>
    <comment_count>4</comment_count>
      <attachid>53610</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 15:18:39 -0700</bug_when>
    <thetext>Comment on attachment 53610
Proposed patch.

Looks good. I haven&apos;t actually tried it locally yet but it looks simple enough. Some minor issues that would need to be fixed in order for this to get accepted.


&gt; +2010-04-17  Juan C. Montemayor  &lt;jmonte03@cs.tufts.edu&gt;
&gt; +
&gt; +        Reviewed by NOBODY (OOPS!).
&gt; +
&gt; +        Bug 20219 - Databases pane doesn&apos;t recognize table creation/deletion
&gt; +        https://bugs.webkit.org/show_bug.cgi?id=20219

Nit: prepare-ChangeLog should not have added the &quot;Bug 20219&quot; part, because the link itself has that. You can remove that text.


&gt;      _queryFinished: function(query, result)
&gt;      {
&gt;          var dataGrid = WebInspector.panels.storage.dataGridForResult(result);
&gt; -        if (!dataGrid)
&gt; -            return;
&gt; +        
&gt; +        if(dataGrid){
&gt;          dataGrid.element.addStyleClass(&quot;inline&quot;);
&gt;          this._appendQueryResult(query, dataGrid.element);
&gt;          dataGrid.autoSizeColumns(5);
&gt; +        }

The code inside the if should be indented (4 spaces) as per the style guidelines:
http://webkit.org/coding/coding-style.html


&gt;          if (query.match(/^create /i) || query.match(/^drop table /i))
&gt;              WebInspector.panels.storage.updateDatabaseTables(this.database);
&gt; +
&gt; +        if(!dataGrid)
&gt; +            return;
&gt; +

No need to move this code here, since its the end of the function anyways. The code can just be deleted.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213685</commentid>
    <comment_count>5</comment_count>
      <attachid>53617</attachid>
    <who name="Juan C. Montemayor E">jmonte03</who>
    <bug_when>2010-04-17 15:53:40 -0700</bug_when>
    <thetext>Created attachment 53617
Proposed patch (updated)

Thanks Joseph for the comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213686</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-04-17 15:57:02 -0700</bug_when>
    <thetext>Attachment 53617 did not pass style-queue:

Failed to run &quot;WebKitTools/Scripts/check-webkit-style&quot; exit_code: 1
Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213689</commentid>
    <comment_count>7</comment_count>
      <attachid>53617</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 16:29:26 -0700</bug_when>
    <thetext>Comment on attachment 53617
Proposed patch (updated)

&gt; +2010-04-17  Juan C. Montemayor  &lt;jmonte03@cs.tufts.edu&gt;
&gt; +
&gt; +        Reviewed by NOBODY (OOPS!).
&gt; +
&gt; +        Databases pane doesn&apos;t recognize table creation/deletion
&gt; +
&gt; +        https://bugs.webkit.org/show_bug.cgi?id=20219

Nit: Its preferred that you don&apos;t have this newline.

	
&gt;      _queryFinished: function(query, result)
&gt;      {
&gt;          var dataGrid = WebInspector.panels.storage.dataGridForResult(result);
&gt; -        if (!dataGrid)
&gt; -            return;
&gt; -        dataGrid.element.addStyleClass(&quot;inline&quot;);
&gt; -        this._appendQueryResult(query, dataGrid.element);
&gt; -        dataGrid.autoSizeColumns(5);
&gt; +        
&gt; +        if(dataGrid){
&gt; +            dataGrid.element.addStyleClass(&quot;inline&quot;);
&gt; +            this._appendQueryResult(query, dataGrid.element);
&gt; +            dataGrid.autoSizeColumns(5);
&gt; +        }

Nit: Trailing whitespace (like that empty line) is a pet peeve of mine. In fact, the blank here isn&apos;t needed and can be removed.


&gt;          if (query.match(/^create /i) || query.match(/^drop table /i))
&gt;              WebInspector.panels.storage.updateDatabaseTables(this.database);

You should also update this code. If the user input has leading whitespace these regex&apos;s don&apos;t match. Could you update this so it is something like the following:

    var trimmedQuery = query.trim();
    if (trimmedQuery.match(/^create /i) || trimmedQuery.match(/^drop table /i))
        WebInspector.panels.storage.updateDatabaseTables(this.database);

Or better yet, trim the query somewhere earlier on (like as soon as we get the user input) so mistakes like this will pop up less frequently.

r+ if you make these changes!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213690</commentid>
    <comment_count>8</comment_count>
      <attachid>53618</attachid>
    <who name="Juan C. Montemayor E">jmonte03</who>
    <bug_when>2010-04-17 16:53:50 -0700</bug_when>
    <thetext>Created attachment 53618
Proposed patch (updated, v2)

I hope I got rid of all the unwanted whitespace that was mentioned. However, I separated the variables from the if statements, *hopefully* a good idea. Let me know.

I also made the changes you suggested replacing query with trimmedQuery.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213691</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2010-04-17 16:57:51 -0700</bug_when>
    <thetext>Attachment 53618 did not pass style-queue:

Failed to run &quot;WebKitTools/Scripts/check-webkit-style&quot; exit_code: 1
Total errors found: 0 in 0 files


If any of these errors are false positives, please file a bug against check-webkit-style.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213692</commentid>
    <comment_count>10</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 17:01:27 -0700</bug_when>
    <thetext>Aha. I see why the style bot is yelling. Because you&apos;re using tabs and not spaces! Sorry I didn&apos;t notice this before.

You have some options. Either I can land this patch for you (keeping you in the ChangeLog so you get credit of course) or you can replace the tabs with 4 spaces. Do you have a preference?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213693</commentid>
    <comment_count>11</comment_count>
      <attachid>53619</attachid>
    <who name="Juan C. Montemayor E">jmonte03</who>
    <bug_when>2010-04-17 17:03:14 -0700</bug_when>
    <thetext>Created attachment 53619
Proposed patch (updated, v3)

Removed a rogue tab character. Sorry for overlooking this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213694</commentid>
    <comment_count>12</comment_count>
      <attachid>53619</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 17:06:04 -0700</bug_when>
    <thetext>Comment on attachment 53619
Proposed patch (updated, v3)

Excellent. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213696</commentid>
    <comment_count>13</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 17:09:24 -0700</bug_when>
    <thetext>Ahh, it looks like I just missed you in IRC. You can always join #webkit or #webkit-inspector if you want to talk directly to someone. I am JoePeck!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213705</commentid>
    <comment_count>14</comment_count>
      <attachid>53619</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-04-17 19:44:24 -0700</bug_when>
    <thetext>Comment on attachment 53619
Proposed patch (updated, v3)

Rejecting patch 53619 from commit-queue.

Found no modified ChangeLogs, cannot create a commit message.
All changes require a ChangeLog.  See:
http://webkit.org/coding/contributing.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213712</commentid>
    <comment_count>15</comment_count>
      <attachid>53619</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 21:58:41 -0700</bug_when>
    <thetext>Comment on attachment 53619
Proposed patch (updated, v3)

&gt; diff --git WebCore/ChangeLog WebCore/ChangeLog
&gt; index e0aa101..082f4f6 100644
&gt; --- WebCore/ChangeLog
&gt; +++ WebCore/ChangeLog

Very Interesting. I haven&apos;t seen a git patch like this before. Juan, what version of git are you using? I would recommend using at least version 1.6.2. Although the diff is correct, the output should actually look like this. Note that line 2 is irrelevant, its the &quot;a/&quot; and &quot;b/&quot; that are missing that worry me and confused the bot.

&gt; diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
&gt; index de3b493..9e5ed89 100644
&gt; --- a/WebCore/ChangeLog
&gt; +++ b/WebCore/ChangeLog

I am going to land this manually, and I&apos;ll put a patch up of what I landed (identical to Juan&apos;s but with a style change and usable by git in the future).

Weird!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213713</commentid>
    <comment_count>16</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 22:04:33 -0700</bug_when>
    <thetext>Nicely done Juan!

Committed r57789
    M    WebCore/ChangeLog
    M    WebCore/inspector/front-end/DatabaseQueryView.js
r57789 = e794dcd6652a60d068b39acb7df614d34952aa19 (trunk)
http://trac.webkit.org/changeset/57789</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213714</commentid>
    <comment_count>17</comment_count>
      <attachid>53624</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 22:05:41 -0700</bug_when>
    <thetext>Created attachment 53624
[PATCH] Patch that Landed

This is the patch that landed. Attached for archival reasons.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213715</commentid>
    <comment_count>18</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-04-17 22:21:20 -0700</bug_when>
    <thetext>Chris or Dan might know if this is something svn-apply should support.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213716</commentid>
    <comment_count>19</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2010-04-17 22:29:32 -0700</bug_when>
    <thetext>I actually tried to manually apply this patch locally. First with `git apply` then with `svn-apply` and both failed. My guess is that this is an older form of git patch which we need not be concerned with.  But, I&apos;d love to hear more from others. Thanks for following up on this Eric!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213727</commentid>
    <comment_count>20</comment_count>
    <who name="Chris Jerdonek">cjerdonek</who>
    <bug_when>2010-04-18 02:01:06 -0700</bug_when>
    <thetext>(In reply to comment #15)
&gt; (From update of attachment 53619 [details])
&gt; &gt; diff --git WebCore/ChangeLog WebCore/ChangeLog
&gt; &gt; index e0aa101..082f4f6 100644
&gt; &gt; --- WebCore/ChangeLog
&gt; &gt; +++ WebCore/ChangeLog
&gt; 
&gt; Very Interesting. I haven&apos;t seen a git patch like this before. Juan, what
&gt; version of git are you using? I would recommend using at least version 1.6.2.
&gt; Although the diff is correct, the output should actually look like this. Note
&gt; that line 2 is irrelevant, its the &quot;a/&quot; and &quot;b/&quot; that are missing that worry me
&gt; and confused the bot.

This past change might be relevant:

https://bugs.webkit.org/show_bug.cgi?id=32820</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213790</commentid>
    <comment_count>21</comment_count>
    <who name="Juan C. Montemayor E">jmonte03</who>
    <bug_when>2010-04-18 13:23:46 -0700</bug_when>
    <thetext>Thanks for all your help guys. I was actually calling &quot;git diff --no-prefix &gt; file&quot;

I called git diff without the no-prefix flag and it now includes the &quot;a/&quot; and &quot;b/&quot;

Won&apos;t happen again!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213791</commentid>
    <comment_count>22</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-04-18 13:25:38 -0700</bug_when>
    <thetext>Seems we should fix our scripts to understand git diff --no-prefix diffs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>213792</commentid>
    <comment_count>23</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2010-04-18 13:26:15 -0700</bug_when>
    <thetext>Looks like we already have a bug on this.  bug 32438.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1560020</commentid>
    <comment_count>24</comment_count>
    <who name="Maciej Stachowiak">mjs</who>
    <bug_when>2019-08-09 14:13:45 -0700</bug_when>
    <thetext>*** Bug 200220 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>53610</attachid>
            <date>2010-04-17 14:53:46 -0700</date>
            <delta_ts>2010-04-17 15:53:40 -0700</delta_ts>
            <desc>Proposed patch.</desc>
            <filename>DatabaseQueryViewPatch.patch</filename>
            <type>text/plain</type>
            <size>1600</size>
            <attacher name="Juan C. Montemayor E">jmonte03</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBXZWJDb3JlL0NoYW5nZUxvZyBXZWJDb3JlL0NoYW5nZUxvZwppbmRleCBlMGFh
MTAxLi4xMmZhM2JjIDEwMDY0NAotLS0gV2ViQ29yZS9DaGFuZ2VMb2cKKysrIFdlYkNvcmUvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTQgQEAKKzIwMTAtMDQtMTcgIEp1YW4gQy4gTW9udGVtYXlvciAg
PGptb250ZTAzQGNzLnR1ZnRzLmVkdT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICBCdWcgMjAyMTkgLSBEYX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dyaWQgPSBXZWJJbnNwZWN0b3IucGFuZWxzLnN0b3Jh
Z2UuZGF0YUdyaWRGb3JSZXN1bHQocmVzdWx0KTsKLSAgICAgICAgaWYgKCFkYXRhR3JpZCkKLSAg
ICAgICAgICAgIHJldHVybjsKKyAgICAgICAgCisgICAgICAgIGlmKGRhdGFHcmlkKXsKICAgICAg
ICAgZGF0YUdyaWQuZWxlbWVudC5hZGRTdHlsZUNsYXNzKCJpbmxpbmUiKTsKICAgICAgICAgdGhp
cy5fYXBwZW5kUXVlcnlSZXN1bHQocXVlcnksIGRhdGFHcmlkLmVsZW1lbnQpOwogICAgICAgICBk
YXRhR3JpZC5hdXRvU2l6ZUNvbHVtbnMoNSk7CisgICAgICAgIH0KIAogICAgICAgICBpZiAocXVl
cnkubWF0Y2goL15jcmVhdGUgL2kpIHx8IHF1ZXJ5Lm1hdGNoKC9eZHJvcCB0YWJsZSAvaSkpCiAg
ICAgICAgICAgICBXZWJJbnNwZWN0b3IucGFuZWxzLnN0b3JhZ2UudXBkYXRlRGF0YWJhc2VUYWJs
ZXModGhpcy5kYXRhYmFzZSk7CisKKyAgICAgICAgaWYoIWRhdGFHcmlkKQorICAgICAgICAgICAg
cmV0dXJuOworCiAgICAgfSwKIAogICAgIF9xdWVyeUVycm9yOiBmdW5jdGlvbihxdWVyeSwgZXJy
b3IpCg==
</data>
<flag name="review"
          id="37376"
          type_id="1"
          status="-"
          setter="joepeck"
    />
          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>53617</attachid>
            <date>2010-04-17 15:53:40 -0700</date>
            <delta_ts>2010-04-17 16:53:50 -0700</delta_ts>
            <desc>Proposed patch (updated)</desc>
            <filename>DatabaseQueryViewPatch.patch</filename>
            <type>text/plain</type>
            <size>1578</size>
            <attacher name="Juan C. Montemayor E">jmonte03</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBXZWJDb3JlL0NoYW5nZUxvZyBXZWJDb3JlL0NoYW5nZU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NDAsMTEgKzE0MCwxMiBAQCBX
ZWJJbnNwZWN0b3IuRGF0YWJhc2VRdWVyeVZpZXcucHJvdG90eXBlID0gewogICAgIF9xdWVyeUZp
bmlzaGVkOiBmdW5jdGlvbihxdWVyeSwgcmVzdWx0KQogICAgIHsKICAgICAgICAgdmFyIGRhdGFH
cmlkID0gV2ViSW5zcGVjdG9yLnBhbmVscy5zdG9yYWdlLmRhdGFHcmlkRm9yUmVzdWx0KHJlc3Vs
dCk7Ci0gICAgICAgIGlmICghZGF0YUdyaWQpCi0gICAgICAgICAgICByZXR1cm47Ci0gICAgICAg
IGRhdGFHcmlkLmVsZW1lbnQuYWRkU3R5bGVDbGFzcygiaW5saW5lIik7Ci0gICAgICAgIHRoaXMu
X2FwcGVuZFF1ZXJ5UmVzdWx0KHF1ZXJ5LCBkYXRhR3JpZC5lbGVtZW50KTsKLSAgICAgICAgZGF0
YUdyaWQuYXV0b1NpemVDb2x1bW5zKDUpOworICAgICAgICAKKyAgICAgICAgaWYoZGF0YUdyaWQp
eworICAgICAgICAgICAgZGF0YUdyaWQuZWxlbWVudC5hZGRTdHlsZUNsYXNzKCJpbmxpbmUiKTsK
KyAgICAgICAgICAgIHRoaXMuX2FwcGVuZFF1ZXJ5UmVzdWx0KHF1ZXJ5LCBkYXRhR3JpZC5lbGVt
ZW50KTsKKyAgICAgICAgICAgIGRhdGFHcmlkLmF1dG9TaXplQ29sdW1ucyg1KTsKKyAgICAgICAg
fQogCiAgICAgICAgIGlmIChxdWVyeS5tYXRjaCgvXmNyZWF0ZSAvaSkgfHwgcXVlcnkubWF0Y2go
L15kcm9wIHRhYmxlIC9pKSkKICAgICAgICAgICAgIFdlYkluc3BlY3Rvci5wYW5lbHMuc3RvcmFn
ZS51cGRhdGVEYXRhYmFzZVRhYmxlcyh0aGlzLmRhdGFiYXNlKTsK
</data>
<flag name="review"
          id="37383"
          type_id="1"
          status="-"
          setter="joepeck"
    />
          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>53618</attachid>
            <date>2010-04-17 16:53:50 -0700</date>
            <delta_ts>2010-04-17 17:03:14 -0700</delta_ts>
            <desc>Proposed patch (updated, v2)</desc>
            <filename>DatabaseQueryViewPatch.patch</filename>
            <type>text/plain</type>
            <size>1708</size>
            <attacher name="Juan C. Montemayor E">jmonte03</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBXZWJDb3JlL0NoYW5nZUxvZyBXZWJDb3JlL0NoYW5nZUxvZwppbmRleCBlMGFh
MTAxLi4xOWU1YzBiIDEwMDY0NAotLS0gV2ViQ29yZS9DaGFuZ2VMb2cKKysrIFdlYkNvcmUvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTAtMDQtMTcgIEp1YW4gQy4gTW9udGVtYXlvciAg
PGptb250ZTAzQGNzLnR1ZnRzLmVkdT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICBEYXRhYmFzZXMgcGFuZSBkb2Vzbid0IHJlY29nbml6ZSB0YWJsZSBj
cmVhdGlvbi9kZWxldGlvbgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9MjAyMTkJCisKKyAgICAgICAgKiBpbnNwZWN0b3IvZnJvbnQtZW5kL0RhdGFiYXNl
UXVlcnlWaWV3LmpzOgorICAgICAgICAoV2ViSW5zcGVjdG9yLkRhdGFiYXNlUXVlcnlWaWV3LnBy
b3RvdHlwZS5fcXVlcnlGaW5pc2hlZCk6CisgICAgICAgIAogMjAxMC0wNC0xNCAgQWxleGFuZGVy
IFBhdmxvdiAgPGFwYXZsb3ZAY2hyb21pdW0ub3JnPgogCiAgICAgICAgIFJldmlld2VkIGJ5IFRp
bW90aHkgSGF0Y2hlci4KZGlmZiAtLWdpdCBXZWJDb3JlL2luc3BlY3Rvci9mcm9udC1lbmQvRGF0
YWJhc2VRdWVyeVZpZXcuan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HJpbW1lZFF1ZXJ5LCBkYXRhR3JpZC5lbGVtZW50KTsK
KyAgICAgICAgICAgIGRhdGFHcmlkLmF1dG9TaXplQ29sdW1ucyg1KTsKKyAgICAgICAgfQorICAg
ICAgICBpZiAodHJpbW1lZFF1ZXJ5Lm1hdGNoKC9eY3JlYXRlIC9pKSB8fCB0cmltbWVkUXVlcnku
bWF0Y2goL15kcm9wIHRhYmxlIC9pKSkKICAgICAgICAgICAgIFdlYkluc3BlY3Rvci5wYW5lbHMu
c3RvcmFnZS51cGRhdGVEYXRhYmFzZVRhYmxlcyh0aGlzLmRhdGFiYXNlKTsKICAgICB9LAogCg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>53619</attachid>
            <date>2010-04-17 17:03:14 -0700</date>
            <delta_ts>2010-04-17 22:05:41 -0700</delta_ts>
            <desc>Proposed patch (updated, v3)</desc>
            <filename>DatabaseQueryViewPatch.patch</filename>
            <type>text/plain</type>
            <size>1709</size>
            <attacher name="Juan C. Montemayor E">jmonte03</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBXZWJDb3JlL0NoYW5nZUxvZyBXZWJDb3JlL0NoYW5nZUxvZwppbmRleCBlMGFh
MTAxLi4wODJmNGY2IDEwMDY0NAotLS0gV2ViQ29yZS9DaGFuZ2VMb2cKKysrIFdlYkNvcmUvQ2hh
bmdlTG9nCkBAIC0xLDMgKzEsMTMgQEAKKzIwMTAtMDQtMTcgIEp1YW4gQy4gTW9udGVtYXlvciAg
PGptb250ZTAzQGNzLnR1ZnRzLmVkdT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9P
UFMhKS4KKworICAgICAgICBEYXRhYmFzZXMgcGFuZSBkb2Vzbid0IHJlY29nbml6ZSB0YWJsZSBj
cmVhdGlvbi9kZWxldGlvbgorICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9MjAyMTkK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5UmVzdWx0KHF1ZXJ5LCBkYXRhR3JpZC5lbGVtZW50KTsKLSAgICAgICAgZGF0YUdy
aWQuYXV0b1NpemVDb2x1bW5zKDUpOworICAgICAgICB2YXIgdHJpbW1lZFF1ZXJ5ID0gcXVlcnku
dHJpbSgpOwogCi0gICAgICAgIGlmIChxdWVyeS5tYXRjaCgvXmNyZWF0ZSAvaSkgfHwgcXVlcnku
bWF0Y2goL15kcm9wIHRhYmxlIC9pKSkKKyAgICAgICAgaWYoZGF0YUdyaWQpeworICAgICAgICAg
ICAgZGF0YUdyaWQuZWxlbWVudC5hZGRTdHlsZUNsYXNzKCJpbmxpbmUiKTsKKyAgICAgICAgICAg
IHRoaXMuX2FwcGVuZFF1ZXJ5UmVzdWx0KHRyaW1tZWRRdWVyeSwgZGF0YUdyaWQuZWxlbWVudCk7
CisgICAgICAgICAgICBkYXRhR3JpZC5hdXRvU2l6ZUNvbHVtbnMoNSk7CisgICAgICAgIH0KKyAg
ICAgICAgaWYgKHRyaW1tZWRRdWVyeS5tYXRjaCgvXmNyZWF0ZSAvaSkgfHwgdHJpbW1lZFF1ZXJ5
Lm1hdGNoKC9eZHJvcCB0YWJsZSAvaSkpCiAgICAgICAgICAgICBXZWJJbnNwZWN0b3IucGFuZWxz
LnN0b3JhZ2UudXBkYXRlRGF0YWJhc2VUYWJsZXModGhpcy5kYXRhYmFzZSk7CiAgICAgfSwKIAo=
</data>
<flag name="review"
          id="37387"
          type_id="1"
          status="+"
          setter="joepeck"
    />
    <flag name="commit-queue"
          id="37388"
          type_id="3"
          status="-"
          setter="commit-queue"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>53624</attachid>
            <date>2010-04-17 22:05:41 -0700</date>
            <delta_ts>2010-04-17 22:05:41 -0700</delta_ts>
            <desc>[PATCH] Patch that Landed</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>1724</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <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