Bug-fix needs your vote: queries w/ joins against SQLite return incorrect values because Adobe treats PK col as alias for rowid when it should not

For someone new to Adobe the forums and products can be bewildering. I've been advised to repost something I posted in Flash Data Integration in this forum.
Here is the link to the post I put there:
http://forums.adobe.com/message/2363777#2363777
I have reported this bug: http://bugs.adobe.com/jira/browse/FB-23750
I gather bugs get fixed if people vote for them to be fixed. Please vote for it to be fixed. It is serious, and you might not even realize you're suffering from it because the incorrect values returned by the query will seem perfectly plausible.
If the link above doesn't work, here it is again:
When I execute the following query in Flex and/or Lita:
select wrdid, uspelling from WRD WHERE uspelling = 'wingeard'
the results are:
uspelling...wrdid
wingeard   3137
Look at what comes back when I execute this query using .NET provider by  Robert Simpson for SQLite and SQLite Manager by Mrinal Kant:
SELECT     rowid, wrdid, uspelling
FROM         WRD
WHERE     (uspelling = 'wingeard')
rowid.......wrdid...........uspelling
3137........3042............wingeard
No wonder none of my queries with joins is working correctly in Flex.
wrdid is defined as "int" not INTEGER.
http://www.sqlite.org/lang_createtable.html (see INTEGER PRIMARY KEY section):
"The special behavior of INTEGER PRIMARY KEY is only available if the type name is exactly "INTEGER" (in any mixture of upper and lower case.)  Other integer type names like "INT" or "BIGINT" or "SHORT INTEGER" or "UNSIGNED INTEGER" causes the primary key column to behave as an ordinary table column with integer affinity and a unique index, not as an alias for the rowid."  [emphasis added]
Now, I happen to think the SQLite developers made a mistake here in failing to follow standards, preferring not to break legacy code. They'd rather break current code instead???  I would not characterize this as a "corner case" and the bug-at-hand is de facto evidence of that.

Did you try running the queries I posted? What were your results with those?
What I am seeing is that when I use "int PRIMARY KEY" in a CREATE TABLE statement, that column becomes the special "rowid" column. I believe this is also what you are seeing.
However, what confuses me is how you're getting a table with three columns "rowid", "id", and "name" in the first place. When I run this SQL...
CREATE TABLE test
id int PRIMARY KEY,
name String
...I get a table with two columns: a normal column named "name", and a special primary key column named "id", which for this table is identical to the column represented by the rowid identifier.
However, if I understand correctly, your table has three columns, "id", "name", and the special primary key column (i.e. "rowid"). Is that right? Can you give me the SQL that was used to create the table, or tell me how the table was created (e.g. if you used a tool like Lita) so I can try to re-create your exact situation? That would really be very very helpful -- it was the only detail that was missing in your last post, so I had to guess on that one detail.
I tried something else to re-create your situation. I ran the following statement:
CREATE TABLE test
id int
name String
That gave me a table with two real columns plus the rowid column. Then I ran the three insert statements on that table, and when I ran the select statement I got the expected result:
id     name
1     one
2     two
7     seven
Again, I'm guessing that your table was created differently than my test table, and that's the explanation for the difference.
Some other possibilities to consider:
The screen shot doesn't show a SQLResult object, so it seems that you're using some wrapper library or code to execute the query, or at least that you've copied the SQLResult.data Array to another variable named results. Although it seems less likely to me, it's possible that somewhere in that code something is getting scrambled. (But I'd rather rule out AIR as the underlying cause first before attempting to explore those paths.)
As a side note, if you really want the database to have three columns (the special rowid column and your two columns id and name), and you don't want id to be the special rowid column, then it sounds to me like you don't actually want to define id as the primary key. If you just want the id column to have a constraint that prevents duplicate values, you can define it as a UNIQUE column:
CREATE TABLE test
id int UNIQUE,
name String
That gives you the same database-enforced constraint of not allowing duplicate values, but it tells the database explicitly that id isn't the same thing as the rowid primary key. (You can still join another table to the id column even if it's not defined as the primary key.)
P.S. I'm sure you don't mean it this way, but using gigantic red text comes across like shouting -- it's very "loud". I'm trying my best to understand the issue you're having and help you resolve it, and using multiple colors and font sizes doesn't really make your post any more or less clear. Just because I ask you questions, or say that I'm seeing different results than you, doesn't mean I don't believe that you're seeing the results you're seeing. I've definitely seen strange variations and cases where something happens on my computer but others can't duplicate it on their computers -- so I believe that you are getting the results you're getting. I'm just trying to figure out how to make it so that I can also get those results, so that I can pass that on to the engineers who are in a position to make changes.

