From bc330634ede44c33019423d4192996cd1b04409e Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 6 Jul 2010 17:35:14 -0700 Subject: [PATCH] Use code that works with the WRE's mysql for detecting ft_min_word_len --- t/Search.t | 4 ++-- t/Search/Index.t | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/Search.t b/t/Search.t index 9c269d03e..2da50d94e 100644 --- a/t/Search.t +++ b/t/Search.t @@ -60,9 +60,9 @@ ok(! $search->_isStopword('private.+'), '_isStopword: regex metacharacters SKIP: { use utf8; - my $min_word_length = $session->db->quickScalar('SELECT @@ft_min_word_len'); + my $min_word_length = $session->db->quickHashRef("show variables like 'ft_min_word_len'"); skip 'MySQL minimum word length too long to support ideograms', 2 - if $min_word_length > 2; + if $min_word_length->{Value} > 2; # Create an article to index my $article = WebGUI::Asset->getImportNode( $session )->addChild( { diff --git a/t/Search/Index.t b/t/Search/Index.t index ce7972f39..977b253cf 100644 --- a/t/Search/Index.t +++ b/t/Search/Index.t @@ -247,9 +247,9 @@ cmp_deeply ( SKIP: { use utf8; - my $min_word_length = $session->db->quickScalar('SELECT @@ft_min_word_len'); - skip 'MySQL minimum word length too long to support ideograms', 1 - if $min_word_length > 2; + my $min_word_length = $session->db->quickHashRef("show variables like 'ft_min_word_len'"); + skip 'MySQL minimum word length too long to support ideograms', 2 + if $min_word_length->{Value} > 2; $article->update({ description => "甲骨文",