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

do not delete * from mytable (21 records) [CORE5459] #5730

Open
firebird-automations opened this issue Jan 18, 2017 · 11 comments
Open

do not delete * from mytable (21 records) [CORE5459] #5730

firebird-automations opened this issue Jan 18, 2017 · 11 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Hossein Daneshvar (daneshvar)

Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

Download Link Database "VSPRING95" : https://goo.gl/PJDS0l

1."select * from "StudentPay" order by "Key"" = 6864 records

2.execute "delete from "StudentPay""

3.after execute delete all :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 0

Commits: e954777 ddd5d04

@firebird-automations
Copy link
Collaborator Author

Modified by: Hossein Daneshvar (daneshvar)

description: Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

1."select * from mytable order by pk" = 6864 records

2.execute "delete * from mytable"

3.after execute delete all :
result of "select * from mytable" = 0 record
result of "select * from mytable order by pk" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from mytable" = 0 record
result of "select * from mytable order by pk" = 0

=>

Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

1."select * from "StudentPay" order by pk" = 6864 records

2.execute "delete * from "StudentPay""

3.after execute delete all :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 0

@firebird-automations
Copy link
Collaborator Author

Modified by: Hossein Daneshvar (daneshvar)

description: Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

1."select * from "StudentPay" order by pk" = 6864 records

2.execute "delete * from "StudentPay""

3.after execute delete all :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 0

=>

Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

Download Link Database "VSPRING95" : https://goo.gl/PJDS0l

1."select * from "StudentPay" order by pk" = 6864 records

2.execute "delete * from "StudentPay""

3.after execute delete all :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 0

@firebird-automations
Copy link
Collaborator Author

Modified by: Hossein Daneshvar (daneshvar)

description: Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

Download Link Database "VSPRING95" : https://goo.gl/PJDS0l

1."select * from "StudentPay" order by pk" = 6864 records

2.execute "delete * from "StudentPay""

3.after execute delete all :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 0

=>

Firebird 3.0.1.32609-0 SuperServer 32bit on Windows 7

Download Link Database "VSPRING95" : https://goo.gl/PJDS0l

1."select * from "StudentPay" order by "Key"" = 6864 records

2.execute "delete from "StudentPay""

3.after execute delete all :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 21 records (do not delete this 21 records)

after backup and restore :
result of "select * from "StudentPay"" = 0 record
result of "select * from "StudentPay" order by "Key"" = 0

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Database have some inconsistencies at pointer pages (gfix show it)
Does Firebird or OS crashed ? Does FW always was ON at this database ?

@firebird-automations
Copy link
Collaborator Author

Commented by: Hossein Daneshvar (daneshvar)

Yes, FW always On at this database.
The situation is terrible for Firebird 3.

@firebird-automations
Copy link
Collaborator Author

Modified by: Hossein Daneshvar (daneshvar)

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

With current snapshot build you can fix the corruption using gfix -v -full

To find and fix the reason i need a steps to reproduce this corruption.

@firebird-automations
Copy link
Collaborator Author

Commented by: Hossein Daneshvar (daneshvar)

Thanks, gfix in Firebird 3.0.2.32673 can fix the corruption.

But should the firebird engine to detecting the problem
Because this problem can cause a major financial miscalculation and the creation of financial losses.
for example :
update "StudentPay" set "Lock" = 0 where "Imported" = 1
delete from "StudentPay" where "Imported" = 1
select sum("Amount") from "StudentPay" where "DriverKey" = 643 -> 7000000 (is a disaster)

I during the 1 transaction :
1.update "StudentPay" set "Lock" = 0 where "Imported" = 1
2.delete from "StudentPay" where "Imported" = 1
3.insert into "StudentPay" ... ~7000 records import from excel file

this actions repeate several times in day

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

> this actions repeate several times in day

So, could you provide me with a test case ?

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

Is it still reproducible ? If yes, would you like to test special build with fix for this issue ?

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

No branches or pull requests

2 participants