1. 02 Dec, 2006 1 commit
    • unknown's avatar
      Bug#24736: UDF functions parsed as Stored Functions · c38783d0
      unknown authored
      Before this fix, a call to a User Defined Function (UDF) could,
      under some circumstances, be interpreted as a call to a Stored function
      instead. This occurred if a native function was invoked in the parameters
      for the UDF, as in "select my_udf(abs(x))".
      
      The root cause of this defect is the introduction, by the fix for Bug 21809,
      of st_select_lex::udf_list, and it's usage in the parser in sql_yacc.yy
      in the rule function_call_generic (in 5.1).
      
      While the fix itself for Bug 21809 is correct in 5.0, the code change
      merged into the 5.1 release created the issue, because the calls in 5.1 to :
      - lex->current_select->udf_list.push_front(udf)
      - lex->current_select->udf_list.pop()
      are not balanced in case of native functions, causing the udf_list,
      which is really a stack, to be out of sync with the internal stack
      maintained by the bison parser.
      
      Instead of moving the call to udf_list.pop(), which would have fixed the
      symptom, this patch goes further and removes the need for udf_list.
      
      This is motivated by two reasons:
      
      a) Maintaining a stack in the MySQL code in sync with the stack maintained
      internally in sql_yacc.cc (not .yy) is extremely dependent of the
      implementation of yacc/bison, and extremely difficult to maintain.
      It's also totally dependent of the structure of the grammar, and has a risk
      to break with regression defects each time the grammar itself is changed.
      
      b) The previous code did report construct like "foo(expr AS name)" as
      syntax errors (ER_PARSER_ERROR), which is incorrect, and misleading.
      The syntax is perfectly valid, as this expression is valid when "foo" is
      a UDF. Whether this syntax is legal or not depends of the semantic of "foo".
      
      With this change:
      
      a) There is only one stack (in bison), and no List<udf_func> to maintain.
      
      b) "foo(expr AS name)", when used incorrectly, is reported as semantic error:
      - ER_WRONG_PARAMETERS_TO_NATIVE_FCT (for native functions)
      - ER_WRONG_PARAMETERS_TO_STORED_FCT (for stored functions)
      This is achieved by the changes implemented in item_create.cc
      
      
      mysql-test/r/parser.result:
        New tests
      mysql-test/r/udf.result:
        New tests
      mysql-test/t/parser.test:
        New tests
      mysql-test/t/udf.test:
        New tests
      sql/item_create.cc:
        Semantic checks for named parameters, as in "foo(expr AS name)".
      sql/share/errmsg.txt:
        New error message
      sql/sql_lex.cc:
        Remove usage of udf_list.
      sql/sql_lex.h:
        Remove usage of udf_list.
      sql/sql_yacc.yy:
        Remove usage of udf_list.
      c38783d0
  2. 30 Nov, 2006 10 commits
  3. 29 Nov, 2006 29 commits
    • unknown's avatar
      Merge 192.168.0.5:mysql/mysql-5.1-maint · 5db0a4c9
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
      
      
      client/mysqltest.c:
        Auto merged
      mysql-test/r/func_misc.result:
        Auto merged
      mysql-test/r/mysql.result:
        Auto merged
      mysql-test/t/mysql.test:
        Auto merged
      sql/field_conv.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      5db0a4c9
    • unknown's avatar
      Update result to 5.1 version format · db683572
      unknown authored
      db683572
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/bug19731/my51-bug19731 · 624508c0
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
      
      
      mysql-test/r/mysqltest.result:
        Auto merged
      mysql-test/t/mysqltest.test:
        Auto merged
      sql/handler.cc:
        Auto merged
      client/mysqltest.c:
        Manual merge
      624508c0
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/bug19731/my50-bug19731 · 4adc9ab8
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      mysql-test/r/mysqltest.result:
        Auto merged
      mysql-test/t/mysqltest.test:
        Auto merged
      sql/handler.cc:
        Auto merged
      client/mysqltest.c:
        Manual merge
      4adc9ab8
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/bug19731/my50-bug19731 · 45c70e6b
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/bug19731/my51-bug19731
      
      
      client/mysqltest.c:
        Auto merged
      mysql-test/r/mysqltest.result:
        Auto merged
      mysql-test/r/varbinary.result:
        Auto merged
      mysql-test/t/mysqltest.test:
        Auto merged
      sql/field_conv.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      45c70e6b
    • unknown's avatar
      Bug#19371 VARBINARY() have trailing zeros after upgrade from 4.1 · f12ec5c3
      unknown authored
       - chmod the saved files from 4.1 to make sure they are writable
      
      
      mysql-test/t/varbinary.test:
        As the files saved from 4.1 has been in bk they muight be readonly
        Use "chmod" to make sure they are writable
      f12ec5c3
    • unknown's avatar
      Add command "chmod" to mysqltest · 4037953b
      unknown authored
      
      client/mysqltest.c:
        Add "chmod" command
      mysql-test/r/mysqltest.result:
        Update result file
      mysql-test/t/mysqltest.test:
        Add tests for chmod
      4037953b
    • unknown's avatar
      Merge 192.168.0.10:mysql/work/my51-work · 53c1c7cb
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-merge-from5.0-maint
      
      
      BitKeeper/etc/ignore:
        auto-union
      client/mysql.cc:
        Auto merged
      mysql-test/lib/mtr_process.pl:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/func_misc.result:
        Auto merged
      mysql-test/r/mysql.result:
        Auto merged
      mysql-test/r/rpl_000015.result:
        Auto merged
      mysql-test/t/mysql.test:
        Auto merged
      mysql-test/t/rpl_000015.test:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      53c1c7cb
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/work/my50-work · 385a1bbf
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      385a1bbf
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/work/my50-work · 295f6431
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/work/my51-work
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      295f6431
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/work/my41-work · d0ce9888
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/mysql-4.1-maint
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      d0ce9888
    • unknown's avatar
      Merge neptunus.(none):/home/msvensson/mysql/work/my41-work · 6ac4eaca
      unknown authored
      into  neptunus.(none):/home/msvensson/mysql/work/my50-work
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      6ac4eaca
    • unknown's avatar
    • unknown's avatar
      Change mode of the checked in 4.1 version files so they are writable · c5d95d1b
      unknown authored
      
      mysql-test/std_data/bug19371.frm:
        Change mode to -rw-rw--w-
      mysql-test/std_data/bug19371.MYD:
        Change mode to -rw-rw--w-
      mysql-test/std_data/bug19371.MYI:
        Change mode to -rw-rw--w-
      c5d95d1b
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint · 1e2b7552
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-merge-from5.0-maint
      
      
      BitKeeper/etc/collapsed:
        auto-union
      BitKeeper/etc/ignore:
        auto-union
      Docs/Makefile.am:
        Auto merged
      Makefile.am:
        Auto merged
      client/mysqltest.c:
        Auto merged
      extra/yassl/src/ssl.cpp:
        Auto merged
      include/my_sys.h:
        Auto merged
      mysql-test/Makefile.am:
        Auto merged
      mysql-test/mysql-test-run-shell.sh:
        Auto merged
      mysql-test/extra/rpl_tests/rpl_deadlock.test:
        Auto merged
      mysql-test/lib/mtr_process.pl:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/func_time.result:
        Auto merged
      mysql-test/r/rpl_000015.result:
        Auto merged
      mysql-test/r/rpl_deadlock_innodb.result:
        Auto merged
      mysql-test/r/udf.result:
        Auto merged
      mysql-test/t/func_time.test:
        Auto merged
      mysql-test/t/limit.test:
        Auto merged
      mysql-test/t/mysql.test:
        Auto merged
      mysql-test/t/rpl_000015.test:
        Auto merged
      mysql-test/t/udf.test:
        Auto merged
      mysql-test/t/view_grant.test:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/sql_base.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      1e2b7552
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/mysql-5.1 · f3c10417
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-merge-from5.0-maint
      
      
      client/mysql_upgrade.c:
        Auto merged
      configure.in:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      support-files/mysql.spec.sh:
        Auto merged
      include/my_sys.h:
        Manual merge - my_getpagesize defined further down separate from HAVE_SYS_MMAN_H
      f3c10417
    • unknown's avatar
      Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint · 2f111de8
      unknown authored
      into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
      
      
      mysql-test/r/func_misc.result:
        Auto merged
      2f111de8
    • unknown's avatar
      Fix merges. · 4d2e951a
      unknown authored
      
      mysql-test/r/func_misc.result:
        case change in SHOW CREATE keywords.
      mysql-test/r/mysql.result:
        Revert clobber of charset special chars.
      mysql-test/t/mysql.test:
        Revert clobber of charset special chars.
      4d2e951a
    • unknown's avatar
      Many files: · c41da42c
      unknown authored
        Changed paths to ndb include directory to include "storage"
      Makefile.am:
        Adjusted path to yaSSL libtool libraries
      ssl.m4:
        Use libtool way of specifying yaSSL libraries
      
      
      config/ac-macros/ssl.m4:
        Use libtool way of specifying yaSSL libraries
      libmysqld/Makefile.am:
        Adjusted path to yaSSL libtool libraries
      storage/ndb/config/type_kernel.mk.am:
        Changed paths to ndb include directory to include "storage"
      storage/ndb/config/type_ndbapi.mk.am:
        Changed paths to ndb include directory to include "storage"
      storage/ndb/config/type_ndbapitest.mk.am:
        Changed paths to ndb include directory to include "storage"
      storage/ndb/config/type_ndbapitools.mk.am:
        Changed paths to ndb include directory to include "storage"
      storage/ndb/config/type_util.mk.am:
        Changed paths to ndb include directory to include "storage"
      c41da42c
    • unknown's avatar
      Merge fixes for new test cases · bb4279ff
      unknown authored
      bb4279ff
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/mysql-5.1 · 038c777c
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
      
      
      BitKeeper/etc/ignore:
        auto-union
      Makefile.am:
        Auto merged
      client/mysql.cc:
        Auto merged
      client/mysql_upgrade.c:
        Auto merged
      client/mysqltest.c:
        Auto merged
      extra/yassl/src/ssl.cpp:
        Auto merged
      mysql-test/lib/mtr_report.pl:
        Auto merged
      mysql-test/mysql-test-run-shell.sh:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/query_cache.result:
        Auto merged
      mysql-test/r/udf.result:
        Auto merged
      mysql-test/t/alter_table.test:
        Auto merged
      mysql-test/t/disabled.def:
        Auto merged
      mysql-test/t/limit.test:
        Auto merged
      mysql-test/t/mysql.test:
        Auto merged
      mysql-test/t/mysqldump.test:
        Auto merged
      mysql-test/t/query_cache.test:
        Auto merged
      mysql-test/t/system_mysql_db_fix30020.test:
        Auto merged
      mysql-test/t/udf.test:
        Auto merged
      mysql-test/t/view_grant.test:
        Auto merged
      mysys/Makefile.am:
        Auto merged
      scripts/mysql_fix_privilege_tables.sql:
        Auto merged
      sql/item.cc:
        Auto merged
      sql/item_func.cc:
        Auto merged
      sql/item_func.h:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/mysqld.cc:
        Auto merged
      sql/sql_handler.cc:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/sql_table.cc:
        Auto merged
      extra/yassl/taocrypt/include/algebra.hpp:
        Remove fix as it conflicts with "import from yassl" and it's been
        fixed there
      sql/ha_ndbcluster.cc:
        Merge fix of warnings
      sql/sql_base.cc:
        Merge
      038c777c
    • unknown's avatar
      Merge mysql.com:/home/kent/bk/mysql-5.0-build · c68df141
      unknown authored
      into  mysql.com:/home/kent/bk/mysql-5.1-build
      
      
      Docs/Makefile.am:
        Auto merged
      extra/yassl/taocrypt/benchmark/benchmark.dsp:
        Auto merged
      extra/yassl/taocrypt/taocrypt.dsp:
        Auto merged
      extra/yassl/taocrypt/taocrypt.vcproj:
        Auto merged
      extra/yassl/taocrypt/test.dsp:
        Auto merged
      extra/yassl/testsuite/testsuite.dsp:
        Auto merged
      extra/yassl/yassl.dsp:
        Auto merged
      extra/yassl/yassl.vcproj:
        Auto merged
      libmysql/libmysql.c:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/t/subselect.test:
        Auto merged
      mysql-test/t/type_newdecimal.test:
        Auto merged
      sql/Makefile.am:
        Auto merged
      sql/filesort.cc:
        Auto merged
      sql/handler.cc:
        Auto merged
      sql/item_cmpfunc.cc:
        Auto merged
      sql/item_subselect.cc:
        Auto merged
      sql/item_timefunc.cc:
        Auto merged
      sql/sql_class.h:
        Auto merged
      sql/sql_parse.cc:
        Auto merged
      sql-common/client.c:
        Auto merged
      sql-common/my_time.c:
        Auto merged
      sql/sql_select.cc:
        Auto merged
      sql/table.cc:
        Auto merged
      strings/decimal.c:
        Auto merged
      c68df141
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1 · f0dd9dd3
      unknown authored
      into  mysql.com:/home/kent/bk/mysql-5.1-build
      
      
      sql-common/my_time.c:
        Auto merged
      f0dd9dd3
    • unknown's avatar
      Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-5.1-build · 4c2a1ef0
      unknown authored
      into  mysql.com:/home/kent/bk/mysql-5.1-build
      
      
      mysql-test/mysql-test-run.pl:
        Auto merged
      4c2a1ef0
    • unknown's avatar
      Merge mysql.com:/home/kent/bk/mysql-4.1-build · 0907cd18
      unknown authored
      into  mysql.com:/home/kent/bk/mysql-5.0-build
      
      0907cd18
    • unknown's avatar
      Merge kpdesk.mysql.com:/home/thek/dev/bug22043/my51-bug22043 · e0d9b919
      unknown authored
      into  kpdesk.mysql.com:/home/thek/dev/mysql-5.1-maint
      
      
      sql/sql_parse.cc:
        Auto merged
      e0d9b919
    • unknown's avatar
      Merge kpettersson@bk-internal:/home/bk/mysql-5.0-maint · 85728197
      unknown authored
      into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
      
      85728197
    • unknown's avatar
      Merge kpdesk.mysql.com:/home/thek/dev/bug22043/my50-bug22043 · 537599cc
      unknown authored
      into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint
      
      
      sql/sql_parse.cc:
        Auto merged
      mysql-test/r/rpl_sp.result:
        - merged
      mysql-test/t/rpl_sp.test:
        -merged
      537599cc
    • unknown's avatar
      Merge shellback.(none):/home/msvensson/mysql/yassl_import/my50-yassl_import · ac4e075d
      unknown authored
      into  shellback.(none):/home/msvensson/mysql/yassl_import/mysql-5.0-maint
      
      
      extra/yassl/src/ssl.cpp:
        Auto merged
      ac4e075d