Merge from mysql-5.0.92-release

This commit is contained in:
Jonathan Perkin 2011-02-08 14:43:27 +01:00
commit 01f57bc98e
24 changed files with 776 additions and 312 deletions

540
README
View File

@ -68,7 +68,6 @@ Use of any of this software is governed by the terms of the license below:
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information. # See the License for more information.
#=========================================================================== #===========================================================================
==
# (To distributed this file outside of CMake, substitute the full # (To distributed this file outside of CMake, substitute the full
# License text for the above reference.) # License text for the above reference.)
# #
@ -122,27 +121,30 @@ CMake is distributed under BSD License
All rights reserved. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met: modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright notice, * Redistributions of source code must retain the above copyright
this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright * Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the notice, this list of conditions and the following disclaimer in
documentation and/or other materials provided with the distribution. the documentation and/or other materials provided with the
* Neither the name of Kitware, Inc. nor the names of its contributors distribution.
may be used to endorse or promote products derived from this software without * Neither the name of Kitware, Inc. nor the names of its
specific prior written permission. contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, DISCLAIMED. IN NO EVENT SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
OF SUCH DAMAGE. IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
Additional License(s) Additional License(s)
@ -186,20 +188,16 @@ cmake-2.4.8/Utilities/cmtar/compat/gethostname.c:
************************************************************************** **************************************************************************
* * Author : Per Foreby, perf@efd.lth.se
Author : Per Foreby, perf@efd.lth.se * Author : Juergen Pfeifer, juergen.pfeifer@gmx.net
*
Author : Juergen Pfeifer, juergen.pfeifer@gmx.net
*
*
************************************************************************** **************************************************************************
---------------------------------------- ----------------------------------------
Copyright (c) 2002 Insight Consortium. All rights reserved. Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for
details. details.
This software is distributed WITHOUT ANY WARRANTY; without even This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
@ -208,9 +206,8 @@ details.
-------------------------------------------- --------------------------------------------
Skeleton parser for Yacc-like parsing with Bison, Skeleton parser for Yacc-like parsing with Bison,
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free Software
Software Foundati Foundation, Inc.
on, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -253,35 +250,27 @@ cmake-2.4.8/Utilities/cmzlib/zlib.h:
in a product, an acknowledgment in the product documentation would be in a product, an acknowledgment in the product documentation would be
appreciated but is not required. appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must 2. Altered source versions must be plainly marked as such, and must
not be not be misrepresented as being the original software.
misrepresented as being the original software.
3. This notice may not be removed or altered from any source 3. This notice may not be removed or altered from any source
distribution. distribution.
Jean-loup Gailly Mark Adler Jean-loup Gailly Mark Adler
---------------------------------------------- ----------------------------------------------
This source code was modified by Martin Hedenfalk This source code was modified by Martin Hedenfalk for use in Curl. His
for latest changes were done 2000-09-18.
use in Curl. His latest changes were done 2000-09-18.
It has since been patched away like a madman by Daniel Stenberg It has since been patched away like a madman by Daniel Stenberg to make it
to make it better applied to curl conditions, and to better applied to curl conditions, and to make it not use globals, pollute
make name space and more. This source code awaits a rewrite to work around the
it not use globals, pollute name space and more. This source code paragraph 2 in the BSD licenses as explained below.
awaits a
rewrite to work around the paragraph 2 in the BSD licenses as explained
below.
Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan
It has since been patched and modified a lot by Daniel Stenberg It has since been patched and modified a lot by Daniel Stenberg to make it
to make it better applied to curl conditions, and to better applied to curl conditions, and to make it not use globals, pollute
make name space and more. This source code awaits a rewrite to work around the
it not use globals, pollute name space and more. This source code paragraph 2 in the BSD licenses as explained below.
awaits a
rewrite to work around the paragraph 2 in the BSD licenses as explained
below.
Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan
(Royal Institute of Technology, Stockholm, Sweden). (Royal Institute of Technology, Stockholm, Sweden).
@ -304,19 +293,15 @@ awaits a
THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
LIABLE DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CONSEQUENTIAL CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. SUCH DAMAGE.
--------------------------------------------- ---------------------------------------------
@ -332,8 +317,7 @@ STRICT
-------------------------------------------------- --------------------------------------------------
cmake-2.4.8/Utilities/cmcurl/inet_pton.c, cmake-2.4.8/Utilities/cmcurl/inet_pton.c,
cmake-2.4.8/Source/CTest/Curl/inet_pto cmake-2.4.8/Source/CTest/Curl/inet_pton.c:
n.c:
This is from the BIND 4.9.4 release, modified to compile by itself This is from the BIND 4.9.4 release, modified to compile by itself
Copyright (c) 1996 by Internet Software Consortium. Copyright (c) 1996 by Internet Software Consortium.
@ -343,16 +327,13 @@ n.c:
copyright notice and this permission notice appear in all copies. copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
DISCLAIMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
WARRANTIES INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT,
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS PERFORMANCE OF THIS SOFTWARE.
ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
OF THIS
SOFTWARE.
------------------------------------------------------- -------------------------------------------------------
@ -369,24 +350,19 @@ OF THIS
* notice, this list of conditions and the following disclaimer in the * notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution. * documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products * 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written * derived from this software without specific prior written permission.
permission.
* *
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
PURPOSE * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
CONSEQUENTIAL * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
** SUCH DAMAGE. * SUCH DAMAGE.
--------------------------------------------------- ---------------------------------------------------
@ -433,23 +409,20 @@ ANY WAY
documentation and/or other materials provided with the distribution. documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software 3. All advertising materials mentioning features or use of this software
must display the following acknowledgement: must display the following acknowledgement:
This product includes software developed by the University of This product includes software developed by the University of
California, Berkeley and its contributors. California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors 4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software may be used to endorse or promote products derived from this software
without specific prior written permission. without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. SUCH DAMAGE.
@ -480,60 +453,33 @@ STRICT
*************************************************************************** ***************************************************************************
Copyright (c) 1998 Free Software Foundation, Inc. Copyright (c) 1998 Free Software Foundation, Inc.
*
Copyright (c) 1998,2000 Free Software Foundation, Inc. Copyright (c) 1998,2000 Free Software Foundation, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
Permission is hereby granted, free of charge, to any person obtaining copy of this software and associated documentation files (the
a * "Software"), to deal in the Software without restriction, including
copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish,
* distribute, distribute with modifications, sublicense, and/or sell copies
"Software"), to deal in the Software without restriction, including of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
without limitation the rights to use, copy, modify, merge, publish,
*
distribute, distribute with modifications, sublicense, and/or sell
*
copies of the Software, and to permit persons to whom the Software is
*
furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
The above copyright notice and this permission notice shall be all copies or substantial portions of the Software.
included *
in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
EXPRESS * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
*
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. *
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, *
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR USE OR OTHER DEALINGS IN THE SOFTWARE.
*
THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*
* Except as contained in this notice, the name(s) of the above copyright
Except as contained in this notice, the name(s) of the above holders shall not be used in advertising or otherwise to promote the sale,
copyright * use or other dealings in this Software without prior written
holders shall not be used in advertising or otherwise to promote the
*
sale, use or other dealings in this Software without prior written
*
authorization. authorization.
* ***************************************************************************
***************************************************************************
------------------------------------------------------ ------------------------------------------------------
@ -551,30 +497,25 @@ copyright *
3. The name of the author may not be used to endorse or promote products 3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
PURPOSE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
CONSEQUENTIAL SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE. SUCH DAMAGE.
@ -586,31 +527,29 @@ Fred Fish's Dbug Library
Use of any of this software is governed by the terms of the license below: Use of any of this software is governed by the terms of the license below:
* * N O T I C E *
* N O T I C E * * *
* * * Copyright Abandoned, 1987, Fred Fish *
* Copyright Abandoned, 1987, Fred Fish * * *
* * * *
* *
* This previously copyrighted work has been placed into the public * * This previously copyrighted work has been placed into the public *
* domain by the author and may be freely used for any purpose, * * domain by the author and may be freely used for any purpose, *
* private or commercial. * * private or commercial. *
* * * *
* Because of the number of inquiries I was receiving about the use * * Because of the number of inquiries I was receiving about the use *
* of this product in commercially developed works I have decided to * * of this product in commercially developed works I have decided to *
* simply make it public domain to further its unrestricted use. I * * simply make it public domain to further its unrestricted use. I *
* specifically would be most happy to see this material become a * * specifically would be most happy to see this material become a *
* part of the standard Unix distributions by AT&T and the Berkeley * * part of the standard Unix distributions by AT&T and the Berkeley *
* Computer Science Research Group, and a standard part of the GNU * * Computer Science Research Group, and a standard part of the GNU *
* system from the Free Software Foundation. * * system from the Free Software Foundation. *
* * * *
* I would appreciate it, as a courtesy, if this notice is left in * * I would appreciate it, as a courtesy, if this notice is left in *
* all copies and derivative works. Thank you. * * all copies and derivative works. Thank you. *
* * * *
* The author makes no warranty of any kind with respect to this * * The author makes no warranty of any kind with respect to this *
* product and explicitly disclaims any implied warranties of mer- * * product and explicitly disclaims any implied warranties of mer- *
* chantability or fitness for any particular purpose. * * chantability or fitness for any particular purpose. *
*
*************************************************************************** ***************************************************************************
@ -619,28 +558,27 @@ dbug_analyze.c (part of Fred Fish's Dbug Library)
Use of any of this software is governed by the terms of the license below: Use of any of this software is governed by the terms of the license below:
* * * Copyright Abandoned, 1987, Fred Fish *
* Copyright Abandoned, 1987, Fred Fish * * *
* * * *
* * * This previously copyrighted work has been placed into the public *
* This previously copyrighted work has been placed into the public * * domain by the author and may be freely used for any purpose, *
* domain by the author and may be freely used for any purpose, * * private or commercial. *
* private or commercial. * * *
* * * Because of the number of inquiries I was receiving about the use *
* Because of the number of inquiries I was receiving about the use * * of this product in commercially developed works I have decided to *
* of this product in commercially developed works I have decided to * * simply make it public domain to further its unrestricted use. I *
* simply make it public domain to further its unrestricted use. I * * specifically would be most happy to see this material become a *
* specifically would be most happy to see this material become a * * part of the standard Unix distributions by AT&T and the Berkeley *
* part of the standard Unix distributions by AT&T and the Berkeley * * Computer Science Research Group, and a standard part of the GNU *
* Computer Science Research Group, and a standard part of the GNU * * system from the Free Software Foundation. *
* system from the Free Software Foundation. * * *
* * * I would appreciate it, as a courtesy, if this notice is left in *
* I would appreciate it, as a courtesy, if this notice is left in * * all copies and derivative works. Thank you. *
* all copies and derivative works. Thank you. * * *
* * * The author makes no warranty of any kind with respect to this *
* The author makes no warranty of any kind with respect to this * * product and explicitly disclaims any implied warranties of mer- *
* product and explicitly disclaims any implied warranties of mer- * * chantability or fitness for any particular purpose. *
* chantability or fitness for any particular purpose.
*************************************************************************** ***************************************************************************
@ -1454,11 +1392,9 @@ text:
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If License along with the GNU C Library; see the file COPYING.LIB. If not,
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite
write to the Free Software Foundation, Inc., 59 Temple Place - 330, Boston, MA 02111-1307, USA. */
Suite 330,
Boston, MA 02111-1307, USA. */
@ -1548,104 +1484,121 @@ Use of any of this software is governed by the terms of the license below:
Unicode Terms of Use Unicode Terms of Use
For the general privacy policy governing access to this site, see the For the general privacy policy governing access to this site, see the
Unicode Privacy Policy. For trademark usage, see the Unicode Consortium® Unicode Privacy Policy. For trademark usage, see the Unicode
Trademarks and Logo Policy. Consortium (R) Trademarks and Logo Policy.
Notice to End User: Terms of Use Notice to End User: Terms of Use
Carefully read the following legal agreement ("Agreement"). Use or copying Carefully read the following legal agreement ("Agreement"). Use or
of the software and/or codes provided with this agreement (The "Software") copying of the software and/or codes provided with this agreement (The
constitutes your acceptance of these terms "Software") constitutes your acceptance of these terms
1. Unicode Copyright. 1. Unicode Copyright.
1. Copyright © 1991-2008 Unicode, Inc. All rights reserved. 1. Copyright (c) 1991-2008 Unicode, Inc. All rights reserved.
2. Certain documents and files on this website contain a legend 2. Certain documents and files on this website contain a
indicating that "Modification is permitted." Any person is hereby authorized, legend indicating that "Modification is permitted." Any person
without fee, to modify such documents and files to create derivative works is hereby authorized, without fee, to modify such documents
conforming to the Unicode® Standard, subject to Terms and Conditions herein. and files to create derivative works conforming to the
Unicode (R) Standard, subject to Terms and Conditions herein.
3. Any person is hereby authorized, without fee, to view, use, 3. Any person is hereby authorized, without fee, to view, use,
reproduce, and distribute all documents and files solely for informational reproduce, and distribute all documents and files solely for
purposes in the creation of products supporting the Unicode Standard, subject to informational purposes in the creation of products supporting
the Terms and Conditions herein. the Unicode Standard, subject to the Terms and Conditions
4. Further specifications of rights and restrictions pertaining to herein.
the use of the particular set of data files known as the "Unicode Character 4. Further specifications of rights and restrictions
Database" can be found in Exhibit 1. pertaining to the use of the particular set of data files
5. Each version of the Unicode Standard has further specifications known as the "Unicode Character Database" can be found in
of rights and restrictions of use. For the book editions, these are found on the Exhibit 1.
back of the title page. For the online edition, certain files (such as the PDF 5. Each version of the Unicode Standard has further
files for book chapters and code charts) carry specific restrictions. All other specifications of rights and restrictions of use. For the book
files are covered under these general Terms of Use. To request a permission to editions, these are found on the back of the title page. For
reproduce any part of the Unicode Standard, please contact the Unicode Consortium. the online edition, certain files (such as the PDF files for
6. No license is granted to "mirror" the Unicode website where a book chapters and code charts) carry specific restrictions.
fee is charged for access to the "mirror" site. All other files are covered under these general Terms of Use.
7. Modification is not permitted with respect to this document. All To request a permission to reproduce any part of the Unicode
copies of this document must be verbatim. Standard, please contact the Unicode Consortium.
6. No license is granted to "mirror" the Unicode website where
a fee is charged for access to the "mirror" site.
7. Modification is not permitted with respect to this
document. All copies of this document must be verbatim.
2. Restricted Rights Legend. Any technical data or software which is 2. Restricted Rights Legend. Any technical data or software which is
licensed to the United States of America, its agencies and/or instrumentalities licensed to the United States of America, its agencies and/or
under this Agreement is commercial technical data or commercial computer instrumentalities under this Agreement is commercial technical data
software developed exclusively at private expense as defined in FAR 2.101, or or commercial computer software developed exclusively at private
DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995),
duplication, or disclosure by the Government is subject to restrictions as set as applicable. For technical data, use, duplication, or disclosure
forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and by the Government is subject to restrictions as set forth in DFARS
this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and
as applicable, use, duplication or disclosure by the Government is subject to this Agreement. For Software, in accordance with FAR 12-212 or DFARS
the restrictions set forth in this Agreement. 227-7202, as applicable, use, duplication or disclosure by the
Government is subject to the restrictions set forth in this
Agreement.
3. Warranties and Disclaimers. 3. Warranties and Disclaimers.
1. This publication and/or website may include technical or 1. This publication and/or website may include technical or
typographical errors or other inaccuracies . Changes are periodically added to typographical errors or other inaccuracies . Changes are
the information herein; these changes will be incorporated in new editions of periodically added to the information herein; these changes
the publication and/or website. Unicode may make improvements and/or changes in will be incorporated in new editions of the publication and/or
the product(s) and/or program(s) described in this publication and/or website at website. Unicode may make improvements and/or changes in the
any time. product(s) and/or program(s) described in this publication
2. If this file has been purchased on magnetic or optical media and/or website at any time.
from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange 2. If this file has been purchased on magnetic or optical
of the defective media within ninety (90) days of original purchase. media from Unicode, Inc. the sole and exclusive remedy for any
claim will be exchange of the defective media within ninety
(90) days of original purchase.
3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR
SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND
IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS
PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN
TO THIS PUBLICATION OR THE UNICODE WEBSITE. THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE
REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE
WEBSITE.
4. Waiver of Damages. In no event shall Unicode or its licensors be 4. Waiver of Damages. In no event shall Unicode or its licensors be
liable for any special, incidental, indirect or consequential damages of any liable for any special, incidental, indirect or consequential
kind, or any damages whatsoever, whether or not Unicode was advised of the damages of any kind, or any damages whatsoever, whether or not
possibility of the damage, including, without limitation, those resulting from Unicode was advised of the possibility of the damage, including,
the following: loss of use, data or profits, in connection with the use, without limitation, those resulting from the following: loss of use,
modification or distribution of this information or its derivatives. data or profits, in connection with the use, modification or
distribution of this information or its derivatives.
5. Trademarks. 5. Trademarks.
1. Unicode and the Unicode logo are registered trademarks of 1. Unicode and the Unicode logo are registered trademarks of
Unicode, Inc. Unicode, Inc.
2. This site contains product names and corporate names of other 2. This site contains product names and corporate names of
companies. All product names and company names and logos mentioned herein are other companies. All product names and company names and logos
the trademarks or registered trademarks of their respective owners. Other mentioned herein are the trademarks or registered trademarks
products and corporate names mentioned herein which are trademarks of a third of their respective owners. Other products and corporate names
party are used only for explanation and for the owners' benefit and with no mentioned herein which are trademarks of a third party are
intent to infringe. used only for explanation and for the owners' benefit and with
3. Use of third party products or information referred to herein is no intent to infringe.
at the users risk. 3. Use of third party products or information referred to
herein is at the user's risk.
6. Miscellaneous. 6. Miscellaneous.
1. Jurisdiction and Venue. This server is operated from a location 1. Jurisdiction and Venue. This server is operated from a
in the State of California, United States of America. Unicode makes no location in the State of California, United States of America.
representation that the materials are appropriate for use in other locations. If Unicode makes no representation that the materials are
you access this server from other locations, you are responsible for compliance appropriate for use in other locations. If you access this
with local laws. This Agreement, all use of this site and any claims and damages server from other locations, you are responsible for
resulting from use of this site are governed solely by the laws of the State of compliance with local laws. This Agreement, all use of this
California without regard to any principles which would apply the laws of a site and any claims and damages resulting from use of this
different jurisdiction. The user agrees that any disputes regarding this site site are governed solely by the laws of the State of
shall be resolved solely in the courts located in Santa Clara County, California without regard to any principles which would apply
California. The user agrees said courts have personal jurisdiction and agree to the laws of a different jurisdiction. The user agrees that any
waive any right to transfer the dispute to any other forum. disputes regarding this site shall be resolved solely in the
2. Modification by Unicode Unicode shall have the right to modify courts located in Santa Clara County, California. The user
this Agreement at any time by posting it to this site. The user may not assign agrees said courts have personal jurisdiction and agree to
any part of this Agreement without Unicodes prior written consent. waive any right to transfer the dispute to any other forum.
3. Taxes. The user agrees to pay any taxes arising from access to 2. Modification by Unicode Unicode shall have the right to
this website or use of the information herein, except for those based on modify this Agreement at any time by posting it to this site.
Unicodes net income. The user may not assign any part of this Agreement without
4. Severability. If any provision of this Agreement is declared Unicode's prior written consent.
invalid or unenforceable, the remaining provisions of this Agreement shall 3. Taxes. The user agrees to pay any taxes arising from access
remain in effect. to this website or use of the information herein, except for
those based on Unicode's net income.
4. Severability. If any provision of this Agreement is
declared invalid or unenforceable, the remaining provisions of
this Agreement shall remain in effect.
5. Entire Agreement. This Agreement constitutes the entire 5. Entire Agreement. This Agreement constitutes the entire
agreement between the parties. agreement between the parties.
EXHIBIT 1 EXHIBIT 1
UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE
@ -1666,7 +1619,7 @@ OR SOFTWARE.
COPYRIGHT AND PERMISSION NOTICE COPYRIGHT AND PERMISSION NOTICE
Copyright © 1991-2008 Unicode, Inc. All rights reserved. Distributed under Copyright (c) 1991-2008 Unicode, Inc. All rights reserved. Distributed under
the Terms of Use in http://www.unicode.org/copyright.html. the Terms of Use in http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
@ -2265,7 +2218,7 @@ http://src.opensolaris.org/source/xref//sfw/usr/src/cmd/gdb/gdb-6.3/include/ieee
/* IEEE Standard 695-1980 "Universal Format for Object Modules" /* IEEE Standard 695-1980 "Universal Format for Object Modules"
header file header file
Contributed by Cygnus Support. */ Contributed by Cygnus Support. */
*************************************************************************** ***************************************************************************
@ -2295,8 +2248,7 @@ Use of any of this software is governed by the terms of the license below:
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
02111-1307, USA.
*/ */
********************************************************************** **********************************************************************

View File

@ -165,3 +165,17 @@ select 'andre%' like 'andre
select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê'; select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
_cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê' _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê'
1 1
End of 4.1 tests
#
# Bug #54575: crash when joining tables with unique set column
#
CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a));
CREATE TABLE t2(b INT PRIMARY KEY);
INSERT INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
1
DROP TABLE t1, t2;
End of 5.1 tests

View File

@ -327,4 +327,19 @@ DROP TABLE t1;
select NAME_CONST('_id',1234) as id; select NAME_CONST('_id',1234) as id;
id id
1234 1234
#
# Bug #54461: crash with longblob and union or update with subquery
#
CREATE TABLE t1 (a INT, b LONGBLOB);
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
LEAST(a, (SELECT b FROM t1 LIMIT 1))
1
2
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
GREATEST(a, (SELECT b FROM t1 LIMIT 1))
2
3
1
DROP TABLE t1;
End of 5.0 tests End of 5.0 tests

View File

@ -1156,4 +1156,78 @@ CURRENT_USER()
root@localhost root@localhost
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin"); SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD(""); SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
# Bug#57952
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
use mysqltest1;
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (1, 1);
CREATE TABLE t2(a INT);
INSERT INTO t2 VALUES (2);
CREATE TABLE mysqltest2.t3(a INT);
INSERT INTO mysqltest2.t3 VALUES (4);
CREATE USER testuser@localhost;
GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
GRANT SELECT(b) ON t1 TO testuser@localhost;
GRANT SELECT ON t2 TO testuser@localhost;
GRANT SELECT ON mysqltest2.* TO testuser@localhost;
# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
PREPARE s1 FROM 'SELECT b FROM t1';
PREPARE s2 FROM 'SELECT a FROM t2';
PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
CREATE PROCEDURE p1() SELECT b FROM t1;
CREATE PROCEDURE p2() SELECT a FROM t2;
CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
CALL p1;
b
1
CALL p2;
a
2
CALL p3;
Tables_in_mysqltest2
t3
# Connection: default
REVOKE SELECT ON t1 FROM testuser@localhost;
GRANT SELECT(a) ON t1 TO testuser@localhost;
REVOKE SELECT ON t2 FROM testuser@localhost;
REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
# Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
# - Check column-level privileges...
EXECUTE s1;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
SELECT b FROM t1;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
EXECUTE s1;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
CALL p1;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for column 'b' in table 't1'
# - Check table-level privileges...
SELECT a FROM t2;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
EXECUTE s2;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
CALL p2;
ERROR 42000: SELECT command denied to user 'testuser'@'localhost' for table 't2'
# - Check database-level privileges...
SHOW TABLES FROM mysqltest2;
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
EXECUTE s3;
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
CALL p3;
ERROR 42000: Access denied for user 'testuser'@'localhost' to database 'mysqltest2'
# Connection: default
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP USER testuser@localhost;
use test;
End of 5.0 tests End of 5.0 tests

View File

@ -1315,4 +1315,16 @@ id select_type table type possible_keys key key_len ref rows Extra
2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found 2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1 2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1
DROP TABLE t1,t2; DROP TABLE t1,t2;
#
# Bug#55826: create table .. select crashes with when KILL_BAD_DATA
# is returned
#
CREATE TABLE t1(a INT) ENGINE=innodb;
INSERT INTO t1 VALUES (0);
SET SQL_MODE='STRICT_ALL_TABLES';
CREATE TABLE t2
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
ERROR 22007: Truncated incorrect datetime value: ''
DROP TABLE t1;
SET SQL_MODE=DEFAULT;
End of 5.0 tests End of 5.0 tests

View File

@ -952,4 +952,55 @@ a b a b
0 0 0 0 0 0 0 0
1 1 1 1 1 1 1 1
DROP TABLE t1; DROP TABLE t1;
#
# Bug #55568: user variable assignments crash server when used within
# query
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (0), (1);
SELECT MULTIPOINT(
1,
(
SELECT MULTIPOINT(
MULTIPOINT(
1,
(SELECT COUNT(*) FROM (SELECT 1 FROM t1 GROUP BY a,a) d)
)
) FROM t1
)
) != COUNT(*) q FROM t1 GROUP BY a;
q
NULL
NULL
SELECT MULTIPOINT(
1,
(
SELECT MULTIPOINT(
MULTIPOINT(
1,
(SELECT COUNT(*) FROM (SELECT 1 FROM t1 GROUP BY a,a) d)
)
) FROM t1
)
) != COUNT(*) q FROM t1 GROUP BY a;
q
NULL
NULL
DROP TABLE t1;
#
# Bug #54468: crash after item's print() function when ordering/grouping
# by subquery
#
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (), ();
SELECT 1 FROM t1
GROUP BY
GREATEST(t1.a,
(SELECT 1 FROM
(SELECT t1.b FROM t1,t1 t2
ORDER BY t1.a, t1.a LIMIT 1) AS d)
);
1
1
DROP TABLE t1;
End of 5.0 tests. End of 5.0 tests.

View File

@ -4527,4 +4527,20 @@ pk int_key
3 3 3 3
7 3 7 3
DROP TABLE t1,t2; DROP TABLE t1,t2;
#
# Bug #52711: Segfault when doing EXPLAIN SELECT with
# union...order by (select... where...)
#
CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (1),(2);
# Should not crash
EXPLAIN
SELECT * FROM t2 UNION SELECT * FROM t2
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
# Should not crash
SELECT * FROM t2 UNION SELECT * FROM t2
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
DROP TABLE t1,t2;
End of 5.0 tests. End of 5.0 tests.

View File

@ -59,3 +59,24 @@ FROM t3 WHERE 1 = 0 GROUP BY 1;
(SELECT 1 FROM t1,t2 WHERE t2.b > t3.b) (SELECT 1 FROM t1,t2 WHERE t2.b > t3.b)
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
End of 5.0 tests. End of 5.0 tests.
#
# Bug#54568: create view cause Assertion failed: 0,
# file .\item_subselect.cc, line 836
#
EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1249 Select 2 was reduced during optimization
DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1249 Select 2 was reduced during optimization
# None of the below should crash
CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
DROP VIEW v1, v2;
#
# End of 5.1 tests.
#

View File

@ -378,4 +378,21 @@ FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1;
MIN(t2.f1) @bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo) MIN(t2.f1) @bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo)
10 NULL 10 NULL
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (0),(0);
# BUG#55615 : should not crash
SELECT (@a:=((SELECT @a:=1 FROM t1 LIMIT 1))) AND COUNT(1) FROM t1 GROUP BY @a;
(@a:=((SELECT @a:=1 FROM t1 LIMIT 1))) AND COUNT(1)
1
1
# BUG#55564 : should not crash
SELECT IF(
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
count(*), 1)
FROM t1 GROUP BY a LIMIT 1;
IF(
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
count(*), 1)
1
DROP TABLE t1;
End of 5.0 tests End of 5.0 tests

View File

@ -112,5 +112,19 @@ select 'andre%' like 'andre
# #
select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê'; select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
#
# End of 4.1 tests --echo End of 4.1 tests
--echo #
--echo # Bug #54575: crash when joining tables with unique set column
--echo #
CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a));
CREATE TABLE t2(b INT PRIMARY KEY);
INSERT INTO t1 VALUES ();
INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
DROP TABLE t1, t2;
--echo End of 5.1 tests

View File

@ -450,5 +450,16 @@ DROP TABLE t1;
# #
select NAME_CONST('_id',1234) as id; select NAME_CONST('_id',1234) as id;
--echo End of 5.0 tests --echo #
--echo # Bug #54461: crash with longblob and union or update with subquery
--echo #
CREATE TABLE t1 (a INT, b LONGBLOB);
INSERT INTO t1 VALUES (1, '2'), (2, '3'), (3, '2');
SELECT DISTINCT LEAST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
SELECT DISTINCT GREATEST(a, (SELECT b FROM t1 LIMIT 1)) FROM t1 UNION SELECT 1;
DROP TABLE t1;
--echo End of 5.0 tests

View File

@ -1166,6 +1166,107 @@ SELECT CURRENT_USER();
SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin"); SET PASSWORD FOR CURRENT_USER() = PASSWORD("admin");
SET PASSWORD FOR CURRENT_USER() = PASSWORD(""); SET PASSWORD FOR CURRENT_USER() = PASSWORD("");
#
# Bug#57952: privilege change is not taken into account by EXECUTE.
#
--echo
--echo # Bug#57952
--echo
--disable_warnings
DROP DATABASE IF EXISTS mysqltest1;
DROP DATABASE IF EXISTS mysqltest2;
--enable_warnings
CREATE DATABASE mysqltest1;
CREATE DATABASE mysqltest2;
use mysqltest1;
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (1, 1);
CREATE TABLE t2(a INT);
INSERT INTO t2 VALUES (2);
CREATE TABLE mysqltest2.t3(a INT);
INSERT INTO mysqltest2.t3 VALUES (4);
CREATE USER testuser@localhost;
GRANT CREATE ROUTINE, EXECUTE ON mysqltest1.* TO testuser@localhost;
GRANT SELECT(b) ON t1 TO testuser@localhost;
GRANT SELECT ON t2 TO testuser@localhost;
GRANT SELECT ON mysqltest2.* TO testuser@localhost;
--echo
--echo # Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
--connect (bug57952_con1,localhost,testuser,,mysqltest1)
PREPARE s1 FROM 'SELECT b FROM t1';
PREPARE s2 FROM 'SELECT a FROM t2';
PREPARE s3 FROM 'SHOW TABLES FROM mysqltest2';
CREATE PROCEDURE p1() SELECT b FROM t1;
CREATE PROCEDURE p2() SELECT a FROM t2;
CREATE PROCEDURE p3() SHOW TABLES FROM mysqltest2;
CALL p1;
CALL p2;
CALL p3;
--echo
--echo # Connection: default
--connection default
REVOKE SELECT ON t1 FROM testuser@localhost;
GRANT SELECT(a) ON t1 TO testuser@localhost;
REVOKE SELECT ON t2 FROM testuser@localhost;
REVOKE SELECT ON mysqltest2.* FROM testuser@localhost;
--echo
--echo # Connection: bug57952_con1 (testuser@localhost, db: mysqltest1)
--connection bug57952_con1
--echo # - Check column-level privileges...
--error ER_COLUMNACCESS_DENIED_ERROR
EXECUTE s1;
--error ER_COLUMNACCESS_DENIED_ERROR
SELECT b FROM t1;
--error ER_COLUMNACCESS_DENIED_ERROR
EXECUTE s1;
--error ER_COLUMNACCESS_DENIED_ERROR
CALL p1;
--echo # - Check table-level privileges...
--error ER_TABLEACCESS_DENIED_ERROR
SELECT a FROM t2;
--error ER_TABLEACCESS_DENIED_ERROR
EXECUTE s2;
--error ER_TABLEACCESS_DENIED_ERROR
CALL p2;
--echo # - Check database-level privileges...
--error ER_DBACCESS_DENIED_ERROR
SHOW TABLES FROM mysqltest2;
--error ER_DBACCESS_DENIED_ERROR
EXECUTE s3;
--error ER_DBACCESS_DENIED_ERROR
CALL p3;
--echo
--echo # Connection: default
--connection default
--disconnect bug57952_con1
DROP DATABASE mysqltest1;
DROP DATABASE mysqltest2;
DROP USER testuser@localhost;
use test;
--echo
--echo End of 5.0 tests --echo End of 5.0 tests
disconnect master; disconnect master;

View File

@ -1073,4 +1073,19 @@ explain
select b from t1 where a not in (select b from t1,t2 group by a) group by a; select b from t1 where a not in (select b from t1,t2 group by a) group by a;
DROP TABLE t1,t2; DROP TABLE t1,t2;
--echo #
--echo # Bug#55826: create table .. select crashes with when KILL_BAD_DATA
--echo # is returned
--echo #
CREATE TABLE t1(a INT) ENGINE=innodb;
INSERT INTO t1 VALUES (0);
SET SQL_MODE='STRICT_ALL_TABLES';
--error ER_TRUNCATED_WRONG_VALUE
CREATE TABLE t2
SELECT LEAST((SELECT '' FROM t1),NOW()) FROM `t1`;
DROP TABLE t1;
SET SQL_MODE=DEFAULT;
--echo End of 5.0 tests --echo End of 5.0 tests

View File

@ -747,4 +747,50 @@ SELECT * FROM t1 STRAIGHT_JOIN t1 t2 ON t1.a=t2.a AND t1.a=t2.b ORDER BY t2.a, t
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # Bug #55568: user variable assignments crash server when used within
--echo # query
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (0), (1);
let $i=2;
while ($i)
{
SELECT MULTIPOINT(
1,
(
SELECT MULTIPOINT(
MULTIPOINT(
1,
(SELECT COUNT(*) FROM (SELECT 1 FROM t1 GROUP BY a,a) d)
)
) FROM t1
)
) != COUNT(*) q FROM t1 GROUP BY a;
dec $i;
}
DROP TABLE t1;
--echo #
--echo # Bug #54468: crash after item's print() function when ordering/grouping
--echo # by subquery
--echo #
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (), ();
SELECT 1 FROM t1
GROUP BY
GREATEST(t1.a,
(SELECT 1 FROM
(SELECT t1.b FROM t1,t1 t2
ORDER BY t1.a, t1.a LIMIT 1) AS d)
);
DROP TABLE t1;
--echo End of 5.0 tests. --echo End of 5.0 tests.

View File

@ -3506,5 +3506,26 @@ ORDER BY outr.pk;
DROP TABLE t1,t2; DROP TABLE t1,t2;
--echo #
--echo # Bug #52711: Segfault when doing EXPLAIN SELECT with
--echo # union...order by (select... where...)
--echo #
CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
INSERT INTO t1 VALUES (1),(2);
CREATE TABLE t2 (b INT);
INSERT INTO t2 VALUES (1),(2);
--echo # Should not crash
--disable_result_log
EXPLAIN
SELECT * FROM t2 UNION SELECT * FROM t2
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
--echo # Should not crash
SELECT * FROM t2 UNION SELECT * FROM t2
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
DROP TABLE t1,t2;
--enable_result_log
--echo End of 5.0 tests. --echo End of 5.0 tests.

View File

@ -62,3 +62,19 @@ FROM t3 WHERE 1 = 0 GROUP BY 1;
DROP TABLE t1,t2,t3; DROP TABLE t1,t2,t3;
--echo End of 5.0 tests. --echo End of 5.0 tests.
--echo #
--echo # Bug#54568: create view cause Assertion failed: 0,
--echo # file .\item_subselect.cc, line 836
--echo #
EXPLAIN SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
DESCRIBE SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
--echo # None of the below should crash
CREATE VIEW v1 AS SELECT 1 LIKE ( 1 IN ( SELECT 1 ) );
CREATE VIEW v2 AS SELECT 1 LIKE '%' ESCAPE ( 1 IN ( SELECT 1 ) );
DROP VIEW v1, v2;
--echo #
--echo # End of 5.1 tests.
--echo #

View File

@ -268,4 +268,24 @@ FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1;
DROP TABLE t1, t2, t3; DROP TABLE t1, t2, t3;
#
# Bug #55615: debug assertion after using variable in assignment and
# referred to
# Bug #55564: crash with user variables, assignments, joins...
#
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (0),(0);
--echo # BUG#55615 : should not crash
SELECT (@a:=((SELECT @a:=1 FROM t1 LIMIT 1))) AND COUNT(1) FROM t1 GROUP BY @a;
--echo # BUG#55564 : should not crash
SELECT IF(
@v:=LEAST((SELECT 1 FROM t1 t2 LEFT JOIN t1 ON (@v) GROUP BY t1.a), a),
count(*), 1)
FROM t1 GROUP BY a LIMIT 1;
DROP TABLE t1;
--echo End of 5.0 tests --echo End of 5.0 tests

View File

