File:  [parser3project] / parser3 / tests / 428-sql.html
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Thu Dec 12 20:34:23 2024 UTC (17 months, 3 weeks ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, HEAD
tests updated for newer MariaDB compatibility

@USE
388-sql.html

@main[]

^connect[$SQL.drivers.connect]{
	^prepare-data[]

	1.1 ^try-catch{ ^t[select pet from pets^;select food from pets] }

	1.2 ^h[select 0,pets.* from pets^;select 1,pets.* from pets; $.type[table] $.distinct(true) ]

	1.3 ^h[select 0,pets.* from pets^;select 0,pets.* from pets; $.type[table] $.distinct(true) ]

	1.4 ^h[select 0,pets.* from pets^;select 0, 2+2; $.type[table] $.distinct(true) ]

	1.5 ^h[select 0,pets.* from pets limit 2^;delete from pets where pet=''^;select 1,pets.* from pets limit 1; $.type[table] $.distinct(true) ]

	1.6 ^h[select 0,pets.* from pets^;delete from pets where pet=''^;select 1,pets.* from pets; $.type[table] $.distinct(true) $.limit(1) ] - minor bug: limit for last query only

	1.7 ^h[select pet,food from pets^;select food,pets.* from pets; $.type[table] $.distinct(true)]

	1.8 ^h[select pet,food from pets^;select food,pets.* from pets;  $.distinct(true)]

	1.9 ^h[select 0,pets.* from pets^;select 0, 2+2; $.type[hash] $.distinct(true) ]
	1.10 ^h[select 0, 2+2^;select 0,pets.* from pets; $.type[hash] $.distinct(true) ]

	1.11 ^h[select 0,food from pets^;select 1,pets.* from pets; $.type[table] $.distinct(true) ] - different structure for each query as key differs
	1.12 ^h[select 0,food from pets^;select 0,pets.* from pets; $.type[table] $.distinct(true) ] - note: there are missed and numeric columns in second query, but it better then exception
}

E-mail: