Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mroonga/mroonga
Browse files Browse the repository at this point in the history
  • Loading branch information
Kentoku committed Dec 26, 2011
2 parents 6060d13 + f9eb730 commit 1cc81fb
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 4 deletions.
29 changes: 27 additions & 2 deletions doc/source/news.rst
Expand Up @@ -5,16 +5,41 @@ News

.. _release-1-11:

Release 1.11 - ????/??/??
Release 1.11 - 2011/12/29
-------------------------

Improvements
^^^^^^^^^^^^

* Supported MySQL 5.5.19.
* Supported MySQL 5.6.4.
* Dropped MySQL 5.6.3 support.
* [wrapper mode] Supported REPAIR TABLE. [#1191]
* Suppress strict-aliasing warnings. [groonga-dev,00659]
[Reported by Kazuhiko Shiozaki]
* Supported utf8, binary, ascii, latin1, cp932, sjis,
eucjpms, ujis and koi8r charset. [#1160] [Reported by nobody]
* [wrapper mode] Improved rollback handling on
delete. [#1224] [Reported by Koichi Shishikura]

Fixes
^^^^^

* [storage mode] fix a bug that full text search on a table without primary key returns empty results #1193.
* [storage mode] Fixed a bug that full text search on a
table without primary key returns empty results. [#1193]
[Reported by Kazuhiko Shiozaki]
* Fixed -Wno- compiler flag detection. [Patch by Arnaud Fontaine]
* [wrapper mode] Fixed a problem that index isn't
used for full count. [#1196][groonga-dev,0653] [Reported by Kaneoka]

Thanks
^^^^^^

* Kazuhiko Shiozaki
* Arnaud Fontaine
* Kaneoka
* nobody
* Koichi Shishikura

.. _release-1-10:

Expand Down
13 changes: 11 additions & 2 deletions ha_mroonga.cc
Expand Up @@ -4434,8 +4434,17 @@ int ha_mroonga::wrapper_update_row_index(const uchar *old_data, uchar *new_data)

grn_rc rc;
if (old_record_id == new_record_id) {
rc = grn_column_index_update(ctx, index_column, old_record_id, j + 1,
&old_value_buffer, &new_value_buffer);
if (added) {
rc = grn_column_index_update(ctx, index_column, old_record_id, j + 1,
&old_value_buffer, NULL);
if (!rc) {
rc = grn_column_index_update(ctx, index_column, new_record_id, j + 1,
NULL, &new_value_buffer);
}
} else {
rc = grn_column_index_update(ctx, index_column, old_record_id, j + 1,
&old_value_buffer, &new_value_buffer);
}
} else {
rc = grn_column_index_update(ctx, index_column, old_record_id, j + 1,
&old_value_buffer, NULL);
Expand Down
@@ -0,0 +1,50 @@
DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
body TEXT,
FULLTEXT INDEX title_index (title),
FULLTEXT INDEX body_index (body)
) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` text,
`body` text,
PRIMARY KEY (`id`),
FULLTEXT KEY `title_index` (`title`),
FULLTEXT KEY `body_index` (`body`)
) ENGINE=groonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!");
INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga...");
INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");
id title body
1 survey will start groonga!
START TRANSACTION;
DELETE FROM diaries WHERE id = 1;
ROLLBACK;
SELECT * FROM diaries;
id title body
1 survey will start groonga!
2 groonga (1) starting groonga...
3 groonga (2) started groonga.
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");
id title body
DELETE FROM diaries WHERE id = 1;
Warnings:
Warning 1026 failed to get record ID for deleting from groonga: key=<>
SELECT * FROM diaries;
id title body
2 groonga (1) starting groonga...
3 groonga (2) started groonga.
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");
id title body
DROP TABLE diaries;
@@ -0,0 +1,47 @@
DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
body TEXT,
FULLTEXT INDEX title_index (title),
FULLTEXT INDEX body_index (body)
) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` text,
`body` text,
PRIMARY KEY (`id`),
FULLTEXT KEY `title_index` (`title`),
FULLTEXT KEY `body_index` (`body`)
) ENGINE=groonga DEFAULT CHARSET=utf8 COMMENT='ENGINE "InnoDB"'
INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!");
INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga...");
INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey");
id title body
1 survey will start groonga!
START TRANSACTION;
DELETE FROM diaries WHERE id = 1;
ROLLBACK;
SELECT * FROM diaries;
id title body
1 survey will start groonga!
2 groonga (1) starting groonga...
3 groonga (2) started groonga.
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey");
id title body
UPDATE diaries SET title = "survey day!" WHERE id = 1;
SELECT * FROM diaries;
id title body
1 survey day! will start groonga!
2 groonga (1) starting groonga...
3 groonga (2) started groonga.
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey");
id title body
1 survey day! will start groonga!
DROP TABLE diaries;
@@ -0,0 +1,58 @@
# Copyright(C) 2011 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/have_groonga.inc

--disable_warnings
DROP TABLE IF EXISTS diaries;
--enable_warnings

CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
body TEXT,
FULLTEXT INDEX title_index (title),
FULLTEXT INDEX body_index (body)
) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;

INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!");
INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga...");
INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");

SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");

START TRANSACTION;
DELETE FROM diaries WHERE id = 1;
ROLLBACK;

SELECT * FROM diaries;
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");

DELETE FROM diaries WHERE id = 1;

SELECT * FROM diaries;
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey") AND
MATCH(body) AGAINST("groonga");

DROP TABLE diaries;

--source include/have_groonga_deinit.inc
@@ -0,0 +1,55 @@
# Copyright(C) 2011 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/have_groonga.inc

--disable_warnings
DROP TABLE IF EXISTS diaries;
--enable_warnings

CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
body TEXT,
FULLTEXT INDEX title_index (title),
FULLTEXT INDEX body_index (body)
) COMMENT = 'ENGINE "InnoDB"' DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;

INSERT INTO diaries (title, body) VALUES ("survey", "will start groonga!");
INSERT INTO diaries (title, body) VALUES ("groonga (1)", "starting groonga...");
INSERT INTO diaries (title, body) VALUES ("groonga (2)", "started groonga.");

SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey");

START TRANSACTION;
DELETE FROM diaries WHERE id = 1;
ROLLBACK;

SELECT * FROM diaries;
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey");

UPDATE diaries SET title = "survey day!" WHERE id = 1;

SELECT * FROM diaries;
SELECT * FROM diaries
WHERE MATCH(title) AGAINST("survey");

DROP TABLE diaries;

--source include/have_groonga_deinit.inc

0 comments on commit 1cc81fb

Please sign in to comment.