Re: [sqlite] probably recursive?

2018-05-03 Thread R Smith


On 2018/05/04 1:54 AM, Cezary H. Noweta wrote:

Hello,

At the beginning I would like to agree with that the problem is 
iterative rather then recursive one. However


LOL, that might be the hackiest query I ever seen, but kudos mate, 
that's bloody marvellous!


I corrected the table to not have duplicate points, and then added some 
bits to visualize the points, which makes it easier to see what is 
happening - also just for fun :)
(Might have to run it a couple times to get a point-set that actually 
passes)




  -- SQLite version 3.20.1  [ Release: 2017-08-24 ]  on SQLitespeed 
version 2.0.2.4.
  -- 



DROP TABLE IF EXISTS points;

CREATE TABLE points(
  x INT, y INT, PRIMARY KEY (x,y)
);

WITH cte(x,y,n) AS (
  SELECT (random() % 10 + 10) % 10 + 1, (random() % 10 + 10) % 10 + 1, 1
  UNION ALL
  SELECT (random() % 10 + 10) % 10 + 1, (random() % 10 + 10) % 10 + 1, 
n + 1

    FROM cte
   WHERE n < 100
)
INSERT INTO points(x,y)
SELECT DISTINCT x, y FROM cte;


SELECT 'Y_'||y AS 'Points',
   MAX(CASE X WHEN  1 THEN ' * ' ELSE '   ' END) AS X_1,
   MAX(CASE X WHEN  2 THEN ' * ' ELSE '   ' END) AS X_2,
   MAX(CASE X WHEN  3 THEN ' * ' ELSE '   ' END) AS X_3,
   MAX(CASE X WHEN  4 THEN ' * ' ELSE '   ' END) AS X_4,
   MAX(CASE X WHEN  5 THEN ' * ' ELSE '   ' END) AS X_5,
   MAX(CASE X WHEN  6 THEN ' * ' ELSE '   ' END) AS X_6,
   MAX(CASE X WHEN  7 THEN ' * ' ELSE '   ' END) AS X_7,
   MAX(CASE X WHEN  8 THEN ' * ' ELSE '   ' END) AS X_8,
   MAX(CASE X WHEN  9 THEN ' * ' ELSE '   ' END) AS X_9,
   MAX(CASE X WHEN 10 THEN ' * ' ELSE '   ' END) AS X_10
  FROM points
 GROUP BY y
;


  -- Points | X_1 | X_2 | X_3 | X_4 | X_5 | X_6 | X_7 | X_8 | X_9 | X_10
  -- -- | --- | --- | --- | --- | --- | --- | --- | --- | --- | 
  -- Y_1    |  *  | | |  *  |  *  | | | | |  *
  -- Y_2    |  *  |  *  | | | |  *  |  *  |  * | |
  -- Y_3    |  *  | |  *  |  *  |  *  |  *  |  *  | |  *  |
  -- Y_4    |  *  |  *  | |  *  | |  *  |  *  |  * | |
  -- Y_5    |  *  | |  *  | |  *  |  *  |  *  |  * |  *  |
  -- Y_6    | | |  *  |  *  |  *  |  *  | |  * |  *  |  *
  -- Y_7    |  *  |  *  |  *  |  *  |  *  | |  *  |  * | |  *
  -- Y_8    |  *  |  *  | |  *  | |  *  |  *  | |  *  |
  -- Y_9    | |  *  |  *  |  *  |  *  |  *  |  *  |  * |  *  |  *
  -- Y_10   |  *  |  *  | |  *  |  *  |  *  | |  * |  *  |  *

