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

truncate database cmd not found #149

Closed
draveness opened this issue Dec 23, 2018 · 2 comments
Closed

truncate database cmd not found #149

draveness opened this issue Dec 23, 2018 · 2 comments
Assignees

Comments

@draveness
Copy link
Contributor

co:0f1a6b81b80da80001b41d891a38ff50e6bd07cd9504377670848c5638b604ca=> TRUNCATE  test;
ERRO[0118] call RPC failed                               caller="rpcutil.go:107 rpc.(*PersistentCaller).Call" error="apply failed: execute at #0 failed: syntax error at position 9 near 'TRUNCATE'" rpc=DBS.Query stack="[#0 rpc.(*PersistentCaller).Call@rpcutil.go:107      #1 client.(*conn).sendQuery@conn.go:399      #2 client.(*conn).addQuery@conn.go:347      #3 client.(*conn).ExecContext@conn.go:249      #4 database/sql.ctxDriverExec@ctxutil.go:31      #5 database/sql.(*DB).execDC.func2@sql.go:1468      #6 database/sql.withLock@sql.go:3076      #7 database/sql.(*DB).execDC@sql.go:1463      #8 database/sql.(*DB).exec@sql.go:1448      #9 database/sql.(*DB).ExecContext@sql.go:1426     ]"
error: covenantsql: apply failed: execute at #0 failed: syntax error at position 9 near 'TRUNCATE'
@stale
Copy link

stale bot commented Apr 29, 2019

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.

@stale stale bot added the wontfix This will not be worked on label Apr 29, 2019
@auxten auxten removed wontfix This will not be worked on labels Apr 29, 2019
@auxten
Copy link
Contributor

auxten commented May 15, 2019

We use SQLite as the storage engine where TRUNCATE is not supported. Just use:
Delete from TableName
and
DELETE FROM SQLITE_SEQUENCE WHERE name='TableName';
instead.

@auxten auxten closed this as completed May 15, 2019
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

3 participants