Similar Messages

  • After joining the iCloud,how can I download music to store on my iPhone for use when wi-fi not available?

    After joining Icloud,how can I download music to store on my iphone from my library to use when Wi-Fi not available?

    Welcome to the Apple Community.
    What exactly is it you want to do.
    Are you talking about iCloud, iTunes in the cloud or iTunes Match.

  • I have two macs in my house.  One is newer and came with the os x mountain lion software and the other one needs to be upgraded.  I was wondering if there is a way to take upgrade from one to the other?  Should not have to buy this software again.

    I have two macs in my house.  One is newer and came with the os x mountain lion software and the other one needs to be upgraded.  I was wondering if there is a way to take upgrade from one to the other?  Should not have to buy this software again.

    Welcome to Apple Support Communities
    Buy it for the other computer. Mountain Lion is preinstalled on the new Mac, but you can only use it in the new one

  • Playbook requires me to pay for support when it did not work from the beginning and they could not fix.

    lack of email app- makes this may purchase virtually useless. because
    cant bridge with my bb 9700. maybe twice after deleting from both, and rebridging, i got connections. i cant spend an hour bridging every time. since may this is unfixable. the support people cant fix it after dozens of hours. got lots.of emails from them though. asking if i was resolved. when i answered no, they asked me to do it all again. they have no fix for this.
    can type documents, but cant email them to anybody. same with excel. no way to attach documents when the bridge doesnt work.
    i am a ceo,and i am moving my entire organization off bb becuase of this.
    have spent many many hours from the beginning in may, and now they want me to pay a 129 dollar fee to get support when it has not worked right from the beginning.
    i bought an ipad today and i am absolutely blown away by how much better it is in every single way. dozens of bbs are going away now.
    slow, no.email, locks up all the time, stand by button restarts tablet, no bridging without total reload on both devices. why would i go through this anymore? it is costing my business a fortune with myself and my people trying to make the playbook work.
    we will get ipads and make more money.
    i have tried to stay loyal to bb, but after being told i have to pay for support
    when i did once get a connection through bridge, reply locked up everytime on an email. could not type.

    I would like to add my support to this comment.
    Strike 1) Bridging a BB 9700 with a PB is flaky at best. Even if you run the very latest software on both, it does not work properly. This is NOT a user issue but a programme/application issue. RIM software running on RIM hardware and O/S and NOT being able to connect properly = RIM fault.(see my other post: My Bridge connects, it exchanges data like passwords, number of unread emails and my playbook notifies me when someone calls my BB, but it does NOT unlock)
    Strike 2) All this used to work fine during the 90d grace suport period (apart from the flaky bluetooth issue that required a hard reboot of the BB whenever the connection was broken in a bad way)
    Strike 3) Now, after a PB OS upgrade (which I faithfully applied), several phone upgrades (due to another problem) and the latest Bridge application install, it all doesn't work anymore, 100 days after I bought the flipping thing. so I have a fancy ebook reader, not the productivity enhancing tool I can use on the go.
    So now I am stuck with a forum that can't help, a technical database that does not contain this support information and a broken RIM application on RIM Hardware and O/S that I paid a lot of money for. And now they want more to look at this incident????? I am sorry but if this was a problem caused by usage, configuration or any other user error, I could understand it. But this is all completely in RIMs ballpark. I have done everything right. It connects. It just DOES NOT WORK!!!!!
    As I said in my other post, an evaluation of the PB in my company is ongoing as a possible management tool by people I know quite well, as I work in the area, but my advice would definitely be to stay away until basic functionality like emails, attachments, calendars etcetera are all suitably solved and usable by the average manager with sausage fingers and no clue about bluetooth, hard reboots and who won't be able to hold down the power, + & - buttons at the same time as the fingers won't fit!!
    So RIM, get your finger out, open up an email support channel or get some qualified support people go through this forum and help those people who have shown faith in your products and who now have real problems with your software and hardware. DONT HIDE BEHIND A STUPID SUPPORT FEE - MAN UP TO YOUR PROBLEMS!!!

  • I need to know how to block the option menu on firefox because my students change the connection option bypassing the proxy that should block them when it's not alloud surf on the web. Thank's

    I need to know how to block the option menu on firefox because my students are able to change the connection option bypassing the proxy that should block them when it's not alloud surf on the web. Thank's

    See http://kb.mozillazine.org/Locking_preferences
    <code>//
    lockPref("network.proxy.type", 1);
    lockPref("network.proxy.http", "");
    lockPref("network.proxy.http_port", "");
    </code>
    See:
    http://kb.mozillazine.org/network.proxy.type
    http://kb.mozillazine.org/network.proxy.%28protocol%29
    http://kb.mozillazine.org/network.proxy.%28protocol%29_port

  • I needed idvd, but since my iMac is newer, I didn't have idvd on it. I installed iLife 11. I should not have installed the iPhoto part because it was 9.1 and my iMac was 9.2. So now my iPhoto wouldn't work. I went to iPhoto Library organizer.

    I needed iDvd, but since my iMac is newer, I didn't have iDvd on it. I installed iLife 11. I shouldn't have installed the iPhoto part because now my iPhoto wouldn't work since iLife 11 was 9.1 and my iMac had 9.2. So I used iPhoto Library Manager to create a new library. That was working, but my computer ran out of hard drive room since my original iPhoto had 137 GB of photos. My new iPhoto library had the majority of my pics and the iPhoto now worked with those pics. But now I still had all of those original pics in my hard drive. I thought that by getting rid of the original iPhoto on the iPhoto Library Manager I would get rid of all of those original pics. I now have no access to them but they are in my hard drive and I can't do much with my iMac because it is all clogged up with those original pics - I think. How do I get rid of my original iPhoto pics out of my hard drive?

    What system are you running?  If it's Mt. Lion go to the App Store and sign in with the Apple ID you used to purchase the Mac.  Go to Purchases and download iPhoto again. The current version is 9.4.3.
    If you're unable to download iPhoto from the App Store you can reomstall iPhoto from the iLife 11 disk and  update it from the Apple Downloads website  to the highest version you can get to (I was able to update all the way to 9.4.3 via the updaters). Then if iPhoto can't open the library  use iPhoto Library Manager to rebuild it and it will rebuild it compatible with your version of iPhoto via this iPLM tutorial: Fat Cat Software - iPhoto Library Manager Help - Downgrading a library to an earlier version of iPhoto
    OT

  • My email on the ipad2 is not working. I gives me a error message of your user I'd or password may be incorrect. I called my provider and they changed my password but it will not take in my iPad.

    My iPad is up to date with iOS.

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Setting Up An eMail Account
    http://support.apple.com/kb/ht4810
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • Need alias for server when using web dynpros

    Hello,
    i will make an iview for an webdynpro. But i need an alias name for each SAP J2EE engine. Can i do this after installation?
    Thanks,
    Frank

    yes.
    even: you must .

  • Need to install AdobePDF.dll in Acrobat 8.0 then download update 8.1,  couldn't do it during install as hatch wouldn't open because Adobe Acrobat disc was in it for the install.

    During the reinstall of Acrobat 8.0 on my Vista 64 bit computer (on a new harddrive) I was asked to insert the Win Vista Install Disk but was unable to do it. Evidently I need to get the 'AdobePDF.dll' file installed and don't know how to do that.  When I tried to check for updates, I got the error message: "There are no updates at this time. ...updates can';t be determined at this time." How do I get the needed file installed.

    Here's a screen copy of the message:

  • 9.0.3 Bug - getServletContextName returns incorrect value

    getServletContextName is returning "current-workspace-app"
    even though I have set the J2EE Web Context Root to something else, e.g. "mywebapp".
    Running the app does in fact load the correct URL, with "mywebapp", but all the links that are built using getServletContextName are broken and contain, "current-workspace-app".

    getServletContextName is returning "current-workspace-app"
    even though I have set the J2EE Web Context Root to something else, e.g. "mywebapp".
    Running the app does in fact load the correct URL, with "mywebapp", but all the links that are built using getServletContextName are broken and contain, "current-workspace-app".

  • Where does NI hide the full list of bug fixes? and why is it hidden from users?

    So I get an enticing email begging me to try the august 2009 release of LabVIEW. Ok. I'm twitching with anticipation. I'd like to know if several specific bugs are fixed in a new release of a specific module, however. Otherwise I'd prefer to install it some other time when I'm not busy writing dlls to compensate for the bugs that I hope are now fixed. I've been clicking in circles on the NI website trying to find complete information regarding changes and as is entirely far too typical of NI, I only have access to an anemic, watered down version of what should be proper documentation.
    "LabVIEW Readme—Use this file to learn
    important last-minute information about LabVIEW, including installation
    and upgrade issues, compatibility issues, a partial list of bugs fixed
    in the current version of LabVIEW... bla bla bla"
    Where is the full list of bug fixes? I don't care if it isn't spellchecked or if it's sloppy; I just want the information. The readme you provide for the specific module I'm interested in is ridiculously small. I know darned well you must have changed more than what is listed. So what secret vault do I have to burgle to find the full list of bug fixes? Am I just missing an obvious hyperlink?
    - mushroomed
    Message Edited by Root Canal on 08-11-2009 11:29 AM
    global variables make robots angry

    Root Canal wrote:
    Where is the full list of bug fixes? ...
    They are locked-up in the Ivory Tower.
    I have been a LabVIEW Champion for about four years and even after signing NDA's I still can't see the full list.
    Seruously, the full list includes probably millions of bugs that NI finds internally before you and I ever see it.
    The best way to handle your situation is to track the CAR's for your bugs. You can call NI support with the CAR number and they can tell you if the bug was fixed and in which version you will find the fix.
    If it has not been fixed you can contact you rlocal NI rep and ask them to look into it for you. They may be able to tell you in which release the fix is scheduled and bump up the priority of the fix if you make a good arguement.
    Just trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Feature/Bug Fix list for 10.2.0.4

    I know 10.2.0.4 is expected in July. I'm currently running 10.2.0.3 and interested in it because it has a fix for Bug 5082178 - "Bind peeking may occur when it should not." I'm interested in knowing what other improvements it contains.
    Can anyone point me to a list of features and bugs planned for the 10.2.0.4 release?
    Thanks,

    The README/ Metalink note for the patchset should include the list of all the bugs that are fixed. I don't believe Oracle publishes the set of bug fixes that will actually be part of the patchset until much closer to the release date since bugs fixes get added and removed during the final testing process.
    Justin

  • My Ipod needs your help :D

    I dropped my ipod 4g and the screen shattered. The problem is that the right side of the screen doesn't work at all, I need help any suggestions???

    jaitken1 wrote:
    Web pages that use Java in order to run, such as email servers and any page that has some kind of interactive menu, along with System Restore, will not open or run.It really sounds like you're confusing Java with JavaScript. Despite the similar names, they are completely unrelated.
    You probably have an infestation, and need your computer cleaned.
    Or you could try to ignore the problem and install FireFox and hope for the best.

  • NEED YOUR PLEASE

    Dear Database Support Professional,
    I am Database Administrator and I am writing to ask for your help in responding to a 10-12 minute survey for a degree requirement on relational database support professionals in the USA. Please note that the respondent is completely anonymous. If I don’t get this portion of my degree completed by the end of this semester, then I would have to wait for another year which entails additional costs and time on me. By completing the survey, you will be contributing to research in our field and also there is the satisfaction of having helped a fellow professional and a fellow human being attain his goals. I believe a good turn always bring another in some way in our lives. I therefore kindly beg for your help to a fellow database professional by completing this survey. The link to the survey is provided below. If possible please forward to other database professionals or groups:
    http://www.surveymonkey.com/s.aspx?sm=a1JqU7GVt1g6rCkIPyL23w_3d_3d
    Thank you earnestly for your kindness.
    Gabriel
    This survey is done solely for the purposed of a College degree requirement and is not associated with, nor represents the views, policy, or demands of any individuals, corporation, or any other named organization.
    Thank you in advance for your kind participation

    I have never felt compelled to say this to anyone here in these forums before but after apparently you need some help with this.
    First everyone here knows that you are not telling the truth. And I mean everyone. We are serious IT professionals with enough mental horsepower to add 1 and 1 and come up with 2. Here's how.
    You claim this is for a school project but we all know it is not. What we do is look at your previous posts ... like this:
    Recent Messages:      
         NEED YOUR PLEASE
    English » Database » Database - General, Nov 23, 2009
    Dear Database Support Professional, I am Database Administrator and I am writing to ask for your h...
         Re: I NEED YOUR HELP PLEASE
    English » Technology Network Community » Community Feedback and Suggestions (Do Not Post Product-Related Questions Here), Nov 23, 2009
    Thanks for your particiapation.
         Re: I NEED YOUR HELP PLEASE
    English » Fusion Middleware » Application Server » Oracle Application Server - General, Nov 23, 2009
    Correct? only US support specialists. Thanks
         Re: I NEED YOUR HELP PLEASE
    English » E-Business Suite » EBS General Discussion, Nov 23, 2009
    Disagree about your spamming theory. An academic survey for knowledge is miles apart from spam and ...
         Re: I NEED YOUR HELP PLEASE
    English » Database » Database - General, Nov 23, 2009
    I am trying to reach as many respondents as I can and not all visit the same forum.
         Search for all user messages      
    Recent Questions:
    I NEED YOUR HELP PLEASE      
    English » Technology Network Community » Community Feedback and Suggestions (Do Not Post Product-Related Questions Here), Nov 22, 2009
    Dear Database Support Professional, I am Database Administrator and I am writing to ask for your...
    I NEED YOUR HELP PLEASE      
    English » Fusion Middleware » Application Server » Oracle Application Server - General, Nov 22, 2009
    Dear Database Support Professional, I am Database Administrator and I am writing to ask for your...
    NEED YOUR PLEASE      
    English » Database » Database - General, Nov 23, 2009
    Dear Database Support Professional, I am Database Administrator and I am writing to ask for your...
    I NEED YOUR HELP PLEASE      
    English » Database » Database - General, Nov 22, 2009
    Dear Database Support Professional, I am Database Administrator and I am writing to ask for your...
    I NEED YOUR HELP PLEASE      
    English » Database » Installation, Nov 22, 2009
    Dear Database Support Professional, I am Database Administrator and I am writing to ask for your... Yep ... there it is ... day after day posting the same nonsense: The same spam.
    I have reported you to OTN management and hopefully the administrators will soon remove your account and ask Oracle legal to go after you for violation of the Terms of Service you agreed to when you signed up for your OTN account.
    Consider doing the honorable thing. That would be an apology and a promise not to ever do this again. One thing you can be sure of ... we are not watching for you and your posts and will flag each and every one as spam if it is not on topic.

  • Hi, I'm need connect the thunderbolt display to my MacPro , but the connection is mini display, you have any adapter for that?

    hi, I'm need connect the thunderbolt display to my MacPro , but the connection is mini display, you have any adapter for that?

    unfortunately, will not work ever
    your mac needs tb on it to use a tb display; the older mac pro's use the apple led cinema display

