manticoresoftware / manticoresearch

Easy to use open source fast database for search | Good alternative to Elasticsearch now | Drop-in replacement for E in the ELK soon
https://manticoresearch.com
GNU General Public License v3.0
8.7k stars 484 forks source link

Manticore indexes aren't visible in SSMS object explorer #253

Open fvuksan opened 5 years ago

fvuksan commented 5 years ago

Hi,
I have a problem getting list of databases (indexes) when I register manticore as linked server.
Steps to reproduce:

  1. Create Manticore ODBC datasource using MySQL ODBC 8.0 Unicode driver. Test connection succeeds.

  2. Change MSDASQL provider properties as follows:
    image

  3. Register ODBC datasource as SQL Server linked server

  4. Querying manticore is successful but when I expand linked server in SQL Server Management Studio manticore indexes aren't visible.
    image

When I check query.log I see this line:
/* Mon Jul 15 15:48:04.342 2019 conn 2 */ select database() # error=Sphinx expr: syntax error, unexpected '(', expecting $end near '()'

Environment:
manticore-3.0.2-190531
Windows 10
Microsoft SQL Server 2017 (RTM-GDR) (KB4494351) - 14.0.2014.14 (X64) Apr 5 2019 09:18:51 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 17134: )

manticoresearch commented 4 years ago

select database() is not supported. In MySQL function DATABASE() is used to return current database as there's USE db syntax. In Manticore Search there's no USE syntax and therefore select database() doesn't make sense too. We can of course fake it to always return NULL or smth.

klirichek commented 4 years ago

We can make kind of stub to return reasonable line just to shut up such queries (as already done for many other queries from different connectors, like 'set name=', etc.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Feel free to re-open the issue in case it becomes actual.

manticoresearch commented 4 years ago

Looks actual, but there're higher priority things now