-
-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Created test-drop-sharded-table.rec #3012
base: master
Are you sure you want to change the base?
Conversation
clt❌ CLT tests in test/clt-tests/buddy/test-fuzzy-search.rec––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
0
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
debconf: delaying package configuration, since apt-utils is not installed
0
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=4 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
0
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.*\(min_infix_len='2'\).*/\1/"
––– output –––
min_infix_len='2'
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
+----------+
| count(*) |
+----------+
| 1000000 |
+----------+
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id | username | s |
+------+-------------------+------+
| 196 | BRICE MULLIN | a |
| 307 | GRICELDA SKELTON | a |
| 363 | LAURICE SOLIZ | a |
| 478 | ERICH LLAMAS | a |
| 490 | LATRICE MANCILLA | a |
| 608 | MAURICE PRATHER | a |
| 659 | BRICE OLIVARES | a |
| 697 | PATRICE WOOD | a |
| 822 | JUNITA RICHARD | a |
| 835 | AUREA RICO | a |
| 854 | ROXANNE BRICE | a |
| 1122 | RICH MOLL | a |
| 1134 | JOELLA RICHARD | a |
| 1160 | MINDY HEINRICH | a |
| 1224 | YADIRA RICHARDSON | a |
| 1379 | BRICE ALLMAN | a |
| 1574 | RICO VALENZUELA | a |
| 1602 | BEATRICE LOVE | a |
| 1822 | RICHELLE ROE | a |
| 2136 | CHIQUITA RICHTER | a |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+----------------------+------+
| id | username | s |
+------+----------------------+------+
| 675 | CONCEPTION ABERNATHY | a |
| 964 | BERNARDINA OSHEA | a |
| 1354 | VERNA VITALE | a |
| 1784 | BERNADETTE HALES | a |
| 1839 | BERNARDINA MCMILLAN | a |
| 1864 | ERNA ULLOA | a |
| 1948 | SAMIRA ABERNATHY | a |
| 2238 | JUDI BERNAL | a |
| 2446 | MERNA GAITHER | a |
| 3065 | BERNADINE HIBBARD | a |
| 3195 | BERNADETTE SHELTON | a |
| 3688 | VERNA GASTON | a |
| 3781 | BERNARDINE WILKINS | a |
| 4370 | ERNA VITALE | a |
| 4637 | TARSHA HERNANDEZ | a |
| 4662 | FERNANDO HOUCK | a |
| 5044 | CONSTANCE ABERNATHY | a |
| 5580 | LAVERNA GORMAN | a |
| 5582 | FERNANDE ISRAEL | a |
| 5798 | LAVERNA STORM | a |
+------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id | username | s |
+------+-------------------+------+
| 8 | DAMIAN SOMERS | a |
| 16 | TAMI WHELAN | a |
| 19 | DARCY SANDBERG | a |
| 20 | RANEE BROUGHTON | a |
| 21 | STEPHEN ALLMAN | a |
| 30 | AMANDA KEY | a |
| 37 | ELFRIEDA HANKS | a |
| 41 | NANNIE WILLINGHAM | a |
| 42 | YOULANDA TROUT | a |
| 44 | ANTHONY SMOOT | a |
| 47 | FRANCIE BUNDY | a |
| 51 | LATASHA POLAND | a |
| 53 | SHEMEKA DURAND | a |
| 54 | LATANYA ARNDT | a |
| 56 | JANELLE LASTER | a |
| 57 | NANNIE HANNON | a |
| 58 | GRANVILLE VALDEZ | a |
| 59 | DEDE SPANN | a |
| 60 | DANIEL MERRITT | a |
| 63 | SAUL HOWLAND | a |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+--------------------+------+
| id | username | s |
+------+--------------------+------+
| 118 | ANTONIA VANWINKLE | a |
| 220 | ANTONIA MELGAR | a |
| 391 | KARYL TONEY | a |
| 761 | TONYA SHERRILL | a |
| 1527 | LEONE TONEY | a |
| 2132 | TONIA RAPP | a |
| 2195 | TONIE HOANG | a |
| 2333 | LATONIA VILLASENOR | a |
| 2357 | TONIE BARNHILL | a |
| 2430 | TONIA BOSTICK | a |
| 2584 | TONI SPENCE | a |
| 2725 | ANTONIETTA CINTRON | a |
| 2881 | ANTONINA HASKELL | a |
| 3318 | TONY DUPRE | a |
| 3582 | ANTONIETTA BAEZ | a |
| 3858 | TONEY SCHOEN | a |
| 4366 | ROCHEL TONEY | a |
| 4608 | ANTONIA DRISCOLL | a |
| 4657 | TONYA PARRIS | a |
| 4800 | TONY WEISS | a |
+------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999964 | CANDACE BOOTH | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999197 | HEATH MCNAMARA | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 999013 | HEATHER HAMMOCK | a |
| 998893 | IRWIN SOUTHARD | a |
| 998526 | SCOTT CARRION | a |
| 998000 | EDYTH CARLISLE | a |
| 997945 | RUTHE SCHENK | a |
| 997558 | ARTIE SOUTH | a |
| 997544 | HEATHER CLAUSEN | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy="1";"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+------------------------+------+
| id | username | s |
+--------+------------------------+------+
| 999961 | JONELL ENRIGHT | a |
| 999932 | JONELL NIX | a |
| 999926 | JONAH BURNSIDE | a |
| 999922 | LAVONNA JONAS | a |
| 999860 | JOHNETTA DO | a |
| 999552 | JOHNNY CARNES | a |
| 999548 | JOHNATHAN PEPPER | a |
| 999509 | JOHNATHAN STUBBLEFIELD | a |
| 999171 | JOHNNY ABRAMS | a |
| 999033 | AGNUS STJOHN | a |
| 998835 | SCARLETT JONAS | a |
| 998798 | JOHNATHON READ | a |
| 998467 | JOHNSON JEAN | a |
| 998393 | JOHN BACH | a |
| 998306 | JOHNNY TAFOYA | a |
| 998304 | JONG SAUER | a |
| 998303 | JONATHON DUPRE | a |
| 998278 | JOHNNIE LOR | a |
| 998181 | JONA ELROD | a |
| 998154 | JONG YORK | a |
+--------+------------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+-------+--------------------+------+
| id | username | s |
+-------+--------------------+------+
| 10028 | ANJANETTE PORTILLO | a |
| 10056 | JANETTE LYNCH | a |
| 10629 | LANETTE SWAIN | a |
| 10874 | JANESSA MONTEZ | a |
| 10977 | RUTHANN LANEY | a |
| 11038 | DESIRE LANE | a |
| 11056 | LANELLE WATTS | a |
| 11397 | MELITA LANE | a |
| 11415 | MARYJANE HOLTZ | a |
| 11569 | JANETH SELBY | a |
| 11758 | JANETTE GANTT | a |
| 11834 | JANELLE DRIGGERS | a |
| 12100 | JAE COBLE | a |
| 12171 | JAE MEARS | a |
| 12185 | JANESSA BALTAZAR | a |
| 12237 | JANENE APODACA | a |
| 12490 | LANELLE ARNDT | a |
| 12536 | JANENE WALDRON | a |
| 12540 | ANJANETTE STAGGS | a |
| 12642 | HERSHEL LANEY | a |
+-------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+------+---------------------+------+
| id | username | s |
+------+---------------------+------+
| 1354 | VERNA VITALE | a |
| 1784 | BERNADETTE HALES | a |
| 1839 | BERNARDINA MCMILLAN | a |
| 1864 | ERNA ULLOA | a |
| 1948 | SAMIRA ABERNATHY | a |
+------+---------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+------------------+------+
| id | username | s |
+------+------------------+------+
| 188 | LARA KIRK | a |
| 207 | CLARA MORRIS | a |
| 351 | KLARA DONALDSON | a |
| 990 | ELAINE SARABIA | a |
| 1409 | LARA FREDERICK | a |
| 1661 | SARA GARNER | a |
| 1831 | SARAI ESPINAL | a |
| 2074 | VALENTIN SARABIA | a |
| 2930 | LARA CINTRON | a |
| 3045 | KLARA ANDRES | a |
| 3373 | KLARA NORTON | a |
| 3741 | CRUZ SARABIA | a |
| 3780 | RUSSEL LARA | a |
| 4700 | HEE SARABIA | a |
| 4933 | KLARA GOODING | a |
| 5830 | SARAI LINDLEY | a |
| 5865 | SARAN KNAPP | a |
| 5918 | SARA WAITE | a |
| 6635 | CLARA BEALE | a |
| 6836 | CLARA BAZAN | a |
+------+------------------+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnson |
| jonas |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| joe |
| john |
| jose |
| joy |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
+-----------+
| albert |
| alexander |
| allen |
| dale |
| dallas |
| donald |
| gale |
| kendall |
| marshall |
| walter |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| ami |
| britni |
| brittni |
| cami |
| choi |
| darci |
| eleni |
| jami |
| jani |
| jeni |
| joi |
| kaci |
| kami |
| kimi |
| laci |
| lani |
| luci |
| mancini |
| marci |
| martini |
| melani |
| muoi |
| nanci |
| neomi |
| noemi |
| nohemi |
| ricci |
| shani |
| staci |
| tammi |
| toi |
| tomi |
| traci |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| chang |
| chi |
| chong |
| chung |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| page |
| paige |
| palma |
| palmer |
| paris |
| parker |
| pat |
| patrick |
| paul |
| paz |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+------------+
| grace |
| gracia |
| grady |
| graham |
| grant |
| gregg |
| gregory |
| griffin |
| grover |
| montenegro |
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
+-----------+
| query |
+-----------+
| some |
| something |
+-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
+-----------+
| query |
+-----------+
| some |
| something |
+-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
ERROR 1064 (42000) at line 1: The 'fuzzy' option requires a full-text query
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
+----------+
| query |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
+----------+
| query |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
- +------+--------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+--------+
- | 1 | abcdef |
- +------+--------+
- +----------------+--------+
- | Variable_name | Value |
- +----------------+--------+
- | total | 1 |
- | total_found | 1 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- | keyword[0] | abcdef |
- | docs[0] | 1 |
- | hits[0] | 1 |
- +----------------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
- +----------------+-------+
- | Variable_name | Value |
- +----------------+-------+
- | total | 2 |
- | total_found | 2 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- +----------------+-------+
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 1 */ SELECT * FROM t WHERE MATCH('abcdef');
+ /* Tue Jan 28 01:31:08.308 2025 conn 81 (127.0.0.1:38418) real 0.000 wall 0.000 found 0 */ SELECT * FROM t WHERE MATCH('abcdef'); /*error=unknown local table(s) 't' in search request */
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 2 */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1;
+ /* Tue Jan 28 01:31:08.309 2025 conn 81 (127.0.0.1:38418) */ SELECT * FROM t WHERE MATCH('abcdef') # error=unknown local table(s) 't' in search request
+ /* Tue Jan 28 01:31:08.325 2025 conn 82 (127.0.0.1:38428) */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1 # error=unknown local table(s) 't' in search request
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
- +----------------+-------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | Variable_name | Value |
- +----------------+-------------+
- | total | 0 |
- | total_found | 0 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- | keyword[0] | nonexistent |
- | docs[0] | 0 |
- | hits[0] | 0 |
- +----------------+-------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
+-------+
| query |
+-------+
| 340 |
+-------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
+-------+
| query |
+-------+
| 340 |
+-------+
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf
––– output –––
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv
––– output –––
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain
––– output –––
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1
––– output –––
––– input –––
rm -f /tmp/searchd.log; searchd --stopwait > /dev/null; searchd -c /tmp/manticore_idx.conf; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/tmp/manticore_idx.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on all interfaces for mysql, port=9306
listening on all interfaces for sphinx and http(s), port=9312
listening on all interfaces for sphinx and http(s), port=9308
precaching table 'idx_plain'
precached 1 tables in #!/[0-9]{1,2}.[0-9]+/!# sec
Buddy started!
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
+-----------+-------+
| Table | Type |
+-----------+-------+
| idx_plain | local |
+-----------+-------+
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
+---------------+-------------------+
| Variable_name | Value |
+---------------+-------------------+
| settings | min_infix_len = 2 |
+---------------+-------------------+
––– input –––
mysql -h0 -P9306 -e "show version\G;"
––– output –––
*************************** 1. row ***************************
Component: Daemon
Version: %{VERSION}
*************************** 2. row ***************************
Component: Columnar
Version: columnar %{VERSION}
*************************** 3. row ***************************
Component: Secondary
Version: secondary %{VERSION}
*************************** 4. row ***************************
Component: KNN
Version: knn %{VERSION}
*************************** 5. row ***************************
Component: Buddy
Version: buddy %{VERSION}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 1 | abcdef |
| 2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 1 | abcdef |
| 2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
+--------+
| query |
+--------+
| abcd |
| abcdef |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
+--------+
| query |
+--------+
| random |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
+------+--------+
| id | f |
+------+--------+
| 1 | abcdef |
+------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 2 | abcd efgh |
+------+-----------+
|
clt❌ CLT tests in test/clt-tests/buddy/test-fuzzy-search.rec––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
0
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
debconf: delaying package configuration, since apt-utils is not installed
0
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=4 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
0
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.*\(min_infix_len='2'\).*/\1/"
––– output –––
min_infix_len='2'
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
+----------+
| count(*) |
+----------+
| 1000000 |
+----------+
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id | username | s |
+------+-------------------+------+
| 196 | BRICE MULLIN | a |
| 307 | GRICELDA SKELTON | a |
| 363 | LAURICE SOLIZ | a |
| 478 | ERICH LLAMAS | a |
| 490 | LATRICE MANCILLA | a |
| 608 | MAURICE PRATHER | a |
| 659 | BRICE OLIVARES | a |
| 697 | PATRICE WOOD | a |
| 822 | JUNITA RICHARD | a |
| 835 | AUREA RICO | a |
| 854 | ROXANNE BRICE | a |
| 1122 | RICH MOLL | a |
| 1134 | JOELLA RICHARD | a |
| 1160 | MINDY HEINRICH | a |
| 1224 | YADIRA RICHARDSON | a |
| 1379 | BRICE ALLMAN | a |
| 1574 | RICO VALENZUELA | a |
| 1602 | BEATRICE LOVE | a |
| 1822 | RICHELLE ROE | a |
| 2136 | CHIQUITA RICHTER | a |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+----------------------+------+
| id | username | s |
+------+----------------------+------+
| 675 | CONCEPTION ABERNATHY | a |
| 964 | BERNARDINA OSHEA | a |
| 1354 | VERNA VITALE | a |
| 1784 | BERNADETTE HALES | a |
| 1839 | BERNARDINA MCMILLAN | a |
| 1864 | ERNA ULLOA | a |
| 1948 | SAMIRA ABERNATHY | a |
| 2238 | JUDI BERNAL | a |
| 2446 | MERNA GAITHER | a |
| 3065 | BERNADINE HIBBARD | a |
| 3195 | BERNADETTE SHELTON | a |
| 3688 | VERNA GASTON | a |
| 3781 | BERNARDINE WILKINS | a |
| 4370 | ERNA VITALE | a |
| 4637 | TARSHA HERNANDEZ | a |
| 4662 | FERNANDO HOUCK | a |
| 5044 | CONSTANCE ABERNATHY | a |
| 5580 | LAVERNA GORMAN | a |
| 5582 | FERNANDE ISRAEL | a |
| 5798 | LAVERNA STORM | a |
+------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id | username | s |
+------+-------------------+------+
| 8 | DAMIAN SOMERS | a |
| 16 | TAMI WHELAN | a |
| 19 | DARCY SANDBERG | a |
| 20 | RANEE BROUGHTON | a |
| 21 | STEPHEN ALLMAN | a |
| 30 | AMANDA KEY | a |
| 37 | ELFRIEDA HANKS | a |
| 41 | NANNIE WILLINGHAM | a |
| 42 | YOULANDA TROUT | a |
| 44 | ANTHONY SMOOT | a |
| 47 | FRANCIE BUNDY | a |
| 51 | LATASHA POLAND | a |
| 53 | SHEMEKA DURAND | a |
| 54 | LATANYA ARNDT | a |
| 56 | JANELLE LASTER | a |
| 57 | NANNIE HANNON | a |
| 58 | GRANVILLE VALDEZ | a |
| 59 | DEDE SPANN | a |
| 60 | DANIEL MERRITT | a |
| 63 | SAUL HOWLAND | a |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+--------------------+------+
| id | username | s |
+------+--------------------+------+
| 118 | ANTONIA VANWINKLE | a |
| 220 | ANTONIA MELGAR | a |
| 391 | KARYL TONEY | a |
| 761 | TONYA SHERRILL | a |
| 1527 | LEONE TONEY | a |
| 2132 | TONIA RAPP | a |
| 2195 | TONIE HOANG | a |
| 2333 | LATONIA VILLASENOR | a |
| 2357 | TONIE BARNHILL | a |
| 2430 | TONIA BOSTICK | a |
| 2584 | TONI SPENCE | a |
| 2725 | ANTONIETTA CINTRON | a |
| 2881 | ANTONINA HASKELL | a |
| 3318 | TONY DUPRE | a |
| 3582 | ANTONIETTA BAEZ | a |
| 3858 | TONEY SCHOEN | a |
| 4366 | ROCHEL TONEY | a |
| 4608 | ANTONIA DRISCOLL | a |
| 4657 | TONYA PARRIS | a |
| 4800 | TONY WEISS | a |
+------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999964 | CANDACE BOOTH | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999197 | HEATH MCNAMARA | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 999013 | HEATHER HAMMOCK | a |
| 998893 | IRWIN SOUTHARD | a |
| 998526 | SCOTT CARRION | a |
| 998000 | EDYTH CARLISLE | a |
| 997945 | RUTHE SCHENK | a |
| 997558 | ARTIE SOUTH | a |
| 997544 | HEATHER CLAUSEN | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy="1";"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+------------------------+------+
| id | username | s |
+--------+------------------------+------+
| 999961 | JONELL ENRIGHT | a |
| 999932 | JONELL NIX | a |
| 999926 | JONAH BURNSIDE | a |
| 999922 | LAVONNA JONAS | a |
| 999860 | JOHNETTA DO | a |
| 999552 | JOHNNY CARNES | a |
| 999548 | JOHNATHAN PEPPER | a |
| 999509 | JOHNATHAN STUBBLEFIELD | a |
| 999171 | JOHNNY ABRAMS | a |
| 999033 | AGNUS STJOHN | a |
| 998835 | SCARLETT JONAS | a |
| 998798 | JOHNATHON READ | a |
| 998467 | JOHNSON JEAN | a |
| 998393 | JOHN BACH | a |
| 998306 | JOHNNY TAFOYA | a |
| 998304 | JONG SAUER | a |
| 998303 | JONATHON DUPRE | a |
| 998278 | JOHNNIE LOR | a |
| 998181 | JONA ELROD | a |
| 998154 | JONG YORK | a |
+--------+------------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+-------+--------------------+------+
| id | username | s |
+-------+--------------------+------+
| 10028 | ANJANETTE PORTILLO | a |
| 10056 | JANETTE LYNCH | a |
| 10629 | LANETTE SWAIN | a |
| 10874 | JANESSA MONTEZ | a |
| 10977 | RUTHANN LANEY | a |
| 11038 | DESIRE LANE | a |
| 11056 | LANELLE WATTS | a |
| 11397 | MELITA LANE | a |
| 11415 | MARYJANE HOLTZ | a |
| 11569 | JANETH SELBY | a |
| 11758 | JANETTE GANTT | a |
| 11834 | JANELLE DRIGGERS | a |
| 12100 | JAE COBLE | a |
| 12171 | JAE MEARS | a |
| 12185 | JANESSA BALTAZAR | a |
| 12237 | JANENE APODACA | a |
| 12490 | LANELLE ARNDT | a |
| 12536 | JANENE WALDRON | a |
| 12540 | ANJANETTE STAGGS | a |
| 12642 | HERSHEL LANEY | a |
+-------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+------+---------------------+------+
| id | username | s |
+------+---------------------+------+
| 1354 | VERNA VITALE | a |
| 1784 | BERNADETTE HALES | a |
| 1839 | BERNARDINA MCMILLAN | a |
| 1864 | ERNA ULLOA | a |
| 1948 | SAMIRA ABERNATHY | a |
+------+---------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+------------------+------+
| id | username | s |
+------+------------------+------+
| 188 | LARA KIRK | a |
| 207 | CLARA MORRIS | a |
| 351 | KLARA DONALDSON | a |
| 990 | ELAINE SARABIA | a |
| 1409 | LARA FREDERICK | a |
| 1661 | SARA GARNER | a |
| 1831 | SARAI ESPINAL | a |
| 2074 | VALENTIN SARABIA | a |
| 2930 | LARA CINTRON | a |
| 3045 | KLARA ANDRES | a |
| 3373 | KLARA NORTON | a |
| 3741 | CRUZ SARABIA | a |
| 3780 | RUSSEL LARA | a |
| 4700 | HEE SARABIA | a |
| 4933 | KLARA GOODING | a |
| 5830 | SARAI LINDLEY | a |
| 5865 | SARAN KNAPP | a |
| 5918 | SARA WAITE | a |
| 6635 | CLARA BEALE | a |
| 6836 | CLARA BAZAN | a |
+------+------------------+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnson |
| jonas |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| joe |
| john |
| jose |
| joy |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
+-----------+
| albert |
| alexander |
| allen |
| dale |
| dallas |
| donald |
| gale |
| kendall |
| marshall |
| walter |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| ami |
| britni |
| brittni |
| cami |
| choi |
| darci |
| eleni |
| jami |
| jani |
| jeni |
| joi |
| kaci |
| kami |
| kimi |
| laci |
| lani |
| luci |
| mancini |
| marci |
| martini |
| melani |
| muoi |
| nanci |
| neomi |
| noemi |
| nohemi |
| ricci |
| shani |
| staci |
| tammi |
| toi |
| tomi |
| traci |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| chang |
| chi |
| chong |
| chung |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| page |
| paige |
| palma |
| palmer |
| paris |
| parker |
| pat |
| patrick |
| paul |
| paz |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+------------+
| grace |
| gracia |
| grady |
| graham |
| grant |
| gregg |
| gregory |
| griffin |
| grover |
| montenegro |
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
- | query |
- +-----------+
- | some |
- | something |
- +-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
- +-----------+
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
- | query |
- +-----------+
- | some |
- | something |
- +-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
ERROR 1064 (42000) at line 1: The 'fuzzy' option requires a full-text query
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
+----------+
| query |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
+----------+
| query |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
- +------+--------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+--------+
- | 1 | abcdef |
- +------+--------+
- +----------------+--------+
- | Variable_name | Value |
- +----------------+--------+
- | total | 1 |
- | total_found | 1 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- | keyword[0] | abcdef |
- | docs[0] | 1 |
- | hits[0] | 1 |
- +----------------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: no such table 't'
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
- +----------------+-------+
- | Variable_name | Value |
- +----------------+-------+
- | total | 2 |
- | total_found | 2 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- +----------------+-------+
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 1 */ SELECT * FROM t WHERE MATCH('abcdef');
+ /* Tue Jan 28 01:39:55.690 2025 conn 79 (127.0.0.1:40056) real 0.000 wall 0.000 found 0 */ SELECT * FROM t WHERE MATCH('abcdef'); /*error=unknown local table(s) 't' in search request */
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 2 */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1;
+ /* Tue Jan 28 01:39:55.691 2025 conn 79 (127.0.0.1:40056) */ SELECT * FROM t WHERE MATCH('abcdef') # error=unknown local table(s) 't' in search request
+ /* Tue Jan 28 01:39:55.704 2025 conn 80 (127.0.0.1:40074) */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1 # error=no such table 't'
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
- +----------------+-------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | Variable_name | Value |
- +----------------+-------------+
- | total | 0 |
- | total_found | 0 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- | keyword[0] | nonexistent |
- | docs[0] | 0 |
- | hits[0] | 0 |
- +----------------+-------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: no such table 't'
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: no such table 't'
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
+-------+
| query |
+-------+
| 340 |
+-------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
+-------+
| query |
+-------+
| 340 |
+-------+
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf
––– output –––
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv
––– output –––
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain
––– output –––
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1
––– output –––
––– input –––
rm -f /tmp/searchd.log; searchd --stopwait > /dev/null; searchd -c /tmp/manticore_idx.conf; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/tmp/manticore_idx.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on all interfaces for mysql, port=9306
listening on all interfaces for sphinx and http(s), port=9312
listening on all interfaces for sphinx and http(s), port=9308
precaching table 'idx_plain'
precached 1 tables in #!/[0-9]{1,2}.[0-9]+/!# sec
Buddy started!
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
+-----------+-------+
| Table | Type |
+-----------+-------+
| idx_plain | local |
+-----------+-------+
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
+---------------+-------------------+
| Variable_name | Value |
+---------------+-------------------+
| settings | min_infix_len = 2 |
+---------------+-------------------+
––– input –––
mysql -h0 -P9306 -e "show version\G;"
––– output –––
*************************** 1. row ***************************
Component: Daemon
Version: %{VERSION}
*************************** 2. row ***************************
Component: Columnar
Version: columnar %{VERSION}
*************************** 3. row ***************************
Component: Secondary
Version: secondary %{VERSION}
*************************** 4. row ***************************
Component: KNN
Version: knn %{VERSION}
*************************** 5. row ***************************
Component: Buddy
Version: buddy %{VERSION}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 1 | abcdef |
| 2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 1 | abcdef |
| 2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
+--------+
| query |
+--------+
| abcd |
| abcdef |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
+--------+
| query |
+--------+
| random |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
+------+--------+
| id | f |
+------+--------+
| 1 | abcdef |
+------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 2 | abcd efgh |
+------+-----------+
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good. Let's add also one more test to validate that it works for CLUSTERED sharding. We can just create simple cluster with minimum of 2 nodes and try to do the same there with DROP TABLE c:table
and so on
0be2557
to
829d640
Compare
clt❌ CLT tests in test/clt-tests/buddy/test-fuzzy-search.rec––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
apt-get update -y > /dev/null; echo $?
––– output –––
0
––– input –––
apt-get install jq -y > /dev/null; echo $?
––– output –––
debconf: delaying package configuration, since apt-utils is not installed
0
––– input –––
php -d memory_limit=2G ./test/clt-tests/scripts/load_names_attr.php --batch-size=100000 --concurrency=4 --docs=1000000 --start-id=1 --min-infix-len=2 > /dev/null; echo $?
––– output –––
0
––– input –––
mysql -h0 -P9306 -e "SHOW CREATE TABLE name;" | grep "min_infix_len='2'" | sed "s/.*\(min_infix_len='2'\).*/\1/"
––– output –––
min_infix_len='2'
––– input –––
mysql -h0 -P9306 -e "SELECT COUNT(*) FROM name;"
––– output –––
+----------+
| count(*) |
+----------+
| 1000000 |
+----------+
––– input –––
mysql -h0 -P9306 -e "OPTIMIZE TABLE name OPTION sync=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('RICH') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id | username | s |
+------+-------------------+------+
| 196 | BRICE MULLIN | a |
| 307 | GRICELDA SKELTON | a |
| 363 | LAURICE SOLIZ | a |
| 478 | ERICH LLAMAS | a |
| 490 | LATRICE MANCILLA | a |
| 608 | MAURICE PRATHER | a |
| 659 | BRICE OLIVARES | a |
| 697 | PATRICE WOOD | a |
| 822 | JUNITA RICHARD | a |
| 835 | AUREA RICO | a |
| 854 | ROXANNE BRICE | a |
| 1122 | RICH MOLL | a |
| 1134 | JOELLA RICHARD | a |
| 1160 | MINDY HEINRICH | a |
| 1224 | YADIRA RICHARDSON | a |
| 1379 | BRICE ALLMAN | a |
| 1574 | RICO VALENZUELA | a |
| 1602 | BEATRICE LOVE | a |
| 1822 | RICHELLE ROE | a |
| 2136 | CHIQUITA RICHTER | a |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+----------------------+------+
| id | username | s |
+------+----------------------+------+
| 675 | CONCEPTION ABERNATHY | a |
| 964 | BERNARDINA OSHEA | a |
| 1354 | VERNA VITALE | a |
| 1784 | BERNADETTE HALES | a |
| 1839 | BERNARDINA MCMILLAN | a |
| 1864 | ERNA ULLOA | a |
| 1948 | SAMIRA ABERNATHY | a |
| 2238 | JUDI BERNAL | a |
| 2446 | MERNA GAITHER | a |
| 3065 | BERNADINE HIBBARD | a |
| 3195 | BERNADETTE SHELTON | a |
| 3688 | VERNA GASTON | a |
| 3781 | BERNARDINE WILKINS | a |
| 4370 | ERNA VITALE | a |
| 4637 | TARSHA HERNANDEZ | a |
| 4662 | FERNANDO HOUCK | a |
| 5044 | CONSTANCE ABERNATHY | a |
| 5580 | LAVERNA GORMAN | a |
| 5582 | FERNANDE ISRAEL | a |
| 5798 | LAVERNA STORM | a |
+------+----------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('ANT') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+-------------------+------+
| id | username | s |
+------+-------------------+------+
| 8 | DAMIAN SOMERS | a |
| 16 | TAMI WHELAN | a |
| 19 | DARCY SANDBERG | a |
| 20 | RANEE BROUGHTON | a |
| 21 | STEPHEN ALLMAN | a |
| 30 | AMANDA KEY | a |
| 37 | ELFRIEDA HANKS | a |
| 41 | NANNIE WILLINGHAM | a |
| 42 | YOULANDA TROUT | a |
| 44 | ANTHONY SMOOT | a |
| 47 | FRANCIE BUNDY | a |
| 51 | LATASHA POLAND | a |
| 53 | SHEMEKA DURAND | a |
| 54 | LATANYA ARNDT | a |
| 56 | JANELLE LASTER | a |
| 57 | NANNIE HANNON | a |
| 58 | GRANVILLE VALDEZ | a |
| 59 | DEDE SPANN | a |
| 60 | DANIEL MERRITT | a |
| 63 | SAUL HOWLAND | a |
+------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('tony') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+--------------------+------+
| id | username | s |
+------+--------------------+------+
| 118 | ANTONIA VANWINKLE | a |
| 220 | ANTONIA MELGAR | a |
| 391 | KARYL TONEY | a |
| 761 | TONYA SHERRILL | a |
| 1527 | LEONE TONEY | a |
| 2132 | TONIA RAPP | a |
| 2195 | TONIE HOANG | a |
| 2333 | LATONIA VILLASENOR | a |
| 2357 | TONIE BARNHILL | a |
| 2430 | TONIA BOSTICK | a |
| 2584 | TONI SPENCE | a |
| 2725 | ANTONIETTA CINTRON | a |
| 2881 | ANTONINA HASKELL | a |
| 3318 | TONY DUPRE | a |
| 3582 | ANTONIETTA BAEZ | a |
| 3858 | TONEY SCHOEN | a |
| 4366 | ROCHEL TONEY | a |
| 4608 | ANTONIA DRISCOLL | a |
| 4657 | TONYA PARRIS | a |
| 4800 | TONY WEISS | a |
+------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMYTH') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999964 | CANDACE BOOTH | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999197 | HEATH MCNAMARA | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 999013 | HEATHER HAMMOCK | a |
| 998893 | IRWIN SOUTHARD | a |
| 998526 | SCOTT CARRION | a |
| 998000 | EDYTH CARLISLE | a |
| 997945 | RUTHE SCHENK | a |
| 997558 | ARTIE SOUTH | a |
| 997544 | HEATHER CLAUSEN | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SMITH') ORDER BY id DESC, username ASC OPTION fuzzy="1";"
––– output –––
+--------+-------------------+------+
| id | username | s |
+--------+-------------------+------+
| 999973 | KEITH SNOW | a |
| 999855 | DOROTHA WISEMAN | a |
| 999723 | SCOTT OLSON | a |
| 999264 | RUTHANN GREENE | a |
| 999250 | MINH LANDERS | a |
| 999127 | MALENA RUTHERFORD | a |
| 999120 | RUTHANNE CARDOSO | a |
| 998893 | IRWIN SOUTHARD | a |
| 998691 | MITCHELL SEITZ | a |
| 998539 | ELSA SEITZ | a |
| 998526 | SCOTT CARRION | a |
| 997945 | RUTHE SCHENK | a |
| 997815 | MINH GOODWIN | a |
| 997558 | ARTIE SOUTH | a |
| 997189 | BETTY SOUTHERN | a |
| 997187 | SUSAN SCOTT | a |
| 997098 | OTHA FAJARDO | a |
| 997074 | SCOTT FLANDERS | a |
| 996804 | SCOTT ENOS | a |
| 996461 | EDRA HIGGINBOTHAM | a |
+--------+-------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('john') ORDER BY id DESC, username ASC OPTION fuzzy=1;"
––– output –––
+--------+------------------------+------+
| id | username | s |
+--------+------------------------+------+
| 999961 | JONELL ENRIGHT | a |
| 999932 | JONELL NIX | a |
| 999926 | JONAH BURNSIDE | a |
| 999922 | LAVONNA JONAS | a |
| 999860 | JOHNETTA DO | a |
| 999552 | JOHNNY CARNES | a |
| 999548 | JOHNATHAN PEPPER | a |
| 999509 | JOHNATHAN STUBBLEFIELD | a |
| 999171 | JOHNNY ABRAMS | a |
| 999033 | AGNUS STJOHN | a |
| 998835 | SCARLETT JONAS | a |
| 998798 | JOHNATHON READ | a |
| 998467 | JOHNSON JEAN | a |
| 998393 | JOHN BACH | a |
| 998306 | JOHNNY TAFOYA | a |
| 998304 | JONG SAUER | a |
| 998303 | JONATHON DUPRE | a |
| 998278 | JOHNNIE LOR | a |
| 998181 | JONA ELROD | a |
| 998154 | JONG YORK | a |
+--------+------------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('jane') AND id BETWEEN 10000 AND 20000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+-------+--------------------+------+
| id | username | s |
+-------+--------------------+------+
| 10028 | ANJANETTE PORTILLO | a |
| 10056 | JANETTE LYNCH | a |
| 10629 | LANETTE SWAIN | a |
| 10874 | JANESSA MONTEZ | a |
| 10977 | RUTHANN LANEY | a |
| 11038 | DESIRE LANE | a |
| 11056 | LANELLE WATTS | a |
| 11397 | MELITA LANE | a |
| 11415 | MARYJANE HOLTZ | a |
| 11569 | JANETH SELBY | a |
| 11758 | JANETTE GANTT | a |
| 11834 | JANELLE DRIGGERS | a |
| 12100 | JAE COBLE | a |
| 12171 | JAE MEARS | a |
| 12185 | JANESSA BALTAZAR | a |
| 12237 | JANENE APODACA | a |
| 12490 | LANELLE ARNDT | a |
| 12536 | JANENE WALDRON | a |
| 12540 | ANJANETTE STAGGS | a |
| 12642 | HERSHEL LANEY | a |
+-------+--------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('EBGRNA') AND id BETWEEN 1000 AND 2000 ORDER BY username ASC OPTION fuzzy=1;"
––– output –––
+------+---------------------+------+
| id | username | s |
+------+---------------------+------+
| 1354 | VERNA VITALE | a |
| 1784 | BERNADETTE HALES | a |
| 1839 | BERNARDINA MCMILLAN | a |
| 1864 | ERNA ULLOA | a |
| 1948 | SAMIRA ABERNATHY | a |
+------+---------------------+------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM name WHERE MATCH('SARA') ORDER BY id ASC, username ASC OPTION fuzzy=1;"
––– output –––
+------+------------------+------+
| id | username | s |
+------+------------------+------+
| 188 | LARA KIRK | a |
| 207 | CLARA MORRIS | a |
| 351 | KLARA DONALDSON | a |
| 990 | ELAINE SARABIA | a |
| 1409 | LARA FREDERICK | a |
| 1661 | SARA GARNER | a |
| 1831 | SARAI ESPINAL | a |
| 2074 | VALENTIN SARABIA | a |
| 2930 | LARA CINTRON | a |
| 3045 | KLARA ANDRES | a |
| 3373 | KLARA NORTON | a |
| 3741 | CRUZ SARABIA | a |
| 3780 | RUSSEL LARA | a |
| 4700 | HEE SARABIA | a |
| 4933 | KLARA GOODING | a |
| 5830 | SARAI LINDLEY | a |
| 5865 | SARAN KNAPP | a |
| 5918 | SARA WAITE | a |
| 6635 | CLARA BEALE | a |
| 6836 | CLARA BAZAN | a |
+------+------------------+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 0 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnson |
| jonas |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend, 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS fuzziness, '' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 2 AS fuzziness, 'us,ru' AS layouts, 1 AS append, 1 AS prepend, 2 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| joe |
| john |
| jose |
| joy |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('jo', 'name', 'ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| joe |
| john |
| johnie |
| johnson |
| jordan |
| jose |
| joseph |
| joshua |
| joy |
| joyce |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('al', 'name', 0 AS fuzziness);" | tail -n +4 | sort
––– output –––
+-----------+
| albert |
| alexander |
| allen |
| dale |
| dallas |
| donald |
| gale |
| kendall |
| marshall |
| walter |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('mi', 'name', 0 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+---------+
| ami |
| britni |
| brittni |
| cami |
| choi |
| darci |
| eleni |
| jami |
| jani |
| jeni |
| joi |
| kaci |
| kami |
| kimi |
| laci |
| lani |
| luci |
| mancini |
| marci |
| martini |
| melani |
| muoi |
| nanci |
| neomi |
| noemi |
| nohemi |
| ricci |
| shani |
| staci |
| tammi |
| toi |
| tomi |
| traci |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ch', 'name', 1 AS fuzziness, 3 AS expansion_len);" | tail -n +4 | sort
––– output –––
+-------+
| chang |
| chi |
| chong |
| chung |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us,ru' AS layouts);" | tail -n +4 | sort
––– output –––
+---------+
| page |
| paige |
| palma |
| palmer |
| paris |
| parker |
| pat |
| patrick |
| paul |
| paz |
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('зф', 'name', 'us' AS layouts);" | tail -n +4 | sort
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('gr', 'name', 1 AS fuzziness, 'ru' AS layouts, 1 AS append, 1 AS prepend);" | tail -n +4 | sort
––– output –––
+------------+
| grace |
| gracia |
| grady |
| graham |
| grant |
| gregg |
| gregory |
| griffin |
| grover |
| montenegro |
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t where match('somethin') option fuzzy=0;"
––– output –––
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
+-----------+
| query |
+-----------+
| some |
| something |
+-----------+
––– input –––
mysql -P9306 -h0 -e "drop table if exists t; create table t(f text) min_infix_len='2'; insert into t values(1, 'something'), (2, 'some thing'); call autocomplete('some', 't');"
––– output –––
+-----------+
| query |
+-----------+
| some |
| something |
+-----------+
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(a int);"
––– output –––
––– input –––
mysql -h0 -P9306 -e "select * from t option fuzzy=1;"
––– output –––
ERROR 1064 (42000) at line 1: The 'fuzzy' option requires a full-text query
––– input –––
mysql -h0 -P9306 -e "drop table if exists comment_28798446; create table comment_28798446(id int, content text) min_infix_len='3';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "insert into comment_28798446 values (1, 'business Manticore interaction'), (2, 'buisness Manticore interation'), (3, 'other text content');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('buisness Manticore interation') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('business Manticore interaction') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "SELECT id FROM comment_28798446 WHERE MATCH('Manticore') OPTION fuzzy = 1, layouts = '';"
––– output –––
+------+
| id |
+------+
| 1 |
| 2 |
+------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', 'ru,us,ua' AS layouts);"
––– output –––
+----------+
| query |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('bus', 'comment_28798446', '' AS layouts);"
––– output –––
+----------+
| query |
+----------+
| business |
+----------+
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS t; CREATE TABLE t(f TEXT) min_infix_len='2';"
––– output –––
+ ERROR 1064 (42000) at line 1: error adding table 't': directory is not empty: /var/lib/manticore/t
––– input –––
mysql -h0 -P9306 -e "INSERT INTO t VALUES (1, 'abcdef'), (2, 'abcd efgh');"
––– output –––
+ ERROR 1064 (42000) at line 1: Cannot create table with column names missing
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef'); SHOW META;"
––– output –––
- +------+--------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+--------+
- | 1 | abcdef |
- +------+--------+
- +----------------+--------+
- | Variable_name | Value |
- +----------------+--------+
- | total | 1 |
- | total_found | 1 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- | keyword[0] | abcdef |
- | docs[0] | 1 |
- | hits[0] | 1 |
- +----------------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1; SHOW META;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
- +----------------+-------+
- | Variable_name | Value |
- +----------------+-------+
- | total | 2 |
- | total_found | 2 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- +----------------+-------+
––– input –––
grep -A3 "SELECT \* FROM t WHERE MATCH('abcdef')" /var/log/manticore/query.log
––– output –––
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 1 */ SELECT * FROM t WHERE MATCH('abcdef');
+ /* Wed Jan 29 13:38:38.259 2025 conn 81 (127.0.0.1:42892) real 0.000 wall 0.000 found 0 */ SELECT * FROM t WHERE MATCH('abcdef'); /*error=unknown local table(s) 't' in search request */
- /* #!/[A-Za-z]{3}\s+[A-Za-z]{3}\s+[0-9]{1,2}\s+[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}\s+[0-9]{4}/!# conn %{NUMBER} (127.0.0.1:%{NUMBER}) real #!/[0-9]{1}.[0-9]{3}/!# wall #!/[0-9]{1}.[0-9]{3}/!# found 2 */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1;
+ /* Wed Jan 29 13:38:38.260 2025 conn 81 (127.0.0.1:42892) */ SELECT * FROM t WHERE MATCH('abcdef') # error=unknown local table(s) 't' in search request
+ /* Wed Jan 29 13:38:38.277 2025 conn 82 (127.0.0.1:42898) */ SELECT * FROM t WHERE MATCH('abcef') OPTION fuzzy=1 # error=unknown local table(s) 't' in search request
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('nonexistent'); SHOW META;"
––– output –––
- +----------------+-------------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | Variable_name | Value |
- +----------------+-------------+
- | total | 0 |
- | total_found | 0 |
- | total_relation | eq |
- | time | #!/[0-9]{1}.[0-9]{3}/!# |
- | keyword[0] | nonexistent |
- | docs[0] | 0 |
- | hits[0] | 0 |
- +----------------+-------------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
- +------+-----------+
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
- | id | f |
- +------+-----------+
- | 1 | abcdef |
- | 2 | abcd efgh |
- +------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM t WHERE MATCH('\$#@\!') OPTION fuzzy=1;"
––– output –––
+ ERROR 1064 (42000) at line 1: unknown local table(s) 't' in search request
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS idx1; CREATE TABLE idx1(value TEXT) min_infix_len='2';"
––– output –––
––– input –––
mysql -h0 -P9306 -e "INSERT INTO idx1(value) VALUES ('340');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1');"
––– output –––
+-------+
| query |
+-------+
| 340 |
+-------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('3', 'idx1');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('34', 'idx1', 1 AS fuzziness);"
––– output –––
+-------+
| query |
+-------+
| 340 |
+-------+
––– input –––
echo -e "searchd {\nlisten = 9306:mysql\nlisten = 9312\nlisten = 9308:http\nlog = /tmp/searchd.log\nquery_log = /tmp/query.log\npid_file = /tmp/searchd.pid\n}\n\nsource src_idx {\ntype = tsvpipe\ntsvpipe_command = cat /tmp/data.tsv\ntsvpipe_field_string = f\ntsvpipe_attr_bigint = id\n}\n\nindex idx_plain {\ntype = plain\nsource = src_idx\npath = /tmp/idx_plain\nmin_infix_len = 2\n}" > /tmp/manticore_idx.conf
––– output –––
––– input –––
echo -e "1\tabcdef\n2\tabcd efgh\n3\trandom text" > /tmp/data.tsv
––– output –––
––– input –––
mkdir -p /tmp/idx_plain && chmod 777 /tmp/idx_plain
––– output –––
––– input –––
indexer --all --config /tmp/manticore_idx.conf > /dev/null 2>&1
––– output –––
––– input –––
rm -f /tmp/searchd.log; searchd --stopwait > /dev/null; searchd -c /tmp/manticore_idx.conf; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/tmp/manticore_idx.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on all interfaces for mysql, port=9306
listening on all interfaces for sphinx and http(s), port=9312
listening on all interfaces for sphinx and http(s), port=9308
precaching table 'idx_plain'
precached 1 tables in #!/[0-9]{1,2}.[0-9]+/!# sec
Buddy started!
––– input –––
mysql -h0 -P9306 -e "SHOW TABLES;"
––– output –––
+-----------+-------+
| Table | Type |
+-----------+-------+
| idx_plain | local |
+-----------+-------+
––– input –––
mysql -h0 -P9306 -e "SHOW TABLE idx_plain SETTINGS;"
––– output –––
+---------------+-------------------+
| Variable_name | Value |
+---------------+-------------------+
| settings | min_infix_len = 2 |
+---------------+-------------------+
––– input –––
mysql -h0 -P9306 -e "show version\G;"
––– output –––
*************************** 1. row ***************************
Component: Daemon
Version: %{VERSION}
*************************** 2. row ***************************
Component: Columnar
Version: columnar %{VERSION}
*************************** 3. row ***************************
Component: Secondary
Version: secondary %{VERSION}
*************************** 4. row ***************************
Component: KNN
Version: knn %{VERSION}
*************************** 5. row ***************************
Component: Buddy
Version: buddy %{VERSION}
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 1 | abcdef |
| 2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcef') OPTION fuzzy=1;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 1 | abcdef |
| 2 | abcd efgh |
+------+-----------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('nonexistent') OPTION fuzzy=1;"
––– output –––
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('abc', 'idx_plain');"
––– output –––
+--------+
| query |
+--------+
| abcd |
| abcdef |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('ran', 'idx_plain');"
––– output –––
+--------+
| query |
+--------+
| random |
+--------+
––– input –––
mysql -h0 -P9306 -e "CALL AUTOCOMPLETE('zzz', 'idx_plain');"
––– output –––
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcdef') OPTION fuzzy=0;"
––– output –––
+------+--------+
| id | f |
+------+--------+
| 1 | abcdef |
+------+--------+
––– input –––
mysql -h0 -P9306 -e "SELECT * FROM idx_plain WHERE MATCH('abcd efgh') OPTION fuzzy=0;"
––– output –––
+------+-----------+
| id | f |
+------+-----------+
| 2 | abcd efgh |
+------+-----------+
|
clt❌ CLT tests in test/clt-tests/sharding/test-drop-sharding-table.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"; echo $?;
––– output –––
0
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=1;"; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
*************************** 1. row ***************************
- Table: _sharding_queue
+ Table: tbl1
- Type: rt
+ Type: distributed
- *************************** 2. row ***************************
- Table: _sharding_state
- Type: rt
- *************************** 3. row ***************************
- Table: _sharding_table
- Type: rt
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
*************************** 1. row ***************************
- Table: _sharding_queue
+ Table: tbl1
- Type: rt
+ Type: distributed
- *************************** 2. row ***************************
- Table: _sharding_state
- Type: rt
- *************************** 3. row ***************************
- Table: _sharding_table
- Type: rt
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP SHARDED TABLE failed: table 'nonexistent_table' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP SHARDED TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP SHARDED TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
[%{NUMBER}] %{NUMBER}
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
[%{NUMBER}]+ Exit %{NUMBER} mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);"
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP SHARDED TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
for i in {1..20}; do mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl${i}(id bigint) shards=3 rf=1;"; done
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl1': CREATE TABLE failed: table 'tbl1' already exists
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl9
+ Type: distributed
––– input –––
for i in {1..20}; do (mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl${i};" &); done; wait; echo "Mass delete test completed."
––– output –––
- Mass delete test completed.
+ ERRORERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ 1064 (42000)ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000)ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ Mass delete test completed.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl9
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ 0
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl9
+ Type: distributed
+ *************************** 21. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
-
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 21. row ***************************
+ Table: tbl9
+ Type: distributed
+ *************************** 22. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
-
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 21. row ***************************
+ Table: tbl9
+ Type: distributed
+ *************************** 22. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
+
test/clt-tests/sharding/test-drop-sharding-table2.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"; echo $?;
––– output –––
0
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=2;"; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP TABLE failed: table 'nonexistent_table' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: table 'Tbl2' is missing: DROP TABLE failed: table 'Tbl2' must exist
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Missing data type for column.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Table name too long.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
-
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
+
|
…ftware/manticoresearch into test/test-drop-sharded-table
clt❌ CLT tests in test/clt-tests/sharding/test-drop-sharding-table.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"; echo $?;
––– output –––
0
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=1;"; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
*************************** 1. row ***************************
- Table: _sharding_queue
+ Table: tbl1
- Type: rt
+ Type: distributed
- *************************** 2. row ***************************
- Table: _sharding_state
- Type: rt
- *************************** 3. row ***************************
- Table: _sharding_table
- Type: rt
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
*************************** 1. row ***************************
- Table: _sharding_queue
+ Table: tbl1
- Type: rt
+ Type: distributed
- *************************** 2. row ***************************
- Table: _sharding_state
- Type: rt
- *************************** 3. row ***************************
- Table: _sharding_table
- Type: rt
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP SHARDED TABLE failed: table 'nonexistent_table' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE nonexistent_cluster:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP SHARDED TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP SHARDED TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);" & sleep 1; mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
[%{NUMBER}] %{NUMBER}
- ERROR 1064 (42000) at line 1: Cannot create table with column names missing
+ ERROR 1064 (42000) at line 1: table 'tbl1' does not support INSERT
[%{NUMBER}]+ Exit %{NUMBER} mysql -h0 -P1306 -e "INSERT INTO ${CLUSTER_NAME}:tbl1 VALUES (1);"
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP SHARDED TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Failed to parse query
––– input –––
for i in {1..20}; do mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl${i}(id bigint) shards=3 rf=1;"; done
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl1': CREATE TABLE failed: table 'tbl1' already exists
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl9
+ Type: distributed
––– input –––
for i in {1..20}; do (mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:tbl${i};" &); done; wait; echo "Mass delete test completed."
––– output –––
- Mass delete test completed.
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000)ERROR 1064 (42000) at line 1 at line 1: Failed to parse query
+ : Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ Mass delete test completed.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl9
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ 0
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl9
+ Type: distributed
+ *************************** 21. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
-
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 21. row ***************************
+ Table: tbl9
+ Type: distributed
+ *************************** 22. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP SHARDED TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: Failed to parse query
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
-
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl1
+ Type: distributed
+ *************************** 3. row ***************************
+ Table: tbl10
+ Type: distributed
+ *************************** 4. row ***************************
+ Table: tbl11
+ Type: distributed
+ *************************** 5. row ***************************
+ Table: tbl12
+ Type: distributed
+ *************************** 6. row ***************************
+ Table: tbl13
+ Type: distributed
+ *************************** 7. row ***************************
+ Table: tbl14
+ Type: distributed
+ *************************** 8. row ***************************
+ Table: tbl15
+ Type: distributed
+ *************************** 9. row ***************************
+ Table: tbl16
+ Type: distributed
+ *************************** 10. row ***************************
+ Table: tbl17
+ Type: distributed
+ *************************** 11. row ***************************
+ Table: tbl18
+ Type: distributed
+ *************************** 12. row ***************************
+ Table: tbl19
+ Type: distributed
+ *************************** 13. row ***************************
+ Table: tbl2
+ Type: distributed
+ *************************** 14. row ***************************
+ Table: tbl20
+ Type: distributed
+ *************************** 15. row ***************************
+ Table: tbl3
+ Type: distributed
+ *************************** 16. row ***************************
+ Table: tbl4
+ Type: distributed
+ *************************** 17. row ***************************
+ Table: tbl5
+ Type: distributed
+ *************************** 18. row ***************************
+ Table: tbl6
+ Type: distributed
+ *************************** 19. row ***************************
+ Table: tbl7
+ Type: distributed
+ *************************** 20. row ***************************
+ Table: tbl8
+ Type: distributed
+ *************************** 21. row ***************************
+ Table: tbl9
+ Type: distributed
+ *************************** 22. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
+
test/clt-tests/sharding/test-drop-sharding-table2.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}/{a,b,c,d,e,f,g,h,i,j}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/sharding/base/config/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[A-Za-z]{3}\s[A-Za-z]{3}\s{1,2}[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
tail -n 100 -f /var/log/manticore-${INSTANCE}/searchd.log | grep -qm1 'started v' && echo "Buddy started!"
––– output –––
Buddy started!
––– input –––
CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"; echo $?;
––– output –––
0
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=2;"; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP TABLE failed: table 'nonexistent_table' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exist
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: table 'Tbl2' is missing: DROP TABLE failed: table 'Tbl2' must exist
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Missing data type for column.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Table name too long.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl00000000000000000000000000000000000000000000000000000000000000001
+ Type: distributed
+ *************************** 2. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
-
+ *************************** 1. row ***************************
+ Table: tbl_missing_type
+ Type: distributed
+
|
@donhardman Removed the base folder from sharding, since all this is already above in the base folder where replication is, errors still occur. |
clt❌ CLT tests in test/clt-tests/replication/replication-test.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=3
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:3306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:3312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:3308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=4
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:4306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=5
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:5306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export CLUSTER_NAME=replication
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
export CLUSTER_NAME=replication
––– output –––
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE testrt (title text, content text, gid uint);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860993,'List of HP business laptops','Elitebook Probook',1);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860994,'List of Dell business laptops','Latitude Precision Vostro',2);" && mysql -h0 -P1306 -e "ALTER CLUSTER replication ADD testrt;" && mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_indexes';"
––– output –––
+-----------------------------+--------+
| Counter | Value |
+-----------------------------+--------+
| cluster_replication_indexes | testrt |
+-----------------------------+--------+
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
––– input –––
export INSTANCE=5
––– output –––
––– input –––
searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
mysql -h0 -P1306 -e "INSERT INTO replication:testrt VALUES(6775836565403860995,'List of HP business laptops','Macbook',3);"; echo $?
––– output –––
0
––– input –––
export INSTANCE=5
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:5306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
sleep 5; mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
––– input –––
export INSTANCE=2
––– output –––
––– input –––
searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
mysql -h0 -P3306 -e "INSERT INTO replication:testrt VALUES(6775836565403860996,'NEW','TABLE',4);"; echo $?
––– output –––
0
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
sleep 5;mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
export INSTANCE=4
––– output –––
––– input –––
searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
sleep 5;mysql -h0 -P2306 -e "DELETE FROM replication:testrt WHERE id = 6775836565403860994"; echo $?
––– output –––
0
––– input –––
mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_2306.txt;
––– output –––
––– input –––
export INSTANCE=4
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:4306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
sleep 5;mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_1306.txt;
––– output –––
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_3306.txt;
––– output –––
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_4306.txt;
––– output –––
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_5306.txt;
––– output –––
––– input –––
diff /tmp/output_1306.txt /tmp/output_2306.txt; echo $?
––– output –––
0
––– input –––
diff /tmp/output_1306.txt /tmp/output_3306.txt; echo $?
––– output –––
0
––– input –––
diff /tmp/output_1306.txt /tmp/output_4306.txt; echo $?
––– output –––
0
––– input –––
diff /tmp/output_1306.txt /tmp/output_5306.txt; echo $?
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "REPLACE INTO replication:testrt SET content='Updated Content', title='List of Dell business laptops', gid=2 WHERE id=6775836565403860994;"; echo $?
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P2306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
|
clt❌ CLT tests in test/clt-tests/sharding/test-drop-sharding-table.rectest/clt-tests/sharding/test-drop-sharding-table2.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=2;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP TABLE failed: table 'nonexistent_table' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exists
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: table 'Tbl2' is missing: DROP TABLE failed: table 'Tbl2' must exist
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Missing data type for column.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Table name too long.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' is missing: DROP TABLE failed: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' must exist
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
-
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
+
|
clt❌ CLT tests in test/clt-tests/core/test-unfreeze-defrosts.rec––– input –––
rm -f /var/log/manticore/searchd.log; searchd --stopwait > /dev/null; searchd; if timeout 10 grep -qm1 '\[BUDDY\] started' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Buddy started!'; else echo 'Timeout or failed!'; cat /var/log/manticore/searchd.log;fi
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [#!/[0-9]+/!#] using config file '/etc/manticoresearch/manticore.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
listening on %{IPADDR}:9312 for sphinx and http(s)
listening on %{IPADDR}:9306 for mysql
listening on %{IPADDR}:9308 for sphinx and http(s)
Buddy started!
––– input –––
set -b +m
––– output –––
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text, s string) rt_mem_limit='128k'; insert into t values(0,'abc','string'); freeze t;" > /dev/null 2>&1
––– output –––
––– input –––
for n in `seq 1 100`; do mysql -h0 -P9306 -e "insert into t values(0, 'abc', 'string string string stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring string');"; done &
––– output –––
[1] %{NUMBER}
––– input –––
sleep 10; mysql -h0 -P9306 -e "select count(*) from t\G"
––– output –––
*************************** 1. row ***************************
count(*): #!/55|56|57|58|59/!#
––– input –––
mysql -h0 -P9306 -e "unfreeze t;"
––– output –––
––– input –––
sleep 10; mysql -h0 -P9306 -e "select count(*) from t\G"
––– output –––
*************************** 1. row ***************************
count(*): 101
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t(f text, s string) rt_mem_limit='128k'; insert into t values(0,'abc','string'); freeze t; freeze t; freeze t;" > /dev/null 2>&1
––– output –––
––– input –––
for n in `seq 1 100`; do mysql -h0 -P9306 -e "insert into t values(0, 'abc', 'string string string stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring stringstring string');"; done &
––– output –––
[%{NUMBER}] %{NUMBER}
––– input –––
sleep 10; mysql -h0 -P9306 -e "select count(*) from t\G"
––– output –––
*************************** 1. row ***************************
count(*): #!/55|56|57|58|59/!#
––– input –––
mysql -h0 -P9306 -e "unfreeze t; unfreeze t; unfreeze t;"
––– output –––
––– input –––
sleep 10; mysql -h0 -P9306 -e "select count(*) from t\G"
––– output –––
*************************** 1. row ***************************
count(*): 101
––– input –––
mysql -h0 -P9306 -e "DROP TABLE IF EXISTS orders; CREATE TABLE orders (id bigint, user_id bigint, name text, description text, price float, order_date timestamp, attr json, region_id int, confirm bool, analogs multi); INSERT INTO orders (id, user_id, name, description, price, order_date, attr, region_id, confirm, analogs) VALUES (0, 1, 'Macbook', '16', 3500.99, 1614258732, '{\"color\":\"titan\",\"size\":16}', 22, 'TRUE', (8,4,16)) rt_mem_limit='64k'; freeze orders;" > /dev/null 2>&1
––– output –––
––– input –––
for n in `seq 1 500`; do mysql -h0 -P9306 -e "INSERT INTO orders (id, user_id, name, description, price, order_date, attr, region_id, confirm, analogs) VALUES (0, 1, 'iPhone', '14Pro', 1500.50, 1708866233, '{\"color\":\"black\",\"size\":14}', 178, 'TRUE', (9,11,15)), (0, 2, 'Macbook', '16', 3500.99, 1614258732, '{\"color\":\"titan\",\"size\":16}', 22, 'TRUE', (8,4,16)), (0, 3, 'iPad', '15Pro', 2600, 1708866234, '{\"color\":\"gold\",\"size\":15}', 178, 'TRUE', (9,11,15)), (0, 4, 'iPhone', '12Mini', 900.50, 1708866235, '{\"color\":\"blue\",\"size\":12}', 179, 'TRUE', (1,5,17)), (0, 5, 'Samsung Galaxy', 'S21', 1000, 1708866236, '{\"color\":\"white\",\"size\":14}', 180, 'FALSE', (13,19,21)), (0, 6, 'Dell Laptop', 'Latitude', 2000, 1708866237, '{\"color\":\"silver\",\"size\":15}', 181, 'TRUE', (4,6,23)), (0, 7, 'Headphones', 'Bluetooth', 100, 1708866238, '{\"color\":\"black\",\"size\":\"M\"}', 182, 'TRUE', (5,7,25)), (0, 8, 'Desk', 'Wooden', 400, 1708866239, '{\"color\":\"brown\",\"size\":\"XL\"}', 183, 'TRUE', (8,9,27)), (0, 9, 'Refrigerator', 'Samsung', 1500, 1708866240, '{\"color\":\"white\",\"size\":60}', 184, 'FALSE', (10,11,29)), (0, 10, 'Smartwatch', 'Fitbit', 300, 1708866241, '{\"color\":\"black\",\"size\":\"S\"}', 185, 'TRUE', (12,13,31)), (0, 11, 'Printer', 'Epson', 250, 1708866242, '{\"color\":\"grey\",\"size\":\"L\"}', 186, 'TRUE', (14,15,33)), (0, 12, 'Chair', 'Office', 150, 1708866243, '{\"color\":\"black\",\"size\":\"M\"}', 187, 'FALSE', (16,17,35)), (0, 13, 'Smartphone', 'Xiaomi', 700, 1708866244, '{\"color\":\"blue\",\"size\":6}', 188, 'TRUE', (18,19,37)), (0, 14, 'Camera', 'Canon', 800, 1708866245, '{\"color\":\"black\",\"size\":\"M\"}', 189, 'TRUE', (20,21,39)), (0, 15, 'Backpack', 'Hiking', 100, 1708866246, '{\"color\":\"green\",\"size\":\"S\"}', 190, 'TRUE', (22,23,41)), (0, 16, 'Table', 'Coffee', 250, 1708866247, '{\"color\":\"brown\",\"size\":\"L\"}', 191, 'FALSE', (24,25,43)), (0, 17, 'Smart TV', 'LG', 1200, 1708866248, '{\"color\":\"silver\",\"size\":55}', 192, 'TRUE', (26,27,45)), (0, 18, 'Blender', 'Kitchen', 80, 1708866249, '{\"color\":\"white\",\"size\":\"M\"}', 193, 'TRUE', (28,29,47)), (0, 19, 'Keyboard', 'Logitech', 50, 1708866250, '{\"color\":\"black\",\"size\":\"L\"}', 194, 'TRUE', (30,31,49)), (0, 20, 'Monitor', 'Samsung', 400, 1708866251, '{\"color\":\"black\",\"size\":24}', 195, 'TRUE', (32,33,51));"; done &
––– output –––
[1] %{NUMBER}
––– input –––
sleep 1; mysql -h0 -P9306 -e "select count(*) from orders\G"
––– output –––
*************************** 1. row ***************************
- count(*): #!/3\d{3}|4\d{3}/!#
+ count(*): 2420
––– input –––
sleep 5; mysql -h0 -P9306 -e "unfreeze orders;"
––– output –––
––– input –––
timeout 60 bash -c 'while [[ $(mysql -h0 -P9306 -e "SELECT COUNT(*) FROM orders;" | grep -o "[0-9]*") -ne 10000 ]]; do sleep 1; done && echo "Data processing completed."'
––– output –––
Data processing completed.
––– input –––
mysql -h0 -P9306 -e "drop table if exists t; create table t; freeze t;" > /dev/null 2>&1
––– output –––
––– input –––
mysql -h0 -P9306 -e "flush ramchunk t;" > /dev/null 2>&1 &
––– output –––
[%{NUMBER}] %{NUMBER}
––– input –––
searchd --stopwait > /dev/null 2>&1; if timeout 60 grep -qm1 'shutdown complete' <(tail -n 1000 -f /var/log/manticore/searchd.log); then echo 'Shutdown complete'; else echo 'Shutdown not completed'; cat /var/log/manticore/searchd.log; fi
––– output –––
Shutdown complete
test/clt-tests/core/show-settings.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
mysql -h0 -P1306 -e "SHOW SETTINGS;"
––– output –––
+----------------------------+------------------------------------------------------------+
| Setting_name | Value |
+----------------------------+------------------------------------------------------------+
| configuration_file | /.clt/test/clt-tests/base/searchd-with-flexible-ports.conf |
| worker_pid | %{NUMBER} |
- | searchd.listen | 1306:mysql41 |
+ | searchd.listen | 127.0.0.1:1306:mysql41 |
- | searchd.listen | 1312 |
+ | searchd.listen | 127.0.0.1:1312 |
- | searchd.listen | 1308:http |
+ | searchd.listen | 127.0.0.1:1308:http |
| searchd.log | /var/log/manticore-1/searchd.log |
| searchd.query_log | /var/log/manticore-1/query.log |
| searchd.pid_file | /var/log/manticore-1/searchd.pid |
| searchd.data_dir | /var/log/manticore-1 |
| searchd.query_log_format | sphinxql |
| searchd.query_log_commands | 1 |
| searchd.binlog_path | /var/log/manticore-1/binlog |
| common.plugin_dir | /usr/local/lib/manticore |
| common.lemmatizer_base | /usr/share/manticore/morph/ |
+----------------------------+------------------------------------------------------------+
|
Temporarely disable diskchunk_flush_write_timeout = -1 cuz it makes bug with losing data in sharding table in replicated cluster
LONG_TABLE_NAME=$(printf "tbl%065d" 1) | ||
––– output ––– | ||
––– input ––– | ||
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly are we doing here with || echo
? If the error is different and not this one, then we are mocking the output of the command that may produce a different error, subject to review and fixing.
mysql -h0 -P1306 -e "SHOW TABLES\G" | ||
––– output ––– | ||
––– input ––– | ||
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
clt❌ CLT tests in test/clt-tests/replication/replication-test.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=3
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:3306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:3312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:3308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=4
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:4306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=5
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:5306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export CLUSTER_NAME=replication
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
export CLUSTER_NAME=replication
––– output –––
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
mysql -h0 -P1306 -e "CREATE TABLE testrt (title text, content text, gid uint);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860993,'List of HP business laptops','Elitebook Probook',1);" && mysql -h0 -P1306 -e "INSERT INTO testrt VALUES(6775836565403860994,'List of Dell business laptops','Latitude Precision Vostro',2);" && mysql -h0 -P1306 -e "ALTER CLUSTER replication ADD testrt;" && mysql -h0 -P1306 -e "SHOW STATUS LIKE 'cluster_replication_indexes';"
––– output –––
+-----------------------------+--------+
| Counter | Value |
+-----------------------------+--------+
| cluster_replication_indexes | testrt |
+-----------------------------+--------+
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
––– input –––
export INSTANCE=5
––– output –––
––– input –––
searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
mysql -h0 -P1306 -e "INSERT INTO replication:testrt VALUES(6775836565403860995,'List of HP business laptops','Macbook',3);"; echo $?
––– output –––
0
––– input –––
export INSTANCE=5
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:5306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:5308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
sleep 5; mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
––– input –––
export INSTANCE=2
––– output –––
––– input –––
searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
mysql -h0 -P3306 -e "INSERT INTO replication:testrt VALUES(6775836565403860996,'NEW','TABLE',4);"; echo $?
––– output –––
0
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
sleep 5;mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860993
title: List of HP business laptops
content: Elitebook Probook
gid: 1
*************************** 2. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Latitude Precision Vostro
gid: 2
*************************** 3. row ***************************
id: 6775836565403860995
title: List of HP business laptops
content: Macbook
gid: 3
*************************** 4. row ***************************
id: 6775836565403860996
title: NEW
content: TABLE
gid: 4
––– input –––
export INSTANCE=4
––– output –––
––– input –––
searchd --stopwait -c test/clt-tests/base/searchd-with-flexible-ports.conf
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] using config file '%{PATH}' (%{NUMBER} chars)...
[#!/[0-9]{2}:[0-9]{2}.[0-9]{3}/!#] [%{NUMBER}] stop: successfully sent SIGTERM to pid %{NUMBER}
––– input –––
sleep 5;mysql -h0 -P2306 -e "DELETE FROM replication:testrt WHERE id = 6775836565403860994"; echo $?
––– output –––
0
––– input –––
mysql -h0 -P2306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_2306.txt;
––– output –––
––– input –––
export INSTANCE=4
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:4306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:4308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
sleep 5;mysql -h0 -P1306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_1306.txt;
––– output –––
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_3306.txt;
––– output –––
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_4306.txt;
––– output –––
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM testrt ORDER BY id ASC" > /tmp/output_5306.txt;
––– output –––
––– input –––
diff /tmp/output_1306.txt /tmp/output_2306.txt; echo $?
––– output –––
0
––– input –––
diff /tmp/output_1306.txt /tmp/output_3306.txt; echo $?
––– output –––
0
––– input –––
diff /tmp/output_1306.txt /tmp/output_4306.txt; echo $?
––– output –––
0
––– input –––
diff /tmp/output_1306.txt /tmp/output_5306.txt; echo $?
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "REPLACE INTO replication:testrt SET content='Updated Content', title='List of Dell business laptops', gid=2 WHERE id=6775836565403860994;"; echo $?
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P2306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P3306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P4306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
––– input –––
mysql -h0 -P5306 -e "SELECT * FROM replication:testrt WHERE id=6775836565403860994\G"
––– output –––
*************************** 1. row ***************************
id: 6775836565403860994
title: List of Dell business laptops
content: Updated Content
gid: 2
|
clt❌ CLT tests in test/clt-tests/sharding/test-drop-sharding-table.rectest/clt-tests/sharding/test-drop-sharding-table2.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=2;"; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP TABLE failed: table 'nonexistent_table' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exists
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: table 'Tbl2' is missing: DROP TABLE failed: table 'Tbl2' must exist
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Missing data type for column.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Table name too long.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' is missing: DROP TABLE failed: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' must exist
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
|
clt❌ CLT tests in test/clt-tests/core/show-settings.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
mysql -h0 -P1306 -e "SHOW SETTINGS;"
––– output –––
- +----------------------------+------------------------------------------------------------+
+ +---------------------------------------+------------------------------------------------------------+
- | Setting_name | Value |
+ | Setting_name | Value |
- +----------------------------+------------------------------------------------------------+
+ +---------------------------------------+------------------------------------------------------------+
- | configuration_file | /.clt/test/clt-tests/base/searchd-with-flexible-ports.conf |
+ | configuration_file | /.clt/test/clt-tests/base/searchd-with-flexible-ports.conf |
- | worker_pid | %{NUMBER} |
+ | worker_pid | 27 |
- | searchd.listen | 1306:mysql41 |
+ | searchd.listen | 127.0.0.1:1306:mysql41 |
- | searchd.listen | 1312 |
+ | searchd.listen | 127.0.0.1:1312 |
- | searchd.listen | 1308:http |
+ | searchd.listen | 127.0.0.1:1308:http |
- | searchd.log | /var/log/manticore-1/searchd.log |
+ | searchd.log | /var/log/manticore-1/searchd.log |
- | searchd.query_log | /var/log/manticore-1/query.log |
+ | searchd.query_log | /var/log/manticore-1/query.log |
- | searchd.pid_file | /var/log/manticore-1/searchd.pid |
+ | searchd.pid_file | /var/log/manticore-1/searchd.pid |
- | searchd.data_dir | /var/log/manticore-1 |
+ | searchd.data_dir | /var/log/manticore-1 |
- | searchd.query_log_format | sphinxql |
+ | searchd.query_log_format | sphinxql |
- | searchd.query_log_commands | 1 |
+ | searchd.query_log_commands | 1 |
- | searchd.binlog_path | /var/log/manticore-1/binlog |
+ | searchd.diskchunk_flush_write_timeout | -1 |
- | common.plugin_dir | /usr/local/lib/manticore |
+ | searchd.binlog_path | /var/log/manticore-1/binlog |
- | common.lemmatizer_base | /usr/share/manticore/morph/ |
+ | common.plugin_dir | /usr/local/lib/manticore |
- +----------------------------+------------------------------------------------------------+
+ | common.lemmatizer_base | /usr/share/manticore/morph/ |
-
+ +---------------------------------------+------------------------------------------------------------+
+
|
clt❌ CLT tests in test/clt-tests/sharding/test-drop-sharding-table.rectest/clt-tests/sharding/test-drop-sharding-table2.rec––– input –––
export INSTANCE=1
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:1306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:1308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export INSTANCE=2
––– output –––
––– input –––
mkdir -p /var/{run,lib,log}/manticore-${INSTANCE}
––– output –––
––– input –––
stdbuf -oL searchd -c test/clt-tests/base/searchd-with-flexible-ports.conf | grep -v precach
––– output –––
Manticore %{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})
Copyright (c) 2001-2016, Andrew Aksyonoff
Copyright (c) 2008-2016, Sphinx Technologies Inc (http://sphinxsearch.com)
Copyright (c) 2017-%{YEAR}, Manticore Software LTD (https://manticoresearch.com)
[#!/[a-zA-Z]{3}\s[a-zA-Z]{3}\s+[0-9]{1,2}\s[0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{3}\s[0-9]{4}/!#] [%{NUMBER}] using config file '/.clt/test/clt-tests/base/searchd-with-flexible-ports.conf' (%{NUMBER} chars)...
starting daemon version '%{VERSION} (columnar %{VERSION}) (secondary %{VERSION}) (knn %{VERSION})' ...
- listening on all interfaces for mysql, port=%{NUMBER}
+ listening on 127.0.0.1:2306 for mysql
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2312 for sphinx and http(s)
- listening on all interfaces for sphinx and http(s), port=%{NUMBER}
+ listening on 127.0.0.1:2308 for sphinx and http(s)
––– input –––
if timeout 10 grep -qm1 'accepting connections' <(tail -n 1000 -f /var/log/manticore-${INSTANCE}/searchd.log); then echo 'Accepting connections!'; else echo 'Timeout or failed!'; fi
––– output –––
Accepting connections!
––– input –––
export CLUSTER_NAME=c
––– output –––
––– input –––
mysql -h0 -P1306 -e "create cluster ${CLUSTER_NAME}"
––– output –––
––– input –––
mysql -h0 -P1306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
for n in `seq 2 $INSTANCE`; do mysql -h0 -P${n}306 -e "join cluster ${CLUSTER_NAME} at '127.0.0.1:1312'"; done;
––– output –––
––– input –––
mysql -h0 -P${INSTANCE}306 -e "show status like 'cluster_${CLUSTER_NAME}_status'\G"
––– output –––
*************************** 1. row ***************************
Counter: cluster_#!/[a-z]+/!#_status
Value: primary
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl1(id bigint) shards=3 rf=2;"; echo $?;
––– output –––
0
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"; echo $?;
––– output –––
- 0
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P2306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:nonexistent_table;"
––– output –––
+ ERROR 1064 (42000) at line 1: table 'nonexistent_table' is missing: DROP TABLE failed: table 'nonexistent_table' must exist
––– input –––
mysql -h0 -P1306 -e "DROP TABLE nonexistent_cluster:tbl1;"
––– output –––
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:tbl1;"
––– output –––
- ERROR 1064 (42000) at line 1: table 'tbl1' is missing: DROP TABLE failed: table 'tbl1' must exists
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
+ *************************** 1. row ***************************
+ Table: tbl1
+ Type: distributed
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:Tbl2(id bigint) shards=3 rf=1;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ 1
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:Tbl2;"; echo $?
––– output –––
+ ERROR 1064 (42000) at line 1: table 'Tbl2' is missing: DROP TABLE failed: table 'Tbl2' must exist
+ 1
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:tbl_missing_type(id) shards=3 rf=1;" || echo "Error: Missing data type for column."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Missing data type for column.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
LONG_TABLE_NAME=$(printf "tbl%065d" 1)
––– output –––
––– input –––
mysql -h0 -P1306 -e "create table ${CLUSTER_NAME}:${LONG_TABLE_NAME}(id bigint) shards=3 rf=1;" || echo "Error: Table name too long."
––– output –––
+ ERROR 1064 (42000) at line 1: Waiting timeout exceeded.
+ Error: Table name too long.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
––– input –––
mysql -h0 -P1306 -e "DROP TABLE ${CLUSTER_NAME}:${LONG_TABLE_NAME};" || echo "Error: Could not drop table with long name."
––– output –––
+ ERROR 1064 (42000) at line 1: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' is missing: DROP TABLE failed: table 'tbl00000000000000000000000000000000000000000000000000000000000000001' must exist
+ Error: Could not drop table with long name.
––– input –––
mysql -h0 -P1306 -e "SHOW TABLES\G"
––– output –––
|
Partially blocked by: #3061 We disabled disk chunk flush to work with tests |
Let's fix tests to pass checks |
Type of Change (select one):
Description of the Change:
Related Issue (provide the link):