Maybe you are looking for

  • Beta driver for X-Fi (SBXF_W7DRVBETA_US_2_18_0008) users feedback thread

    <div class="DownloadDate">Release date : 28 Jan 09<div class="DownloadShortDesc">This?download is a beta?driver providing Microsoft? Windows?7?Beta support for Creative Sound Blaster? X-Fi?series of audio devices. For more details, read the rest of t

  • Connection authentication error occured

    Hi, i'm using netbeans 6.8 and java DB ClientDriver.I want to insert data into database table, so after inserting data into required fields and by clicking on submit button it is displaying the message as :Connection authentication failure occurred.

  • How to reduce the number of levels of ODS

    Hello, I have a ODS of the first level and a ODS of second level. In the second level, for each record carries a select on the first level to calculate the time between the current record and the previous record. How can I optimize by eliminating a l

  • Alternative for flash player

    Is there any iPhone alternative for video requiring a flash player?

  • REQUIRED SOLUTION FOR BELOW SCENARIO

    Hi Friends, I have a requirement as below Source NUM1 123456789 TARGETNUM1,2,3,46,7,8,9.... I WANT TO LOAD FIRST FOUR RECORDS FROM SOUCE INTO SINGLE RECORDS IN TARGET AND SO ON.. PLEASE PROVDE SOLUTION FOR ABOVE SCENARIOTHANKS IN ADVANCE