WITH
  params(nx, ny) AS (SELECT 5, 6),
  main(elem, rest) AS (
    SELECT NULL, (
  WITH
    state(clock, points, xaxis, yaxis, nxmin, nxmax, nymin, nymax) AS (
  SELECT
    0,
    (SELECT GROUP_CONCAT(x || ' ' || y) FROM points),
    (SELECT GROUP_CONCAT(x || ' ' || n) FROM (SELECT x, 
COUNT(x) n FROM points GROUP BY x)),
    (SELECT GROUP_CONCAT(y || ' ' || n) FROM (SELECT y, 
COUNT(y) n FROM points GROUP BY y)),
    (SELECT MIN(n) FROM (SELECT x, COUNT(x) n FROM points GROUP 
BY x)),
    (SELECT MAX(n) FROM (SELECT x, COUNT(x) n FROM points GROUP 
BY x)),
    (SELECT MIN(n) FROM (SELECT y, COUNT(y) n FROM points GROUP 
BY y)),
    (SELECT MAX(n) FROM (SELECT y, COUNT(y) n FROM points GROUP 
BY y))

  UNION ALL
  SELECT
    (clock + 1) % 3,
    CASE clock WHEN 0 THEN
    (SELECT GROUP_CONCAT(x || ' ' || y) FROM (
  WITH
    cte(elem, rest) AS (
  SELECT NULL, state.points
  UNION ALL
  SELECT
    SUBSTR(rest, 1, IFNULL(NULLIF(INSTR(rest, ','), 0) 
- 1, LENGTH(rest))),

    SUBSTR(rest, NULLIF(INSTR(rest, ','), 0) + 1)
  FROM cte
  WHERE rest IS NOT NULL
    )
  SELECT
    CAST(elem AS INTEGER) x,
    CAST(SUBSTR(elem, INSTR(elem, ' ')) AS INTEGER) y
    FROM cte WHERE elem IS NOT NULL
    )
    WHERE (x NOT IN (
  SELECT x FROM (
    WITH
  cte(elem, rest) AS (
    SELECT NULL, state.xaxis
    UNION ALL
    SELECT
  SUBSTR(rest, 1, IFNULL(NULLIF(INSTR(rest, ','), 
0) - 1, LENGTH(rest))),

  SUBSTR(rest, NULLIF(INSTR(rest, ','), 0) + 1)
    FROM cte
    WHERE rest IS NOT NULL
  )
    SELECT
  CAST(elem AS INTEGER) x,
  CAST(SUBSTR(elem, INSTR(elem, ' ')) AS INTEGER) n
  FROM cte WHERE elem IS NOT NULL
  ) WHERE n < (SELECT nx FROM params)
    )) AND (y NOT IN (
  SELECT y FROM (
    WITH
  cte(elem, rest) AS (
    SELECT NULL, state.yaxis

Re: [sqlite] probably recursive?

2018-05-03 Thread Cezary H. Noweta

Hello,

At the beginning I would like to agree with that the problem is 
iterative rather then recursive one. However,


On 2018-05-01 14:15, R Smith wrote:

That depends on what you mean by "Could this be achieved in SQLite?".

There is no query (in any SQL engine) that can depend on a sub-query 
that is itself dependent on the outcome of the main query. This is what 
makes recursion beautiful, but then there is also no CTE (or other query 
in any SQL engine) that can recurse over multiple states of data (i.e. 
query data in one single query to reflect results from both before and 
after a delete in the source table), nor can a CTE be updated or deleted 
from, its data must persist atomically (with some exceptions when using 
non-deterministic functions, like random).


These are not so much "inabilities" of SQL engines, but more due to 
explicit SQL and set-algebra rules.


So this is not possible in a single query.
This is possible in a single query, though not directly. CTE are very 
flexible. CTE can be used to write your own DBMS, which is able to store 
tables and make a recursive DELETE. Then: (1) copy ``points'' table to 
SQL-one-query-written DBMS; (2) do a recursive DELETE; (3) output a 
final table to a proper DBMS -- SQLite.


As Simon has written, the problem can be presented as an image 
processing problem. Further, image is a 2D Cartesian product of X/Y 
coordinates with points being relations between Xs and Ys -- a classic 
relational problem. So, at the beginning, my solution tries to produce 
two tables: xaxis/yaxis from a n-to-n relation ``points''. Each 
``*axis'' table contains id (coordinate) of a row/column and a number of 
points lying on it. Next, let's remove rows/columns having a number of 
points less then given values until all remaining rows/columns (even if 
0, at the border case) have enough points. Parameters (nX, nY) are 
passed by ``params'' CTE:


Let's generate 100 random points:

CREATE TABLE points AS WITH cte(x,y,n) AS (SELECT (random() % 10 + 10) % 
10 + 1, (random() % 10 + 10) % 10 + 1, 1 UNION ALL SELECT (random() % 10 
+ 10) % 10 + 1, (random() % 10 + 10) % 10 + 1, n + 1 FROM cte WHERE n < 
100) SELECT x, y FROM cte;


The preceding statement creates table ``points(x, y)'' containing 100 
points with coordinates <1;10> -- points can be repeated -- it does not 
matter.

Now, let's SELECT x, y FROM points WHERE nX = 6 AND nY = 8:

==
WITH
  params(nx, ny) AS (SELECT 6, 8),
  main(elem, rest) AS (
SELECT NULL, (
  WITH
state(clock, points, xaxis, yaxis, nxmin, nxmax, nymin, nymax) AS (
  SELECT
0,
(SELECT GROUP_CONCAT(x || ' ' || y) FROM points),
(SELECT GROUP_CONCAT(x || ' ' || n) FROM (SELECT x, 
COUNT(x) n FROM points GROUP BY x)),
(SELECT GROUP_CONCAT(y || ' ' || n) FROM (SELECT y, 
COUNT(y) n FROM points GROUP BY y)),
(SELECT MIN(n) FROM (SELECT x, COUNT(x) n FROM points GROUP 
BY x)),
(SELECT MAX(n) FROM (SELECT x, COUNT(x) n FROM points GROUP 
BY x)),
(SELECT MIN(n) FROM (SELECT y, COUNT(y) n FROM points GROUP 
BY y)),
(SELECT MAX(n) FROM (SELECT y, COUNT(y) n FROM points GROUP 
BY y))

  UNION ALL
  SELECT
(clock + 1) % 3,
CASE clock WHEN 0 THEN
(SELECT GROUP_CONCAT(x || ' ' || y) FROM (
  WITH
cte(elem, rest) AS (
  SELECT NULL, state.points
  UNION ALL
  SELECT
SUBSTR(rest, 1, IFNULL(NULLIF(INSTR(rest, ','), 0) 
- 1, LENGTH(rest))),

SUBSTR(rest, NULLIF(INSTR(rest, ','), 0) + 1)
  FROM cte
  WHERE rest IS NOT NULL
)
  SELECT
CAST(elem AS INTEGER) x,
CAST(SUBSTR(elem, INSTR(elem, ' ')) AS INTEGER) y
FROM cte WHERE elem IS NOT NULL
)
WHERE (x NOT IN (
  SELECT x FROM (
WITH
  cte(elem, rest) AS (
SELECT NULL, state.xaxis
UNION ALL
SELECT
  SUBSTR(rest, 1, IFNULL(NULLIF(INSTR(rest, ','), 
0) - 1, LENGTH(rest))),

  SUBSTR(rest, NULLIF(INSTR(rest, ','), 0) + 1)
FROM cte
WHERE rest IS NOT NULL
  )
SELECT
  CAST(elem AS INTEGER) x,
  CAST(SUBSTR(elem, INSTR(elem, ' ')) AS INTEGER) n
  FROM cte WHERE elem IS NOT NULL
  ) WHERE n < (SELECT nx FROM params)
)) AND (y NOT IN (
  SELECT y FROM (
WITH
  cte(elem, rest) AS (
SELECT NULL, state.yaxis
UNION ALL
SELECT
  SUBSTR(rest, 1, IFNULL(NULLIF(INSTR(rest, ','), 
0) - 1, LENGTH(rest))),

   

Re: [sqlite] not build with SQLITE_OMIT_VIRTUALTABLE

2018-05-03 Thread Simon Davies
On 3 May 2018 at 14:07, Michele Dionisio  wrote:
> Hi all,
>
> last sqlite 3230100 does not build with -DSQLITE_OMIT_VIRTUALTABLE and the
> error is:
>
> | sqlite3-sqlite3.o: In function `sqlite3RunParser':
> | sqlite3.c:(.text+0x6e644): undefined reference to `sqlite3VtabFinishParse'
> | sqlite3.c:(.text+0x6e654): undefined reference to `sqlite3VtabFinishParse'
> | sqlite3.c:(.text+0x6e674): undefined reference to `sqlite3VtabBeginParse'
> | sqlite3.c:(.text+0x6e680): undefined reference to `sqlite3VtabArgInit'
> | sqlite3.c:(.text+0x6e690): undefined reference to `sqlite3VtabArgExtend'
> | collect2: error: ld returned 1 exit status
> | make: *** [sqlite3] Error 1

If you are using the amalgamation, see last bullet in list in
"Building The Amalgamation"
(http://www.sqlite.org/howtocompile.html#amal)

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] not build with SQLITE_OMIT_VIRTUALTABLE

2018-05-03 Thread Michele Dionisio

Hi all,

last sqlite 3230100 does not build with -DSQLITE_OMIT_VIRTUALTABLE and 
the error is:


| sqlite3-sqlite3.o: In function `sqlite3RunParser':
| sqlite3.c:(.text+0x6e644): undefined reference to `sqlite3VtabFinishParse'
| sqlite3.c:(.text+0x6e654): undefined reference to `sqlite3VtabFinishParse'
| sqlite3.c:(.text+0x6e674): undefined reference to `sqlite3VtabBeginParse'
| sqlite3.c:(.text+0x6e680): undefined reference to `sqlite3VtabArgInit'
| sqlite3.c:(.text+0x6e690): undefined reference to `sqlite3VtabArgExtend'
| collect2: error: ld returned 1 exit status
| make: *** [sqlite3] Error 1

--

Powersoft logo 

*Michele Dionisio |*Senior Embedded System Manager

*skype:*  m.dionisio *| email:* michele.dioni...@powersoft.com 



*HQ Italy:* Via E. Conti, 5 *|* 50018 Scandicci (FI) Italy

*direct phone:*  +39 055 735 0230 *| Fax:*   +39 055 735 6235

*web site:* www.powersoft.it 

Green Audio Power

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to Handle BigInt

2018-05-03 Thread dmp
> Also note that if you store your numbers as strings, indexes on those
> values will order them as strings.  In other words, searching and sorting
> will work incorrectly.

> It should be possible to get your numbers from a Java numeric variable to
> a database numeric value without passing them through a string at any
> point.  And, of course, back out of the database into a numeric variable.
> If your database library does not allow this, you have a serious problem.
>
>
> As a solution purely about SQLite, SQLite has a "black box" type of BLOB.
> BLOB is used to store bytes, without putting any interpretation on those
> bytes.  Although technically you can search and sort BLOBs, it's probably
> a sign of faulty thinking.  If I was trying to store something in a
> database which I didn't want interpreted in any way, I'd use a BLOB.
>
> Simon.

Hello,

Since the purpose of the code is to replicate a database SQL query
to a memory/file SQLite database then it seems appropriate to maintain
the integrity of the fields as closely as possible.

I shall look at treating the fields for numbers as a generic numeric
variable in Java. The original code derived from obtaining input from
a user, so therefore strings, and parsing to check for valid input
before storing.

PostgreSQL max/min BigInt are fitting in fine as SQLite's Integer.

Thank you for comments.

danap.

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to Handle BigInt

2018-05-03 Thread Eric Grange
As quick insight I gleaned from this list sometime ago: if you only need to
be able to search and sort, the blobs can be used.

If you can live with a fixed size (f.i. 256bits), then just use the
fixed-size big-endian representation as blob content.

For variable-length big integers, encode them as variable-length
big-endian, then prepend it with its byte length encoded to a fixed size
big-endian (f.i. a dword), so encoding 123456 would be the blob
x'000301E240'  (of course if your biginteger are never going to grow
too large, you could use a word or a byte to encode the length)

SQLite will not be able to do arithmetic on those or convert them to string
or anything, but you can add custom functions to handle that format should
you need them.

Eric


On Thu, May 3, 2018 at 1:54 PM, Simon Slavin  wrote:

> On 2 May 2018, at 6:08pm, Thomas Kurz  sqlite.org> wrote:
>
> > Are there any plans for supporting a true BigInt/HugeInt data type (i.e.
> without any length restriction) in the near future?
>
> The largest integer storable as an integer is current 2^63-1, which is the
> value as signed BigInt in many libraries.  In other words, SQLite already
> does BigInt.  Just the same as SQL Server, MySQL, Postgres and DB2.
>
> I have not seen any plans for anything bigger than that.
>
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to Handle BigInt

2018-05-03 Thread Simon Slavin
On 2 May 2018, at 6:08pm, Thomas Kurz  
wrote:

> Are there any plans for supporting a true BigInt/HugeInt data type (i.e. 
> without any length restriction) in the near future?

The largest integer storable as an integer is current 2^63-1, which is the 
value as signed BigInt in many libraries.  In other words, SQLite already does 
BigInt.  Just the same as SQL Server, MySQL, Postgres and DB2.

I have not seen any plans for anything bigger than that.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] EF 6 provider rejecting composite primary keys

2018-05-03 Thread Pete Campion
I first posted this in ErikEJ's Github repo and he referred me to
system.data.sqlite.org.

After I migrated a working SQL server database using SqlCeToolbox to Sqlite
as per toolbox instructions I tried to add an edmx model of the new Sqlite
db file to my VS project and I found that all my foreign keys that reference
composite primary keys have been rejected with error E6035 - no primary key
in source table . Foreign keys that reference non-composite primary keys are
unaffected. I have confirmed that all foreign keys are present using the
SqliteStudio.

Is this a bug with System.Data.SQLite.EF6?

Steps to reproduce

Include a complete description that I can redo to reproduce the issue.

1.  Migrate a SQL server database with tables that have foreign keys
referencing composite primary keys.
2.  Add the new Sqlite database as an edmx into a C# project.
3.  Confirm E6035 for all composite foreign keys.

Further technical details

Toolbox/Power Tools version: (found in About dialog - blue questionmark
icon) 4.7.534.0

Database engine: (SQlite, SQL Compact or SQL Server) : 1.0.108.0

Visual Studio or SSMS version: (e.g. Visual Studio 2017 15.3, SSMS 17.3)
VS2017 15.6.6

 

 

Pete Campion

 

 

Cell : +27 82 447 8989

Bus : +27 31 572 2354

Fax : +27 86 6484 678

  mailto:pe...@ssware.co.za

 

 

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to Handle BigInt

2018-05-03 Thread Thomas Kurz
Are there any plans for supporting a true BigInt/HugeInt data type (i.e. 
without any length restriction) in the near future?


- Original Message - 
From: Simon Slavin 
To: SQLite mailing list 
Sent: Wednesday, May 2, 2018, 19:04:33
Subject: [sqlite] How to Handle BigInt

On 2 May 2018, at 5:22pm, dmp  wrote:

> Since I'm using Java and JDBC I was retrieving numeric fields in PostgreSQL
> with getString(), handles all, then using Integer.parseInt(stringValue) for 
> BigInts in storing to SQLite.

> There lies the problem since BigInt values were exceeding the range of
> Java Integer. My original solution was to store these as strings, will now 
> just use Long.parseLong(stringValue) and store has SQLite Integers
> properly.

Also note that if you store your numbers as strings, indexes on those values 
will order them as strings.  In other words, searching and sorting will work 
incorrectly.

It should be possible to get your numbers from a Java numeric variable to a 
database numeric value without passing them through a string at any point.  
And, of course, back out of the database into a numeric variable.  If your 
database library does not allow this, you have a serious problem.

As a solution purely about SQLite, SQLite has a "black box" type of BLOB.  BLOB 
is used to store bytes, without putting any interpretation on those bytes.  
Although technically you can search and sort BLOBs, it's probably a sign of 
faulty thinking.  If I was trying to store something in a database which I 
didn't want interpreted in any way, I'd use a BLOB.

Simon.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Configuring csv extension to use '; ' as column delimiter instead of ',' ?

2018-05-03 Thread Niall O'Reilly
On 1 May 2018, at 15:20, Simon Slavin wrote:

> Seems like the best way to solve this would be to write a converter for 
> Windows which converts SCSV to CSV.  Then it could be used by all Excel users 
> instead of just SQLite users.

As the heavy lifting of implementing Python on Windows has been done already, I 
think
that some wrapping around this might do the job, since the separator is 
parameterized:
https://docs.python.org/3.6/library/csv.html

Like Simon,

> I'd do it myself but I don't use Windows.

8-)

Niall O'Reilly


signature.asc
Description: OpenPGP digital signature
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] When trying to compile with gcc is giving kind of infinit loop

2018-05-03 Thread Domingo Alvarez Duarte

Hello !

I'm experiencing a kind of compiler infinte loop when trying to compile 
sha1 extension (it seems like the macros problem for shathree).



The compiler seems to enter an infinite loop. If I avoid using "asm" it 
compiles fine.


#if __GNUC__ && (defined(__i386__) || defined(__x86_64__)) && 
!defined(NO_ASM) ///add && !defined(NO_ASM)


Has someone experiencing this problem ?

=

/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c: In function 
'SHA1Transform':
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218953:5: 
warning: implicit declaration of function 'asm' 
[-Wimplicit-function-declaration]
 Rl0(a,b,c,d,e, 0); Rl0(e,a,b,c,d, 1); Rl0(d,e,a,b,c, 2); 
Rl0(c,d,e,a,b, 3);

 ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218889:44: 
error: expected ')' before ':' token
 ({ unsigned int y; asm(op " %1,%0" : "=r" (y) : "I" (k), "0" 
(x)); y; })

    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218891:18: 
note: in expansion of macro 'SHA_ROT'

 #define ror(x,k) SHA_ROT("rorl", x, k)
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218901:32: 
note: in expansion of macro 'ror'

 #define blk0le(i) (block[i] = (ror(block[i],8)&0xFF00FF00) \
    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218914:22: 
note: in expansion of macro 'blk0le'

z+=((w&(x^y))^y)+blk0le(i)+0x5A827999+rol(v,5);w=ror(w,2);
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218953:5: 
note: in expansion of macro 'Rl0'
 Rl0(a,b,c,d,e, 0); Rl0(e,a,b,c,d, 1); Rl0(d,e,a,b,c, 2); 
Rl0(c,d,e,a,b, 3);

 ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218889:44: 
error: expected ')' before ':' token
 ({ unsigned int y; asm(op " %1,%0" : "=r" (y) : "I" (k), "0" 
(x)); y; })

    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218890:18: 
note: in expansion of macro 'SHA_ROT'

 #define rol(x,k) SHA_ROT("roll", x, k)
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218902:7: 
note: in expansion of macro 'rol'

 |(rol(block[i],8)&0x00FF00FF))
   ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218914:22: 
note: in expansion of macro 'blk0le'

z+=((w&(x^y))^y)+blk0le(i)+0x5A827999+rol(v,5);w=ror(w,2);
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218953:5: 
note: in expansion of macro 'Rl0'
 Rl0(a,b,c,d,e, 0); Rl0(e,a,b,c,d, 1); Rl0(d,e,a,b,c, 2); 
Rl0(c,d,e,a,b, 3);

 ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218889:44: 
error: expected ')' before ':' token
 ({ unsigned int y; asm(op " %1,%0" : "=r" (y) : "I" (k), "0" 
(x)); y; })

    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218890:18: 
note: in expansion of macro 'SHA_ROT'

 #define rol(x,k) SHA_ROT("roll", x, k)
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218914:43: 
note: in expansion of macro 'rol'

z+=((w&(x^y))^y)+blk0le(i)+0x5A827999+rol(v,5);w=ror(w,2);
   ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218953:5: 
note: in expansion of macro 'Rl0'
 Rl0(a,b,c,d,e, 0); Rl0(e,a,b,c,d, 1); Rl0(d,e,a,b,c, 2); 
Rl0(c,d,e,a,b, 3);

 ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218889:44: 
error: expected ')' before ':' token
 ({ unsigned int y; asm(op " %1,%0" : "=r" (y) : "I" (k), "0" 
(x)); y; })

    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218891:18: 
note: in expansion of macro 'SHA_ROT'

 #define ror(x,k) SHA_ROT("rorl", x, k)
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218914:54: 
note: in expansion of macro 'ror'

z+=((w&(x^y))^y)+blk0le(i)+0x5A827999+rol(v,5);w=ror(w,2);
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218953:5: 
note: in expansion of macro 'Rl0'
 Rl0(a,b,c,d,e, 0); Rl0(e,a,b,c,d, 1); Rl0(d,e,a,b,c, 2); 
Rl0(c,d,e,a,b, 3);

 ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218889:44: 
error: expected ')' before ':' token
 ({ unsigned int y; asm(op " %1,%0" : "=r" (y) : "I" (k), "0" 
(x)); y; })

    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218891:18: 
note: in expansion of macro 'SHA_ROT'

 #define ror(x,k) SHA_ROT("rorl", x, k)
  ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218901:32: 
note: in expansion of macro 'ror'

 #define blk0le(i) (block[i] = (ror(block[i],8)&0xFF00FF00) \
    ^
/vdata/db-api-server-presentation/../SquiLu-ext/sqlite3.c:218914:22: 
note: in expansion of macro 'blk0le'