cancel
Showing results for 
Search instead for 
Did you mean: 

Select command with 32 UNION ALLs crashs the Android application

Former Member
4,228

Any attempt to execute a SELECT statement with 32 or more UNION ALLs in UltraliteJ for Android crashes the application.

I've been using the UltraliteJ for Android 16.0.0.1823.

Is there any solution/EBF/workaround for it?

SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL
SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL
SELECT 11 UNION ALL SELECT 12 UNION ALL SELECT 13 UNION ALL SELECT 14 UNION ALL SELECT 15 UNION ALL
SELECT 16 UNION ALL SELECT 17 UNION ALL SELECT 18 UNION ALL SELECT 19 UNION ALL SELECT 20 UNION ALL
SELECT 21 UNION ALL SELECT 22 UNION ALL SELECT 23 UNION ALL SELECT 24 UNION ALL SELECT 25 UNION ALL
SELECT 26 UNION ALL SELECT 27 UNION ALL SELECT 28 UNION ALL SELECT 29 UNION ALL SELECT 30 UNION ALL
SELECT 31 UNION ALL SELECT 32 UNION ALL SELECT 33 UNION ALL SELECT 34 UNION ALL SELECT 35

 #00  pc 000a4982  /data/app-lib/OMMITED_PACKAGE/libultralitej16.so
 #01  pc 000a59e7  /data/app-lib/OMMITED_PACKAGE/libultralitej16.so (db_describe+142)
 #02  pc 000b2c8d  /data/app-lib/OMMITED_PACKAGE/libultralitej16.so (ULPreparedStatementImpl::Prepare(void const*, bool)+244)
 #03  pc 000b3cf3  /data/app-lib/OMMITED_PACKAGE/libultralitej16.so (ULConnectionImpl::prepareStatementInternal(void const*, bool)+34)
 #04  pc 000b3d2d  /data/app-lib/OMMITED_PACKAGE/libultralitej16.so (ULConnectionImpl::PrepareStatement(char const*)+4)
 #05  pc 0004b853  /data/app-lib/OMMITED_PACKAGE/libultralitej16.so (Java_com_ianywhere_ultralitejni16_implementation_JniConnection_prepareStatement+50)
 #06  pc 0001e44c  /system/lib/libdvm.so (dvmPlatformInvoke+112)
 #07  pc 0004e91b  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+398)
 #08  pc 00027860  /system/lib/libdvm.so
 #09  pc 0002be00  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+184)
 #10  pc 0006092b  /system/lib/libdvm.so (dvmCallMethodA(Thread*, Method const*, Object*, bool, JValue*, jvalue const*)+314)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

The crash is fixed in 16.0.0.2141 or later. UltraLite will not be able to deal with a query with that many UNION's. A ULjException will be thrown with SQL error code SQLE_RESOURCE_GOVERNOR_EXCEEDED. Sorry about the long delay, as this issue got lost in the backlog.

Former Member
0 Kudos

Thanks @Andy! Great news =] Is this EBF already released? If so, where can I download it?

Former Member
0 Kudos

@Andy Quick Can you convert it as an answer so I can close this ticket?

VolkerBarth
Contributor
0 Kudos

Now you can:)

reimer_pods
Participant

Good news: the latest EBF (or SP, whatever) for Windows I've downloaded is 16.0.0.2419, so yes, it's available. But you'll need a valid S-ID (SAP support login) to download the update from https://support.sap.com/home.html

Answers (1)

Answers (1)

Former Member

I don't use Ultralite, but wouldn't it be possible to replace the front-end UNIONs by having a back-end view or procedure with the UNIONs, thereby allowing you to use a much simpler query on the front-end?

Former Member

@SethRich, the Ultralite doesn't provide SQL procedures or views. Also, we've been developing a product with a configurable database/query engine to provide DataSource for configurable components. So, the engine must be as reliable as the Ultralite is. We don't care if the Ultralite doesn't provide such a feature like this, as long it doesn't crash the application.