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

Don't use sql cache for Query when generating SQL #8

Open
BLaDZer opened this issue Oct 24, 2019 · 1 comment
Open

Don't use sql cache for Query when generating SQL #8

BLaDZer opened this issue Oct 24, 2019 · 1 comment

Comments

@BLaDZer
Copy link

BLaDZer commented Oct 24, 2019

There is at least one bug in The Bug Genie bugtracker cause by Query checking already generated sql string.

Here you can see working not as expected code because Query already compiled as SELECT statement here and actually not deleting anything.

Of course you can try to make some kind of complex cache validating but I don't think it's worth it.

How to reproduce(pseudo code):


$query = Query();
$query->where(<add some conditions>);

$result = $table->select($query);

// instead of deleting actually will be executed last Select query
$table->delete($query);

or few same action with a little bit changed Query:

$query = Query();
$query->where(<add some conditions>);

$result1 = $table->select($query);

$query->where(<add some another conditions>);

// actually will be executed previous Select query
$result2 = $table->select($query);
@zegenie
Copy link
Member

zegenie commented Oct 24, 2019

Yes, this looks like a valid bug. Will look into this.

@BLaDZer BLaDZer changed the title Don't use sql cache for Query when generation SQL Don't use sql cache for Query when generating SQL Oct 24, 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

2 participants