Toad World® Forums

Plsql package compiles on wrong environment bug


I noticed a pretty significant bug in Toad (I'm on version 13.1). The likelihood of encountering this bug is slim but the repercussions can be huge as it can bring down core packages which it did for us (bringing down some major parts of our website) so it is worth noting.

When you hit compile on a package, on dev, for example, then quickly switch over to the same package on a different environment (test or production), before the compile has finished. The compilation happens on the environment you switch to.

Steps I did to recreate it

  • Checkout and open a big package on dev in the editor (big packages are slow to compile)
  • Open the same package on the other environment, e.g. test ( I am not sure if this is a required step, but this is how I can recreate it.)
  • Go back to the open package on dev, make your code change and hit ‘compile’ on the body
  • Quickly switch over to the test environment, and wait for the compile to complete.
  • Go the Schema Browser view on test of the package you have open, refresh it. The test code has now been entirely replaced by dev code.