Bug 27864

Summary: [iOS 8.2] SQLite.net queries fail in iOS 8.2 if they contain UNION or COLLATE
Product: iOS Reporter: Cody Beyer (MSFT) <cody.beyer>
Component: GeneralAssignee: Alex Soto [MSFT] <alex.soto>
Status: RESOLVED ANSWERED    
Severity: normal CC: danisha, mono-bugs+monotouch, rolf
Priority: Normal    
Version: master   
Target Milestone: Untriaged   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:
Attachments: Xcode Sample

Description Cody Beyer (MSFT) 2015-03-10 23:06:12 UTC
### Description

The attached sample app attempts to create a simple sqlite database via ado and then select the entered rows

### Test Case


### Steps to reproduce

1. Download linked app
2. Deploy to iOS 8.2 Simulator
3. Click "Use ADO"
4. notice db created
5. Click "Use ADO" again

### Expected Results

The text window within the app should return the previously inserted values 

**** This can bee seen by running the same test case against 8.1 ****

### Actual Results

An error is displayed in the text window stating "no such column: com.Name"

### Version

=== Xamarin Studio ===

Version 5.8 (build 443)
Installation UUID: fe050df7-44bb-4337-87ab-a8e27643bb7d
Runtime:
	Mono 3.12.1 ((detached/b7764aa)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312010000

=== Apple Developer Tools ===

Xcode 6.2 (6776)
Build 6C131e

=== Xamarin.iOS ===

Version: 8.8.0.2 (Business Edition)
Hash: ccfcd59
Branch: 
Build date: 2015-03-10 02:20:32-0400

=== Xamarin.Android ===

Version: 4.20.0.37 (Business Edition)
Android SDK: /Users/beyerc/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: Unknown version
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 1.12.0.8 (Business Edition)

=== Build Information ===

Release ID: 508000443
Git revision: 73883239470cbe8e261c94d95f7c3d0452fd393b
Build date: 2015-03-10 07:22:51-04
Xamarin addins: a2ff7b617f09d9c45d8bbf3d010b5db0d7d36100

=== Operating System ===

Mac OS X 10.10.2
Darwin byrc-mbp.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Feb 26 19:26:47 PST 2015
    root:xnu-2782.10.73~1/RELEASE_X86_64 x86_64
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-03-11 14:14:07 UTC
I can reproduce in the simulator, but it works fine on a 8.2 device.

At first sight this doesn't look like a bug in Xamarin.iOS, but instead a bug in the iOS 8.2 simulator.
Comment 4 Cody Beyer (MSFT) 2015-03-11 16:39:55 UTC
@Rolf

It appears that it does happen on my device as well, iPhone 6 running 8.2

https://www.dropbox.com/s/ywaz81jw6771lsg/ADORec.mov?dl=0
Comment 5 Rolf Bjarne Kvinge [MSFT] 2015-03-12 05:05:52 UTC
Alex, I think this is a bug in iOS 8.2; can you create an Xcode test project to confirm? It don't think it'll be hard to replicate the sqlite code in ObjC.
Comment 6 Cody Beyer (MSFT) 2015-03-12 12:57:45 UTC
It appears as if Apple updated the version of sqlite used from 3.7.12 in iOS 8.1 to 3.8.5 in 8.2.

This may be relevant :)
Comment 7 Cody Beyer (MSFT) 2015-03-12 13:02:06 UTC
http://osdir.com/ml/general/2015-03/msg14442.html for the above comment 6
Comment 8 Alex Soto [MSFT] 2015-03-24 01:19:18 UTC
Created attachment 10466 [details]
Xcode Sample

Here is the Objective-C test case and as @Rolf suggests this is an iOS 8.2 bug since same error happens on 8.2 simulator and device using the Objective-C sample.

Also tested this using Xcode 8.3 beta 3 and an iOS 8.3 device and simulator and it is also happening on them.
Comment 9 Alex Soto [MSFT] 2015-03-24 11:18:32 UTC
Opened a radar with Apple.