Вышел свежий релиз Manticore search 6.0.0
Сегодня вышел релиз поисковой машины Manticore Search. Я расскажу, что это такое, для чего используется и почему я так рад новому релизу. Раньше для индексирования данных из MySQL и полнотекстового поиска я использовал Sphinx Search. Не скажу, что использовал его на всю катушку, но одна его фича пришлась мне по душе. Это SphinxSE (Sphinx storage engine). Это кастомный движок хранения для MySQL, который получает данные из Sphinx и выдает их в виде SQL-таблицы. Мы можем использовать эту таблицу в запросах и более того – делать JOIN с ней (ну или JOIN ее и других таблиц). Именно из-за этой фичи я начал использовать Sphinx.
Проблема сборки SphinxSE и MySQL 8
Но моя радость была недолгой. Проект у меня собирается в Docker, а SphinxSE компилируется вместе с исходниками MySQL. А именно MySQL 5.7. А MySQL 8 он не поддерживает от слова совсем. Когда я пытался скомпилировать его с MySQL 8:
1 2 3 4 5 6 |
##### BUILD RUN cd /usr/src/mysql/mysql-8.0.28 && \ mkdir BUILD && \ cd BUILD && \ cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/usr/local/boost_1_73_0 && \ make |
то получил просто гору ошибок:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
[ 53%] Building CXX object storage/sphinx/CMakeFiles/sphinx.dir/ha_sphinx.cc.o cc1plus: warning: /usr/src/mysql/mysql-8.0.28/extra/yassl/include: No such file or directory [-Wmissing-include-dirs] cc1plus: warning: /usr/src/mysql/mysql-8.0.28/regex: No such file or directory [-Wmissing-include-dirs] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:20:5: warning: "_MSC_VER" is not defined, evaluates to 0 [-Wundef] #if _MSC_VER>=1400 ^~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:92:5: warning: "_MSC_VER" is not defined, evaluates to 0 [-Wundef] #if _MSC_VER>=1400 ^~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:6560:15: warning: 'virtual int handler::create(const char*, TABLE*, HA_CREATE_INFO*, dd::Table*)' was hidden [-Woverloaded-virtual] virtual int create(const char *name, TABLE *form, HA_CREATE_INFO *info, ^~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:125:9: warning: by 'int ha_sphinx::create(const char*, TABLE*, HA_CREATE_INFO*)' [-Woverloaded-virtual] int create ( const char * name, TABLE * form, HA_CREATE_INFO * create_info ); ^~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:6172:15: warning: 'virtual int handler::open(const char*, int, uint, const dd::Table*)' was hidden [-Woverloaded-virtual] virtual int open(const char *name, int mode, uint test_if_locked, ^~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:84:9: warning: by 'int ha_sphinx::open(const char*, int, uint)' [-Woverloaded-virtual] int open ( const char * name, int mode, uint test_if_locked ); ^~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:6161:15: warning: 'virtual int handler::delete_table(const char*, const dd::Table*)' was hidden [-Woverloaded-virtual] virtual int delete_table(const char *name, const dd::Table *table_def); ^~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:123:9: warning: by 'int ha_sphinx::delete_table(const char*)' [-Woverloaded-virtual] int delete_table ( const char * from ); ^~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:6141:15: warning: 'virtual int handler::rename_table(const char*, const char*, const dd::Table*, dd::Table*)' was hidden [-Woverloaded-virtual] virtual int rename_table(const char *from, const char *to, ^~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:124:9: warning: by 'int ha_sphinx::rename_table(const char*, const char*)' [-Woverloaded-virtual] int rename_table ( const char * from, const char * to ); ^~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:5519:16: warning: 'virtual uint handler::max_supported_key_part_length(HA_CREATE_INFO*) const' was hidden [-Woverloaded-virtual] virtual uint max_supported_key_part_length(HA_CREATE_INFO *create_info ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:73:9: warning: by 'uint ha_sphinx::max_supported_key_part_length() const' [-Woverloaded-virtual] uint max_supported_key_part_length () const { return MAX_KEY_LENGTH; } ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:4710:18: warning: 'virtual double handler::read_time(uint, uint, ha_rows)' was hidden [-Woverloaded-virtual] virtual double read_time(uint index [[maybe_unused]], uint ranges, ^~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:81:17: warning: by 'virtual double ha_sphinx::read_time(ha_rows)' [-Woverloaded-virtual] virtual double read_time ( ha_rows rows ) { return (double)rows/20.0 + 1; } ///< index read time estimate ^~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:735:8: error: 'HASH' does not name a type; did you mean 'TRASH'? static HASH sphinx_open_tables; // hash used to track open tables ^~~~ TRASH /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:748:82: error: 'my_bool' has not been declared static byte * sphinx_get_key ( const byte * pSharePtr, GetKeyLength_t * pLength, my_bool ) ^~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'byte* sphinx_get_key(const byte*, GetKeyLength_t*, int)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:750:41: warning: cast from type 'const byte*' {aka 'const unsigned char*'} to type 'CSphSEShare*' casts away qualifiers [-Wcast-qual] CSphSEShare * pShare = (CSphSEShare *) pSharePtr; ^~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'int sphinx_init_func(void*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:767:23: error: 'sphinx_open_tables' was not declared in this scope sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, ^~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:767:23: note: suggested alternative: 'sphinx_hton_name' sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0, ^~~~~~~~~~~~~~~~~~ sphinx_hton_name /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:151:26: error: 'my_hash_init' was not declared in this scope #define sphinx_hash_init my_hash_init ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:151:26: note: in definition of macro 'sphinx_hash_init' #define sphinx_hash_init my_hash_init ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:151:26: note: suggested alternative: 'my_net_init' #define sphinx_hash_init my_hash_init ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:151:26: note: in definition of macro 'sphinx_hash_init' #define sphinx_hash_init my_hash_init ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:777:18: error: invalid conversion from 'handler* (*)(handlerton*, TABLE_SHARE*, MEM_ROOT*)' to 'create_t' {aka 'handler* (*)(handlerton*, TABLE_SHARE*, bool, MEM_ROOT*)'} [-fpermissive] hton->create = sphinx_create_handler; ^~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'int sphinx_close_connection(handlerton*, THD*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:802:16: error: 'thd_ha_data' was not declared in this scope void ** tmp = thd_ha_data ( thd, hton ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:802:16: note: suggested alternative: 'Ha_data' void ** tmp = thd_ha_data ( thd, hton ); ^~~~~~~~~~~ Ha_data /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'int sphinx_done_func(void*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:818:8: error: 'sphinx_open_tables' was not declared in this scope if ( sphinx_open_tables.records ) ^~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:818:8: note: suggested alternative: 'sphinx_hton_name' if ( sphinx_open_tables.records ) ^~~~~~~~~~~~~~~~~~ sphinx_hton_name /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:820:23: error: 'sphinx_open_tables' was not declared in this scope sphinx_hash_free ( &sphinx_open_tables ); ^~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:820:23: note: suggested alternative: 'sphinx_hton_name' sphinx_hash_free ( &sphinx_open_tables ); ^~~~~~~~~~~~~~~~~~ sphinx_hton_name /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:152:26: error: 'my_hash_free' was not declared in this scope #define sphinx_hash_free my_hash_free ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:152:26: note: in definition of macro 'sphinx_hash_free' #define sphinx_hash_free my_hash_free ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:152:26: note: suggested alternative: 'my_once_free' #define sphinx_hash_free my_hash_free ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:152:26: note: in definition of macro 'sphinx_hash_free' #define sphinx_hash_free my_hash_free ^~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'bool sphinx_show_status(handlerton*, THD*, bool (*)(THD*, const char*, size_t, const char*, size_t, const char*, size_t), ha_stat_type)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:877:33: error: 'thd_ha_data' was not declared in this scope CSphTLS * pTls = (CSphTLS*) ( *thd_ha_data ( thd, hton ) ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:877:33: note: suggested alternative: 'Ha_data' CSphTLS * pTls = (CSphTLS*) ( *thd_ha_data ( thd, hton ) ); ^~~~~~~~~~~ Ha_data /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:914:13: error: 'my_snprintf' was not declared in this scope buf1len = my_snprintf ( buf1, sizeof(buf1), ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:914:13: note: suggested alternative: 'my_b_printf' buf1len = my_snprintf ( buf1, sizeof(buf1), ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:967:10: error: 'FALSE' was not declared in this scope SPH_RET(FALSE); ^~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:304:32: note: in definition of macro 'SPH_RET' #define SPH_RET(_arg) { return(_arg); } ^~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:967:10: note: suggested alternative: 'FILE' SPH_RET(FALSE); ^~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:304:32: note: in definition of macro 'SPH_RET' #define SPH_RET(_arg) { return(_arg); } ^~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'void sphLogError(const char*, ...)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1021:30: warning: function 'void sphLogError(const char*, ...)' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] vfprintf ( stderr, sFmt, ap ); ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'bool ParseUrl(CSphSEShare*, TABLE*, bool)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:170:33: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define SPHINXAPI_DEFAULT_HOST "127.0.0.1" ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:170:33: note: in definition of macro 'SPHINXAPI_DEFAULT_HOST' #define SPHINXAPI_DEFAULT_HOST "127.0.0.1" ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: note: in definition of macro 'SPHINXAPI_DEFAULT_INDEX' #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: note: in definition of macro 'SPHINXAPI_DEFAULT_INDEX' #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: note: in definition of macro 'SPHINXAPI_DEFAULT_INDEX' #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: note: in definition of macro 'SPHINXAPI_DEFAULT_INDEX' #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:172:34: note: in definition of macro 'SPHINXAPI_DEFAULT_INDEX' #define SPHINXAPI_DEFAULT_INDEX "*" ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'CSphSEShare* get_share(const char*, TABLE*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1225:49: error: 'sphinx_open_tables' was not declared in this scope pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); ^~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1225:49: note: suggested alternative: 'sphinx_hton_name' pShare = (CSphSEShare*) sphinx_hash_search ( &sphinx_open_tables, (const uchar *) table_name, strlen(table_name) ); ^~~~~~~~~~~~~~~~~~ sphinx_hton_name /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:153:28: error: 'my_hash_search' was not declared in this scope #define sphinx_hash_search my_hash_search ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:153:28: note: in definition of macro 'sphinx_hash_search' #define sphinx_hash_search my_hash_search ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:153:28: note: suggested alternative: 'ft_init_search' #define sphinx_hash_search my_hash_search ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:153:28: note: in definition of macro 'sphinx_hash_search' #define sphinx_hash_search my_hash_search ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1258:8: error: 'my_hash_insert' was not declared in this scope if ( my_hash_insert ( &sphinx_open_tables, (const byte *)pShare ) ) ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1258:8: note: suggested alternative: 'sk_SCT_insert' if ( my_hash_insert ( &sphinx_open_tables, (const byte *)pShare ) ) ^~~~~~~~~~~~~~ sk_SCT_insert /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'int free_share(CSphSEShare*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1282:25: error: 'sphinx_open_tables' was not declared in this scope sphinx_hash_delete ( &sphinx_open_tables, (byte *)pShare ); ^~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1282:25: note: suggested alternative: 'sphinx_hton_name' sphinx_hash_delete ( &sphinx_open_tables, (byte *)pShare ); ^~~~~~~~~~~~~~~~~~ sphinx_hton_name /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:154:28: error: 'my_hash_delete' was not declared in this scope #define sphinx_hash_delete my_hash_delete ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:154:28: note: in definition of macro 'sphinx_hash_delete' #define sphinx_hash_delete my_hash_delete ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:154:28: note: suggested alternative: 'my_delete' #define sphinx_hash_delete my_hash_delete ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:154:28: note: in definition of macro 'sphinx_hash_delete' #define sphinx_hash_delete my_hash_delete ^~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'handler* sphinx_create_handler(handlerton*, TABLE_SHARE*, MEM_ROOT*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1295:50: error: invalid new-expression of abstract class type 'ha_sphinx' return new ( mem_root ) ha_sphinx ( hton, table ); ^ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:33:7: note: because the following virtual functions are pure within 'ha_sphinx': class ha_sphinx : public handler ^~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/partition_element.h:27, from /usr/src/mysql/mysql-8.0.28/sql/partition_info.h:32, from /usr/src/mysql/mysql-8.0.28/sql/table.h:54, from /usr/src/mysql/mysql-8.0.28/sql/field.h:60, from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/handler.h:6172:15: note: 'virtual int handler::open(const char*, int, uint, const dd::Table*)' virtual int open(const char *name, int mode, uint test_if_locked, ^~~~ /usr/src/mysql/mysql-8.0.28/sql/handler.h:6560:15: note: 'virtual int handler::create(const char*, TABLE*, HA_CREATE_INFO*, dd::Table*)' virtual int create(const char *name, TABLE *form, HA_CREATE_INFO *info, ^~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In constructor 'CSphSEQuery::CSphSEQuery(const char*, int, const char*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] , m_bBufOverrun ( false ) ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1343:26: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In destructor 'CSphSEQuery::~CSphSEQuery()': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1358:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<CSphSEQuery::Override_t*>::size_type' {aka 'long unsigned int'} [-Wsign-compare] for ( int i=0; i<m_dOverrides.sphinx_elements(); i++ ) ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'bool CSphSEQuery::ParseField(char*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1737:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; ^~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1737:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1740:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; ^~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1740:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1743:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; ^~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1743:43: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (!( p = strchr ( p, ',' ) )) break; *p++ = '\0'; ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1791:20: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare] for ( int i=0; i<sizeof(dAttrTypes)/sizeof(*dAttrTypes); i++ ) ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1812:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (!( sRest = strchr ( sRest, ':' ) )) break; *sRest++ = '\0'; ^~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1812:51: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' if (!( sRest = strchr ( sRest, ':' ) )) break; *sRest++ = '\0'; ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'int CSphSEQuery::BuildRequest(char**)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:1943:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<CSphSEQuery::Override_t*>::size_type' {aka 'long unsigned int'} [-Wsign-compare] for ( int i=0; i<m_dOverrides.sphinx_elements(); i++ ) ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2050:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<CSphSEQuery::Override_t*>::size_type' {aka 'long unsigned int'} [-Wsign-compare] for ( int i=0; i<m_dOverrides.sphinx_elements(); i++ ) ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2056:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector::size_type' {aka 'long unsigned int'} [-Wsign-compare] for ( int j=0; jm_dIds.sphinx_elements(); j++ ) ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'int ha_sphinx::open(const char*, int, uint)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2144:16: error: 'thd_ha_data' was not declared in this scope void ** tmp = thd_ha_data ( table->in_use, ht ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2144:16: note: suggested alternative: 'Ha_data' void ** tmp = thd_ha_data ( table->in_use, ht ); ^~~~~~~~~~~ Ha_data /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'int ha_sphinx::Connect(const char*, ushort)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2219:5: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", sHost ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2219:5: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "failed to resolve searchd host (name=%s)", sHost ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2261:3: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "failed to connect to searchd (host=%s, errno=%d, port=%d)", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2261:3: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "failed to connect to searchd (host=%s, errno=%d, port=%d)", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'int ha_sphinx::ConnectAPI(const char*, int)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2288:3: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "failed to receive searchd version (host=%s, port=%d)", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2288:3: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "failed to receive searchd version (host=%s, port=%d)", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2298:3: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "failed to send client version (host=%s, port=%d)", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2298:3: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "failed to send client version (host=%s, port=%d)", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: At global scope: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2323:5: error: no declaration matches 'int ha_sphinx::HandleMysqlError(MYSQL*, int)' int ha_sphinx::HandleMysqlError ( MYSQL * pConn, int iErrCode ) ^~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: candidate is: 'int ha_sphinx::HandleMysqlError(st_mysql*, int)' int HandleMysqlError ( struct st_mysql * pConn, int iErrCode ); ^~~~~~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:33:7: note: 'class ha_sphinx' defined here class ha_sphinx : public handler ^~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'virtual int ha_sphinx::write_row(byte*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2431:73: error: no matching function for call to 'ha_sphinx::HandleMysqlError(MYSQL*&, int)' SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) ); ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:304:32: note: in definition of macro 'SPH_RET' #define SPH_RET(_arg) { return(_arg); } ^~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: candidate: 'int ha_sphinx::HandleMysqlError(st_mysql*, int)' int HandleMysqlError ( struct st_mysql * pConn, int iErrCode ); ^~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: no known conversion for argument 1 from 'MYSQL*' to 'st_mysql*' /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2434:71: error: no matching function for call to 'ha_sphinx::HandleMysqlError(MYSQL*&, int)' SPH_RET ( HandleMysqlError ( pConn, ER_QUERY_ON_FOREIGN_DATA_SOURCE ) ); ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:304:32: note: in definition of macro 'SPH_RET' #define SPH_RET(_arg) { return(_arg); } ^~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: candidate: 'int ha_sphinx::HandleMysqlError(st_mysql*, int)' int HandleMysqlError ( struct st_mysql * pConn, int iErrCode ); ^~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: no known conversion for argument 1 from 'MYSQL*' to 'st_mysql*' /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'bool IsIDField(Field*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2455:55: error: 'const bool Field_num::unsigned_flag' is private within this context if ( eType==MYSQL_TYPE_LONG && ((Field_num*)pField)->unsigned_flag ) ^~~~~~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/field.h:1928:14: note: declared private here const bool unsigned_flag; ^~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2455:55: note: field 'const bool Field_num::unsigned_flag' can be accessed via 'virtual bool Field_num::is_unsigned() const' if ( eType==MYSQL_TYPE_LONG && ((Field_num*)pField)->unsigned_flag ) ^~~~~~~~~~~~~ is_unsigned() /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'virtual int ha_sphinx::delete_row(const byte*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2490:73: error: no matching function for call to 'ha_sphinx::HandleMysqlError(MYSQL*&, int)' SPH_RET ( HandleMysqlError ( pConn, ER_CONNECT_TO_FOREIGN_DATA_SOURCE ) ); ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:304:32: note: in definition of macro 'SPH_RET' #define SPH_RET(_arg) { return(_arg); } ^~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: candidate: 'int ha_sphinx::HandleMysqlError(st_mysql*, int)' int HandleMysqlError ( struct st_mysql * pConn, int iErrCode ); ^~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: no known conversion for argument 1 from 'MYSQL*' to 'st_mysql*' /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2493:71: error: no matching function for call to 'ha_sphinx::HandleMysqlError(MYSQL*&, int)' SPH_RET ( HandleMysqlError ( pConn, ER_QUERY_ON_FOREIGN_DATA_SOURCE ) ); ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:304:32: note: in definition of macro 'SPH_RET' #define SPH_RET(_arg) { return(_arg); } ^~~~ In file included from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:86: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: candidate: 'int ha_sphinx::HandleMysqlError(st_mysql*, int)' int HandleMysqlError ( struct st_mysql * pConn, int iErrCode ); ^~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.h:150:9: note: no known conversion for argument 1 from 'MYSQL*' to 'st_mysql*' /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'bool ha_sphinx::UnpackSchema()': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2608:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "searchd error: %s", sMessage ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2608:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "searchd error: %s", sMessage ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'virtual const Item* ha_sphinx::cond_push(const Item*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2774:36: warning: cast from type 'const Item*' to type 'Item_func*' casts away qualifiers [-Wcast-qual] Item_func * condf = (Item_func *)cond; ^~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2791:24: error: invalid use of member function 'uint16 Field::field_index() const' (did you forget the '()' ?) if ( pField->field->field_index!=2 ) // FIXME! magic key index ~~~~~~~~~~~~~~~^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2797:41: error: 'String Item::str_value' is protected within this context strncpy ( pTable->m_sQuery, pString->str_value.c_ptr(), sizeof(pTable->m_sQuery) ); ^~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:44, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/item.h:3261:10: note: declared protected here String str_value; ^~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2799:39: error: 'String Item::str_value' is protected within this context pTable->m_pQueryCharset = pString->str_value.charset(); ^~~~~~~~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:44, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/item.h:3261:10: note: declared protected here String str_value; ^~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2808:24: error: invalid use of member function 'uint16 Field::field_index() const' (did you forget the '()' ?) if ( pField->field->field_index!=0 ) // FIXME! magic key index ~~~~~~~~~~~~~~~^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'CSphSEThreadTable* ha_sphinx::GetTls()': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2841:22: error: 'thd_ha_data' was not declared in this scope ppTls = (CSphTLS**) thd_ha_data ( table->in_use, ht ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2841:22: note: suggested alternative: 'Ha_data' ppTls = (CSphTLS**) thd_ha_data ( table->in_use, ht ); ^~~~~~~~~~~ Ha_data /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'virtual int ha_sphinx::index_read(byte*, const byte*, uint, ha_rkey_function)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2981:3: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "bad searchd response length (length=%u)", uRespLength ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:2981:3: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "bad searchd response length (length=%u)", uRespLength ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3000:3: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "net read error (expected=%d, got=%d)", uRespLength, iRecvLength ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3000:3: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "net read error (expected=%d, got=%d)", uRespLength, iRecvLength ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3029:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "searchd error: %s", pTable->m_tStats.m_sLastMessage ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3029:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "searchd error: %s", pTable->m_tStats.m_sLastMessage ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'int ha_sphinx::get_rec(byte*, const byte*, uint)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3139:22: error: 'uchar* Field::ptr' is protected within this context longstore ( af->ptr, uValue ); // because store() does not accept timestamps ^~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/field.h:654:10: note: declared protected here uchar *ptr; ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3077:19: warning: format '%li' expects argument of type 'long int', but argument 4 has type 'longlong' {aka 'long long int'} [-Wformat=] #define INT64_FMT "%" PRIi64 ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3077:19: note: in definition of macro 'INT64_FMT' #define INT64_FMT "%" PRIi64 ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3225:57: error: 'uchar* Field::ptr' is protected within this context case SPH_ATTR_TIMESTAMP: longstore ( table->field[i]->ptr, 0 ); break; ^~~ In file included from /usr/src/mysql/mysql-8.0.28/sql/item_timefunc.h:43, from /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:38: /usr/src/mysql/mysql-8.0.28/sql/field.h:654:10: note: declared protected here uchar *ptr; ^~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In member function 'int ha_sphinx::create(const char*, TABLE*, HA_CREATE_INFO*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3443:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: there MUST be at least %d columns", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3443:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: there MUST be at least %d columns", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3450:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: 1st column (docid) MUST be unsigned integer or bigint", name ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3450:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: 1st column (docid) MUST be unsigned integer or bigint", name ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3456:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: 2nd column (weight) MUST be integer or bigint", name ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3456:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: 2nd column (weight) MUST be integer or bigint", name ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3464:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: 3rd column (search query) MUST be varchar or text", name ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3464:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: 3rd column (search query) MUST be varchar or text", name ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3475:5: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: %dth column (attribute %s) MUST be integer, bigint, timestamp, varchar, or float", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3475:5: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: %dth column (attribute %s) MUST be integer, bigint, timestamp, varchar, or float", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3490:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: there must be an index on '%s' column", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3490:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: there must be an index on '%s' column", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3508:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: 1st column must be called 'id'", name ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3508:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: 1st column must be called 'id'", name ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3514:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be INT UNSIGNED or BIGINT", name ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3514:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be INT UNSIGNED or BIGINT", name ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3524:4: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be indexed", name ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3524:4: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: 'id' column must be indexed", name ); ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3534:5: error: 'my_snprintf' was not declared in this scope my_snprintf ( sError, sizeof(sError), "%s: column %d(%s) is of unsupported type (use int/bigint/timestamp/varchar/float)", ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3534:5: note: suggested alternative: 'my_b_printf' my_snprintf ( sError, sizeof(sError), "%s: column %d(%s) is of unsupported type (use int/bigint/timestamp/varchar/float)", ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'CSphSEStats* sphinx_get_stats(THD*, SHOW_VAR*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3567:33: error: 'thd_ha_data' was not declared in this scope CSphTLS * pTls = (CSphTLS *) *thd_ha_data ( thd, sphinx_hton_ptr ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3567:33: note: suggested alternative: 'Ha_data' CSphTLS * pTls = (CSphTLS *) *thd_ha_data ( thd, sphinx_hton_ptr ); ^~~~~~~~~~~ Ha_data /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3579:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] out->value = ""; ^~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: In function 'int sphinx_showfunc_words(THD*, SHOW_VAR*, char*)': /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3632:33: error: 'thd_ha_data' was not declared in this scope CSphTLS * pTls = (CSphTLS *) *thd_ha_data ( thd, sphinx_hton_ptr ); ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3632:33: note: suggested alternative: 'Ha_data' CSphTLS * pTls = (CSphTLS *) *thd_ha_data ( thd, sphinx_hton_ptr ); ^~~~~~~~~~~ Ha_data /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3652:17: error: 'my_snprintf' was not declared in this scope uBuffLen = my_snprintf ( sBuffer, SHOW_VAR_FUNC_BUFF_SIZE, "%s%s:%d:%d ", sBuffer, ^~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3652:17: note: suggested alternative: 'my_b_printf' uBuffLen = my_snprintf ( sBuffer, SHOW_VAR_FUNC_BUFF_SIZE, "%s%s:%d:%d ", sBuffer, ^~~~~~~~~~~ my_b_printf /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3680:15: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings] out->value = ""; ^~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc: At global scope: /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3696:32: error: variable 'st_mysql_storage_engine sphinx_storage_engine' has initializer but incomplete type struct st_mysql_storage_engine sphinx_storage_engine = ^~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3698:2: error: 'MYSQL_HANDLERTON_INTERFACE_VERSION' was not declared in this scope MYSQL_HANDLERTON_INTERFACE_VERSION ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3698:2: note: suggested alternative: 'MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION' MYSQL_HANDLERTON_INTERFACE_VERSION ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MYSQL_CLIENT_TRACE_PLUGIN_INTERFACE_VERSION /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3701:26: error: elements of array 'st_mysql_show_var sphinx_status_vars []' have incomplete type struct st_mysql_show_var sphinx_status_vars[] = ^~~~~~~~~~~~~~~~~~ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3701:26: error: storage size of 'sphinx_status_vars' isn't known /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3713:21: error: expected constructor, destructor, or type conversion before '(' token mysql_declare_plugin(sphinx) ^ /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:3728:1: error: 'mysql_declare_plugin_end' does not name a type; did you mean 'mysql_load_plugin_v'? mysql_declare_plugin_end; ^~~~~~~~~~~~~~~~~~~~~~~~ mysql_load_plugin_v /usr/src/mysql/mysql-8.0.28/storage/sphinx/ha_sphinx.cc:758:12: warning: 'int sphinx_init_func(void*)' defined but not used [-Wunused-function] static int sphinx_init_func ( void * p ) ^~~~~~~~~~~~~~~~ make[2]: *** [storage/sphinx/CMakeFiles/sphinx.dir/build.make:63: storage/sphinx/CMakeFiles/sphinx.dir/ha_sphinx.cc.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:4884: storage/sphinx/CMakeFiles/sphinx.dir/all] Error 2 make: *** [Makefile:163: all] Error 2 |
Решение проблемы SphinxSE + MySQL 8
Я честно боролся с ними несколько дней, а потом понял что дело – труба. Полазил по форумам, почитал посты таких же страдальцев и узнал, что проект Sphinx то закрыт. И они даже в планах не собираются поддерживать MySQL 8.
После этого я начал искать аналоги и с удивлением нашел проект Manticore. Ребята перехватили разработку sphinx и выпустили несколько версий. Вместо SphinxSE можно использовать FEDERATED таблицу. Читайте про это в земечательной статье From SphinxSE to FEDERATED. И самое главное Manticore не надо компилить вместе с исходниками MySQL и он поддерживает MySQL 8.
Моей радости не было предела, я начал колдовать. Как результат – я внедрил его в проект, смог ставить MySQL нормально через deb-пакет и НЕ КОМПИЛИТЬ БОЛЬШЕ исходники MySQL. Это была победа!
Время шло, и моей основной рабочей платформой стал MacBook на M1. А это архитектура ARM64V8 со всеми вытекающими. Docker образов для нее было не так много и многие из них приходилось запускать в режиме эмуляции через quemu. И Manticore тоже. Но сегодня ребята из команды разработки зарелизили multi-arch версию Manticore. Это был мой feature-request и я очень рад, что они это сделали!
Что нового в релизе
Читаю свежие release notes и прямо радуюсь, как ребенок. Сегодня команда Manticore рада объявить о выпуске Manticore Search 6.0.0. Этот релиз был трудом любви, на выполнение которого ушло более полугода, почти 800 коммитов и более 80 000 строк кода.
Manticore Buddy – расширение для Manticore на PHP
Начиная с этого выпуска, Manticore Search поставляется с Manticore Buddy, вспомогательным демоном, написанным на PHP, который обрабатывает высокоуровневый функционал, не требующую low latency или высокой пропускной способности. Manticore Buddy работает невидимо дял юзера, и вы можете даже не осознавать, что он работает. Хотя он невидим для юзера, сделать его совместимым с основным C++ демоном было сложной задачей. Это расширение позволяет команде разрабатывать широкий спектр высокоуровневых фич, таких как оркестрация шардов, контроль доступа и аутентификацию, различные интеграции такие, как mysqldump, DBeaver, Grafana mysql connector и другие. Сейчас оно позволяет:
– с помощью SHOW QUERIES возможно посмотреть список запросов, которые выполняются в Manticore в данный момент.
– с помощью BACKUP возможно сделать собственно бекапы инстанса Manticore
– с помощью AUto schema можно создать схему на основе первого вставляемого документа. Без необходимости описывать схему заранее.
Самое интересное, что теперь можно писать свои расширения для Manticore на PHP. Подробнее читайте на страничке Manticore Buddy GitHub project в GitLab
Elasticsearch-совместимые INSERT-ы и REPLACE-ы
Теперь вы можете выполнять совместимые с Elasticsearch JSON запросцы insert и replace, что позволяет использовать Manticore с такими инструментами, как Logstash и Filebeat, а также с другими инструментами из семейства Beats. Это приближает Manticore к тому, чтобы стать заменой Elasticsearch в стеке ELK. Следующая цель — завершить интеграцию Kibana/Opensearch Dashboards.
Вторичные индексы включены по-умолчанию
Если вы используете нашу Manticore columnar library, что настоятельно рекомендуется, вторичные индексы теперь включены по умолчанию. После их появления в предыдущем основном релизе они были значительно улучшены, и теперь авторы считают, что их включение по умолчанию имеет смысл для большинства пользователей. Также есть новая команда ALTER TABLE имя_таблицы REBUILD SECONDARY для перестроения ваших вторичных индексов, например при обновлении с предыдущей версии.
Авто-схема
Теперь вы можете пропустить создание таблицы. Просто вставьте первый документ, и Manticore автоматически создаст таблицу на основе его полей. Подробнее об этом подробно читайте здесь
Апгрейд Cost-based оптимизатора
Когда Manticore выполняет fullscan query, она может либо использовать обычное сканирование для проверки каждого документа на соответствие фильтрам, либо использовать дополнительные данные и/или алгоритмы для ускорения выполнения запроса. Чтобы решить, какой подход выбрать, Manticore использует Cost-based оптимизатор (также известный как «CBO» или «оптимизатор запросов»). Этот релиз включает в себя множество улучшений в его работе.
Телеметрия
Команда рада объявить о добавлении телеметрии в этот релиз. Эта функция позволяет собирать анонимные и обезличенные метрики, которые помогут нам улучшить производительность и удобство использования продукта. Будьте уверены, все собранные данные полностью анонимны и не будут связаны с какой-либо личной информацией. При желании эту функцию можно легко отключить в настройках. А я вро очень этому рад, так как явно больше багов пофикситься после этого.
Утилиты для backup
Крайне важно регулярно создавать резервные копии ваших таблиц, чтобы иметь возможность восстановить их в случае таких проблем, как сбой системы, отказ оборудования или повреждение/потеря данных по любой причине. Резервные копии также необходимы перед обновлением Manticore Search до новой версии, которая вносит изменения в формат таблицы, а также может использоваться для переноса ваших данных в другую систему, когда вы хотите перейти на новый сервер.
Инструмент резервного копирования manticore, который включен в официальные пакеты Manticore Search, может помочь вам автоматизировать процесс резервного копирования таблиц для экземпляра Manticore, работающего в режиме RT, давая вам душевное спокойствие в случае каких-либо сбоев или сбоев.
Вы также можете создать резервную копию данных с помощью SQL, выполнив простую команду BACKUP TO /path/to/backup.
SHOW QUERIES and KILL
Новая команда SQL SHOW QUERIES — это простой способ просмотра выполняемых запросов. Его можно использовать в сочетании с командой KILL для завершения длительного выполнения оператора SELECT.
Dynamic max_matches and accurate aggregation
Параметр max_matches указывает максимальное количество совпадений, которое сервер будет хранить в оперативной памяти для каждой таблицы и возвращать клиенту. В этом выпуске его значение является динамическим и может автоматически увеличиваться до max_matches_increase_threshold для повышения точности запросов агрегации. Кроме того, он также может быть автоматически снижен, если количество уникальных значений атрибута groupby меньше порогового значения.
arm64 support
Это собственно то, чего я так ждал. Теперь Manticore можно запускать нативно на Apple M1 / M2 и ARM-серверах (которые быстрее и дешевле чем amd64-сервера).
И многое другое
– 🚀 10 major фич
– ✅ 35+ minor фич
– 🐞 85 багфиксов