Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Assertion failed: 101412

265 views
Skip to first unread message

Bob Piskac

unread,
Jan 19, 2010, 10:29:33 AM1/19/10
to
This sql causes an error.

select dbo.xp_write_file('c:\\xmlfile.xml', (select xmlData from
"DBA"."sp_getxmlData"(1, 770280)));


Internal database error *** ERROR *** Assertion failed: 101412 (9.0.2.3778)
Page number on page does not match page requested -- transaction rolled back
[Sybase][ODBC Driver][SQL Anywhere]Internal database error *** ERROR ***
Assertion failed: 101412 (9.0.2.3778)
Page number on page does not match page requested -- transaction rolled back
Error code=-301
SQL state=HY000

Connection parameters:
User=dba
Password=***
LINKS=all


I can avoid the error by using a variable

begin
declare @xmlData long binary;

select xmlData
into @xmlData
from "DBA"."sp_CliniflowPatientExport"(1, 770280);

select dbo.xp_write_file('c:\\bob.xml', @xmlData);

end

Glenn Paulley [Sybase iAnywhere]

unread,
Jan 19, 2010, 10:37:58 AM1/19/10
to
I apologize for the assertion error; this is an oversight on our part,
and the problem pertains specifically to the statement's construction
(ie there is nothing wrong with your database).

The fix would be to generate a syntax error, however. SQL Anywhere does
not support passing query expressions as parameters to stored procedures
or functions, in any context. The use of the variable (as below) is the
"correct" way to code this.

Glenn

--
Glenn Paulley
Director, Engineering (Query Processing)
Sybase iAnywhere

Blog: http://iablog.sybase.com/paulley

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports: http://case-express.sybase.com

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

Whitepapers, TechDocs, and bug fixes are all available through the
Sybase iAnywhere pages at
http://www.sybase.com/products/databasemanagement/sqlanywhere/technicalsupport

Bob Piskac

unread,
Jan 19, 2010, 11:08:18 AM1/19/10
to pau...@ianywhere.com
I just thought the error was a little over the top.
0 new messages