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

Not working? #21

Closed
recoilme opened this issue Nov 18, 2019 · 2 comments
Closed

Not working? #21

recoilme opened this issue Nov 18, 2019 · 2 comments

Comments

@recoilme
Copy link

Hello. I write simple test script on go:

package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
    "strings"
)

func main() {
    fmt.Println("Hello, playground")
    for i := 0; i < 500; i++ {
        post(fmt.Sprintf("(%d)", i))
    }
    println("done")
}

func post(b string) {
    bod := strings.NewReader(b)
    req, err := http.NewRequest("POST", "http://127.0.0.1:8124/?query=INSERT%20INTO%20t%20VALUES", bod)
    if err != nil {
        panic(err)
    }
    resp, err := http.DefaultClient.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()
    _, err = ioutil.ReadAll(resp.Body)

    if err != nil {
        panic(err)
    }
}

I have default params in config
A see in log this records:

2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (493)
2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (494)
2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (495)
2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (496)
2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (497)
2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (498)
2019/11/18 18:14:07 DEBUG: query query=INSERT%20INTO%20t%20VALUES (499)
2019/11/18 18:14:08 INFO: send 500 rows to http://u:pass@ip:8123 of INSERT INTO t VALUES

But i see in CH:
curl 'some:8123?query=SELECT%20MAX(a)%20FROM%20t'
255
Looks like first packet was sended 2 times:

250
251
252
253
254
255
0
1
2
3
4
5
6
@nikepan
Copy link
Owner

nikepan commented Nov 18, 2019

Hi! I will check it. You used default config?

@recoilme
Copy link
Author

@nikepan oh, sorry i create field like this: UInt8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants