<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I realize that this is an old thread, but the issue just came up for me.  Perhaps it was answered or solved later, but I didn’t find so.<div class=""><br class=""></div><div class="">A fix of some sort, in some versions of Clozure and emacs/slime, is this line:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">(setf clsql-sys::*original-readtable* nil)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">which resets the clsql readtable caching mechanism, which is unaware of the slime/mcl/ccl thread-specific readtable issue.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">Used like this:</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><br class=""></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">;; Reset the mechanism.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><div style="margin: 0px;" class="">(setf clsql-sys::*original-readtable* nil)</div><div class=""><br class=""></div><div class="">;; Alter the read table.</div><div class="">(clsql::enable-sql-reader-syntax)</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(215, 57, 30);" class=""><span style="color: rgb(0, 0, 0);" class=""><br class=""></span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(215, 57, 30);" class=""><span style="color: rgb(0, 0, 0);" class="">;; Do whatever special syntax stuff you need to do:</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class=""><span style="color: rgb(0, 0, 0);" class="">(</span><span style="color: rgb(208, 60, 255);" class="">defun</span><span style="color: rgb(0, 0, 0);" class=""> </span><font color="#5e34ff" class="">blah </font><span style="color: rgb(0, 0, 0);" class="">(blah)</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  (clsql::select ‘blah</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                 <span style="font-variant-ligatures: no-common-ligatures; color: #ef76ee" class="">:where</span> [= [ ‘blah ‘blah]</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">                 blah])</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;" class="">  )</div><div class="">;; Disable the syntax….</div><div class=""><br class=""></div><div class="">The point is that killing the cache needs to happen in the same evaluation as the code with the special syntax.</div><div class=""><br class=""></div><div class="">I make no claim except that the original error goes away.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">
<div class="">Bob Cram</div><div class="">Robert Cram Construction</div><div class=""><a href="http://www.robertcramconstruction.com" class="">www.robertcramconstruction.com</a></div><div class="">415-613-8319</div><div class=""><a href="mailto:robert@robertcramconstruction.com" class="">robert@robertcramconstruction.com</a></div><div class="">CA LIC 965300</div>

</div>
<br class=""></div></body></html>