Kouhei Sutou
null+****@clear*****
Mon Aug 12 11:09:32 JST 2013
Kouhei Sutou 2013-08-12 11:09:32 +0900 (Mon, 12 Aug 2013) New Revision: 28c6dcbe4f0d00b72c958f0997809c2e5f0d3b49 https://github.com/mroonga/mroonga/commit/28c6dcbe4f0d00b72c958f0997809c2e5f0d3b49 Message: test mroonga_escape: add a test for wrong type query case Added files: test/sql/suite/mroonga/storage/function/escape/error/r/query_is_not_string.result test/sql/suite/mroonga/storage/function/escape/error/t/query_is_not_string.test Added: test/sql/suite/mroonga/storage/function/escape/error/r/query_is_not_string.result (+3 -0) 100644 =================================================================== --- /dev/null +++ test/sql/suite/mroonga/storage/function/escape/error/r/query_is_not_string.result 2013-08-12 11:09:32 +0900 (c176245) @@ -0,0 +1,3 @@ +SET NAMES UTF8; +SELECT mroonga_escape(29) AS escaped_query; +ERROR HY000: Can't initialize function 'mroonga_escape'; mroonga_escape(): The 1st argument must be query as string Added: test/sql/suite/mroonga/storage/function/escape/error/t/query_is_not_string.test (+26 -0) 100644 =================================================================== --- /dev/null +++ test/sql/suite/mroonga/storage/function/escape/error/t/query_is_not_string.test 2013-08-12 11:09:32 +0900 (3e7a46e) @@ -0,0 +1,26 @@ +# Copyright(C) 2013 Kouhei Sutou <kou �� clear-code.com> +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library 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 +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +--source include/mroonga/have_mroonga.inc +--source include/mroonga/load_mroonga_functions.inc + +SET NAMES UTF8; + +-- error ER_CANT_INITIALIZE_UDF +SELECT mroonga_escape(29) AS escaped_query; + +--source include/mroonga/unload_mroonga_functions.inc +--source include/mroonga/have_mroonga_deinit.inc -------------- next part -------------- HTML����������������������������...Download