From 200144dd009d33ff8334be24d0fb2cc91b3a87ab Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 14 Apr 2010 23:59:03 +0000 Subject: Moving scanner tests into separate repository. The repository can be reached at http://svn.rubychan.de/coderay-scanner-tests/trunk. --- test/scanners/sql/create_tables.expected.raydebug | 94 -------- test/scanners/sql/create_tables.in.sql | 94 -------- test/scanners/sql/maintenance.expected.raydebug | 24 -- test/scanners/sql/maintenance.in.sql | 24 -- test/scanners/sql/mysql-comments.expected.raydebug | 2 - test/scanners/sql/mysql-comments.in.sql | 2 - .../sql/mysql-long-queries.expected.raydebug | 254 --------------------- test/scanners/sql/mysql-long-queries.in.sql | 254 --------------------- test/scanners/sql/norwegian.expected.raydebug | 48 ---- test/scanners/sql/norwegian.in.sql | 48 ---- test/scanners/sql/reference.expected.raydebug | 109 --------- test/scanners/sql/reference.in.sql | 109 --------- test/scanners/sql/selects.expected.raydebug | 46 ---- test/scanners/sql/selects.in.sql | 46 ---- test/scanners/sql/suite.rb | 2 - 15 files changed, 1156 deletions(-) delete mode 100644 test/scanners/sql/create_tables.expected.raydebug delete mode 100644 test/scanners/sql/create_tables.in.sql delete mode 100644 test/scanners/sql/maintenance.expected.raydebug delete mode 100644 test/scanners/sql/maintenance.in.sql delete mode 100644 test/scanners/sql/mysql-comments.expected.raydebug delete mode 100644 test/scanners/sql/mysql-comments.in.sql delete mode 100644 test/scanners/sql/mysql-long-queries.expected.raydebug delete mode 100644 test/scanners/sql/mysql-long-queries.in.sql delete mode 100644 test/scanners/sql/norwegian.expected.raydebug delete mode 100644 test/scanners/sql/norwegian.in.sql delete mode 100644 test/scanners/sql/reference.expected.raydebug delete mode 100644 test/scanners/sql/reference.in.sql delete mode 100644 test/scanners/sql/selects.expected.raydebug delete mode 100644 test/scanners/sql/selects.in.sql delete mode 100644 test/scanners/sql/suite.rb (limited to 'test/scanners/sql') diff --git a/test/scanners/sql/create_tables.expected.raydebug b/test/scanners/sql/create_tables.expected.raydebug deleted file mode 100644 index a4b7f47..0000000 --- a/test/scanners/sql/create_tables.expected.raydebug +++ /dev/null @@ -1,94 +0,0 @@ -comment(--RANDOM SQL QUERIES THAT DO NOTHING INTERESTING) -comment(--Copyright (C\) 2009 - Keith Pitt ) - -comment(--This program is free software: you can redistribute it and/or modify) -comment(--it under the terms of the GNU General Public License as published by) -comment(--the Free Software Foundation, either version 3 of the License, or) -comment(--(at your option\) any later version.) - -comment(--This program is distributed in the hope that it will be useful,) -comment(--but WITHOUT ANY WARRANTY; without even the implied warranty of) -comment(--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the) -comment(--GNU General Public License for more details.) - -comment(--You should have received a copy of the GNU General Public License) -comment(--along with this program. If not, see .) - -comment(-- Comment: Drop table) -class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) stringoperator(;) - -comment(-- Create table) -class(CREATE) type(TABLE) string operator(() - string pre_type(varchar)operator(()integer(255)operator(\)) directive(default) pre_constant(NULL) -operator(\)) reserved(ENGINE)operator(=)ident(InnoDB) directive(DEFAULT) directive(CHARSET)operator(=)ident(latin1)operator(;) - -comment(-- Drop table again) -class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) ident(customer)operator(;) - -comment(-- Create customers) -class(CREATE) type(TABLE) ident(customer) operator(() - ident(first_name) pre_type(char)operator(()integer(50)operator(\))operator(,) - ident(last_name) pre_type(char)operator(()integer(50)operator(\))operator(,) - ident(address) pre_type(char)operator(()integer(50)operator(\))operator(,) - ident(city) pre_type(char)operator(()integer(50)operator(\))operator(,) - ident(country) pre_type(char)operator(()integer(25)operator(\))operator(,) - ident(birth_date) pre_type(date)operator(,) - ident(created_at) pre_type(timestamp)operator(,) comment(-- Differnt sort of date here) - ident(updated_at) pre_type(timestamp) -operator(\)) - -comment(-- Create business) -class(CREATE) type(TABLE) ident(business) operator(() - ident(compant_name) pre_type(char)operator(()integer(50)operator(\))operator(,) - ident(address) pre_type(char)operator(()integer(50)operator(\)) directive(default) stringoperator(,) comment(-- Oohh, defaults..) - ident(city) pre_type(char)operator(()integer(50)operator(\)) directive(default) stringoperator(,) - ident(country) pre_type(char)operator(()integer(150)operator(\)) directive(default) string -operator(\)) - -comment(-- Some random table) - -class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) ident(customer_statuses)operator(;) - -class(CREATE) type(TABLE) string operator(() - comment(-- Auto incrementing IDs) - string pre_type(smallint)operator(()integer(6)operator(\)) pre_type(unsigned) reserved(NOT) pre_constant(NULL) directive(auto_increment)operator(,) - string pre_type(int)operator(()integer(10)operator(\)) pre_type(unsigned) reserved(NOT) pre_constant(NULL) directive(default) stringoperator(,) - string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(date) directive(default) pre_constant(NULL)operator(,) - string pre_type(smallint)operator(()integer(6)operator(\)) pre_type(unsigned) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(100)operator(\)) directive(default) pre_constant(NULL)operator(,) - reserved(PRIMARY) reserved(KEY) operator(()stringoperator(\)) -operator(\)) reserved(ENGINE)operator(=)ident(InnoDB) directive(DEFAULT) directive(CHARSET)operator(=)ident(latin1)operator(;) - -comment(-- Try creating an index.) -class(CREATE) type(INDEX) ident(customer_status_status_id) reserved(ON) ident(customer_statuses) operator(()ident(status_id)operator(\)) - -comment(/* Now lets try and make a really big table */) - -class(DROP) type(TABLE) reserved(IF) reserved(EXISTS) stringoperator(;) -class(CREATE) type(TABLE) string operator(() - string pre_type(int)operator(()integer(10)operator(\)) pre_type(unsigned) reserved(NOT) pre_constant(NULL) directive(auto_increment)operator(,) - string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(20)operator(\)) reserved(NOT) pre_constant(NULL) directive(default) stringoperator(,) - string pre_type(varchar)operator(()integer(20)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(30)operator(\)) reserved(NOT) pre_constant(NULL) directive(default) stringoperator(,) - string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(10)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(smallint)operator(()integer(3)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(15)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(date) directive(default) pre_constant(NULL)operator(,) - string pre_type(int)operator(()integer(11)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(100)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(char)operator(()integer(3)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(char)operator(()integer(1)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) - string pre_type(varchar)operator(()integer(50)operator(\)) directive(default) pre_constant(NULL)operator(,) - reserved(PRIMARY) reserved(KEY) operator(()stringoperator(\)) -operator(\)) reserved(ENGINE)operator(=)ident(InnoDB) directive(DEFAULT) directive(CHARSET)operator(=)ident(latin1)operator(;) - - diff --git a/test/scanners/sql/create_tables.in.sql b/test/scanners/sql/create_tables.in.sql deleted file mode 100644 index 1844af0..0000000 --- a/test/scanners/sql/create_tables.in.sql +++ /dev/null @@ -1,94 +0,0 @@ ---RANDOM SQL QUERIES THAT DO NOTHING INTERESTING ---Copyright (C) 2009 - Keith Pitt - ---This program is free software: you can redistribute it and/or modify ---it under the terms of the GNU General Public License as published by ---the Free Software Foundation, either version 3 of the License, or ---(at your option) any later version. - ---This program is distributed in the hope that it will be useful, ---but WITHOUT ANY WARRANTY; without even the implied warranty of ---MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ---GNU General Public License for more details. - ---You should have received a copy of the GNU General Public License ---along with this program. If not, see . - --- Comment: Drop table -DROP TABLE IF EXISTS `general_lookups`; - --- Create table -CREATE TABLE `general_lookups` ( - `name` varchar(255) default NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- Drop table again -DROP TABLE IF EXISTS customer; - --- Create customers -CREATE TABLE customer ( - first_name char(50), - last_name char(50), - address char(50), - city char(50), - country char(25), - birth_date date, - created_at timestamp, -- Differnt sort of date here - updated_at timestamp -) - --- Create business -CREATE TABLE business ( - compant_name char(50), - address char(50) default 'Address Unknown', -- Oohh, defaults.. - city char(50) default 'Adelaide', - country char(150) default 'Australia' -) - --- Some random table - -DROP TABLE IF EXISTS customer_statuses; - -CREATE TABLE `customer_statuses` ( - -- Auto incrementing IDs - `id` smallint(6) unsigned NOT NULL auto_increment, - `customer_id` int(10) unsigned NOT NULL default '0', - `customer_client_code` varchar(15) default NULL, - `entry_date` date default NULL, - `status_id` smallint(6) unsigned default NULL, - `comments` varchar(100) default NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - --- Try creating an index. -CREATE INDEX customer_status_status_id ON customer_statuses (status_id) - -/* Now lets try and make a really big table */ - -DROP TABLE IF EXISTS `legacy_clients`; -CREATE TABLE `legacy_clients` ( - `id` int(10) unsigned NOT NULL auto_increment, - `client_code` varchar(15) default NULL, - `first_name` varchar(20) NOT NULL default '', - `other_name` varchar(20) default NULL, - `surname` varchar(30) NOT NULL default '', - `address` varchar(50) default NULL, - `suburb` varchar(50) default NULL, - `postcode` varchar(10) default NULL, - `location_id` smallint(3) default NULL, - `home_phone` varchar(15) default NULL, - `work_phone` varchar(15) default NULL, - `fax` varchar(15) default NULL, - `mobile` varchar(15) default NULL, - `email` varchar(50) default NULL, - `date_of_birth` date default NULL, - `business_id` int(11) default NULL, - `comments` varchar(100) default NULL, - `state` char(3) default NULL, - `sex` char(1) default NULL, - `location_temp` varchar(50) default NULL, - `employer_temp` varchar(50) default NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; - - diff --git a/test/scanners/sql/maintenance.expected.raydebug b/test/scanners/sql/maintenance.expected.raydebug deleted file mode 100644 index 6cfb72a..0000000 --- a/test/scanners/sql/maintenance.expected.raydebug +++ /dev/null @@ -1,24 +0,0 @@ -comment(--RANDOM SQL QUERIES THAT DO NOTHING INTERESTING) -comment(--Copyright (C\) 2009 - Keith Pitt ) - -comment(--This program is free software: you can redistribute it and/or modify) -comment(--it under the terms of the GNU General Public License as published by) -comment(--the Free Software Foundation, either version 3 of the License, or) -comment(--(at your option\) any later version.) - -comment(--This program is distributed in the hope that it will be useful,) -comment(--but WITHOUT ANY WARRANTY; without even the implied warranty of) -comment(--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the) -comment(--GNU General Public License for more details.) - -comment(--You should have received a copy of the GNU General Public License) -comment(--along with this program. If not, see .) - -class(INSERT) class(INTO) ident(users) operator(()ident(first_name)operator(,) ident(last_name)operator(\)) reserved(VALUES) operator(()stringoperator(,) stringoperator(\))operator(;) - -class(INSERT) class(INTO) ident(users) operator(()ident(first_name)operator(,) ident(last_name)operator(\)) reserved(VALUES) operator(()stringoperator(,) stringoperator(\))operator(;) - -class(UPDATE) ident(users) class(SET) ident(first_name) operator(=) string reserved(WHERE) ident(first_name) operator(=) stringoperator(;) - -class(DELETE) reserved(FROM) ident(users) reserved(WHERE) ident(first_name) operator(=) stringoperator(;) - diff --git a/test/scanners/sql/maintenance.in.sql b/test/scanners/sql/maintenance.in.sql deleted file mode 100644 index 7b06db6..0000000 --- a/test/scanners/sql/maintenance.in.sql +++ /dev/null @@ -1,24 +0,0 @@ ---RANDOM SQL QUERIES THAT DO NOTHING INTERESTING ---Copyright (C) 2009 - Keith Pitt - ---This program is free software: you can redistribute it and/or modify ---it under the terms of the GNU General Public License as published by ---the Free Software Foundation, either version 3 of the License, or ---(at your option) any later version. - ---This program is distributed in the hope that it will be useful, ---but WITHOUT ANY WARRANTY; without even the implied warranty of ---MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ---GNU General Public License for more details. - ---You should have received a copy of the GNU General Public License ---along with this program. If not, see . - -INSERT INTO users (first_name, last_name) VALUES ('John', 'Doe'); - -INSERT INTO users (first_name, last_name) VALUES ("John", "Doe"); - -UPDATE users SET first_name = 'Keith' WHERE first_name = 'JOHN'; - -DELETE FROM users WHERE first_name = 'Keith'; - diff --git a/test/scanners/sql/mysql-comments.expected.raydebug b/test/scanners/sql/mysql-comments.expected.raydebug deleted file mode 100644 index 38f738c..0000000 --- a/test/scanners/sql/mysql-comments.expected.raydebug +++ /dev/null @@ -1,2 +0,0 @@ -class(SELECT) directive(/*! STRAIGHT_JOIN */) ident(col1) reserved(FROM) ident(table1)operator(,)ident(table2) reserved(WHERE) operator(.)operator(.)operator(.) -class(CREATE) directive(/*!32302 TEMPORARY */) type(TABLE) ident(t) operator(()ident(a) pre_type(INT)operator(\))operator(;) diff --git a/test/scanners/sql/mysql-comments.in.sql b/test/scanners/sql/mysql-comments.in.sql deleted file mode 100644 index fe7cd83..0000000 --- a/test/scanners/sql/mysql-comments.in.sql +++ /dev/null @@ -1,2 +0,0 @@ -SELECT /*! STRAIGHT_JOIN */ col1 FROM table1,table2 WHERE ... -CREATE /*!32302 TEMPORARY */ TABLE t (a INT); diff --git a/test/scanners/sql/mysql-long-queries.expected.raydebug b/test/scanners/sql/mysql-long-queries.expected.raydebug deleted file mode 100644 index a0d0886..0000000 --- a/test/scanners/sql/mysql-long-queries.expected.raydebug +++ /dev/null @@ -1,254 +0,0 @@ -comment(/* This is a modified copy of the - query linked above to test other keywords: */) -class(SELECT) ident(sd)operator(.)ident(qbclass)operator(,) comment(-- Comments Test) - predefined(Sum)operator(()ident(sd)operator(.)ident(amount)operator(\)) reserved(AS) ident(invoiceamount)operator(,) comment(# Comments Test) - predefined(Sum)operator(()ident(scd1)operator(.)ident(amount)operator(\)) reserved(AS) ident(paymentsperiod1)operator(,) - predefined(Sum)operator(()ident(scd2)operator(.)ident(amount)operator(\)) reserved(AS) ident(paymentsperiod2)operator(,) - predefined(Sum)operator(()ident(scd3)operator(.)ident(amount)operator(\)) reserved(AS) ident(paymentsperiod3) -reserved(FROM) ident(studentdebit) reserved(AS) ident(sd) - reserved(LEFT) reserved(JOIN) operator(()class(SELECT) ident(studentcreditdetail)operator(.)ident(studentdebitid)operator(,) - ident(studentcreditdetail)operator(.)ident(amount)operator(,) - ident(studentcredit)operator(.)pre_type(date)operator(,) - ident(credittype)operator(.)ident(credittype) - reserved(FROM) ident(studentcreditdetail) - reserved(INNER) reserved(JOIN) ident(studentcredit) - reserved(ON) ident(studentcreditdetail)operator(.)ident(studentcreditid) operator(=) ident(studentcredit)operator(.)ident(studentcreditid) - reserved(AND) ident(studentcredit)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(studentcredit)operator(.)ident(status) operator(=) integer(1) comment(/* Successful */) - comment(/* PERIOD 1 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) - comment(/* PERIOD 1 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(1) ident(MONTH) - reserved(LEFT) reserved(JOIN) ident(credittype) - reserved(USING)operator(()ident(credittypeid)operator(\))operator(\)) reserved(AS) ident(scd1) - reserved(ON) ident(sd)operator(.)ident(studentdebitid) operator(=) ident(scd1)operator(.)ident(studentdebitid) - reserved(LEFT) reserved(JOIN) operator(()class(SELECT) ident(studentcreditdetail)operator(.)ident(studentdebitid)operator(,) - ident(studentcreditdetail)operator(.)ident(amount)operator(,) - ident(studentcredit)operator(.)pre_type(date)operator(,) - ident(credittype)operator(.)ident(credittype) - reserved(FROM) ident(studentcreditdetail) - reserved(INNER) reserved(JOIN) ident(studentcredit) - reserved(ON) ident(studentcreditdetail)operator(.)ident(studentcreditid) operator(=) ident(studentcredit)operator(.)ident(studentcreditid) - reserved(AND) ident(studentcredit)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(studentcredit)operator(.)ident(status) operator(=) integer(1) comment(/* Successful */) - comment(/* PERIOD 2 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(1) ident(MONTH) - comment(/* PERIOD 2 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(2) ident(MONTH) - reserved(LEFT) reserved(OUTER) reserved(JOIN) ident(credittype) - reserved(USING)operator(()ident(credittypeid)operator(\))operator(\)) reserved(AS) ident(scd2) - reserved(ON) ident(sd)operator(.)ident(studentdebitid) operator(=) ident(scd2)operator(.)ident(studentdebitid) - reserved(RIGHT) reserved(JOIN) operator(()class(SELECT) ident(studentcreditdetail)operator(.)ident(studentdebitid)operator(,) - ident(studentcreditdetail)operator(.)ident(amount)operator(,) - ident(studentcredit)operator(.)pre_type(date)operator(,) - ident(credittype)operator(.)ident(credittype) - reserved(FROM) ident(studentcreditdetail) - reserved(INNER) reserved(JOIN) ident(studentcredit) - reserved(ON) ident(studentcreditdetail)operator(.)ident(studentcreditid) operator(=) ident(studentcredit)operator(.)ident(studentcreditid) - reserved(AND) ident(studentcredit)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(studentcredit)operator(.)ident(status) operator(=) integer(1) comment(/* Successful */) - comment(/* PERIOD 3 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(2) ident(MONTH) - comment(/* PERIOD 3 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(3) ident(MONTH) - reserved(LEFT) reserved(JOIN) ident(credittype) - reserved(USING)operator(()ident(credittypeid)operator(\))operator(\)) reserved(AS) ident(scd3) - reserved(ON) ident(sd)operator(.)ident(studentdebitid) operator(=) ident(scd3)operator(.)ident(studentdebitid) -reserved(WHERE) ident(sd)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(sd)operator(.)ident(status) operator(=) integer(0) comment(/* Normal */) - comment(/* Exclude Voided Invoices */) - reserved(AND) ident(sd)operator(.)ident(adjustsdebitid) reserved(IS) pre_constant(NULL) - reserved(AND) ident(sd)operator(.)ident(studentdebitid) reserved(NOT) ident(IN) operator(()class(SELECT) ident(adjustsdebitid) - reserved(FROM) ident(studentdebit) - reserved(WHERE) ident(adjustsdebitid) reserved(IS) reserved(NOT) pre_constant(NULL)operator(\)) - comment(/* FULL PERIOD */) - reserved(AND) ident(sd)operator(.)pre_type(DATE) operator(<) predefined(Now)operator(()operator(\)) - comment(/* FULL PERIOD */) - reserved(AND) ident(sd)operator(.)pre_type(DATE) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(3) ident(MONTH) -reserved(GROUP) reserved(BY) ident(sd)operator(.)ident(qbclass) -comment(/* Formatting only */) -reserved(UNION) reserved(ALL) -class(SELECT) stringoperator(,) - stringoperator(,) - stringoperator(,) - stringoperator(,) - string -comment(/* Payment Types Summary */) -reserved(UNION) reserved(DISTINCT) -class(SELECT) ident(credittype)operator(,) - ident(invoiceamount)operator(,) - predefined(Sum)operator(()ident(paymentsperiod1)operator(\))operator(,) - predefined(Sum)operator(()ident(paymentsperiod2)operator(\))operator(,) - predefined(Sum)operator(()ident(paymentsperiod3)operator(\)) -reserved(FROM) operator(()class(SELECT) ident(scd)operator(.)ident(credittype)operator(,) - string reserved(AS) ident(invoiceamount)operator(,) - predefined(Sum)operator(()ident(scd)operator(.)ident(amount)operator(\)) reserved(AS) ident(paymentsperiod1)operator(,) - string reserved(AS) ident(paymentsperiod2)operator(,) - string reserved(AS) ident(paymentsperiod3) - reserved(FROM) ident(studentdebit) reserved(AS) ident(sd) - reserved(INNER) reserved(JOIN) operator(()class(SELECT) ident(studentcreditdetail)operator(.)ident(studentdebitid)operator(,) - ident(studentcreditdetail)operator(.)ident(amount)operator(,) - ident(studentcredit)operator(.)pre_type(date)operator(,) - ident(credittype)operator(.)ident(credittype) - reserved(FROM) ident(studentcreditdetail) - reserved(INNER) reserved(JOIN) ident(studentcredit) - reserved(ON) ident(studentcreditdetail)operator(.)ident(studentcreditid) operator(=) ident(studentcredit)operator(.)ident(studentcreditid) - reserved(AND) ident(studentcredit)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(studentcredit)operator(.)ident(status) operator(=) integer(1) comment(/* Successful */) - comment(/* PERIOD 1 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) - comment(/* PERIOD 1 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(1) ident(MONTH) - reserved(LEFT) reserved(JOIN) ident(credittype) - reserved(USING)operator(()ident(credittypeid)operator(\))operator(\)) reserved(AS) ident(scd) - reserved(ON) ident(sd)operator(.)ident(studentdebitid) operator(=) ident(scd)operator(.)ident(studentdebitid) - reserved(WHERE) ident(sd)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(sd)operator(.)ident(status) operator(=) integer(0) comment(/* Normal */) - comment(/* Exclude Voided Invoices */) - reserved(AND) ident(sd)operator(.)ident(adjustsdebitid) reserved(IS) pre_constant(NULL) - reserved(AND) ident(sd)operator(.)ident(studentdebitid) reserved(NOT) ident(IN) operator(()class(SELECT) ident(adjustsdebitid) - reserved(FROM) ident(studentdebit) - reserved(WHERE) ident(adjustsdebitid) reserved(IS) reserved(NOT) pre_constant(NULL)operator(\)) - reserved(AND) ident(sd)operator(.)pre_type(DATE) operator(<) predefined(Now)operator(()operator(\)) - reserved(AND) ident(sd)operator(.)pre_type(DATE) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(3) ident(MONTH) - reserved(GROUP) reserved(BY) ident(scd)operator(.)ident(credittype) - reserved(UNION) reserved(ALL) - class(SELECT) ident(scd)operator(.)ident(credittype)operator(,) - string reserved(AS) ident(invoiceamount)operator(,) - string reserved(AS) ident(paymentsperiod1)operator(,) - predefined(Sum)operator(()ident(scd)operator(.)ident(amount)operator(\)) reserved(AS) ident(paymentsperiod2)operator(,) - string reserved(AS) ident(paymentsperiod3) - reserved(FROM) ident(studentdebit) reserved(AS) ident(sd) - reserved(INNER) reserved(JOIN) operator(()class(SELECT) ident(studentcreditdetail)operator(.)ident(studentdebitid)operator(,) - ident(studentcreditdetail)operator(.)ident(amount)operator(,) - ident(studentcredit)operator(.)pre_type(date)operator(,) - ident(credittype)operator(.)ident(credittype) - reserved(FROM) ident(studentcreditdetail) - reserved(INNER) reserved(JOIN) ident(studentcredit) - reserved(ON) ident(studentcreditdetail)operator(.)ident(studentcreditid) operator(=) ident(studentcredit)operator(.)ident(studentcreditid) - reserved(AND) ident(studentcredit)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(studentcredit)operator(.)ident(status) operator(=) integer(1) comment(/* Successful */) - comment(/* PERIOD 2 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(1) ident(MONTH) - comment(/* PERIOD 2 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(2) ident(MONTH) - reserved(LEFT) reserved(JOIN) ident(credittype) - reserved(USING)operator(()ident(credittypeid)operator(\))operator(\)) reserved(AS) ident(scd) - reserved(ON) ident(sd)operator(.)ident(studentdebitid) operator(=) ident(scd)operator(.)ident(studentdebitid) - reserved(WHERE) ident(sd)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(sd)operator(.)ident(status) operator(=) integer(0) comment(/* Normal */) - comment(/* Exclude Voided Invoices */) - reserved(AND) ident(sd)operator(.)ident(adjustsdebitid) reserved(IS) pre_constant(NULL) - reserved(AND) ident(sd)operator(.)ident(studentdebitid) reserved(NOT) ident(IN) operator(()class(SELECT) ident(adjustsdebitid) - reserved(FROM) ident(studentdebit) - reserved(WHERE) ident(adjustsdebitid) reserved(IS) reserved(NOT) pre_constant(NULL)operator(\)) - reserved(AND) ident(sd)operator(.)pre_type(DATE) operator(<) predefined(Now)operator(()operator(\)) - reserved(AND) ident(sd)operator(.)pre_type(DATE) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(3) ident(MONTH) - reserved(GROUP) reserved(BY) ident(scd)operator(.)ident(credittype) - reserved(UNION) reserved(ALL) - class(SELECT) ident(scd)operator(.)ident(credittype)operator(,) - string reserved(AS) ident(invoiceamount)operator(,) - string reserved(AS) ident(paymentsperiod1)operator(,) - string reserved(AS) ident(paymentsperiod2)operator(,) - predefined(Sum)operator(()ident(scd)operator(.)ident(amount)operator(\)) reserved(AS) ident(paymentsperiod3) - reserved(FROM) ident(studentdebit) reserved(AS) ident(sd) - reserved(INNER) reserved(JOIN) operator(()class(SELECT) ident(studentcreditdetail)operator(.)ident(studentdebitid)operator(,) - ident(studentcreditdetail)operator(.)ident(amount)operator(,) - ident(studentcredit)operator(.)pre_type(date)operator(,) - ident(credittype)operator(.)ident(credittype) - reserved(FROM) ident(studentcreditdetail) - reserved(INNER) reserved(JOIN) ident(studentcredit) - reserved(ON) ident(studentcreditdetail)operator(.)ident(studentcreditid) operator(=) ident(studentcredit)operator(.)ident(studentcreditid) - reserved(AND) ident(studentcredit)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(studentcredit)operator(.)ident(status) operator(=) integer(1) comment(/* Successful */) - comment(/* PERIOD 3 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(2) ident(MONTH) - comment(/* PERIOD 3 */) - reserved(AND) ident(studentcredit)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(3) ident(MONTH) - reserved(LEFT) reserved(JOIN) ident(credittype) - reserved(USING)operator(()ident(credittypeid)operator(\))operator(\)) reserved(AS) ident(scd) - reserved(ON) ident(sd)operator(.)ident(studentdebitid) operator(=) ident(scd)operator(.)ident(studentdebitid) - reserved(WHERE) ident(sd)operator(.)ident(obsolete) operator(=) integer(0) comment(/* Not Deleted */) - reserved(AND) ident(sd)operator(.)ident(status) operator(=) integer(0) comment(/* Normal */) - comment(/* Exclude Voided Invoices */) - reserved(AND) ident(sd)operator(.)ident(adjustsdebitid) reserved(IS) pre_constant(NULL) - reserved(AND) ident(sd)operator(.)ident(studentdebitid) reserved(NOT) ident(IN) operator(()class(SELECT) ident(adjustsdebitid) - reserved(FROM) ident(studentdebit) - reserved(WHERE) ident(adjustsdebitid) reserved(IS) reserved(NOT) pre_constant(NULL)operator(\)) - reserved(AND) ident(sd)operator(.)pre_type(date) operator(<) predefined(Now)operator(()operator(\)) - reserved(AND) ident(sd)operator(.)pre_type(date) operator(>) predefined(Now)operator(()operator(\)) operator(-) ident(INTERVAL) integer(3) ident(MONTH) - reserved(GROUP) reserved(BY) ident(scd)operator(.)ident(credittype)operator(\)) reserved(AS) ident(ct) -reserved(GROUP) reserved(BY) ident(ct)operator(.)ident(credittype) - -class(SELECT) string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - reserved(If)operator(()operator(()stringoperator(.)string reserved(IS) reserved(NOT) pre_constant(NULL)operator(\))operator(,)stringoperator(.)stringoperator(,) - stringoperator(.)stringoperator(\)) reserved(AS) stringoperator(,) - string reserved(AS) string -reserved(FROM) operator(()operator(()operator(()operator(()operator(()operator(()operator(()operator(()string string - reserved(JOIN) string string - reserved(ON) operator(()operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\)) - reserved(AND) operator(()stringoperator(.)string operator(=) stringoperator(\)) - reserved(AND) operator(()operator(()stringoperator(.)string operator(<) predefined(Now)operator(()operator(\))operator(\)) - reserved(OR) ident(Isnull)operator(()stringoperator(.)stringoperator(\))operator(\))operator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\)) - reserved(AND) operator(()stringoperator(.)string operator(=) stringoperator(\))operator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) -reserved(UNION) -class(SELECT) string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) stringoperator(,) - reserved(If)operator(()operator(()stringoperator(.)string reserved(IS) reserved(NOT) pre_constant(NULL)operator(\))operator(,)stringoperator(.)stringoperator(,) - stringoperator(.)stringoperator(\)) reserved(AS) stringoperator(,) - stringoperator(.)string reserved(AS) string -reserved(FROM) operator(()operator(()operator(()operator(()operator(()operator(()operator(()operator(()string string - reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) - reserved(LEFT) reserved(JOIN) string string - reserved(ON) operator(()operator(()stringoperator(.)string operator(=) stringoperator(.)stringoperator(\))operator(\))operator(\)) -reserved(WHERE) operator(()reserved(NOT) operator(()operator(()stringoperator(.)string reserved(LIKE) stringoperator(\))operator(\))operator(\)) \ No newline at end of file diff --git a/test/scanners/sql/mysql-long-queries.in.sql b/test/scanners/sql/mysql-long-queries.in.sql deleted file mode 100644 index 5704d6b..0000000 --- a/test/scanners/sql/mysql-long-queries.in.sql +++ /dev/null @@ -1,254 +0,0 @@ -/* This is a modified copy of the - query linked above to test other keywords: */ -SELECT sd.qbclass, -- Comments Test - Sum(sd.amount) AS invoiceamount, # Comments Test - Sum(scd1.amount) AS paymentsperiod1, - Sum(scd2.amount) AS paymentsperiod2, - Sum(scd3.amount) AS paymentsperiod3 -FROM studentdebit AS sd - LEFT JOIN (SELECT studentcreditdetail.studentdebitid, - studentcreditdetail.amount, - studentcredit.date, - credittype.credittype - FROM studentcreditdetail - INNER JOIN studentcredit - ON studentcreditdetail.studentcreditid = studentcredit.studentcreditid - AND studentcredit.obsolete = 0 /* Not Deleted */ - AND studentcredit.status = 1 /* Successful */ - /* PERIOD 1 */ - AND studentcredit.date < Now() - /* PERIOD 1 */ - AND studentcredit.date > Now() - INTERVAL 1 MONTH - LEFT JOIN credittype - USING(credittypeid)) AS scd1 - ON sd.studentdebitid = scd1.studentdebitid - LEFT JOIN (SELECT studentcreditdetail.studentdebitid, - studentcreditdetail.amount, - studentcredit.date, - credittype.credittype - FROM studentcreditdetail - INNER JOIN studentcredit - ON studentcreditdetail.studentcreditid = studentcredit.studentcreditid - AND studentcredit.obsolete = 0 /* Not Deleted */ - AND studentcredit.status = 1 /* Successful */ - /* PERIOD 2 */ - AND studentcredit.date < Now() - INTERVAL 1 MONTH - /* PERIOD 2 */ - AND studentcredit.date > Now() - INTERVAL 2 MONTH - LEFT OUTER JOIN credittype - USING(credittypeid)) AS scd2 - ON sd.studentdebitid = scd2.studentdebitid - RIGHT JOIN (SELECT studentcreditdetail.studentdebitid, - studentcreditdetail.amount, - studentcredit.date, - credittype.credittype - FROM studentcreditdetail - INNER JOIN studentcredit - ON studentcreditdetail.studentcreditid = studentcredit.studentcreditid - AND studentcredit.obsolete = 0 /* Not Deleted */ - AND studentcredit.status = 1 /* Successful */ - /* PERIOD 3 */ - AND studentcredit.date < Now() - INTERVAL 2 MONTH - /* PERIOD 3 */ - AND studentcredit.date > Now() - INTERVAL 3 MONTH - LEFT JOIN credittype - USING(credittypeid)) AS scd3 - ON sd.studentdebitid = scd3.studentdebitid -WHERE sd.obsolete = 0 /* Not Deleted */ - AND sd.status = 0 /* Normal */ - /* Exclude Voided Invoices */ - AND sd.adjustsdebitid IS NULL - AND sd.studentdebitid NOT IN (SELECT adjustsdebitid - FROM studentdebit - WHERE adjustsdebitid IS NOT NULL) - /* FULL PERIOD */ - AND sd.DATE < Now() - /* FULL PERIOD */ - AND sd.DATE > Now() - INTERVAL 3 MONTH -GROUP BY sd.qbclass -/* Formatting only */ -UNION ALL -SELECT '---', - '---', - '---', - '---', - '---' -/* Payment Types Summary */ -UNION DISTINCT -SELECT credittype, - invoiceamount, - Sum(paymentsperiod1), - Sum(paymentsperiod2), - Sum(paymentsperiod3) -FROM (SELECT scd.credittype, - '' AS invoiceamount, - Sum(scd.amount) AS paymentsperiod1, - '' AS paymentsperiod2, - '' AS paymentsperiod3 - FROM studentdebit AS sd - INNER JOIN (SELECT studentcreditdetail.studentdebitid, - studentcreditdetail.amount, - studentcredit.date, - credittype.credittype - FROM studentcreditdetail - INNER JOIN studentcredit - ON studentcreditdetail.studentcreditid = studentcredit.studentcreditid - AND studentcredit.obsolete = 0 /* Not Deleted */ - AND studentcredit.status = 1 /* Successful */ - /* PERIOD 1 */ - AND studentcredit.date < Now() - /* PERIOD 1 */ - AND studentcredit.date > Now() - INTERVAL 1 MONTH - LEFT JOIN credittype - USING(credittypeid)) AS scd - ON sd.studentdebitid = scd.studentdebitid - WHERE sd.obsolete = 0 /* Not Deleted */ - AND sd.status = 0 /* Normal */ - /* Exclude Voided Invoices */ - AND sd.adjustsdebitid IS NULL - AND sd.studentdebitid NOT IN (SELECT adjustsdebitid - FROM studentdebit - WHERE adjustsdebitid IS NOT NULL) - AND sd.DATE < Now() - AND sd.DATE > Now() - INTERVAL 3 MONTH - GROUP BY scd.credittype - UNION ALL - SELECT scd.credittype, - '' AS invoiceamount, - '' AS paymentsperiod1, - Sum(scd.amount) AS paymentsperiod2, - '' AS paymentsperiod3 - FROM studentdebit AS sd - INNER JOIN (SELECT studentcreditdetail.studentdebitid, - studentcreditdetail.amount, - studentcredit.date, - credittype.credittype - FROM studentcreditdetail - INNER JOIN studentcredit - ON studentcreditdetail.studentcreditid = studentcredit.studentcreditid - AND studentcredit.obsolete = 0 /* Not Deleted */ - AND studentcredit.status = 1 /* Successful */ - /* PERIOD 2 */ - AND studentcredit.date < Now() - INTERVAL 1 MONTH - /* PERIOD 2 */ - AND studentcredit.date > Now() - INTERVAL 2 MONTH - LEFT JOIN credittype - USING(credittypeid)) AS scd - ON sd.studentdebitid = scd.studentdebitid - WHERE sd.obsolete = 0 /* Not Deleted */ - AND sd.status = 0 /* Normal */ - /* Exclude Voided Invoices */ - AND sd.adjustsdebitid IS NULL - AND sd.studentdebitid NOT IN (SELECT adjustsdebitid - FROM studentdebit - WHERE adjustsdebitid IS NOT NULL) - AND sd.DATE < Now() - AND sd.DATE > Now() - INTERVAL 3 MONTH - GROUP BY scd.credittype - UNION ALL - SELECT scd.credittype, - '' AS invoiceamount, - '' AS paymentsperiod1, - '' AS paymentsperiod2, - Sum(scd.amount) AS paymentsperiod3 - FROM studentdebit AS sd - INNER JOIN (SELECT studentcreditdetail.studentdebitid, - studentcreditdetail.amount, - studentcredit.date, - credittype.credittype - FROM studentcreditdetail - INNER JOIN studentcredit - ON studentcreditdetail.studentcreditid = studentcredit.studentcreditid - AND studentcredit.obsolete = 0 /* Not Deleted */ - AND studentcredit.status = 1 /* Successful */ - /* PERIOD 3 */ - AND studentcredit.date < Now() - INTERVAL 2 MONTH - /* PERIOD 3 */ - AND studentcredit.date > Now() - INTERVAL 3 MONTH - LEFT JOIN credittype - USING(credittypeid)) AS scd - ON sd.studentdebitid = scd.studentdebitid - WHERE sd.obsolete = 0 /* Not Deleted */ - AND sd.status = 0 /* Normal */ - /* Exclude Voided Invoices */ - AND sd.adjustsdebitid IS NULL - AND sd.studentdebitid NOT IN (SELECT adjustsdebitid - FROM studentdebit - WHERE adjustsdebitid IS NOT NULL) - AND sd.date < Now() - AND sd.date > Now() - INTERVAL 3 MONTH - GROUP BY scd.credittype) AS ct -GROUP BY ct.credittype - -SELECT 'mediaid' AS `idtype`, - `m`.`mediaid` AS `id`, - `m`.`title` AS `title`, - `m`.`description` AS `description`, - `m`.`source` AS `source`, - `m`.`date` AS `startdate`, - `m`.`date` AS `enddate`, - `c`.`class` AS `class`, - `c`.`classname` AS `classname`, - `per`.`firstname` AS `firstname`, - `per`.`lastname` AS `lastname`, - `c`.`description` AS `classdesc`, - `p`.`programid` AS `programid`, - If((`p`.`subprogramof` IS NOT NULL),`mp`.`programname`, - `p`.`programname`) AS `programname`, - 'Recorded' AS `longname` -FROM ((((((((`media` `m` - JOIN `mediaaudience` `ma` - ON (((`m`.`mediaid` = `ma`.`mediaid`) - AND (`ma`.`audiencetype` = 'Public') - AND ((`ma`.`enddate` < Now()) - OR Isnull(`ma`.`enddate`))))) - LEFT JOIN `mediapresenter` `mpp` - ON ((`m`.`mediaid` = `mpp`.`mediaid`))) - LEFT JOIN `person` `per` - ON ((`mpp`.`personid` = `per`.`personid`))) - LEFT JOIN `mediaaudience` `mad` - ON (((`ma`.`mediaid` = `mad`.`mediaid`) - AND (`mad`.`audiencetype` = 'classid')))) - LEFT JOIN `class` `c` - ON ((`mad`.`audienceid` = `c`.`classid`))) - LEFT JOIN `program_class` `pc` - ON ((`c`.`classid` = `pc`.`classid`))) - LEFT JOIN `program` `p` - ON ((`pc`.`programid` = `p`.`programid`))) - LEFT JOIN `program` `mp` - ON ((`p`.`subprogramof` = `mp`.`programid`))) -UNION -SELECT 'sectionid' AS `idtype`, - `cc`.`sectionid` AS `id`, - `cc`.`title` AS `title`, - `cc`.`description` AS `description`, - `l`.`mapurl` AS `mapurl`, - `cc`.`starttime` AS `startdate`, - `cc`.`endtime` AS `enddate`, - `c`.`class` AS `class`, - `c`.`classname` AS `classname`, - `per`.`firstname` AS `firstname`, - `per`.`lastname` AS `lastname`, - `c`.`description` AS `classdesc`, - `p`.`programid` AS `programid`, - If((`p`.`subprogramof` IS NOT NULL),`mp`.`programname`, - `p`.`programname`) AS `programname`, - `d`.`longname` AS `longname` -FROM ((((((((`calendarcache` `cc` - JOIN `section` `s` - ON ((`cc`.`sectionid` = `s`.`sectionid`))) - LEFT JOIN `person` `per` - ON ((`s`.`teacherid` = `per`.`personid`))) - LEFT JOIN `division` `d` - ON ((`s`.`divisionid` = `d`.`divisionid`))) - LEFT JOIN `location` `l` - ON ((`s`.`locationid` = `l`.`locationid`))) - LEFT JOIN `class` `c` - ON ((`s`.`classid` = `c`.`classid`))) - LEFT JOIN `program_class` `pc` - ON ((`c`.`classid` = `pc`.`classid`))) - LEFT JOIN `program` `p` - ON ((`pc`.`programid` = `p`.`programid`))) - LEFT JOIN `program` `mp` - ON ((`p`.`subprogramof` = `mp`.`programid`))) -WHERE (NOT ((`cc`.`description` LIKE '%{cs}%'))) \ No newline at end of file diff --git a/test/scanners/sql/norwegian.expected.raydebug b/test/scanners/sql/norwegian.expected.raydebug deleted file mode 100644 index 1222709..0000000 --- a/test/scanners/sql/norwegian.expected.raydebug +++ /dev/null @@ -1,48 +0,0 @@ -class(select) integer(1) reserved(from)comment(-- Skapa en ny tabell med de endast de språkkoder vi accepterar) -class(CREATE) type(TABLE) ident(public)operator(.)ident(languages) operator(() - ident(language_code) pre_type(char)operator(()integer(2)operator(\)) reserved(PRIMARY) reserved(KEY) -operator(\))operator(;) -class(INSERT) class(INTO) ident(public)operator(.)ident(languages) reserved(VALUES) operator(()stringoperator(\))operator(,)operator(()stringoperator(\))operator(,)operator(()stringoperator(\))operator(,)operator(()stringoperator(\))operator(,)operator(()stringoperator(\))operator(;) -class(COMMENT) reserved(ON) type(COLUMN) ident(public)operator(.)ident(languages)operator(.)ident(language_code) reserved(IS) stringoperator(;) -class(GRANT) class(SELECT) reserved(ON) ident(public)operator(.)ident(languages) reserved(TO) reserved(GROUP) ident(readonly)operator(;) -class(GRANT) reserved(ALL) reserved(ON) ident(public)operator(.)ident(languages) reserved(TO) reserved(GROUP) ident(readwrite)operator(;) - -comment(-- Lägg till en ny column i color_description som hanterar language_code instället för) -comment(-- locale som idag.) -comment(-- 1. Lägg till kolumnen.) -comment(-- 2. Fyll den med data från locale kolumnen.) -comment(-- 3. Ändra så att columnen inte får vara tom) -comment(-- 4. Lägg till constraint mot tidigare skapade tabellen languages.) -comment(-- 5. Sätt kommentar på locale kolumnen om att den inte bör användas.) -class(ALTER) type(TABLE) ident(products)operator(.)ident(color_description) class(ADD) type(COLUMN) ident(language_code) pre_type(char)operator(()integer(2)operator(\))operator(;) -class(UPDATE) ident(products)operator(.)ident(color_description) -class(SET) ident(language_code) operator(=) operator(()reserved(CASE) reserved(WHEN) ident(locale) reserved(like) string - reserved(THEN) string - reserved(ELSE) predefined(SUBSTRING)operator(()ident(locale) reserved(FROM) integer(1) reserved(FOR) integer(2)operator(\)) reserved(END)operator(\))operator(;) -class(ALTER) type(TABLE) ident(products)operator(.)ident(color_description) class(ALTER) type(COLUMN) ident(language_code) class(SET) reserved(NOT) pre_constant(NULL)operator(;) -class(ALTER) type(TABLE) ident(products)operator(.)ident(color_description) - class(ADD) reserved(CONSTRAINT) ident(products_color_description_lang_ref) - reserved(FOREIGN) reserved(KEY) operator(()ident(language_code)operator(\)) reserved(REFERENCES) ident(public)operator(.)ident(languages)operator(()ident(language_code)operator(\))operator(;) -class(COMMENT) reserved(ON) type(COLUMN) ident(products)operator(.)ident(color_description)operator(.)ident(locale) -reserved(IS) string PAHSE OUT, use language_code instead)delimiter(')>operator(;) - - - -comment(-- Lägg till en ny column i frame_description som hanterar language_code instället för) -comment(-- locale som idag.) -comment(-- 1. Lägg till kolumnen.) -comment(-- 2. Fyll den med data från locale kolumnen.) -comment(-- 3. Ändra så att columnen inte får vara tom) -comment(-- 4. Lägg till constraint mot tidigare skapade tabellen languages.) -comment(-- 5. Sätt kommentar på locale kolumnen om att den inte bör användas.) -class(ALTER) type(TABLE) ident(products)operator(.)ident(frame_description) class(ADD) type(COLUMN) ident(language_code) pre_type(char)operator(()integer(2)operator(\))operator(;) -class(UPDATE) ident(products)operator(.)ident(frame_description) -class(SET) ident(language_code) operator(=) operator(()reserved(CASE) reserved(WHEN) ident(locale) reserved(like) string - reserved(THEN) string - reserved(ELSE) predefined(SUBSTRING)operator(()ident(locale) reserved(FROM) integer(1) reserved(FOR) integer(2)operator(\)) reserved(END)operator(\))operator(;) -class(ALTER) type(TABLE) ident(products)operator(.)ident(frame_description) class(ALTER) type(COLUMN) ident(language_code) class(SET) reserved(NOT) pre_constant(NULL)operator(;) -class(ALTER) type(TABLE) ident(products)operator(.)ident(frame_description) - class(ADD) reserved(CONSTRAINT) ident(products_frame_description_lang_ref) - reserved(FOREIGN) reserved(KEY) operator(()ident(language_code)operator(\)) reserved(REFERENCES) ident(public)operator(.)ident(languages)operator(()ident(language_code)operator(\))operator(;) -class(COMMENT) reserved(ON) type(COLUMN) ident(products)operator(.)ident(frame_description)operator(.)ident(locale) -reserved(IS) string PAHSE OUT, use language_code instead)delimiter(')>operator(;) diff --git a/test/scanners/sql/norwegian.in.sql b/test/scanners/sql/norwegian.in.sql deleted file mode 100644 index b1241b8..0000000 --- a/test/scanners/sql/norwegian.in.sql +++ /dev/null @@ -1,48 +0,0 @@ -select 1 from-- Skapa en ny tabell med de endast de språkkoder vi accepterar -CREATE TABLE public.languages ( - language_code char(2) PRIMARY KEY -); -INSERT INTO public.languages VALUES ('sv'),('de'),('da'),('no'),('fi'); -COMMENT ON COLUMN public.languages.language_code IS 'Codes according to ISO 639'; -GRANT SELECT ON public.languages TO GROUP readonly; -GRANT ALL ON public.languages TO GROUP readwrite; - --- Lägg till en ny column i color_description som hanterar language_code instället för --- locale som idag. --- 1. Lägg till kolumnen. --- 2. Fyll den med data från locale kolumnen. --- 3. Ändra så att columnen inte får vara tom --- 4. Lägg till constraint mot tidigare skapade tabellen languages. --- 5. Sätt kommentar på locale kolumnen om att den inte bör användas. -ALTER TABLE products.color_description ADD COLUMN language_code char(2); -UPDATE products.color_description -SET language_code = (CASE WHEN locale like 'ty%' - THEN 'de' - ELSE SUBSTRING(locale FROM 1 FOR 2) END); -ALTER TABLE products.color_description ALTER COLUMN language_code SET NOT NULL; -ALTER TABLE products.color_description - ADD CONSTRAINT products_color_description_lang_ref - FOREIGN KEY (language_code) REFERENCES public.languages(language_code); -COMMENT ON COLUMN products.color_description.locale -IS '<¡> PAHSE OUT, use language_code instead'; - - - --- Lägg till en ny column i frame_description som hanterar language_code instället för --- locale som idag. --- 1. Lägg till kolumnen. --- 2. Fyll den med data från locale kolumnen. --- 3. Ändra så att columnen inte får vara tom --- 4. Lägg till constraint mot tidigare skapade tabellen languages. --- 5. Sätt kommentar på locale kolumnen om att den inte bör användas. -ALTER TABLE products.frame_description ADD COLUMN language_code char(2); -UPDATE products.frame_description -SET language_code = (CASE WHEN locale like 'ty%' - THEN 'de' - ELSE SUBSTRING(locale FROM 1 FOR 2) END); -ALTER TABLE products.frame_description ALTER COLUMN language_code SET NOT NULL; -ALTER TABLE products.frame_description - ADD CONSTRAINT products_frame_description_lang_ref - FOREIGN KEY (language_code) REFERENCES public.languages(language_code); -COMMENT ON COLUMN products.frame_description.locale -IS '<¡> PAHSE OUT, use language_code instead'; diff --git a/test/scanners/sql/reference.expected.raydebug b/test/scanners/sql/reference.expected.raydebug deleted file mode 100644 index 443c59b..0000000 --- a/test/scanners/sql/reference.expected.raydebug +++ /dev/null @@ -1,109 +0,0 @@ -comment(# All of the values below are valid MySQL syntax accoring to) -comment(# the Reference Manual:) -comment(# http://dev.mysql.com/doc/refman/5.1/en/language-structure.html) -comment(# unless stated otherwise.) - -comment(# strings) -class(SELECT) stringoperator(;) -class(SELECT) stringoperator(;) - -class(SELECT) stringoperator(;) -class(SELECT) string reserved(COLLATE) ident(latin1_danish_ci)operator(;) - -class(SELECT) stringoperator(;) -class(SELECT) stringoperator(;) -class(SELECT) stringoperator(;) - -class(SELECT) stringoperator(;) comment(# ") -class(SELECT) stringoperator(;) comment(# ') - -class(SELECT) stringoperator(;) comment(# ") -class(SELECT) stringoperator(;) comment(# ') - -class(SELECT) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(;) comment(-- ') -class(SELECT) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(,) stringoperator(;) comment(-- ") - -class(SELECT) stringoperator(;) -class(SELECT) stringoperator(;) - -comment(# numbers) -class(select) integer(1221)operator(;) -class(select) integer(0)operator(;) -class(select) operator(-)integer(32)error(:) - -class(select) float(294.42)error(:) -class(select) operator(-)float(32032.6809e+10)operator(;) -class(select) float(148.00)operator(;) - -class(select) float(10e+10)operator(;) -class(select) float(10e10)operator(;) - -comment(# hexadecimal) -class(SELECT) stringoperator(;) -class(SELECT) hex(0x0a)operator(+)integer(0)operator(;) -class(SELECT) hex(0x5061756c)operator(;) -class(SELECT) hex(0x41)operator(,) predefined(CAST)operator(()hex(0x41) reserved(AS) pre_type(UNSIGNED)operator(\))operator(;) -class(SELECT) pre_type(HEX)operator(()stringoperator(\))operator(;) -class(SELECT) hex(0x636174)operator(;) -class(insert) class(into) ident(t) operator(()ident(md5)operator(\)) reserved(values) operator(()hex(0xad65)operator(\))operator(;) -class(SELECT) operator(*) reserved(FROM) ident(SomeTable) reserved(WHERE) ident(BinaryColumn) operator(=) predefined(CAST)operator(() string reserved(AS) pre_type(BINARY) operator(\))operator(;) -class(select) stringoperator(,) stringoperator(;) - -class(SELECT) pre_constant(TRUE)operator(,) pre_constant(true)operator(,) pre_constant(FALSE)operator(,) pre_constant(false)operator(;) -class(SELECT) pre_constant(NULL)operator(,) pre_constant(null)operator(,) pre_constant(nuLL)operator(,) pre_constant(\\N)operator(;) -class(SELECT) error(\\)ident(n)operator(;) comment(# invalid!) - -comment(# bit-field) -class(CREATE) type(TABLE) ident(t) operator(()ident(b) pre_type(BIT)operator(()integer(8)operator(\))operator(\))operator(;) -class(INSERT) class(INTO) ident(t) class(SET) ident(b) operator(=) stringoperator(;) -class(INSERT) class(INTO) ident(t) class(SET) ident(b) operator(=) stringoperator(;) -class(INSERT) class(INTO) ident(t) class(SET) ident(b) operator(=) stringoperator(;) -class(SELECT) ident(b)operator(+)integer(0)operator(,) pre_type(BIN)operator(()ident(b)operator(+)integer(0)operator(\))operator(,) pre_type(OCT)operator(()ident(b)operator(+)integer(0)operator(\))operator(,) pre_type(HEX)operator(()ident(b)operator(+)integer(0)operator(\)) reserved(FROM) ident(t)operator(;) - -class(SET) variable(@v1) operator(=) stringoperator(;) -class(SET) variable(@v2) operator(=) predefined(CAST)operator(()string reserved(AS) pre_type(UNSIGNED)operator(\))operator(,) variable(@v3) operator(=) stringoperator(+)integer(0)operator(;) -class(SELECT) variable(@v1)operator(,) variable(@v2)operator(,) variable(@v3)operator(;) - -class(INSERT) class(INTO) ident(my_table) operator(()ident(phone)operator(\)) reserved(VALUES) operator(()pre_constant(NULL)operator(\))operator(;) -class(INSERT) class(INTO) ident(my_table) operator(()ident(phone)operator(\)) reserved(VALUES) operator(()stringoperator(\))operator(;) - -comment(# schema object names) -class(SELECT) operator(*) reserved(FROM) string reserved(WHERE) stringoperator(.)ident(id) operator(>) integer(100)operator(;) - -class(CREATE) type(TABLE) string operator(()string pre_type(INT)operator(\))operator(;) -class(SELECT) integer(1) reserved(AS) stringoperator(,) integer(2) reserved(AS) stringoperator(;) - -class(select) ident(foo) reserved(from) ident(foo)operator(;) -class(select) string reserved(from) ident(foo)operator(;) -class(select) ident(foo)operator(.)ident(bar) reserved(from) ident(foo)operator(;) -class(select) stringoperator(.)ident(bar) reserved(from) ident(foo)operator(;) -class(select) ident(foo)operator(.)string reserved(from) ident(foo)operator(;) -class(select) string reserved(from) ident(foo)operator(;) -class(select) stringoperator(.)string reserved(from) ident(foo)operator(;) - -comment(# How to handle ANSI_QUOTES?) -class(CREATE) type(TABLE) string operator(()ident(col) pre_type(INT)operator(\))operator(;) -class(SET) ident(sql_mode)operator(=)stringoperator(;) -class(CREATE) type(TABLE) string operator(()ident(col) pre_type(INT)operator(\))operator(;) - -comment(# identifiers) -class(SELECT) operator(*) reserved(FROM) ident(my_table) reserved(WHERE) ident(MY_TABLE)operator(.)ident(col)operator(=)integer(1)operator(;) -class(SHOW) type(COLUMNS) reserved(FROM) stringoperator(;) - -comment(# Function Name Parsing and Resolution) - - -class(SELECT) predefined(COUNT)operator(()operator(*)operator(\)) reserved(FROM) ident(mytable)operator(;) comment(-- the first reference to count is a function call) -class(CREATE) type(TABLE) predefined(count) operator(()ident(i) pre_type(INT)operator(\))operator(;) comment(-- whereas the second reference is a table name) -class(CREATE) type(TABLE) stringoperator(()ident(i) pre_type(INT)operator(\))operator(;) comment(-- this too) -class(CREATE) type(TABLE) string operator(()ident(i) pre_type(INT)operator(\))operator(;) comment(-- this too) - -comment(# IGNORE_SPACE) -class(SELECT) predefined(COUNT)operator(()operator(*)operator(\)) reserved(FROM) ident(mytable)operator(;) -class(SELECT) predefined(COUNT) operator(()operator(*)operator(\)) reserved(FROM) ident(mytable)operator(;) - -comment(# reserved words) -class(CREATE) type(TABLE) ident(interval) operator(()reserved(begin) pre_type(INT)operator(,) reserved(end) pre_type(INT)operator(\))operator(;) comment(-- errror) -class(CREATE) type(TABLE) string operator(()reserved(begin) pre_type(INT)operator(,) reserved(end) pre_type(INT)operator(\))operator(;) comment(-- valid) -class(CREATE) type(TABLE) ident(mydb)operator(.)ident(interval) operator(()reserved(begin) pre_type(INT)operator(,) reserved(end) pre_type(INT)operator(\))operator(;) comment(-- valid) -class(SELECT) stringoperator(,) string reserved(FROM) string reserved(WHERE) string operator(=) stringoperator(;) comment(-- valid) diff --git a/test/scanners/sql/reference.in.sql b/test/scanners/sql/reference.in.sql deleted file mode 100644 index e301570..0000000 --- a/test/scanners/sql/reference.in.sql +++ /dev/null @@ -1,109 +0,0 @@ -# All of the values below are valid MySQL syntax accoring to -# the Reference Manual: -# http://dev.mysql.com/doc/refman/5.1/en/language-structure.html -# unless stated otherwise. - -# strings -SELECT 'a string'; -SELECT "another string"; - -SELECT _latin1'string'; -SELECT _latin1'string' COLLATE latin1_danish_ci; - -SELECT N'some text'; -SELECT n'some text'; -SELECT _utf8'some text'; - -SELECT "\0\'\"''""\b\n\r\t\Z\\\%\_"; # " -SELECT '\0\'\"''""\b\n\r\t\Z\\\%\_'; # ' - -SELECT "\B\x"; # " -SELECT '\B\x'; # ' - -SELECT 'hello', '"hello"', '""hello""', 'hel''lo', '\'hello'; -- ' -SELECT "hello", "'hello'", "''hello''", "hel""lo", "\"hello"; -- " - -SELECT 'This\nIs\nFour\nLines'; -SELECT 'disappearing\ backslash'; - -# numbers -select 1221; -select 0; -select -32: - -select 294.42: -select -32032.6809e+10; -select 148.00; - -select 10e+10; -select 10e10; - -# hexadecimal -SELECT X'4D7953514C'; -SELECT 0x0a+0; -SELECT 0x5061756c; -SELECT 0x41, CAST(0x41 AS UNSIGNED); -SELECT HEX('cat'); -SELECT 0x636174; -insert into t (md5) values (0xad65); -SELECT * FROM SomeTable WHERE BinaryColumn = CAST( x'a0f44ef7a52411de' AS BINARY ); -select x'000bdddc0e9153f5a93447fc3310f710', x'0bdddc0e9153f5a93447fc3310f710'; - -SELECT TRUE, true, FALSE, false; -SELECT NULL, null, nuLL, \N; -SELECT \n; # invalid! - -# bit-field -CREATE TABLE t (b BIT(8)); -INSERT INTO t SET b = b'11111111'; -INSERT INTO t SET b = b'1010'; -INSERT INTO t SET b = b'0101'; -SELECT b+0, BIN(b+0), OCT(b+0), HEX(b+0) FROM t; - -SET @v1 = b'1000001'; -SET @v2 = CAST(b'1000001' AS UNSIGNED), @v3 = b'1000001'+0; -SELECT @v1, @v2, @v3; - -INSERT INTO my_table (phone) VALUES (NULL); -INSERT INTO my_table (phone) VALUES (''); - -# schema object names -SELECT * FROM `select` WHERE `select`.id > 100; - -CREATE TABLE `a``b` (`c"d` INT); -SELECT 1 AS `one`, 2 AS 'two'; - -select foo from foo; -select `foo` from foo; -select foo.bar from foo; -select `foo`.bar from foo; -select foo.`bar` from foo; -select `foo.bar` from foo; -select `foo`.`bar` from foo; - -# How to handle ANSI_QUOTES? -CREATE TABLE "test" (col INT); -SET sql_mode='ANSI_QUOTES'; -CREATE TABLE "test" (col INT); - -# identifiers -SELECT * FROM my_table WHERE MY_TABLE.col=1; -SHOW COLUMNS FROM `#mysql50#a@b`; - -# Function Name Parsing and Resolution - - -SELECT COUNT(*) FROM mytable; -- the first reference to count is a function call -CREATE TABLE count (i INT); -- whereas the second reference is a table name -CREATE TABLE `count`(i INT); -- this too -CREATE TABLE `count` (i INT); -- this too - -# IGNORE_SPACE -SELECT COUNT(*) FROM mytable; -SELECT COUNT (*) FROM mytable; - -# reserved words -CREATE TABLE interval (begin INT, end INT); -- errror -CREATE TABLE `interval` (begin INT, end INT); -- valid -CREATE TABLE mydb.interval (begin INT, end INT); -- valid -SELECT `foo`, `bar` FROM `baz` WHERE `bal` = `quiche`; -- valid diff --git a/test/scanners/sql/selects.expected.raydebug b/test/scanners/sql/selects.expected.raydebug deleted file mode 100644 index ef1f051..0000000 --- a/test/scanners/sql/selects.expected.raydebug +++ /dev/null @@ -1,46 +0,0 @@ -comment(--RANDOM SQL QUERIES THAT DO NOTHING INTERESTING) -comment(--Copyright (C\) 2009 - Keith Pitt ) - -comment(--This program is free software: you can redistribute it and/or modify) -comment(--it under the terms of the GNU General Public License as published by) -comment(--the Free Software Foundation, either version 3 of the License, or) -comment(--(at your option\) any later version.) - -comment(--This program is distributed in the hope that it will be useful,) -comment(--but WITHOUT ANY WARRANTY; without even the implied warranty of) -comment(--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the) -comment(--GNU General Public License for more details.) - -comment(--You should have received a copy of the GNU General Public License) -comment(--along with this program. If not, see .) - -class(SELECT) operator(*) reserved(FROM) ident(users)operator(;) - -class(select) operator(*) reserved(from) ident(users)operator(;) - -class(SELECT) stringoperator(,) string reserved(FROM) stringoperator(;) - -class(select) ident(first_name)operator(,) ident(last_name) reserved(FROM) ident(users)operator(;) - -class(select) ident(first_name) operator(|)operator(|) string operator(|)operator(|) ident(last_name) reserved(from) ident(users)operator(;) - -class(select) ident(first_name) operator(|)operator(|) string operator(|)operator(|) ident(last_name) reserved(from) ident(users)operator(;) - -class(SELECT) operator(*) reserved(FROM) ident(users) reserved(JOIN) ident(companies) reserved(USING) operator(()ident(company_id)operator(\)) reserved(WHERE) ident(company_type) operator(=) stringoperator(;) - -class(SELECT) operator(*) reserved(FROM) ident(users) reserved(WHERE) ident(name_first) reserved(LIKE) stringoperator(;) - -class(SELECT) reserved(CASE) reserved(WHEN) ident(foo)operator(.)ident(bar) operator(=) string - reserved(THEN) string - reserved(ELSE) string - reserved(END) reserved(as) ident(bar_type)operator(,) - ident(user_id)operator(,) - ident(company_id)operator(,) - predefined(sum)operator(() - reserved(case) reserved(when) ident(foo)operator(.)ident(bar) operator(=) string - reserved(then) operator(-)ident(amt) reserved(else) ident(amt) - reserved(end) - operator(\)) ident(over) operator(()reserved(order) reserved(by) ident(id)operator(,) ident(amt)operator(\)) reserved(as) ident(balance)operator(;) - -class(SELECT) ident(users)operator(.)operator(*)operator(,) operator(()class(SELECT) ident(company_name) reserved(FROM) ident(companies) reserved(WHERE) ident(company_id) operator(=) ident(users)operator(.)ident(company_id)operator(\)) reserved(FROM) ident(users)operator(;) - diff --git a/test/scanners/sql/selects.in.sql b/test/scanners/sql/selects.in.sql deleted file mode 100644 index 3c6203f..0000000 --- a/test/scanners/sql/selects.in.sql +++ /dev/null @@ -1,46 +0,0 @@ ---RANDOM SQL QUERIES THAT DO NOTHING INTERESTING ---Copyright (C) 2009 - Keith Pitt - ---This program is free software: you can redistribute it and/or modify ---it under the terms of the GNU General Public License as published by ---the Free Software Foundation, either version 3 of the License, or ---(at your option) any later version. - ---This program is distributed in the hope that it will be useful, ---but WITHOUT ANY WARRANTY; without even the implied warranty of ---MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ---GNU General Public License for more details. - ---You should have received a copy of the GNU General Public License ---along with this program. If not, see . - -SELECT * FROM users; - -select * from users; - -SELECT `First Name`, `Last Name` FROM `User Table`; - -select first_name, last_name FROM users; - -select first_name || ' ' || last_name from users; - -select first_name || " " || last_name from users; - -SELECT * FROM users JOIN companies USING (company_id) WHERE company_type = 'Fortune 500'; - -SELECT * FROM users WHERE name_first LIKE '%Keith%'; - -SELECT CASE WHEN foo.bar = 'PY' - THEN 'BAR' - ELSE 'FOO' - END as bar_type, - user_id, - company_id, - sum( - case when foo.bar = 'PY' - then -amt else amt - end - ) over (order by id, amt) as balance; - -SELECT users.*, (SELECT company_name FROM companies WHERE company_id = users.company_id) FROM users; - diff --git a/test/scanners/sql/suite.rb b/test/scanners/sql/suite.rb deleted file mode 100644 index f1122b3..0000000 --- a/test/scanners/sql/suite.rb +++ /dev/null @@ -1,2 +0,0 @@ -class SQL < CodeRay::TestCase -end -- cgit v1.2.1