@ -1365,7 +1365,7 @@ void Field::make_field(Send_field *field)
} }
else else
field->org_table_name= field->db_name= ""; field->org_table_name= field->db_name= "";
if (orig_table) if (orig_table && orig_table->alias)
{ {
field->table_name= orig_table->alias; field->table_name= orig_table->alias;
field->org_col_name= field_name; field->org_col_name= field_name;

View File

@ -4220,13 +4220,14 @@ Item_func::optimize_type Item_func_like::select_optimize() const
if (args[1]->const_item()) if (args[1]->const_item())
{ {
String* res2= args[1]->val_str((String *)&tmp_value2); String* res2= args[1]->val_str((String *)&tmp_value2);
const char *ptr2;
if (!res2) if (!res2 || !(ptr2= res2->ptr()))
return OPTIMIZE_NONE; return OPTIMIZE_NONE;
if (*res2->ptr() != wild_many) if (*ptr2 != wild_many)
{ {
if (args[0]->result_type() != STRING_RESULT || *res2->ptr() != wild_one) if (args[0]->result_type() != STRING_RESULT || *ptr2 != wild_one)
return OPTIMIZE_OP; return OPTIMIZE_OP;
} }
} }
@ -4247,7 +4248,7 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
return TRUE; return TRUE;
} }
if (escape_item->const_item()) if (escape_item->const_item() && !thd->lex->view_prepare_mode)
{ {
/* If we are on execution stage */ /* If we are on execution stage */
String *escape_str= escape_item->val_str(&tmp_value1); String *escape_str= escape_item->val_str(&tmp_value1);

View File

@ -2250,6 +2250,8 @@ void Item_func_min_max::fix_length_and_dec()
else if ((cmp_type == DECIMAL_RESULT) || (cmp_type == INT_RESULT)) else if ((cmp_type == DECIMAL_RESULT) || (cmp_type == INT_RESULT))
max_length= my_decimal_precision_to_length(max_int_part+decimals, decimals, max_length= my_decimal_precision_to_length(max_int_part+decimals, decimals,
unsigned_flag); unsigned_flag);
else if (cmp_type == REAL_RESULT)
max_length= float_length(decimals);
cached_field_type= agg_field_type(args, arg_count); cached_field_type= agg_field_type(args, arg_count);
} }
@ -2268,7 +2270,7 @@ void Item_func_min_max::fix_length_and_dec()
stored to the value pointer, if latter is provided. stored to the value pointer, if latter is provided.
RETURN RETURN
0 If one of arguments is NULL 0 If one of arguments is NULL or there was a execution error
# index of the least/greatest argument # index of the least/greatest argument
*/ */
@ -2282,6 +2284,14 @@ uint Item_func_min_max::cmp_datetimes(ulonglong *value)
Item **arg= args + i; Item **arg= args + i;
bool is_null; bool is_null;
longlong res= get_datetime_value(thd, &arg, 0, datetime_item, &is_null); longlong res= get_datetime_value(thd, &arg, 0, datetime_item, &is_null);
/* Check if we need to stop (because of error or KILL) and stop the loop */
if (thd->net.report_error)
{
null_value= 1;
return 0;
}
if ((null_value= args[i]->null_value)) if ((null_value= args[i]->null_value))
return 0; return 0;
if (i == 0 || (res < min_max ? cmp_sign : -cmp_sign) > 0) if (i == 0 || (res < min_max ? cmp_sign : -cmp_sign) > 0)
@ -2310,6 +2320,12 @@ String *Item_func_min_max::val_str(String *str)
if (null_value) if (null_value)
return 0; return 0;
str_res= args[min_max_idx]->val_str(str); str_res= args[min_max_idx]->val_str(str);
if (args[min_max_idx]->null_value)
{
// check if the call to val_str() above returns a NULL value
null_value= 1;
return NULL;
}
str_res->set_charset(collation.collation); str_res->set_charset(collation.collation);
return str_res; return str_res;
} }
@ -4301,6 +4317,14 @@ longlong Item_func_set_user_var::val_int_result()
return entry->val_int(&null_value); return entry->val_int(&null_value);
} }
bool Item_func_set_user_var::val_bool_result()
{
DBUG_ASSERT(fixed == 1);
check(TRUE);
update(); // Store expression
return entry->val_int(&null_value) != 0;
}
String *Item_func_set_user_var::str_result(String *str) String *Item_func_set_user_var::str_result(String *str)
{ {
DBUG_ASSERT(fixed == 1); DBUG_ASSERT(fixed == 1);

View File

@ -1300,6 +1300,7 @@ public:
my_decimal *val_decimal(my_decimal *); my_decimal *val_decimal(my_decimal *);
double val_result(); double val_result();
longlong val_int_result(); longlong val_int_result();
bool val_bool_result();
String *str_result(String *str); String *str_result(String *str);
my_decimal *val_decimal_result(my_decimal *); my_decimal *val_decimal_result(my_decimal *);
bool is_null_result(); bool is_null_result();

View File

@ -3657,6 +3657,8 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
/* /*
Find field by name in a base table or a view with temp table algorithm. Find field by name in a base table or a view with temp table algorithm.
The caller is expected to check column-level privileges.
SYNOPSIS SYNOPSIS
find_field_in_table() find_field_in_table()
thd thread handler thd thread handler
@ -3753,6 +3755,8 @@ find_field_in_table(THD *thd, TABLE *table, const char *name, uint length,
This procedure detects the type of the table reference 'table_list' This procedure detects the type of the table reference 'table_list'
and calls the corresponding search routine. and calls the corresponding search routine.
The routine checks column-level privieleges for the found field.
RETURN RETURN
0 field is not found 0 field is not found
view_ref_found found value in VIEW (real result is in *ref) view_ref_found found value in VIEW (real result is in *ref)
@ -3944,8 +3948,16 @@ find_field_in_tables(THD *thd, Item_ident *item,
when table_ref->field_translation != NULL. when table_ref->field_translation != NULL.
*/ */
if (table_ref->table && !table_ref->view) if (table_ref->table && !table_ref->view)
{
found= find_field_in_table(thd, table_ref->table, name, length, found= find_field_in_table(thd, table_ref->table, name, length,
TRUE, &(item->cached_field_index)); TRUE, &(item->cached_field_index));
#ifndef NO_EMBEDDED_ACCESS_CHECKS
/* Check if there are sufficient access rights to the found field. */
if (found && check_privileges &&
check_column_grant_in_table_ref(thd, table_ref, name, length))
found= WRONG_GRANT;
#endif
}
else else
found= find_field_in_table_ref(thd, table_ref, name, length, item->name, found= find_field_in_table_ref(thd, table_ref, name, length, item->name,
NULL, NULL, ref, check_privileges, NULL, NULL, ref, check_privileges,

View File

@ -501,7 +501,7 @@ JOIN::prepare(Item ***rref_pointer_array,
thd->lex->allow_sum_func= save_allow_sum_func; thd->lex->allow_sum_func= save_allow_sum_func;
} }
if (!thd->lex->view_prepare_mode) if (!thd->lex->view_prepare_mode && !(select_options & SELECT_DESCRIBE))
{ {
Item_subselect *subselect; Item_subselect *subselect;
/* Is it subselect? */ /* Is it subselect? */
@ -2226,13 +2226,8 @@ JOIN::destroy()
cleanup(1); cleanup(1);
/* Cleanup items referencing temporary table columns */ /* Cleanup items referencing temporary table columns */
if (!tmp_all_fields3.is_empty()) cleanup_item_list(tmp_all_fields1);
{ cleanup_item_list(tmp_all_fields3);
List_iterator_fast<Item> it(tmp_all_fields3);
Item *item;
while ((item= it++))
item->cleanup();
}
if (exec_tmp_table1) if (exec_tmp_table1)
free_tmp_table(thd, exec_tmp_table1); free_tmp_table(thd, exec_tmp_table1);
if (exec_tmp_table2) if (exec_tmp_table2)
@ -2243,6 +2238,19 @@ JOIN::destroy()
DBUG_RETURN(error); DBUG_RETURN(error);
} }
void JOIN::cleanup_item_list(List<Item> &items) const
{
if (!items.is_empty())
{
List_iterator_fast<Item> it(items);
Item *item;
while ((item= it++))
item->cleanup();
}
}
/* /*
An entry point to single-unit select (a select without UNION). An entry point to single-unit select (a select without UNION).
@ -6861,7 +6869,8 @@ remove_const(JOIN *join,ORDER *first_order, COND *cond,
*simple_order=0; // Must do a temp table to sort *simple_order=0; // Must do a temp table to sort
else if (!(order_tables & not_const_tables)) else if (!(order_tables & not_const_tables))
{ {
if (order->item[0]->with_subselect) if (order->item[0]->with_subselect &&
!(join->select_lex->options & SELECT_DESCRIBE))
order->item[0]->val_str(&order->item[0]->str_value); order->item[0]->val_str(&order->item[0]->str_value);
DBUG_PRINT("info",("removing: %s", order->item[0]->full_name())); DBUG_PRINT("info",("removing: %s", order->item[0]->full_name()));
continue; // skip const item continue; // skip const item

View File

@ -489,6 +489,7 @@ public:
} }
private: private:
bool make_simple_join(JOIN *join, TABLE *tmp_table); bool make_simple_join(JOIN *join, TABLE *tmp_table);
void cleanup_item_list(List<Item> &items) const;
}; };