question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

after truncate class command , the select from command shows the deleted records in result .

See original GitHub issue

OrientDB Version, operating system, or hardware.

v2.2.5

Operating System

  • Windows

Expected behavior and actual behavior

expect return empty array in result but returns the deleted records in result .

Steps to reproduce the problem

  1. create a class named by ‘Invoice’ and insert 5 records to it .
  2. select from Invoice; -> returns 5 record and it’s true .
  3. truncate class Invoice -> must delete all of records in Invoice class now .
  4. select from Invoice -> shows the deleted record !!! its not true .
  5. i guess the query result has been cached so i restart my oriendb service .
  6. run select from Invoice -> shows the empty array and its true !!!

i guess there is a bug in query caching mechanism .

Thanks Saeed Tabrizi

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
luigidellaquilacommented, Aug 9, 2016

Hi @saeedtabrizi

I just pushed a fix on both 2.2.x and develop. Please let me know if it fixes your problem

Thanks

Luigi

0reactions
saeedtabrizicommented, Sep 19, 2016

Hi @luigidellaquila I test it in 2.2.10 and works fine . Thanks Saeed Tabrizi

Read more comments on GitHub >

github_iconTop Results From Across the Web

Step-by-Step Guide to Perform Truncate in SQL - Simplilearn
It is faster than the delete command. The DELETE statement deletes rows one-by-one, and it records each deleted row in the transaction log....
Read more >
SQL Delete & TRUNCATE to remove records from MySQL table
To delete all the records from the table we can use truncate command like this. TRUNCATE `student` This will remove all the records...
Read more >
Difference between SQL Truncate and SQL Delete statements ...
We use SQL Delete command in SQL Server to remove records from a table. We can remove all records or use a Where...
Read more >
Does TRUNCATE and DELETE produce same results?
DELETE can be part of a transaction. The action can be rolled back. It copies old records to the rollback segment, and if...
Read more >
Difference between Delete and Truncate Command - Javatpoint
It is a DML or data manipulation command used to deletes records from a table that is not required in the database. It...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found