Skip to content
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

Impossible to use a table with an upper case via JSON in plain mode #1640

Closed
sanikolaev opened this issue Nov 29, 2023 · 1 comment
Closed
Assignees
Labels
bug rel::upcoming Upcoming release

Comments

@sanikolaev
Copy link
Collaborator

When a table contains upper case letters (which is ok according to the docs https://manual.manticoresearch.com/Creating_a_table/Local_tables#Defining-table-schema-in-config-(Plain-mode)), it's impossible to search in the table via the JSON interface:

MRE

Config:

searchd {
    listen = 19306
    log = searchd.log
    pid_file = searchd.pid
    binlog_path =
}

source src {
    type = csvpipe
    csvpipe_command = echo "1,a"
    csvpipe_field = f
}

index T {
    type = plain
    source = src
    path = idx
}

Queries:

➜  ~ curl -sX POST localhost:19306/search -d '{"index" : "T"}'|jq .
[
  {
    "total": 0,
    "warning": "",
    "error": "unknown local table(s) 't' in search request"
  }
]
➜  ~ curl -sX POST localhost:19306/search -d '{"index" : "t"}'|jq .
[
  {
    "total": 0,
    "warning": "",
    "error": "unknown local table(s) 't' in search request"
  }
]

Expected: the same behaviour as in SQL:

mysql> select * from T;
+------+------+
| id   | f    |
+------+------+
|    1 | a    |
+------+------+
1 row in set (0.00 sec)
--- 1 out of 1 results in 0ms ---

mysql> select * from t;
ERROR 1064 (42000): unknown local table(s) 't' in search request

i.e.:

POST search '{"index" : "T"} should work, POST search '{"index" : "t"} shouldn't.

@glookka
Copy link
Contributor

glookka commented Dec 5, 2023

Fixed in 1163d4b4

@glookka glookka closed this as completed Dec 5, 2023
@sanikolaev sanikolaev added rel::upcoming Upcoming release and removed est::TO_ESTIMATE labels Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug rel::upcoming Upcoming release
Projects
None yet
Development

No branches or pull requests

3 participants