The forum will experience an outage sometime between February 10 at 7:00pm EST and February 12 at 11:59 EST for installation of security updates. The actual time and duration of the outage are unknown but attempts will be made to minimize the downtime. We apologize for any inconvenience.

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)

asked 12 Aug '14, 10:37

Alex's gravatar image

Alex
800143441
accept rate: 25%

edited 12 Aug '14, 16:39

It may help if you post your query and relevant schema.

(12 Aug '14, 11:45) Tim McClements
Replies hidden

Question edited with the query. In fact, any query, no matter which schema is used, will crash the app.

(12 Aug '14, 16:41) Alex

It's likely that UL has a limit on the number of unions in a query -- an arbitrary (but assumed reasonable) limit for the sake of efficiency otherwise. 32 does seem like a lot of unions, but increasing it could be possible as well.

It should not crash in any case of course. That must be a separate bug which we will try to address in the near term.

(13 Aug '14, 13:46) Tim McClements
Replies hidden

Tks Tim. You've got my point. In our case, all we don't want is an application crash. We'll look forward a bug fix. For now, thank you by your attention.

(14 Aug '14, 08:12) Alex

Tim, any news about a bug fix?

(06 Nov '14, 05:48) Alex

Hi Alex,

It's still in the queue given some major release work here. I will post back when it's done. Thank you for your patience :-)

(06 Nov '14, 10:57) Tim McClements

Ah, ok. Don't need to hurry up with it. It's just a minor fix. Just let me know when it is fixed. Thank you =]

(12 Nov '14, 14:06) Alex

Hello, Tim. Any news about this issue?

(27 May '15, 15:32) Alex
2

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.

(09 Jun '15, 16:22) Andy Quick
Replies hidden

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

(19 Jun '15, 12:48) Alex
showing 5 of 10 show all flat view

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?

permanent link

answered 13 Aug '14, 10:43

SethRich's gravatar image

SethRich
0
accept rate: 0%

1

@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.

(13 Aug '14, 13:06) Alex
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×75
×59
×46
×43
×5

question asked: 12 Aug '14, 10:37

question was seen: 1,052 times

last updated: 19 Jun '15, 12:48