diff --git a/BUILD/compile-pentium-max b/BUILD/compile-pentium-max index 5deedf7ac37..6eb71fcebb6 100755 --- a/BUILD/compile-pentium-max +++ b/BUILD/compile-pentium-max @@ -14,6 +14,6 @@ extra_configs="$pentium_configs" # fail extra_configs="$extra_configs --with-innodb --with-berkeley-db \ --with-embedded-server --enable-thread-safe-client \ - --with-openssl --with-vio --with-raid --without-ndbcluster" + --with-openssl --with-vio --with-raid --with-ndbcluster" . "$path/FINISH.sh" diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 6df2fc31e25..7be353a4b4f 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -93,6 +93,7 @@ miguel@hegel.local miguel@light. miguel@light.local miguel@sartre.local +mikron@mikael-ronstr-ms-dator.local mmatthew@markslaptop. monty@bitch.mysql.fi monty@butch. diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 5d4a1bdb987..85361108700 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_tmp=$opt_version_suffix=""; $opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0; -$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=0; +$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0; GetOptions( "bdb", @@ -57,8 +57,7 @@ GetOptions( "with-other-libc=s", "with-small-disk", "without-embedded", - "clearlogs", - "without-ndbcluster", + "clearlogs", ) || usage(); usage() if ($opt_help); @@ -252,7 +251,6 @@ if ($opt_stage <= 1) $opt_config_options.= " --with-raid" if ($opt_raid); $opt_config_options.= " --with-readline" if ($opt_readline); $opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded); - $opt_config_options.= " --without-ndbcluster" if ($opt_without_ndbcluster); $opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster); # Only enable InnoDB when requested (required to be able to @@ -308,7 +306,7 @@ if ($opt_stage <= 3) } $flags.= " --no-strip" if ($opt_no_strip || $opt_with_debug); - $flags.= " --with-ndbcluster" if ($opt__with_ndbcluster); + $flags.= " --with-ndbcluster" if ($opt_with_cluster); check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created"); safe_system("mv mysql*.t*gz $pwd/$host"); if (-f "client/.libs/mysqladmin") @@ -347,10 +345,12 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . # if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) { + my $flags= ""; + $flags.= " --with-ndbcluster" if ($opt_with_cluster); log_timestamp(); system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); safe_cd("${test_dir}/mysql-test"); - check_system("./mysql-test-run --warnings --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); + check_system("./mysql-test-run $flags --warnings --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); } # @@ -571,7 +571,7 @@ If user is empty then no mail is sent. Set name suffix (e.g. 'com' or '-max') for a distribution --with cluster -Compile with NDB Cluster +Compile and test with NDB Cluster enabled --with-debug Build binaries with debug information (implies "--no-strip") diff --git a/Build-tools/mysql-copyright b/Build-tools/mysql-copyright index 004476ff92c..b403fdf8c0a 100755 --- a/Build-tools/mysql-copyright +++ b/Build-tools/mysql-copyright @@ -12,15 +12,17 @@ use Getopt::Long; $opt_help = 0; $opt_version = 0; +$opt_verbose = 0; $opt_target = "mysql-copyright-target-"; $opt_target .= `date +%d%m%y-%H%M%S`; chop $opt_target; -GetOptions("help","version","target=s") || error(); +GetOptions("help","version","target=s", "verbose") || error(); # fix the directory prefix for target dir $WD= cwd(); +my $win_flag = 0; $opt_target= $WD . '/' . $opt_target; &main(); @@ -50,6 +52,7 @@ sub main for ($i=0; $ARGV[$i]; $i++) { my $distfile= $ARGV[$i]; + $win_flag = ($distfile =~ /win-src/) ? 1 : 0; my $dir; $dir= "mysql-copyright-"; @@ -66,20 +69,19 @@ sub main } # if the distfile is mysql-3.22.22-alpha.tar.gz, then # distname is 'mysql-3.22.22-alpha' and suffix '.tar.gz' - if ($distfile =~ m/^($REG_BASENAME)([\-\_]) - ($REG_VERSION){1}([\.\-\+]) - (.*)?$/xo) + if ($distfile =~ + m/^($REG_BASENAME)([\-\_])($REG_VERSION){1}([\.\-\+]\w+\-\w+)?[\.\-\+](.*)?$/xo) { $distname= $1.$2.$3; - $suffix= $5.$6; + $suffix= $5; + $fileext = $6; $newdistname= $1."com".$2.$3; + $newdistname .= $suffix if $win_flag; } # find out the extract path (should be same as distname!) chomp($destdir= `tar ztf ../$distfile | head -1`); # remove slash from the end $destdir= substr($destdir, 0, -1); - print "destdir: $destdir\n"; - print "distname: $distname\n"; if ("$destdir" ne "$distname") { @@ -103,26 +105,49 @@ sub main # remove readline subdir and update configure accordingly system("rm -rf $destdir/cmd-line-utils/readline"); - unlink ("$destdir/configure") or die "Can't delete $destdir/configure: $!\n"; - `(cd $destdir ; sed -e 's!\ cmd-line-utils\/readline\/Makefile\ dnl!!g' < configure.in > configure.in.new)`; - rename ("$destdir/configure.in.new","$destdir/configure.in") or die "Can't rename $destdir/configure.in.new: $!\n";; - `(cd $destdir ; autoconf)`; + if ($win_flag) { + chdir("$destdir") or (print "$! Unable to change directory to $desdir!\n" && exit(0)); + } else { + chdir("$destdir"); + unlink ("configure") or die "Can't delete $destdir/configure: $!\n"; + open(CONFIGURE,"; + close(CONFIGURE); + $configure =~ s|cmd\-line\-utils/readline/Makefile dnl\n?||g; + open(CONFIGURE,">configure.in") or die "$! Unable to open configure.in to write to!\n"; + print CONFIGURE $configure; + close(CONFIGURE); + `autoconf`; + if (! -f "configure") { + print "\"./configure\" was not produced, exiting!\n"; + exit(0); + } + } # fix file copyrights &fix_usage_copyright(); &add_copyright(); # rename the directory with new distribution name + chdir("$WD/$dir"); + print "renaming $destdir $newdistname\n" if $opt_verbose; rename($destdir, $newdistname); # tar the new distribution - `tar cz -f $opt_target/$newdistname.tar.gz *`; + `tar cz -f $WD/$newdistname.tar.gz $newdistname`; $pec= $? >> 8; abort($dir, "Making new tar archive failed!\n") if ($pec); # remove temporary directory - chdir ".."; - `rm -rf $dir/`; + chdir($WD) or print "$! Unable to move up one dir\n"; + my $cwd = getcwd(); + print "current dir is $cwd\n" if $opt_verbose ; + print "deleting temp dir $dir\n" if $opt_verbose; + if (-d $dir) { + system("rm -rf $dir") or print "$! Unable to delete $dir!\n"; + } + } exit(0); } @@ -138,7 +163,7 @@ sub fix_usage_copyright foreach my $Cfile (@Cfiles) { chop $Cfile; - `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- $Cfile`; + `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- "$Cfile"` if -f $Cfile; } } @@ -152,7 +177,9 @@ sub add_copyright foreach my $file (@files) { chop $file; - `$WD/Build-tools/mysql-copyright-2 $file`; + next if ! -f $file; + next if -B $file; + `$WD/Build-tools/mysql-copyright-2 "$file"`; } } diff --git a/acinclude.m4 b/acinclude.m4 index baad145c0e0..2af463627f7 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1383,6 +1383,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ --with-ndb-test Include the NDB Cluster ndbapi test programs], [ndb_test="$withval"], [ndb_test=no]) + AC_ARG_WITH([ndb-docs], + [ + --with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation], + [ndb_docs="$withval"], + [ndb_docs=no]) AC_MSG_CHECKING([for NDB Cluster options]) AC_MSG_RESULT([]) @@ -1422,6 +1427,17 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ;; esac + have_ndb_docs=no + case "$ndb_docs" in + yes ) + AC_MSG_RESULT([-- including ndbapi and mgmapi documentation]) + have_ndb_docs="yes" + ;; + * ) + AC_MSG_RESULT([-- not including ndbapi and mgmapi documentation]) + ;; + esac + AC_MSG_RESULT([done.]) ]) @@ -1452,6 +1468,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ ;; esac + AM_CONDITIONAL([HAVE_NDBCLUSTER_DB], [ test "$have_ndbcluster" = "yes" ]) AC_SUBST(ndbcluster_includes) AC_SUBST(ndbcluster_libs) AC_SUBST(ndbcluster_system_libs) diff --git a/client/mysqltest.c b/client/mysqltest.c index 830846eda84..f638053b515 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -318,6 +318,7 @@ TYPELIB command_typelib= {array_elements(command_names),"", DYNAMIC_STRING ds_res; static void die(const char *fmt, ...); static void init_var_hash(); +static VAR* var_from_env(const char *, const char *); static byte* get_var_key(const byte* rec, uint* len, my_bool __attribute__((unused)) t); static VAR* var_init(VAR* v, const char *name, int name_len, const char *val, @@ -654,11 +655,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw, if (!(v = (VAR*) hash_search(&var_hash, save_var_name, var_name - save_var_name))) { - if (ignore_not_existing) - DBUG_RETURN(0); - if (end) - *(char*) end = 0; - die("Variable '%s' used uninitialized", save_var_name); + char c=*var_name, *s=(char*)var_name;; + *s=0; + v=var_from_env(save_var_name, ""); + *s=c; } --var_name; /* Point at last character */ } @@ -2580,7 +2580,7 @@ static void var_free(void *v) } -static void var_from_env(const char *name, const char *def_val) +static VAR* var_from_env(const char *name, const char *def_val) { const char *tmp; VAR *v; @@ -2589,6 +2589,7 @@ static void var_from_env(const char *name, const char *def_val) v = var_init(0, name, 0, tmp, 0); my_hash_insert(&var_hash, (byte*)v); + return v; } @@ -2599,10 +2600,8 @@ static void init_var_hash(MYSQL *mysql) if (hash_init(&var_hash, charset_info, 1024, 0, 0, get_var_key, var_free, MYF(0))) die("Variable hash initialization failed"); - var_from_env("MASTER_MYPORT", "9306"); - var_from_env("SLAVE_MYPORT", "9307"); - var_from_env("MYSQL_TEST_DIR", "/tmp"); - var_from_env("BIG_TEST", opt_big_test ? "1" : "0"); + if (opt_big_test) + my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0, "1",0)); v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0); my_hash_insert(&var_hash, (byte*) v); v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0); diff --git a/configure.in b/configure.in index be40d8ff029..481ce4ca719 100644 --- a/configure.in +++ b/configure.in @@ -370,12 +370,15 @@ AC_SUBST(INSTALL_SCRIPT) export CC CXX CFLAGS LD LDFLAGS AR +ndb_cxxflags_fix= if test "$GXX" = "yes" then # mysqld requires -fno-implicit-templates. # Disable exceptions as they seams to create problems with gcc and threads. # mysqld doesn't use run-time-type-checking, so we disable it. CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti" + # ndb cannot be compiled with -fno-implicit-templaces + ndb_cxxflags_fix=-fimplicit-templates # If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux, # we will gets some problems when linking static programs. @@ -2892,22 +2895,20 @@ if test X"$have_ndbcluster" = Xyes then MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster" + CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)" if test "$with_debug" = "yes" then # Medium debug. NDB_DEFS="-DVM_TRACE -DERROR_INSERT -DARRAY_GUARD" - CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_DEBUG_LOC)" elif test "$with_debug" = "full" then NDB_DEFS="-DVM_TRACE -DERROR_INSERT -DARRAY_GUARD" - CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_DEBUG_LOC)" else NDB_DEFS="-DNDEBUG" - CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_RELEASE_LOC)" fi -fi AC_SUBST([NDB_DEFS]) +AC_SUBST([ndb_cxxflags_fix]) ndb_transporter_opt_objs="" if test X"$have_ndb_shm" = Xyes @@ -2920,22 +2921,23 @@ then fi AC_SUBST([ndb_transporter_opt_objs]) +ndb_opt_subdirs= ndb_bin_am_ldflags="-static" if test X"$have_ndb_test" = Xyes then - ndb_opt_test_subdirs="test" + ndb_opt_subdirs="test" + ndb_bin_am_ldflags="" +fi +if test X"$have_ndb_docs" = Xyes +then + ndb_opt_subdirs="$ndb_opt_subdirs docs" ndb_bin_am_ldflags="" fi AC_SUBST([ndb_bin_am_ldflags]) -AC_SUBST([ndb_opt_test_subdirs]) - -AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) - -# Output results -AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl - ndb/docs/Makefile dnl - ndb/Makefile ndb/include/Makefile dnl +AC_SUBST([ndb_opt_subdirs]) +AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl ndb/src/Makefile ndb/src/common/Makefile dnl + ndb/docs/Makefile dnl ndb/tools/Makefile dnl ndb/src/common/debugger/Makefile ndb/src/common/debugger/signaldata/Makefile dnl ndb/src/common/portlib/Makefile dnl @@ -2976,7 +2978,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl ndb/test/ndbapi/Makefile dnl ndb/test/ndbapi/bank/Makefile dnl ndb/test/tools/Makefile dnl - ndb/test/run-test/Makefile dnl + ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl + ) +fi + +AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS) + +# Output results +AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl strings/Makefile regex/Makefile heap/Makefile dnl bdb/Makefile dnl myisam/Makefile myisammrg/Makefile dnl @@ -2989,15 +2998,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl merge/Makefile dbug/Makefile scripts/Makefile dnl include/Makefile sql-bench/Makefile tools/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl - support-files/MacOSX/Makefile mysql-test/Makefile mysql-test/ndb/Makefile dnl + support-files/MacOSX/Makefile mysql-test/Makefile dnl netware/Makefile dnl include/mysql_version.h dnl cmd-line-utils/Makefile dnl cmd-line-utils/libedit/Makefile dnl - cmd-line-utils/readline/Makefile dnl - , , [ - test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h - ]) + cmd-line-utils/readline/Makefile) + AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h) + AC_OUTPUT rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES echo diff --git a/include/m_ctype.h b/include/m_ctype.h index 9be5538b48a..785fa431385 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -104,7 +104,7 @@ typedef struct my_collation_handler_st my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); /* Collation routines */ int (*strnncoll)(struct charset_info_st *, - const uchar *, uint, const uchar *, uint); + const uchar *, uint, const uchar *, uint, my_bool); int (*strnncollsp)(struct charset_info_st *, const uchar *, uint, const uchar *, uint); int (*strnxfrm)(struct charset_info_st *, @@ -206,6 +206,7 @@ typedef struct charset_info_st uchar *to_lower; uchar *to_upper; uchar *sort_order; + uint16 *contractions; uint16 **sort_order_big; uint16 *tab_to_uni; MY_UNI_IDX *tab_from_uni; @@ -253,7 +254,7 @@ extern CHARSET_INFO my_charset_cp1250_czech_ci; extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *, uint); extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint, - const uchar *, uint); + const uchar *, uint, my_bool); extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint, const uchar *, uint); @@ -387,7 +388,7 @@ extern my_bool my_parse_charset_xml(const char *bug, uint len, #define my_binary_compare(s) ((s)->state & MY_CS_BINSORT) #define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM) #define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d))) -#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d))) +#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0)) #define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j))) #define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) diff --git a/include/my_dbug.h b/include/my_dbug.h index d02ea5bf050..bc90b91f1c7 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -16,6 +16,9 @@ #ifndef _dbug_h #define _dbug_h +#ifdef DBUG_OFF +#define NDEBUG /* for assert.h */ +#endif #include #ifdef __cplusplus extern "C" { diff --git a/include/mysql.h b/include/mysql.h index 71bff833d59..39b9b7da000 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -558,7 +558,7 @@ typedef struct st_mysql_bind enum enum_field_types buffer_type; /* buffer type */ unsigned long buffer_length; /* buffer length, must be set for str/binary */ - /* Following are for internal use. Set by mysql_bind_param */ + /* Following are for internal use. Set by mysql_stmt_bind_param */ unsigned char *inter_buffer; /* for the current data position */ unsigned long offset; /* offset position for char/binary fetch */ unsigned long internal_length; /* Used if length is 0 */ diff --git a/include/sql_state.h b/include/sql_state.h index 5c4b1c50745..52a359405e1 100644 --- a/include/sql_state.h +++ b/include/sql_state.h @@ -23,10 +23,10 @@ the second column is the ODBC state (which the 4.1 server sends out by default) and the last is the state used by the JDBC driver. If the last column is "" then it means that the JDBC driver is using the - ODBC state + ODBC state. - The errors in this file is sorted in the same order as in mysqld_error.h - to allow on to do binary searches for the sqlstate. + The errors in this file are sorted in the same order as in mysqld_error.h + to allow one to do binary searches for the sqlstate. */ ER_DUP_KEY, "23000", "", diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c index a200116797a..59fbd6f785d 100644 --- a/innobase/fil/fil0fil.c +++ b/innobase/fil/fil0fil.c @@ -2220,6 +2220,7 @@ fil_create_new_single_table_tablespace( ut_free(buf2); error_exit: os_file_close(file); + error_exit2: os_file_delete(path); mem_free(path); @@ -2262,10 +2263,7 @@ fil_create_new_single_table_tablespace( os_file_close(file); if (*space_id == ULINT_UNDEFINED) { - os_file_delete(path); - error_exit2: - mem_free(path); - return(DB_ERROR); + goto error_exit2; } success = fil_space_create(path, *space_id, FIL_TABLESPACE); @@ -2822,12 +2820,11 @@ fil_load_single_table_tablespaces(void) if (len > dbpath_len) { dbpath_len = len; - if (!dbpath) { - dbpath = mem_alloc(dbpath_len); - } else { - dbpath = mem_realloc(dbpath, dbpath_len, - __FILE__, __LINE__); + if (dbpath) { + mem_free(dbpath); } + + dbpath = mem_alloc(dbpath_len); } sprintf(dbpath, "%s/%s", fil_path_to_mysql_datadir, dbinfo.name); diff --git a/innobase/row/row0ins.c b/innobase/row/row0ins.c index fdd6989479d..aa4b313d15d 100644 --- a/innobase/row/row0ins.c +++ b/innobase/row/row0ins.c @@ -42,14 +42,13 @@ extern void innobase_invalidate_query_cache( /*============================*/ - trx_t* trx, /* in: transaction which modifies - the table */ - const char* full_name, /* in: concatenation of database name, - null char '\0', table name, null char - '\0'; NOTE that in Windows this is - always in LOWER CASE! */ - ulint full_name_len); /* in: full name length where also the - null chars count */ + trx_t* trx, /* in: transaction which modifies the table */ + char* full_name, /* in: concatenation of database name, null + char '\0', table name, null char'\0'; + NOTE that in Windows this is always + in LOWER CASE! */ + ulint full_name_len); /* in: full name length where also the null + chars count */ /************************************************************************* @@ -652,24 +651,27 @@ row_ins_foreign_check_on_constraint( ulint n_to_update; ulint err; ulint i; - const char* ptr; - char* table_name; + char* ptr; + char* table_name_buf; ut_a(thr && foreign && pcur && mtr); -#ifndef UNIV_HOTBACKUP /* Since we are going to delete or update a row, we have to invalidate the MySQL query cache for table */ - ptr = strchr(table->name, '/'); + table_name_buf = mem_strdup(table->name); + + ptr = strchr(table_name_buf, '/'); ut_a(ptr); - table_name = mem_strdupl(table->name, ptr - table->name); + *ptr = '\0'; +#ifndef UNIV_HOTBACKUP /* We call a function in ha_innodb.cc */ - innobase_invalidate_query_cache(thr_get_trx(thr), table_name, - ptr - table->name + 1); - mem_free(table_name); + innobase_invalidate_query_cache(thr_get_trx(thr), table_name_buf, + strlen(table->name) + 1); #endif + mem_free(table_name_buf); + node = thr->run_node; if (node->is_delete && 0 == (foreign->type & diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index eb8368977e9..ebbcbc5037d 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -84,7 +84,6 @@ my_bool net_flush(NET *net); #define MAX_LONG_DATA_LENGTH 8192 #define unsigned_field(A) ((A)->flags & UNSIGNED_FLAG) -static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data); static void append_wild(char *to,char *end,const char *wild); sig_handler pipe_sig_handler(int sig); @@ -1665,6 +1664,11 @@ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row); static int stmt_read_row_buffered(MYSQL_STMT *stmt, unsigned char **row); static int stmt_read_row_no_data(MYSQL_STMT *stmt, unsigned char **row); +/* + This function is used in mysql_stmt_store_result if + STMT_ATTR_UPDATE_MAX_LENGTH attribute is set. +*/ +static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data); /* Maximum sizes of MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME @@ -1672,19 +1676,19 @@ static int stmt_read_row_no_data(MYSQL_STMT *stmt, unsigned char **row); */ /* 1 (length) + 2 (year) + 1 (month) + 1 (day) */ -static const unsigned MAX_DATE_REP_LENGTH= 5; +#define MAX_DATE_REP_LENGTH 5 /* 1 (length) + 1 (is negative) + 4 (day count) + 1 (hour) + 1 (minute) + 1 (seconds) + 4 (microseconds) */ -static const unsigned MAX_TIME_REP_LENGTH= 13; +#define MAX_TIME_REP_LENGTH 13 /* 1 (length) + 2 (year) + 1 (month) + 1 (day) + 1 (hour) + 1 (minute) + 1 (second) + 4 (microseconds) */ -static const unsigned MAX_DATETIME_REP_LENGTH= 12; +#define MAX_DATETIME_REP_LENGTH 12 /**************** Misc utility functions ****************************/ @@ -1945,7 +1949,7 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) mysql_stmt_free_result(stmt); /* - These members must be reset for API to + These members must be reset for API to function in case of error or misuse. */ stmt->bind_param_done= stmt->bind_result_done= FALSE; @@ -1984,14 +1988,14 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length) } /* - alloc_root will return valid address even in case param_count + alloc_root will return valid address even in case param_count and field_count are zero. Thus we should never rely on stmt->bind or stmt->params when checking for existence of placeholders or result set. */ if (!(stmt->params= (MYSQL_BIND *) alloc_root(&stmt->mem_root, sizeof(MYSQL_BIND)* - (stmt->param_count + + (stmt->param_count + stmt->field_count)))) { set_stmt_error(stmt, CR_OUT_OF_MEMORY, unknown_sqlstate); @@ -2015,22 +2019,22 @@ static unsigned int alloc_stmt_fields(MYSQL_STMT *stmt) MYSQL_FIELD *fields, *field, *end; MEM_ROOT *alloc= &stmt->mem_root; MYSQL *mysql= stmt->mysql->last_used_con; - + stmt->field_count= mysql->field_count; - + /* - Get the field information for non-select statements + Get the field information for non-select statements like SHOW and DESCRIBE commands */ - if (!(stmt->fields= (MYSQL_FIELD *) alloc_root(alloc, + if (!(stmt->fields= (MYSQL_FIELD *) alloc_root(alloc, sizeof(MYSQL_FIELD) * - stmt->field_count)) || - !(stmt->bind= (MYSQL_BIND *) alloc_root(alloc, + stmt->field_count)) || + !(stmt->bind= (MYSQL_BIND *) alloc_root(alloc, sizeof(MYSQL_BIND) * stmt->field_count))) return 0; - - for (fields= mysql->fields, end= fields+stmt->field_count, + + for (fields= mysql->fields, end= fields+stmt->field_count, field= stmt->fields; field && fields < end; fields++, field++) { @@ -2107,7 +2111,7 @@ mysql_stmt_result_metadata(MYSQL_STMT *stmt) { MYSQL_RES *result; DBUG_ENTER("mysql_stmt_result_metadata"); - + /* stmt->fields is only defined if stmt->field_count is not null; stmt->field_count is initialized in prepare. @@ -2130,41 +2134,65 @@ mysql_stmt_result_metadata(MYSQL_STMT *stmt) DBUG_RETURN(result); } + /* Returns parameter columns meta information in the form of result set. - XXX: not implemented yet. + + SYNOPSYS + mysql_stmt_param_metadata() + stmt statement handle + + DESCRIPTION + This function can be called after you prepared the statement handle + with mysql_stmt_prepare(). + XXX: not implemented yet. + + RETURN + MYSQL_RES on success, 0 if there is no metadata. + Currently this function always returns 0. */ MYSQL_RES * STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt) { DBUG_ENTER("mysql_stmt_param_metadata"); - + if (!stmt->param_count) DBUG_RETURN(0); /* - TODO: Fix this when server sends the information. - Till then keep a dummy prototype + TODO: Fix this when server sends the information. + Till then keep a dummy prototype. */ DBUG_RETURN(0); } +/* Store type of parameter in network buffer. */ + +static void store_param_type(char **pos, MYSQL_BIND *param) +{ + uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0); + int2store(*pos, typecode); + *pos+= 2; +} + + /* Functions to store parameter data in network packet. - All functions have the following characteristics: - SYNOPSIS store_param_xxx() net MySQL NET connection param MySQL bind param - RETURN VALUES - 0 ok - 1 Error (Can't alloc net->buffer) + DESCRIPTION + These funtions are invoked from mysql_stmt_execute by + MYSQL_BIND::store_param_func pointer. This pointer is set once per many + executions in mysql_stmt_bind_param. The caller must ensure that network + buffer have enough capacity to store parameter (MYSQL_BIND::buffer_length + contains needed number of bytes). */ static void store_param_tinyint(NET *net, MYSQL_BIND *param) @@ -2253,7 +2281,7 @@ static void net_store_datetime(NET *net, MYSQL_TIME *tm) length= 4; else length= 0; - buff[0]= (char) length++; + buff[0]= (char) length++; memcpy((char *)net->write_pos, buff, length); net->write_pos+= length; } @@ -2271,7 +2299,7 @@ static void store_param_datetime(NET *net, MYSQL_BIND *param) MYSQL_TIME *tm= (MYSQL_TIME *) param->buffer; net_store_datetime(net, tm); } - + static void store_param_str(NET *net, MYSQL_BIND *param) { /* param->length is always set in mysql_stmt_bind_param */ @@ -2292,7 +2320,8 @@ static void store_param_str(NET *net, MYSQL_BIND *param) DESCRIPTION A data package starts with a string of bits where we set a bit - if a parameter is NULL + if a parameter is NULL. Unlike bit string in result set row, here + we don't have reserved bits for OK/error packet. */ static void store_param_null(NET *net, MYSQL_BIND *param) @@ -2303,8 +2332,9 @@ static void store_param_null(NET *net, MYSQL_BIND *param) /* - Set parameter data by reading from input buffers from the - client application + Store one parameter in network packet: data is read from + client buffer and saved in network packet by means of one + of store_param_xxxx functions. */ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param) @@ -2336,14 +2366,15 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param) /* - Send the prepared query to server for execution + Auxilary function to send COM_EXECUTE packet to server and read reply. + Used from cli_stmt_execute, which is in turn used by mysql_stmt_execute. */ -static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length) +static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) { MYSQL *mysql= stmt->mysql; NET *net= &mysql->net; - char buff[4 /* size of stmt id */ + + char buff[4 /* size of stmt id */ + 5 /* execution flags */]; DBUG_ENTER("execute"); DBUG_PRINT("enter",("packet: %s, length :%d",packet ? packet :" ", length)); @@ -2363,14 +2394,6 @@ static my_bool execute(MYSQL_STMT * stmt, char *packet, ulong length) stmt->insert_id= mysql->insert_id; DBUG_RETURN(0); } - - -static void store_param_type(char **pos, MYSQL_BIND *param) -{ - uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0); - int2store(*pos, typecode); - *pos+= 2; -} int cli_stmt_execute(MYSQL_STMT *stmt) @@ -2413,7 +2436,7 @@ int cli_stmt_execute(MYSQL_STMT *stmt) for (param= stmt->params; param < param_end; param++) { - /* check if mysql_long_data() was used */ + /* check if mysql_stmt_send_long_data() was used */ if (param->long_data_used) param->long_data_used= 0; /* Clear for next execute call */ else if (store_param(stmt, param)) @@ -2472,16 +2495,16 @@ static int stmt_read_row_buffered(MYSQL_STMT *stmt, unsigned char **row) 0 - success; *row contains valid address of a row; row data is stored in network buffer 1 - error; error code is written to - stmt->last_{errno,error}; *row is not changed + stmt->last_{errno,error}; *row is not changed MYSQL_NO_DATA - end of file was read from network; - *row is to NULL + *row is set to NULL */ static int stmt_read_row_unbuffered(MYSQL_STMT *stmt, unsigned char **row) { int rc= 1; MYSQL *mysql= stmt->mysql; - /* + /* This function won't be called if stmt->field_count is zero or execution wasn't done: this is ensured by mysql_stmt_execute. */ @@ -2555,7 +2578,7 @@ stmt_read_row_no_data(MYSQL_STMT *stmt __attribute__((unused)), 0 success !0 wrong attribute type */ - + my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) @@ -2564,14 +2587,14 @@ my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, case STMT_ATTR_UPDATE_MAX_LENGTH: stmt->update_max_length= value ? *(const my_bool*) value : 0; break; - default: + default: return TRUE; } return FALSE; } -my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, +my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, void *value) { @@ -2579,7 +2602,7 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, case STMT_ATTR_UPDATE_MAX_LENGTH: *(unsigned long *) value= stmt->update_max_length; break; - default: + default: return TRUE; } return FALSE; @@ -2587,7 +2610,47 @@ my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt, /* - Execute the prepared query + Send placeholders data to server (if there are placeholders) + and execute prepared statement. + + SYNOPSIS + mysql_stmt_execute() + stmt statement handle. The handle must be created + with mysql_stmt_init() and prepared with + mysql_stmt_prepare(). If there are placeholders + in the statement they must be bound to local + variables with mysql_stmt_bind_param(). + + DESCRIPTION + This function will automatically flush pending result + set (if there is one), send parameters data to the server + and read result of statement execution. + If previous result set was cached with mysql_stmt_store_result() + it will also be freed in the beginning of this call. + The server can return 3 types of responses to this command: + - error, can be retrieved with mysql_stmt_error() + - ok, no result set pending. In this case we just update + stmt->insert_id and stmt->affected_rows. + - the query returns a result set: there could be 0 .. N + rows in it. In this case the server can also send updated + result set metadata. + + Next steps you may want to make: + - find out if there is result set with mysql_stmt_field_count(). + If there is one: + - optionally, cache entire result set on client to unblock + connection with mysql_stmt_store_result() + - bind client variables to result set columns and start read rows + with mysql_stmt_fetch(). + - reset statement with mysql_stmt_reset() or close it with + mysql_stmt_close() + Otherwise: + - find out last insert id and number of affected rows with + mysql_stmt_insert_id(), mysql_stmt_affected_rows() + + RETURN + 0 success + 1 error, message can be retrieved with mysql_stmt_error(). */ int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt) @@ -2681,7 +2744,19 @@ unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt) } /* - Return last inserted id for auto_increment columns + Return last inserted id for auto_increment columns. + + SYNOPSIS + mysql_stmt_insert_id() + stmt statement handle + + DESCRIPTION + Current implementation of this call has a caveat: stmt->insert_id is + unconditionally updated from mysql->insert_id in the end of each + mysql_stmt_execute(). This works OK if mysql->insert_id contains new + value (sent in reply to mysql_stmt_execute()), otherwise stmt->insert_id + value gets undefined, as it's updated from some arbitrary value saved in + connection structure during some other call. */ my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt) @@ -2693,11 +2768,24 @@ my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt) static my_bool int_is_null_true= 1; /* Used for MYSQL_TYPE_NULL */ static my_bool int_is_null_false= 0; + /* - Setup the parameter data buffers from application + Setup the input parameter data buffers from application + + SYNOPSIS + mysql_stmt_bind_param() + stmt statement handle + The statement must be prepared with mysql_stmt_prepare(). + bind Array of mysql_stmt_param_count() bind parameters. + + RETURN + 0 success + 1 error, can be retrieved with mysql_stmt_error. + Note, that this function doesn't check that size of MYSQL_BIND + array is >= mysql_stmt_field_count(), */ -my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) +my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bind) { uint count=0; MYSQL_BIND *param, *end; @@ -2785,9 +2873,8 @@ my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) case MYSQL_TYPE_STRING: param->store_param_func= store_param_str; /* - For variable length types we expect user to set - length or buffer_length. Otherwise mysql_stmt_execute - will just fail. + For variable length types user must set either length or + buffer_length. */ break; default: @@ -2804,7 +2891,7 @@ my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) if (!param->length) param->length= ¶m->buffer_length; } - /* We have to send/resendtype information to MySQL */ + /* We have to send/resend type information to MySQL */ stmt->send_types_to_server= TRUE; stmt->bind_param_done= TRUE; DBUG_RETURN(0); @@ -2825,6 +2912,30 @@ my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND * bind) data Data to send to server length Length of data to send (may be 0) + DESCRIPTION + This call can be used repeatedly to send long data in pieces + for any string/binary placeholder. Data supplied for + a placeholder is saved at server side till execute, and then + used instead of value from MYSQL_BIND object. More precisely, + if long data for a parameter was supplied, MYSQL_BIND object + corresponding to this parameter is not sent to server. In the + end of execution long data states of placeholders are reset, + so next time values of such placeholders will be taken again + from MYSQL_BIND array. + The server does not reply to this call: if there was an error + in data handling (which now only can happen if server run out + of memory) it would be returned in reply to + mysql_stmt_execute(). + You should choose type of long data carefully if you care + about character set conversions performed by server when the + statement is executed. No conversion is performed at all for + MYSQL_TYPE_BLOB and other binary typecodes. For + MYSQL_TYPE_STRING and the rest of text placeholders data is + converted from client character set to character set of + connection. If these character sets are different, this + conversion may require additional memory at server, equal to + total size of supplied pieces. + RETURN VALUES 0 ok 1 error @@ -2839,7 +2950,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, DBUG_ASSERT(stmt != 0); DBUG_PRINT("enter",("param no : %d, data : %lx, length : %ld", param_number, data, length)); - + /* We only need to check for stmt->param_count, if it's not null prepare was done. @@ -2864,7 +2975,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, DBUG_RETURN(1); } - /* + /* Send long data packet if there is data or we're sending long data for the first time. */ @@ -2872,8 +2983,8 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, { MYSQL *mysql= stmt->mysql; /* Packet header: stmt id (4 bytes), param no (2 bytes) */ - char buff[MYSQL_LONG_DATA_HEADER]; - + char buff[MYSQL_LONG_DATA_HEADER]; + int4store(buff, stmt->stmt_id); int2store(buff + 4, param_number); param->long_data_used= 1; @@ -2926,7 +3037,7 @@ static uint read_binary_time(MYSQL_TIME *tm, uchar **pos) { uchar *to; uint length; - + /* net_field_length will set pos to the first byte of data */ if (!(length= net_field_length(pos))) { @@ -2983,14 +3094,14 @@ static uint read_binary_date(MYSQL_TIME *tm, uchar **pos) { uchar *to; uint length; - + if (!(length= net_field_length(pos))) { set_zero_time(tm); return 0; } - - to= *pos; + + to= *pos; tm->year = (uint) sint2korr(to); tm->month= (uint) to[2]; tm->day= (uint) to[3]; @@ -3004,7 +3115,7 @@ static uint read_binary_date(MYSQL_TIME *tm, uchar **pos) /* Convert Numeric to buffer types */ static void send_data_long(MYSQL_BIND *param, MYSQL_FIELD *field, longlong value) -{ +{ char *buffer= param->buffer; uint field_is_unsigned= (field->flags & UNSIGNED_FLAG); @@ -3041,26 +3152,26 @@ static void send_data_long(MYSQL_BIND *param, MYSQL_FIELD *field, { char tmp[22]; /* Enough for longlong */ uint length= (uint)(longlong10_to_str(value,(char *)tmp, - field_is_unsigned ? 10: -10) - - tmp); + field_is_unsigned ? 10: -10) - + tmp); ulong copy_length= min((ulong)length-param->offset, param->buffer_length); if ((long) copy_length < 0) copy_length=0; else memcpy(buffer, (char *)tmp+param->offset, copy_length); - *param->length= length; - + *param->length= length; + if (copy_length != param->buffer_length) *(buffer+copy_length)= '\0'; } - } + } } /* Convert Double to buffer types */ static void send_data_double(MYSQL_BIND *param, double value) -{ +{ char *buffer= param->buffer; switch(param->buffer_type) { @@ -3099,19 +3210,19 @@ static void send_data_double(MYSQL_BIND *param, double value) copy_length=0; else memcpy(buffer, (char *)tmp+param->offset, copy_length); - *param->length= length; - + *param->length= length; + if (copy_length != param->buffer_length) *(buffer+copy_length)= '\0'; } - } + } } /* Convert string to buffer types */ static void send_data_str(MYSQL_BIND *param, char *value, uint length) -{ +{ char *buffer= param->buffer; int err=0; @@ -3136,7 +3247,7 @@ static void send_data_str(MYSQL_BIND *param, char *value, uint length) { int32 data= (int32)my_strntol(&my_charset_latin1,value,length,10,NULL, &err); - int4store(buffer, data); + int4store(buffer, data); break; } case MYSQL_TYPE_LONGLONG: @@ -3179,7 +3290,7 @@ static void send_data_str(MYSQL_BIND *param, char *value, uint length) } -static void send_data_time(MYSQL_BIND *param, MYSQL_TIME ltime, +static void send_data_time(MYSQL_BIND *param, MYSQL_TIME ltime, uint length) { switch (param->buffer_type) { @@ -3192,7 +3303,7 @@ static void send_data_time(MYSQL_BIND *param, MYSQL_TIME ltime, case MYSQL_TYPE_TIMESTAMP: { MYSQL_TIME *tm= (MYSQL_TIME *)param->buffer; - + tm->year= ltime.year; tm->month= ltime.month; tm->day= ltime.day; @@ -3203,33 +3314,33 @@ static void send_data_time(MYSQL_BIND *param, MYSQL_TIME ltime, tm->second_part= ltime.second_part; tm->neg= ltime.neg; - break; + break; } default: { char buff[25]; - + if (!length) ltime.time_type= MYSQL_TIMESTAMP_NONE; switch (ltime.time_type) { case MYSQL_TIMESTAMP_DATE: length= my_sprintf(buff,(buff, "%04d-%02d-%02d", ltime.year, - ltime.month,ltime.day)); + ltime.month,ltime.day)); break; case MYSQL_TIMESTAMP_FULL: length= my_sprintf(buff,(buff, "%04d-%02d-%02d %02d:%02d:%02d", - ltime.year,ltime.month,ltime.day, - ltime.hour,ltime.minute,ltime.second)); + ltime.year,ltime.month,ltime.day, + ltime.hour,ltime.minute,ltime.second)); break; case MYSQL_TIMESTAMP_TIME: length= my_sprintf(buff, (buff, "%02d:%02d:%02d", - ltime.hour,ltime.minute,ltime.second)); + ltime.hour,ltime.minute,ltime.second)); break; default: length= 0; buff[0]='\0'; } - send_data_str(param, (char *)buff, length); + send_data_str(param, (char *)buff, length); } } } @@ -3261,7 +3372,7 @@ static void fetch_results(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) longlong data= ((field_is_unsigned) ? (longlong) (unsigned short) value: (longlong) value); send_data_long(param, field, data); - length= 2; + length= 2; break; } case MYSQL_TYPE_LONG: @@ -3300,7 +3411,7 @@ static void fetch_results(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) case MYSQL_TYPE_DATE: { MYSQL_TIME tm; - + length= read_binary_date(&tm, row); tm.time_type= MYSQL_TIMESTAMP_DATE; send_data_time(param, tm, length); @@ -3309,7 +3420,7 @@ static void fetch_results(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) case MYSQL_TYPE_TIME: { MYSQL_TIME tm; - + length= read_binary_time(&tm, row); tm.time_type= MYSQL_TIMESTAMP_TIME; send_data_time(param, tm, length); @@ -3319,14 +3430,14 @@ static void fetch_results(MYSQL_BIND *param, MYSQL_FIELD *field, uchar **row) case MYSQL_TYPE_TIMESTAMP: { MYSQL_TIME tm; - + length= read_binary_datetime(&tm, row); tm.time_type= MYSQL_TIMESTAMP_FULL; send_data_time(param, tm, length); break; } - default: - length= net_field_length(row); + default: + length= net_field_length(row); send_data_str(param,(char*) *row,length); break; } @@ -3355,7 +3466,7 @@ static void fetch_result_int32(MYSQL_BIND *param, uchar **row) } static void fetch_result_int64(MYSQL_BIND *param, uchar **row) -{ +{ longlong value= (longlong)sint8korr(*row); longlongstore(param->buffer, value); *row+= 8; @@ -3396,11 +3507,11 @@ static void fetch_result_datetime(MYSQL_BIND *param, uchar **row) } static void fetch_result_bin(MYSQL_BIND *param, uchar **row) -{ +{ ulong length= net_field_length(row); ulong copy_length= min(length, param->buffer_length); memcpy(param->buffer, (char *)*row, copy_length); - *param->length= length; + *param->length= length; *row+= length; } @@ -3481,7 +3592,7 @@ my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT *stmt, MYSQL_BIND *bind) We only need to check that stmt->field_count - if it is not null stmt->bind was initialized in mysql_stmt_prepare */ - + memcpy((char*) stmt->bind, (char*) bind, sizeof(MYSQL_BIND) * bind_count); for (param= stmt->bind, end= param + bind_count, field= stmt->fields ; @@ -3643,16 +3754,16 @@ static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row) /* If output parameters were not bound we should just return success */ return 0; } - - null_ptr= row; + + null_ptr= row; row+= (stmt->field_count+9)/8; /* skip null bits */ bit= 4; /* first 2 bits are reserved */ - + /* Copy complete row to application buffers */ for (bind= stmt->bind, end= bind + stmt->field_count, field= stmt->fields ; bind < end ; bind++, field++) - { + { if (*null_ptr & bit) { /* @@ -3666,12 +3777,12 @@ static int stmt_fetch_row(MYSQL_STMT *stmt, uchar *row) *bind->is_null= 1; } else - { + { *bind->is_null= 0; bind->inter_buffer= row; if (field->type == bind->buffer_type) (*bind->fetch_result)(bind, &row); - else + else fetch_results(bind, field, &row); } if (!((bit<<=1) & 255)) @@ -3731,15 +3842,15 @@ int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt) column Column to fetch (first column is 0) ulong offset Offset in result data (to fetch blob in pieces) This is normally 0 - RETURN + RETURN 0 ok 1 error */ -int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, +int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, uint column, ulong offset) { - MYSQL_BIND *param= stmt->bind+column; + MYSQL_BIND *param= stmt->bind+column; DBUG_ENTER("mysql_stmt_fetch_column"); if ((int) stmt->state < (int) MYSQL_STMT_FETCH_DONE) @@ -3755,7 +3866,7 @@ int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, if (param->inter_buffer) { - MYSQL_FIELD *field= stmt->fields+column; + MYSQL_FIELD *field= stmt->fields+column; uchar *row= param->inter_buffer; bind->offset= offset; if (bind->is_null) @@ -3825,6 +3936,49 @@ err: } +/* + Update meta data for statement + + SYNOPSIS + stmt_update_metadata() + stmt Statement handler + row Binary data + + NOTES + Only updates MYSQL_FIELD->max_length for strings +*/ + +static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data) +{ + MYSQL_BIND *bind, *end; + MYSQL_FIELD *field; + uchar *null_ptr, bit; + uchar *row= (uchar*) data->data; +#ifndef DBUG_OFF + uchar *row_end= row + data->length; +#endif + + null_ptr= row; + row+= (stmt->field_count+9)/8; /* skip null bits */ + bit= 4; /* first 2 bits are reserved */ + + /* Go throw all fields and calculate metadata */ + for (bind= stmt->bind, end= bind + stmt->field_count, field= stmt->fields ; + bind < end ; + bind++, field++) + { + if (!(*null_ptr & bit)) + (*bind->skip_result)(bind, field, &row); + DBUG_ASSERT(row <= row_end); + if (!((bit<<=1) & 255)) + { + bit= 1; /* To next byte */ + null_ptr++; + } + } +} + + /* Store or buffer the binary results to stmt */ @@ -3880,6 +4034,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt) free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); result->data= NULL; result->rows= 0; + mysql->status= MYSQL_STATUS_READY; DBUG_RETURN(1); } @@ -3908,7 +4063,7 @@ mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) { MYSQL_ROW_OFFSET offset= stmt->data_cursor; DBUG_ENTER("mysql_stmt_row_seek"); - + stmt->data_cursor= row; DBUG_RETURN(offset); } @@ -3918,11 +4073,11 @@ mysql_stmt_row_seek(MYSQL_STMT *stmt, MYSQL_ROW_OFFSET row) Return the current statement row cursor position */ -MYSQL_ROW_OFFSET STDCALL +MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt) { DBUG_ENTER("mysql_stmt_row_tell"); - + DBUG_RETURN(stmt->data_cursor); } @@ -3937,7 +4092,7 @@ mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) MYSQL_ROWS *tmp= stmt->result.data; DBUG_ENTER("mysql_stmt_data_seek"); DBUG_PRINT("enter",("row id to seek: %ld",(long) row)); - + for (; tmp && row; --row, tmp= tmp->next) ; stmt->data_cursor= tmp; @@ -3952,7 +4107,7 @@ mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong row) my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt) { DBUG_ENTER("mysql_stmt_num_rows"); - + DBUG_RETURN(stmt->result.rows); } @@ -3962,7 +4117,7 @@ my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt) DBUG_ENTER("mysql_stmt_free_result"); DBUG_ASSERT(stmt != 0); - + if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE) { MYSQL *mysql= stmt->mysql; @@ -4030,7 +4185,7 @@ my_bool STDCALL mysql_stmt_close(MYSQL_STMT *stmt) mysql->unbuffered_fetch_owner= 0; if (mysql->status != MYSQL_STATUS_READY) { - /* + /* Flush result set of the connection. If it does not belong to this statement, set a warning. */ @@ -4068,13 +4223,13 @@ my_bool STDCALL mysql_stmt_reset(MYSQL_STMT *stmt) /* If statement hasnt been prepared there is nothing to reset */ if ((int) stmt->state < (int) MYSQL_STMT_PREPARE_DONE) DBUG_RETURN(0); - + mysql= stmt->mysql->last_used_con; int4store(buff, stmt->stmt_id); /* Send stmt id to server */ if ((*mysql->methods->advanced_command)(mysql, COM_RESET_STMT, buff, sizeof(buff), 0, 0, 0)) { - set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno, + set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno, mysql->net.sqlstate); DBUG_RETURN(1); } @@ -4115,50 +4270,6 @@ const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt) } -/* - Update meta data for statement - - SYNOPSIS - stmt_update_metadata() - stmt Statement handler - row Binary data - - NOTES - Only updates MYSQL_FIELD->max_length for strings - -*/ - -static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data) -{ - MYSQL_BIND *bind, *end; - MYSQL_FIELD *field; - uchar *null_ptr, bit; - uchar *row= (uchar*) data->data; -#ifndef DBUG_OFF - uchar *row_end= row + data->length; -#endif - - null_ptr= row; - row+= (stmt->field_count+9)/8; /* skip null bits */ - bit= 4; /* first 2 bits are reserved */ - - /* Go throw all fields and calculate metadata */ - for (bind= stmt->bind, end= bind + stmt->field_count, field= stmt->fields ; - bind < end ; - bind++, field++) - { - if (!(*null_ptr & bit)) - (*bind->skip_result)(bind, field, &row); - DBUG_ASSERT(row <= row_end); - if (!((bit<<=1) & 255)) - { - bit= 1; /* To next byte */ - null_ptr++; - } - } -} - - /******************************************************************** Transactional APIs *********************************************************************/ @@ -4212,10 +4323,10 @@ my_bool STDCALL mysql_more_results(MYSQL *mysql) { my_bool res; DBUG_ENTER("mysql_more_results"); - - res= ((mysql->last_used_con->server_status & SERVER_MORE_RESULTS_EXISTS) ? + + res= ((mysql->last_used_con->server_status & SERVER_MORE_RESULTS_EXISTS) ? 1: 0); - DBUG_PRINT("exit",("More results exists ? %d", res)); + DBUG_PRINT("exit",("More results exists ? %d", res)); DBUG_RETURN(res); } @@ -4226,7 +4337,7 @@ my_bool STDCALL mysql_more_results(MYSQL *mysql) int STDCALL mysql_next_result(MYSQL *mysql) { DBUG_ENTER("mysql_next_result"); - + if (mysql->status != MYSQL_STATUS_READY) { strmov(mysql->net.sqlstate, unknown_sqlstate); diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 2ceeb43a91e..d1a140c754a 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -511,6 +511,7 @@ int check_embedded_connection(MYSQL *mysql) thd->host= (char*)my_localhost; thd->host_or_ip= thd->host; thd->user= my_strdup(mysql->user, MYF(0)); + thd->priv_user= thd->user; return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true); } diff --git a/myisam/ft_boolean_search.c b/myisam/ft_boolean_search.c index 345cd3ceb0c..cac4d08f5d6 100644 --- a/myisam/ft_boolean_search.c +++ b/myisam/ft_boolean_search.c @@ -53,10 +53,10 @@ static double _nwghts[11]= -3.796875000000000}; static double *nwghts=_nwghts+5; /* nwghts[i] = -0.5*1.5**i */ -#define FTB_FLAG_TRUNC 1 /* MUST be 1 */ +#define FTB_FLAG_TRUNC 1 /* */ #define FTB_FLAG_YES 2 /* no two from these three */ #define FTB_FLAG_NO 4 /* YES, NO, WONLY */ -#define FTB_FLAG_WONLY 8 /* should be ever set both */ +#define FTB_FLAG_WONLY 8 /* should be _ever_ set both */ typedef struct st_ftb_expr FTB_EXPR; struct st_ftb_expr @@ -157,6 +157,7 @@ static void _ftb_parse_query(FTB *ftb, byte **start, byte *end, w.len+extra)); ftbw->len=w.len+1; ftbw->flags=0; + ftbw->off=0; if (param.yesno>0) ftbw->flags|=FTB_FLAG_YES; if (param.yesno<0) ftbw->flags|=FTB_FLAG_NO; if (param.trunc) ftbw->flags|=FTB_FLAG_TRUNC; @@ -203,23 +204,26 @@ static int _ftb_no_dupes_cmp(void* not_used __attribute__((unused)), static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) { int r; - uint off; int subkeys=1; my_bool can_go_down; MI_INFO *info=ftb->info; + uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength; + byte *lastkey_buf=ftbw->word+ftbw->off; + + if (ftbw->flags & FTB_FLAG_TRUNC) + lastkey_buf+=ftbw->len; if (init_search) { ftbw->key_root=info->s->state.key_root[ftb->keynr]; ftbw->keyinfo=info->s->keyinfo+ftb->keynr; - ftbw->off=0; r=_mi_search(info, ftbw->keyinfo, (uchar*) ftbw->word, ftbw->len, SEARCH_FIND | SEARCH_BIGGER, ftbw->key_root); } else { - r=_mi_search(info, ftbw->keyinfo, (uchar*) ftbw->word+ftbw->off, + r=_mi_search(info, ftbw->keyinfo, (uchar*) lastkey_buf, USE_WHOLE_KEY, SEARCH_BIGGER, ftbw->key_root); } @@ -230,7 +234,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) if (can_go_down) { /* going down ? */ - off=info->lastkey_length-HA_FT_WLEN-info->s->base.rec_reflength; + off=info->lastkey_length-extra; subkeys=ft_sintXkorr(info->lastkey+off); } if (subkeys<0 || info->lastpos < info->state->data_file_length) @@ -243,11 +247,11 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) if (!r && !ftbw->off) { r= mi_compare_text(ftb->charset, - info->lastkey + (ftbw->flags & FTB_FLAG_TRUNC), - ftbw->len - (ftbw->flags & FTB_FLAG_TRUNC), - (uchar*) ftbw->word + (ftbw->flags & FTB_FLAG_TRUNC), - ftbw->len - (ftbw->flags & FTB_FLAG_TRUNC), - 0,0); + info->lastkey+1, + info->lastkey_length-extra-1, + (uchar*) ftbw->word+1, + ftbw->len-1, + (my_bool) (ftbw->flags & FTB_FLAG_TRUNC),0); } if (r) /* not found */ @@ -269,8 +273,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) } /* going up to the first-level tree to continue search there */ - _mi_dpointer(info, (uchar*) (ftbw->word+ftbw->off+HA_FT_WLEN), - ftbw->key_root); + _mi_dpointer(info, (uchar*) (lastkey_buf+HA_FT_WLEN), ftbw->key_root); ftbw->key_root=info->s->state.key_root[ftb->keynr]; ftbw->keyinfo=info->s->keyinfo+ftb->keynr; ftbw->off=0; @@ -278,7 +281,10 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) } /* matching key found */ - memcpy(ftbw->word+ftbw->off, info->lastkey, info->lastkey_length); + memcpy(lastkey_buf, info->lastkey, info->lastkey_length); + if (lastkey_buf == ftbw->word) + ftbw->len=info->lastkey_length-extra; + /* going down ? */ if (subkeys<0) { @@ -291,7 +297,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) ftbw->keyinfo=& info->s->ft2_keyinfo; r=_mi_search_first(info, ftbw->keyinfo, ftbw->key_root); DBUG_ASSERT(r==0); /* found something */ - memcpy(ftbw->word+off, info->lastkey, info->lastkey_length); + memcpy(lastkey_buf+off, info->lastkey, info->lastkey_length); } ftbw->docid[0]=info->lastpos; return 0; @@ -356,7 +362,7 @@ static void _ftb_init_index_search(FT_INFO *ftb) else reset_tree(& ftb->no_dupes); } - + if (_ft2_search(ftb, ftbw, 1)) return; } diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 6da0fd9552b..96a26fd90f1 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -142,6 +142,8 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag) empty=0; for (i= info->state->del ; i > 0L && next_link != HA_OFFSET_ERROR ; i--) { + if (*killed_ptr(param)) + DBUG_RETURN(1); if (test_flag & T_VERBOSE) printf(" %9s",llstr(next_link,buff)); if (next_link >= info->state->data_file_length) @@ -233,6 +235,8 @@ static int check_k_link(MI_CHECK *param, register MI_INFO *info, uint nr) records= (ha_rows) (info->state->key_file_length / block_size); while (next_link != HA_OFFSET_ERROR && records > 0) { + if (*killed_ptr(param)) + DBUG_RETURN(1); if (param->testflag & T_VERBOSE) printf("%16s",llstr(next_link,llbuff)); if (next_link > info->state->key_file_length || @@ -372,6 +376,8 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ; rec_per_key_part+=keyinfo->keysegs, key++, keyinfo++) { + if (*killed_ptr(param)) + DBUG_RETURN(-1); param->key_crc[key]=0; if (!(((ulonglong) 1 << key) & share->state.key_map)) { @@ -592,6 +598,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, } for ( ;; ) { + if (*killed_ptr(param)) + goto err; memcpy((char*) info->lastkey,(char*) key,key_length); info->lastkey_length=key_length; if (nod_flag) @@ -782,6 +790,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) bzero((char*) key_checksum, info->s->base.keys * sizeof(key_checksum[0])); while (pos < info->state->data_file_length) { + if (*killed_ptr(param)) + goto err2; switch (info->s->data_file_type) { case STATIC_RECORD: if (my_b_read(¶m->read_cache,(byte*) record, diff --git a/myisam/mi_unique.c b/myisam/mi_unique.c index 4d82858c9ad..06d50e6905b 100644 --- a/myisam/mi_unique.c +++ b/myisam/mi_unique.c @@ -69,9 +69,9 @@ my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, byte *record, ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record) { const byte *pos, *end; - ha_checksum crc=0; - HA_KEYSEG *keyseg; + ulong crc= 0; ulong seed= 4; + HA_KEYSEG *keyseg; for (keyseg=def->seg ; keyseg < def->end ; keyseg++) { @@ -118,7 +118,7 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record) (((uchar) *(uchar*) pos++))) + (crc >> (8*sizeof(ha_checksum)-8)); } - return crc; + return (ha_checksum)crc; } /* diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am index 266cc7799b0..6ec8c293a9c 100644 --- a/mysql-test/Makefile.am +++ b/mysql-test/Makefile.am @@ -17,7 +17,9 @@ ## Process this file with automake to create Makefile.in +if HAVE_NDBCLUSTER_DB SUBDIRS = ndb +endif benchdir_root= $(prefix) testdir = $(benchdir_root)/mysql-test @@ -74,6 +76,7 @@ SUFFIXES = .sh -e 's!@''libexecdir''@!$(libexecdir)!g' \ -e 's!@''PERL''@!@PERL@!' \ -e 's!@''VERSION''@!@VERSION@!' \ + -e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \ -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 13ddb8f221e..32ed205f0db 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -16,6 +16,7 @@ USE_MANAGER=0 MY_TZ=GMT-3 TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work LOCAL_SOCKET=@MYSQL_UNIX_ADDR@ +MYSQL_TCP_PORT=@MYSQL_TCP_PORT@; export MYSQL_TCP_PORT # For query_cache test case `uname` in @@ -1438,7 +1439,7 @@ then if [ -z "$USE_RUNNING_NDBCLUSTER" ] then echo "Starting ndbcluster" - ./ndb/ndbcluster --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1 + ./ndb/ndbcluster --small --discless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1 export NDB_CONNECTSTRING=`cat Ndb.cfg` else export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER" diff --git a/mysql-test/ndb/Makefile.am b/mysql-test/ndb/Makefile.am index 44627c85bb5..3ed222344a6 100644 --- a/mysql-test/ndb/Makefile.am +++ b/mysql-test/ndb/Makefile.am @@ -4,9 +4,9 @@ testdir = $(benchdir_root)/mysql-test/ndb test_SCRIPTS = ndbcluster -EXTRA_SCRIPTS = ndbcluster.sh +noinst_HEADERS = ndbcluster.sh -test_DATA = ndb_config_2_node.ini +dist_test_DATA = ndb_config_2_node.ini SUFFIXES = .sh diff --git a/mysql-test/ndb/ndb_config_2_node.ini b/mysql-test/ndb/ndb_config_2_node.ini index 57aa2f527e0..c4ff0aba80a 100644 --- a/mysql-test/ndb/ndb_config_2_node.ini +++ b/mysql-test/ndb/ndb_config_2_node.ini @@ -1,8 +1,9 @@ [DB DEFAULT] -#NoOfFragmentLogfiles: 1 -#TimeBetweenLocalCheckpoints: 31 NoOfReplicas: 2 -MaxNoOfConcurrentOperations: 100000 +MaxNoOfConcurrentOperations: CHOOSE_MaxNoOfConcurrentOperations +DataMemory: CHOOSE_DataMemory +IndexMemory: CHOOSE_IndexMemory +Discless: CHOOSE_Discless [COMPUTER] Id: 1 diff --git a/mysql-test/ndb/ndbcluster.sh b/mysql-test/ndb/ndbcluster.sh old mode 100755 new mode 100644 index 5334604db33..d706f5dcffe --- a/mysql-test/ndb/ndbcluster.sh +++ b/mysql-test/ndb/ndbcluster.sh @@ -41,6 +41,12 @@ pidfile=ndbcluster.pid cfgfile=Ndb.cfg stop_ndb= initial_ndb= +status_ndb= +ndb_discless=0 + +ndb_con_op=100000 +ndb_dmem=80M +ndb_imem=24M while test $# -gt 0; do case "$1" in @@ -51,6 +57,17 @@ while test $# -gt 0; do flags_ndb=$flags_ndb" -i" initial_ndb=1 ;; + --status) + status_ndb=1 + ;; + --small) + ndb_con_op=10000 + ndb_dmem=40M + ndb_imem=12M + ;; + --discless) + ndb_discless=1 + ;; --data-dir=*) fsdir=`echo "$1" | sed -e "s;--data-dir=;;"` ;; @@ -121,6 +138,10 @@ NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID if [ $initial_ndb ] ; then sed \ + -e s,"CHOOSE_MaxNoOfConcurrentOperations",$ndb_con_op,g \ + -e s,"CHOOSE_DataMemory",$ndb_dmem,g \ + -e s,"CHOOSE_IndexMemory",$ndb_imem,g \ + -e s,"CHOOSE_Discless",$ndb_discless,g \ -e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \ -e s,"CHOOSE_FILESYSTEM_NODE_2","$fs_name_2",g \ -e s,"CHOOSE_FILESYSTEM_NODE_3","$fs_name_3",g \ @@ -140,6 +161,7 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile NDB_ID="2" NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID +echo "Starting ndbd connectstring=\""$NDB_CONNECTSTRING\" ( cd $fs_ndb_2 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & ) cat `find $fs_ndb -name 'node*.pid'` > $pidfile @@ -148,17 +170,14 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile NDB_ID="3" NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID +echo "Starting ndbd connectstring=\""$NDB_CONNECTSTRING\" ( cd $fs_ndb_3 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & ) cat `find $fs_ndb -name 'node*.pid'` > $pidfile -# Start management client - -sleep 10 -echo "show" | $exec_mgmtclient $ndb_host $ndb_port - # test if Ndb Cluster starts properly +echo "Waiting for started..." NDB_ID="11" NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else @@ -169,6 +188,14 @@ fi echo $NDB_CONNECTSTRING > $cfgfile cat `find $fs_ndb -name 'node*.pid'` > $pidfile + +status_ndbcluster +} + +status_ndbcluster() { +# Start management client + +echo "show" | $exec_mgmtclient $ndb_host $ndb_port } stop_default_ndbcluster() { @@ -195,12 +222,17 @@ echo "all stop" | $exec_mgmtclient sleep 5 if [ -f $pidfile ] ; then - kill `cat $pidfile` + kill `cat $pidfile` 2> /dev/null rm $pidfile fi } +if [ $status_ndb ] ; then + status_ndbcluster + exit 0 +fi + if [ $stop_ndb ] ; then stop_default_ndbcluster else diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index a7c1dbde697..c2ed40f3f94 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -121,7 +121,7 @@ create database mysqltest; create table mysqltest.t1 (a int,b int,c int); grant all on mysqltest.t1 to mysqltest_1@localhost; alter table t1 rename t2; -ERROR 42000: insert command denied to user: 'mysqltest_1'@'localhost' for table 't2' +ERROR 42000: insert command denied to user 'mysqltest_1'@'localhost' for table 't2' revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; delete from mysql.user where user='mysqltest_1'; drop database mysqltest; @@ -468,5 +468,5 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `b` (`b`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 ALTER TABLE t1 DROP PRIMARY KEY; -ERROR 42000: Can't DROP 'PRIMARY'. Check that column/key exists +ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists DROP TABLE t1; diff --git a/mysql-test/r/auto_increment.result b/mysql-test/r/auto_increment.result index 66b24248cf9..97bf835a9d2 100644 --- a/mysql-test/r/auto_increment.result +++ b/mysql-test/r/auto_increment.result @@ -162,7 +162,7 @@ last_insert_id() 255 insert into t1 set i = null; Warnings: -Warning 1264 Data truncated, out of range for column 'i' at row 1 +Warning 1264 Data truncated; out of range for column 'i' at row 1 select last_insert_id(); last_insert_id() 255 @@ -213,7 +213,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=6; Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4 update t1 set a=300 where b=7; SET SQL_MODE=''; insert into t1(a,b)values(NULL,8); @@ -255,7 +255,7 @@ a b delete from t1 where a=0; update t1 set a=NULL where b=13; Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 9 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 9 update t1 set a=500 where b=14; select * from t1 order by b; a b diff --git a/mysql-test/r/bdb-deadlock.result b/mysql-test/r/bdb-deadlock.result index c5871ff282a..9394c90ff00 100644 --- a/mysql-test/r/bdb-deadlock.result +++ b/mysql-test/r/bdb-deadlock.result @@ -9,7 +9,7 @@ set autocommit=0; update t2 set x = 1 where id = 0; select x from t1 where id = 0; select x from t2 where id = 0; -ERROR 40001: Deadlock found when trying to get lock; Try restarting transaction +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction commit; x 1 diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index b5f7da30bb3..699485ff3f7 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -11,7 +11,7 @@ create table t1 (b char(0) not null); create table if not exists t1 (b char(0) not null); insert into t1 values (""),(null); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2 select * from t1; b @@ -35,7 +35,7 @@ drop table if exists t1; Warnings: Note 1051 Unknown table 't1' create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; -ERROR 42000: Incorrect table definition; There can only be one auto column and it must be defined as a key +ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key create table not_existing_database.test (a int); Got one of the listed errors create table `a/a` (a int); @@ -47,7 +47,7 @@ ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa create table test (a datetime default now()); ERROR 42000: Invalid default value for 'a' create table test (a datetime on update now()); -ERROR HY000: Invalid ON UPDATE clause for 'a' field +ERROR HY000: Invalid ON UPDATE clause for 'a' column create table test (a int default 100 auto_increment); ERROR 42000: Invalid default value for 'a' create table 1ea10 (1a20 int,1e int); @@ -275,11 +275,11 @@ ERROR 42000: Incorrect database name 'db1 ' create table t1(`a ` int); ERROR 42000: Incorrect column name 'a ' create table t1 (a int,); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 create table t1 (a int,,b int); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 create table t1 (,b int); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 create table t1 (a int, key(a)); create table t2 (b int, foreign key(b) references t1(a), key(b)); drop table if exists t1,t2; diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result new file mode 100644 index 00000000000..cb6fbecb6e8 --- /dev/null +++ b/mysql-test/r/ctype_uca.result @@ -0,0 +1,1657 @@ +DROP TABLE IF EXISTS t1; +set names utf8; +create table t1 (c1 char(10) character set utf8 collate utf8_bin); +insert into t1 values ('A'),('a'); +insert into t1 values ('B'),('b'); +insert into t1 values ('C'),('c'); +insert into t1 values ('D'),('d'); +insert into t1 values ('E'),('e'); +insert into t1 values ('F'),('f'); +insert into t1 values ('G'),('g'); +insert into t1 values ('H'),('h'); +insert into t1 values ('I'),('i'); +insert into t1 values ('J'),('j'); +insert into t1 values ('K'),('k'); +insert into t1 values ('L'),('l'); +insert into t1 values ('M'),('m'); +insert into t1 values ('N'),('n'); +insert into t1 values ('O'),('o'); +insert into t1 values ('P'),('p'); +insert into t1 values ('Q'),('q'); +insert into t1 values ('R'),('r'); +insert into t1 values ('S'),('s'); +insert into t1 values ('T'),('t'); +insert into t1 values ('U'),('u'); +insert into t1 values ('V'),('v'); +insert into t1 values ('W'),('w'); +insert into t1 values ('X'),('x'); +insert into t1 values ('Y'),('y'); +insert into t1 values ('Z'),('z'); +insert into t1 values (_ucs2 0x00e0),(_ucs2 0x00c0); +insert into t1 values (_ucs2 0x00e1),(_ucs2 0x00c1); +insert into t1 values (_ucs2 0x00e2),(_ucs2 0x00c2); +insert into t1 values (_ucs2 0x00e3),(_ucs2 0x00c3); +insert into t1 values (_ucs2 0x00e4),(_ucs2 0x00c4); +insert into t1 values (_ucs2 0x00e5),(_ucs2 0x00c5); +insert into t1 values (_ucs2 0x00e6),(_ucs2 0x00c6); +insert into t1 values (_ucs2 0x00e7),(_ucs2 0x00c7); +insert into t1 values (_ucs2 0x00e8),(_ucs2 0x00c8); +insert into t1 values (_ucs2 0x00e9),(_ucs2 0x00c9); +insert into t1 values (_ucs2 0x00ea),(_ucs2 0x00ca); +insert into t1 values (_ucs2 0x00eb),(_ucs2 0x00cb); +insert into t1 values (_ucs2 0x00ec),(_ucs2 0x00cc); +insert into t1 values (_ucs2 0x00ed),(_ucs2 0x00cd); +insert into t1 values (_ucs2 0x00ee),(_ucs2 0x00ce); +insert into t1 values (_ucs2 0x00ef),(_ucs2 0x00cf); +insert into t1 values (_ucs2 0x00f0),(_ucs2 0x00d0); +insert into t1 values (_ucs2 0x00f1),(_ucs2 0x00d1); +insert into t1 values (_ucs2 0x00f2),(_ucs2 0x00d2); +insert into t1 values (_ucs2 0x00f3),(_ucs2 0x00d3); +insert into t1 values (_ucs2 0x00f4),(_ucs2 0x00d4); +insert into t1 values (_ucs2 0x00f5),(_ucs2 0x00d5); +insert into t1 values (_ucs2 0x00f6),(_ucs2 0x00d6); +insert into t1 values (_ucs2 0x00f7),(_ucs2 0x00d7); +insert into t1 values (_ucs2 0x00f8),(_ucs2 0x00d8); +insert into t1 values (_ucs2 0x00f9),(_ucs2 0x00d9); +insert into t1 values (_ucs2 0x00fa),(_ucs2 0x00da); +insert into t1 values (_ucs2 0x00fb),(_ucs2 0x00db); +insert into t1 values (_ucs2 0x00fc),(_ucs2 0x00dc); +insert into t1 values (_ucs2 0x00fd),(_ucs2 0x00dd); +insert into t1 values (_ucs2 0x00fe),(_ucs2 0x00de); +insert into t1 values (_ucs2 0x00ff),(_ucs2 0x00df); +insert into t1 values (_ucs2 0x0100),(_ucs2 0x0101),(_ucs2 0x0102),(_ucs2 0x0103); +insert into t1 values (_ucs2 0x0104),(_ucs2 0x0105),(_ucs2 0x0106),(_ucs2 0x0107); +insert into t1 values (_ucs2 0x0108),(_ucs2 0x0109),(_ucs2 0x010a),(_ucs2 0x010b); +insert into t1 values (_ucs2 0x010c),(_ucs2 0x010d),(_ucs2 0x010e),(_ucs2 0x010f); +insert into t1 values (_ucs2 0x0110),(_ucs2 0x0111),(_ucs2 0x0112),(_ucs2 0x0113); +insert into t1 values (_ucs2 0x0114),(_ucs2 0x0115),(_ucs2 0x0116),(_ucs2 0x0117); +insert into t1 values (_ucs2 0x0118),(_ucs2 0x0119),(_ucs2 0x011a),(_ucs2 0x011b); +insert into t1 values (_ucs2 0x011c),(_ucs2 0x011d),(_ucs2 0x011e),(_ucs2 0x011f); +insert into t1 values (_ucs2 0x0120),(_ucs2 0x0121),(_ucs2 0x0122),(_ucs2 0x0123); +insert into t1 values (_ucs2 0x0124),(_ucs2 0x0125),(_ucs2 0x0126),(_ucs2 0x0127); +insert into t1 values (_ucs2 0x0128),(_ucs2 0x0129),(_ucs2 0x012a),(_ucs2 0x012b); +insert into t1 values (_ucs2 0x012c),(_ucs2 0x012d),(_ucs2 0x012e),(_ucs2 0x012f); +insert into t1 values (_ucs2 0x0130),(_ucs2 0x0131),(_ucs2 0x0132),(_ucs2 0x0133); +insert into t1 values (_ucs2 0x0134),(_ucs2 0x0135),(_ucs2 0x0136),(_ucs2 0x0137); +insert into t1 values (_ucs2 0x0138),(_ucs2 0x0139),(_ucs2 0x013a),(_ucs2 0x013b); +insert into t1 values (_ucs2 0x013c),(_ucs2 0x013d),(_ucs2 0x013e),(_ucs2 0x013f); +insert into t1 values (_ucs2 0x0140),(_ucs2 0x0141),(_ucs2 0x0142),(_ucs2 0x0143); +insert into t1 values (_ucs2 0x0144),(_ucs2 0x0145),(_ucs2 0x0146),(_ucs2 0x0147); +insert into t1 values (_ucs2 0x0148),(_ucs2 0x0149),(_ucs2 0x014a),(_ucs2 0x014b); +insert into t1 values (_ucs2 0x014c),(_ucs2 0x014d),(_ucs2 0x014e),(_ucs2 0x014f); +insert into t1 values (_ucs2 0x0150),(_ucs2 0x0151),(_ucs2 0x0152),(_ucs2 0x0153); +insert into t1 values (_ucs2 0x0154),(_ucs2 0x0155),(_ucs2 0x0156),(_ucs2 0x0157); +insert into t1 values (_ucs2 0x0158),(_ucs2 0x0159),(_ucs2 0x015a),(_ucs2 0x015b); +insert into t1 values (_ucs2 0x015c),(_ucs2 0x015d),(_ucs2 0x015e),(_ucs2 0x015f); +insert into t1 values (_ucs2 0x0160),(_ucs2 0x0161),(_ucs2 0x0162),(_ucs2 0x0163); +insert into t1 values (_ucs2 0x0164),(_ucs2 0x0165),(_ucs2 0x0166),(_ucs2 0x0167); +insert into t1 values (_ucs2 0x0168),(_ucs2 0x0169),(_ucs2 0x016a),(_ucs2 0x016b); +insert into t1 values (_ucs2 0x016c),(_ucs2 0x016d),(_ucs2 0x016e),(_ucs2 0x016f); +insert into t1 values (_ucs2 0x0170),(_ucs2 0x0171),(_ucs2 0x0172),(_ucs2 0x0173); +insert into t1 values (_ucs2 0x0174),(_ucs2 0x0175),(_ucs2 0x0176),(_ucs2 0x0177); +insert into t1 values (_ucs2 0x0178),(_ucs2 0x0179),(_ucs2 0x017a),(_ucs2 0x017b); +insert into t1 values (_ucs2 0x017c),(_ucs2 0x017d),(_ucs2 0x017e),(_ucs2 0x017f); +insert into t1 values (_ucs2 0x0180),(_ucs2 0x0181),(_ucs2 0x0182),(_ucs2 0x0183); +insert into t1 values (_ucs2 0x0184),(_ucs2 0x0185),(_ucs2 0x0186),(_ucs2 0x0187); +insert into t1 values (_ucs2 0x0188),(_ucs2 0x0189),(_ucs2 0x018a),(_ucs2 0x018b); +insert into t1 values (_ucs2 0x018c),(_ucs2 0x018d),(_ucs2 0x018e),(_ucs2 0x018f); +insert into t1 values (_ucs2 0x0190),(_ucs2 0x0191),(_ucs2 0x0192),(_ucs2 0x0193); +insert into t1 values (_ucs2 0x0194),(_ucs2 0x0195),(_ucs2 0x0196),(_ucs2 0x0197); +insert into t1 values (_ucs2 0x0198),(_ucs2 0x0199),(_ucs2 0x019a),(_ucs2 0x019b); +insert into t1 values (_ucs2 0x019c),(_ucs2 0x019d),(_ucs2 0x019e),(_ucs2 0x019f); +insert into t1 values (_ucs2 0x01a0),(_ucs2 0x01a1),(_ucs2 0x01a2),(_ucs2 0x01a3); +insert into t1 values (_ucs2 0x01a4),(_ucs2 0x01a5),(_ucs2 0x01a6),(_ucs2 0x01a7); +insert into t1 values (_ucs2 0x01a8),(_ucs2 0x01a9),(_ucs2 0x01aa),(_ucs2 0x01ab); +insert into t1 values (_ucs2 0x01ac),(_ucs2 0x01ad),(_ucs2 0x01ae),(_ucs2 0x01af); +insert into t1 values (_ucs2 0x01b0),(_ucs2 0x01b1),(_ucs2 0x01b2),(_ucs2 0x01b3); +insert into t1 values (_ucs2 0x01b4),(_ucs2 0x01b5),(_ucs2 0x01b6),(_ucs2 0x01b7); +insert into t1 values (_ucs2 0x01b8),(_ucs2 0x01b9),(_ucs2 0x01ba),(_ucs2 0x01bb); +insert into t1 values (_ucs2 0x01bc),(_ucs2 0x01bd),(_ucs2 0x01be),(_ucs2 0x01bf); +insert into t1 values (_ucs2 0x01c0),(_ucs2 0x01c1),(_ucs2 0x01c2),(_ucs2 0x01c3); +insert into t1 values (_ucs2 0x01c4),(_ucs2 0x01c5),(_ucs2 0x01c6),(_ucs2 0x01c7); +insert into t1 values (_ucs2 0x01c8),(_ucs2 0x01c9),(_ucs2 0x01ca),(_ucs2 0x01cb); +insert into t1 values (_ucs2 0x01cc),(_ucs2 0x01cd),(_ucs2 0x01ce),(_ucs2 0x01cf); +insert into t1 values (_ucs2 0x01d0),(_ucs2 0x01d1),(_ucs2 0x01d2),(_ucs2 0x01d3); +insert into t1 values (_ucs2 0x01d4),(_ucs2 0x01d5),(_ucs2 0x01d6),(_ucs2 0x01d7); +insert into t1 values (_ucs2 0x01d8),(_ucs2 0x01d9),(_ucs2 0x01da),(_ucs2 0x01db); +insert into t1 values (_ucs2 0x01dc),(_ucs2 0x01dd),(_ucs2 0x01de),(_ucs2 0x01df); +insert into t1 values (_ucs2 0x01e0),(_ucs2 0x01e1),(_ucs2 0x01e2),(_ucs2 0x01e3); +insert into t1 values (_ucs2 0x01e4),(_ucs2 0x01e5),(_ucs2 0x01e6),(_ucs2 0x01e7); +insert into t1 values (_ucs2 0x01e8),(_ucs2 0x01e9),(_ucs2 0x01ea),(_ucs2 0x01eb); +insert into t1 values (_ucs2 0x01ec),(_ucs2 0x01ed),(_ucs2 0x01ee),(_ucs2 0x01ef); +insert into t1 values (_ucs2 0x01f0),(_ucs2 0x01f1),(_ucs2 0x01f2),(_ucs2 0x01f3); +insert into t1 values (_ucs2 0x01f4),(_ucs2 0x01f5),(_ucs2 0x01f6),(_ucs2 0x01f7); +insert into t1 values (_ucs2 0x01f8),(_ucs2 0x01f9),(_ucs2 0x01fa),(_ucs2 0x01fb); +insert into t1 values (_ucs2 0x01fc),(_ucs2 0x01fd),(_ucs2 0x01fe),(_ucs2 0x01ff); +insert into t1 values ('AA'),('Aa'),('aa'),('aA'); +insert into t1 values ('CH'),('Ch'),('ch'),('cH'); +insert into t1 values ('DZ'),('Dz'),('dz'),('dZ'); +insert into t1 values ('IJ'),('Ij'),('ij'),('iJ'); +insert into t1 values ('LJ'),('Lj'),('lj'),('lJ'); +insert into t1 values ('LL'),('Ll'),('ll'),('lL'); +insert into t1 values ('NJ'),('Nj'),('nj'),('nJ'); +insert into t1 values ('OE'),('Oe'),('oe'),('oE'); +insert into t1 values ('SS'),('Ss'),('ss'),('sS'); +insert into t1 values ('RR'),('Rr'),('rr'),('rR'); +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_icelandic_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Â,Ã,à,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Ã,á +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ã,ð +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +E,e,È,Ê,Ë,è,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +É,é +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,ÃŽ,Ã,ì,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +Ã,í +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ô,Õ,ò,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ó,ó +Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Û,Ü,ù,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Ú,ú +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,ÿ,Ŷ,Å·,Ÿ +Ã,ý +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Þ,þ +Ä,Æ,ä,æ +Ö,Ø,ö,ø +Ã…,Ã¥ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_latvian_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ǧ,ǧ,Ç´,ǵ +Ä¢,Ä£ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +Y,y +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ǩ,Ç© +Ķ,Ä· +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Ä»,ļ +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Å…,ņ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Ř,Å™ +RR,Rr,rR,rr +Å–,Å— +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_romanian_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Ã,Ä,Ã…,à,á,ã,ä,Ã¥,Ä€,Ä,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Ä‚,ă +Â,â +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,Ã,ì,í,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ÃŽ,î +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åž,ÅŸ +Æ© +ƪ +T,t,Ť,Å¥ +ƾ +Å¢,Å£ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovenian_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +CH,Ch,cH,ch +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_polish_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Ä„,Ä… +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ć,ć +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Äš,Ä› +Ę,Ä™ +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Ń,Å„ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ô,Õ,Ö,ò,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ó,ó +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åš,Å› +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ž,ž +Æ +Ź,ź +Å»,ż +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_estonian_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ã…,à,á,â,ã,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz +Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,ò,ó,ô,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Z,z +Ž,ž +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +Õ,õ +Ä,ä +Ö,ö +Ü,ü +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Ź,ź,Å»,ż +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Ñ,ñ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_swedish_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,à,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ü,Ã,ü,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ã…,Ã¥ +Ä,Æ,ä,æ +Ö,Ø,ö,ø +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_turkish_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ç,ç +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Äž,ÄŸ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +I,ı +IJ,Ij +Æ•,Ƕ +Ħ,ħ +i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +iJ,ij,IJ,ij +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ö,ö +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Åž,ÅŸ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Ü,ü +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_czech_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +cH +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +CH,Ch,ch +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å— +RR,Rr,rR,rr +Ř,Å™ +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_danish_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,à,á,â,ã,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +aA +Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +CH,Ch,cH,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,ò,ó,ô,õ,ÅŒ,Å,ÅŽ,Å,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,ù,ú,û,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ü,Ã,ü,ý,ÿ,Ű,ű,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ä,Æ,ä,æ +Ö,Ø,ö,ø,Å,Å‘ +AA,Aa,aa,Ã…,Ã¥ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,CH,Ch,c,ch,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹ +cH +ÄŒ,Ä +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,Y,i,y,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +LL,Ll,lL,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ñ,ñ,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,r,Å”,Å•,Å–,Å—,Ř,Å™ +RR,Rr,rR,rr +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å¿ +SS,Ss,sS,ss,ß +Å ,Å¡ +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż +Æ +Ž,ž +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci; +group_concat(c1 order by c1) +÷ +× +A,a,À,Ã,Â,Ã,Ä,Ã…,à,á,â,ã,ä,Ã¥,Ä€,Ä,Ä‚,ă,Ä„,Ä…,Ç,ÇŽ,Çž,ÇŸ,Ç ,Ç¡,Ǻ,Ç» +AA,Aa,aA,aa +Æ,æ,Ç¢,Ç£,Ǽ,ǽ +B,b +Æ€ +Æ +Æ‚,ƃ +C,c,Ç,ç,Ć,ć,Ĉ,ĉ,ÄŠ,Ä‹,ÄŒ,Ä +cH +CH,Ch,ch +Ƈ,ƈ +D,d,ÄŽ,Ä +DZ,Dz,dZ,dz,Ç„,Ç…,dž,DZ,Dz,dz +Ä,Ä‘ +Ɖ +ÆŠ +Æ‹,ÆŒ +Ã,ð +E,e,È,É,Ê,Ë,è,é,ê,ë,Ä’,Ä“,Ä”,Ä•,Ä–,Ä—,Ę,Ä™,Äš,Ä› +ÆŽ,Ç +Æ +Æ +F,f +Æ‘,Æ’ +G,g,Äœ,Ä,Äž,ÄŸ,Ä ,Ä¡,Ä¢,Ä£,Ǧ,ǧ,Ç´,ǵ +Ǥ,Ç¥ +Æ“ +Æ” +Æ¢,Æ£ +H,h,Ĥ,Ä¥ +Æ•,Ƕ +Ħ,ħ +I,i,ÃŒ,Ã,ÃŽ,Ã,ì,í,î,ï,Ĩ,Ä©,Ī,Ä«,Ĭ,Ä­,Ä®,į,İ,Ç,Ç +IJ,Ij,iJ,ij,IJ,ij +ı +Æ— +Æ– +J,j,Ä´,ĵ,ǰ +K,k,Ķ,Ä·,Ǩ,Ç© +Ƙ,Æ™ +L,l,Ĺ,ĺ,Ä»,ļ,Ľ,ľ +Ä¿,Å€ +LJ,Lj,lJ,lj,LJ,Lj,lj +lL +LL,Ll,ll +Å,Å‚ +Æš +Æ› +M,m +N,n,Ń,Å„,Å…,ņ,Ň,ň,Ǹ,ǹ +NJ,Nj,nJ,nj,ÇŠ,Ç‹,ÇŒ +Ñ,ñ +Æ +Æž +ÅŠ,Å‹ +O,o,Ã’,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,ÅŒ,Å,ÅŽ,Å,Å,Å‘,Æ ,Æ¡,Ç‘,Ç’,Ǫ,Ç«,Ǭ,Ç­ +OE,Oe,oE,oe,Å’,Å“ +Ø,ø,Ǿ,Ç¿ +Ɔ +ÆŸ +P,p +Ƥ,Æ¥ +Q,q +ĸ +R,RR,Rr,r,rr,Å”,Å•,Å–,Å—,Ř,Å™ +rR +Ʀ +S,s,Åš,Å›,Åœ,Å,Åž,ÅŸ,Å ,Å¡,Å¿ +SS,Ss,sS,ss,ß +Æ© +ƪ +T,t,Å¢,Å£,Ť,Å¥ +ƾ +Ŧ,ŧ +Æ« +Ƭ,Æ­ +Æ® +U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,Å©,Ū,Å«,Ŭ,Å­,Å®,ů,Ű,ű,Ų,ų,Ư,ư,Ç“,Ç”,Ç•,Ç–,Ç—,ǘ,Ç™,Çš,Ç›,Çœ +Æœ +Ʊ +V,v +Ʋ +W,w,Å´,ŵ +X,x +Y,y,Ã,ý,ÿ,Ŷ,Å·,Ÿ +Ƴ,Æ´ +Z,z,Ź,ź,Å»,ż,Ž,ž +Æ +Ƶ,ƶ +Æ·,Ç®,ǯ +Ƹ,ƹ +ƺ +Þ,þ +Æ¿,Ç· +Æ» +Ƨ,ƨ +Ƽ,ƽ +Æ„,Æ… +ʼn +Ç€ +Ç +Ç‚ +ǃ diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index b73953823ca..6637750913a 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -303,14 +303,14 @@ date format str_to_date 2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12 03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12 Warnings: -Note 1292 Truncated wrong string value: '10:20:10AM' +Note 1292 Truncated incorrect string value: '10:20:10AM' select date,format,concat(str_to_date(date, format),'') as con from t1; date format con 10:20:10AM %h:%i:%s 0000-00-00 10:20:10 2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12 03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12 Warnings: -Note 1292 Truncated wrong string value: '10:20:10AM' +Note 1292 Truncated incorrect string value: '10:20:10AM' drop table t1; select get_format(DATE, 'USA') as a; a @@ -374,7 +374,7 @@ str_to_date("02 10", "%d %f") as f6; f1 f2 f3 f4 f5 f6 2003-01-02 10:11:12.001200 2003-01-02 10:11:12 2003-01-02 58:11:12 58:11:12 48:00:00.100000 Warnings: -Note 1292 Truncated wrong datetime value: '2003-01-02 10:11:12.0012' +Note 1292 Truncated incorrect datetime value: '2003-01-02 10:11:12.0012' drop table t1, t2; select str_to_date("2003-01-02 10:11:12.0012ABCD", "%Y-%m-%d %H:%i:%S.%f") as f1, addtime("-01:01:01.01 GGG", "-23:59:59.1") as f2, @@ -382,13 +382,13 @@ microsecond("1997-12-31 23:59:59.01XXXX") as f3; f1 f2 f3 2003-01-02 10:11:12.001200 -25:01:00.110000 10000 Warnings: -Note 1292 Truncated wrong datetime value: '2003-01-02 10:11:12.0012ABCD' -Note 1292 Truncated wrong time value: '-01:01:01.01 GG' -Note 1292 Truncated wrong datetime value: '1997-12-31 23:59:59.01XXXX' +Note 1292 Truncated incorrect datetime value: '2003-01-02 10:11:12.0012ABCD' +Note 1292 Truncated incorrect time value: '-01:01:01.01 GG' +Note 1292 Truncated incorrect datetime value: '1997-12-31 23:59:59.01XXXX' select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1, str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2; f1 f2 2003-04-05 2003-04-05 10:11:12.101010 Warnings: -Note 1292 Truncated wrong date value: '2003-04-05 g' -Note 1292 Truncated wrong datetime value: '2003-04-05 10:11:12.101010234567' +Note 1292 Truncated incorrect date value: '2003-04-05 g' +Note 1292 Truncated incorrect datetime value: '2003-04-05 10:11:12.101010234567' diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result index dd4c32403b5..7e6b9b44566 100644 --- a/mysql-test/r/derived.result +++ b/mysql-test/r/derived.result @@ -27,7 +27,7 @@ a y SELECT a FROM (SELECT 1 FROM (SELECT 1) a HAVING a=1) b; ERROR 42S22: Unknown column 'a' in 'having clause' SELECT a,b as a FROM (SELECT '1' as a,'2' as b) b HAVING a=1; -ERROR 23000: Column: 'a' in having clause is ambiguous +ERROR 23000: Column 'a' in having clause is ambiguous SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=2; a a 1 2 @@ -204,22 +204,22 @@ x 1 create table t1 select 1 as a; select 2 as a from (select * from t1) b; -ERROR 3D000: No Database Selected +ERROR 3D000: No database selected use test; select 2 as a from (select * from t1) b; a 2 drop table t1; select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1 create table t1 (a int); insert into t1 values (1),(2),(3); update (select * from t1) as t1 set a = 5; ERROR HY000: The target table t1 of the UPDATE is not updatable delete from (select * from t1); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1)' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1)' at line 1 insert into (select * from t1) values (5); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1) values (5)' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1) values (5)' at line 1 drop table t1; create table t1 (E1 INTEGER UNSIGNED NOT NULL, E2 INTEGER UNSIGNED NOT NULL, E3 INTEGER UNSIGNED NOT NULL, PRIMARY KEY(E1) ); diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index 3106602e718..c86a379cccd 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -253,11 +253,11 @@ KEY tig (ticket), fulltext index tix (inhalt) ); select * from t2 where MATCH inhalt AGAINST (t2.inhalt); -ERROR HY000: Wrong arguments to AGAINST +ERROR HY000: Incorrect arguments to AGAINST select * from t2 where MATCH ticket AGAINST ('foobar'); ERROR HY000: Can't find FULLTEXT index matching the column list select * from t2,t3 where MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar'); -ERROR HY000: Wrong arguments to MATCH +ERROR HY000: Incorrect arguments to MATCH drop table t1,t2,t3; CREATE TABLE t1 ( id int(11) auto_increment, @@ -363,3 +363,14 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); t collation(t) aus Osnabrück latin1_german2_ci DROP TABLE t1; +CREATE TABLE t1 (s varchar(255), FULLTEXT (s)) DEFAULT CHARSET=utf8; +insert into t1 (s) values ('pära para para'),('para para para'); +select * from t1 where match(s) against('para' in boolean mode); +s +pära para para +para para para +select * from t1 where match(s) against('par*' in boolean mode); +s +pära para para +para para para +DROP TABLE t1; diff --git a/mysql-test/r/func_compress.result b/mysql-test/r/func_compress.result index ef03ec71c69..a3d28471993 100644 --- a/mysql-test/r/func_compress.result +++ b/mysql-test/r/func_compress.result @@ -66,5 +66,5 @@ NULL NULL Warnings: Error 1259 ZLIB: Input data corrupted -Error 1256 Too big size of uncompressed data. The maximum size is 1048576. (probably, length of uncompressed data was corrupted) +Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted) drop table t1; diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 43bcf94d6d9..0c744d1dff6 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -157,11 +157,8 @@ grp group_concat(c) 3 D,D,E 4 5 NULL -Warnings: -Warning 1260 1 line(s) was(were) cut by group_concat() show warnings; Level Code Message -Warning 1260 1 line(s) was(were) cut by group_concat() set group_concat_max_len = 1024; select group_concat(sum(a)) from t1 group by grp; ERROR HY000: Invalid use of group function @@ -310,3 +307,14 @@ GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) 1,2 2,4 DROP TABLE t1, t2; +CREATE TABLE t1 (a char(4)); +INSERT INTO t1 VALUES ('John'), ('Anna'), ('Bill'); +SELECT GROUP_CONCAT(a SEPARATOR '||') AS names FROM t1 +HAVING names LIKE '%An%'; +names +John||Anna||Bill +SELECT GROUP_CONCAT(a SEPARATOR '###') AS names FROM t1 +HAVING LEFT(names, 1) ='J'; +names +John###Anna###Bill +DROP TABLE t1; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index c47530cdc46..0ae4ec8dee1 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -129,7 +129,7 @@ delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or flush privileges; drop table t1; GRANT FILE on mysqltest.* to mysqltest_1@localhost; -ERROR HY000: Wrong usage of DB GRANT and GLOBAL PRIVILEGES +ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES select 1; 1 1 diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index d0765e2721f..6f341e12344 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -10,7 +10,7 @@ current_user mysqltest_1@localhost grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; -ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'my_%' +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'my_%' show grants for mysqltest_1@localhost; Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' diff --git a/mysql-test/r/grant_cache.result b/mysql-test/r/grant_cache.result index 48068c0f68d..b890f2e454e 100644 --- a/mysql-test/r/grant_cache.result +++ b/mysql-test/r/grant_cache.result @@ -134,7 +134,7 @@ a b c a 1 1 1 test.t1 2 2 2 test.t1 select * from t2; -ERROR 42000: select command denied to user: 'mysqltest_2'@'localhost' for table 't2' +ERROR 42000: select command denied to user 'mysqltest_2'@'localhost' for table 't2' show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 @@ -148,17 +148,17 @@ select "user3"; user3 user3 select * from t1; -ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for column 'b' in table 't1' +ERROR 42000: select command denied to user 'mysqltest_3'@'localhost' for column 'b' in table 't1' select a from t1; a 1 2 select c from t1; -ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1' select * from t2; -ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for table 't2' +ERROR 42000: select command denied to user 'mysqltest_3'@'localhost' for table 't2' select mysqltest.t1.c from test.t1,mysqltest.t1; -ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1' +ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1' show status like "Qcache_queries_in_cache"; Variable_name Value Qcache_queries_in_cache 6 @@ -176,7 +176,7 @@ Grants for mysqltest_1@localhost GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' select a from t1; -ERROR 3D000: No Database Selected +ERROR 3D000: No database selected select * from mysqltest.t1,test.t1; a b c a 1 1 1 test.t1 diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index fddad8dba51..f66e9f1759d 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -6,7 +6,7 @@ insert into t1 values (20,"ggg"),(21,"hhh"),(22,"iii"); handler t1 open as t2; handler t2 read a=(SELECT 1); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1 handler t2 read a first; a b 14 aaa @@ -51,7 +51,7 @@ handler t2 read a=(16); a b 16 ccc handler t2 read a=(19,"fff"); -ERROR 42000: Too many key parts specified. Max 1 parts allowed +ERROR 42000: Too many key parts specified; max 1 parts allowed handler t2 read b=(19,"fff"); a b 19 fff @@ -135,7 +135,7 @@ handler t2 read next; a b 19 fff handler t2 read last; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 handler t2 close; handler t1 open as t2; drop table t1; @@ -173,7 +173,7 @@ handler t1 open; handler t1 read a=(W); ERROR 42S22: Unknown column 'W' in 'field list' handler t1 read a=(a); -ERROR HY000: Wrong arguments to HANDLER ... READ +ERROR HY000: Incorrect arguments to HANDLER ... READ drop table t1; create table t1 (a char(5)); insert into t1 values ("Ok"); diff --git a/mysql-test/r/innodb_handler.result b/mysql-test/r/innodb_handler.result index a608e5c71ab..7f4960ffa35 100644 --- a/mysql-test/r/innodb_handler.result +++ b/mysql-test/r/innodb_handler.result @@ -49,7 +49,7 @@ handler t2 read a=(16); a b 16 ccc handler t2 read a=(19,"fff"); -ERROR 42000: Too many key parts specified. Max 1 parts allowed +ERROR 42000: Too many key parts specified; max 1 parts allowed handler t2 read b=(19,"fff"); a b 19 fff @@ -130,7 +130,7 @@ handler t2 read next; a b 18 eee handler t2 read last; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 handler t2 close; handler t1 open as t2; handler t2 read first; diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result index 782a71e83d1..71b10699fa9 100644 --- a/mysql-test/r/insert.result +++ b/mysql-test/r/insert.result @@ -63,7 +63,7 @@ insert into t1 values(NULL); ERROR 23000: Column 'id' cannot be null insert into t1 values (1), (NULL), (2); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'id' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id' at row 2 select * from t1; id 1 @@ -159,18 +159,18 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val Warnings: Warning 1265 Data truncated for column 'f_double' at row 1 Warning 1265 Data truncated for column 'f_float' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float' at row 1 Warning 1265 Data truncated for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 Warning 1265 Data truncated for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 Warning 1265 Data truncated for column 'f_double_u' at row 1 Warning 1265 Data truncated for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 4 original_value 1e+1111111111a @@ -187,19 +187,19 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val Warnings: Warning 1265 Data truncated for column 'f_double' at row 1 Warning 1265 Data truncated for column 'f_float' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float' at row 1 Warning 1265 Data truncated for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 Warning 1265 Data truncated for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 Warning 1265 Data truncated for column 'f_double_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 Warning 1265 Data truncated for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 5 original_value -1e+1111111111a @@ -214,12 +214,12 @@ f_float_3_1_u 0.0 set @value= 1e+1111111111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_float' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 6 original_value 1.7976931348623e+308 @@ -234,13 +234,13 @@ f_float_3_1_u 99.9 set @value= -1e+1111111111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_float' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 7 original_value -1.7976931348623e+308 @@ -255,12 +255,12 @@ f_float_3_1_u 0.0 set @value= 1e+111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_float' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 8 original_value 1e+111 @@ -275,13 +275,13 @@ f_float_3_1_u 99.9 set @value= -1e+111; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_float' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 9 original_value -1e+111 @@ -309,10 +309,10 @@ f_float_3_1_u 1.0 set @value= -1; insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); Warnings: -Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 -Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1 +Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1 select * from t1 where number =last_insert_id(); number 11 original_value -1 diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index 2e90f8b2d81..7c7ac152aa5 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -622,8 +622,8 @@ NULL 2 100 create table t2(No int not null, Field int not null, Count int not null); insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'No' at row 1 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'No' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 2 select * from t2; No Field Count 0 1 100 diff --git a/mysql-test/r/isam.result b/mysql-test/r/isam.result index 2c7b3a4a568..52eb2d73ed5 100644 --- a/mysql-test/r/isam.result +++ b/mysql-test/r/isam.result @@ -34,7 +34,7 @@ ERROR 42000: Column 'a' is used with UNIQUE or INDEX but is not defined as NOT N create table t1 (a int,b text, index(b)) engine=isam; ERROR 42000: BLOB column 'b' can't be used in key specification with the used table type create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=isam; -ERROR 42000: Incorrect table definition; There can only be one auto column and it must be defined as a key +ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key create table t1 (ordid int(8), unique (ordid)) engine=isam; ERROR 42000: Column 'ordid' is used with UNIQUE or INDEX but is not defined as NOT NULL drop table if exists t1; diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result index f9e49c40dc1..db9b051a58f 100644 --- a/mysql-test/r/join.result +++ b/mysql-test/r/join.result @@ -126,7 +126,7 @@ a 1 2 select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); -ERROR HY000: Too many tables. MySQL can only use XX tables in a join +ERROR HY000: Too many tables; MySQL can only use XX tables in a join drop table t1; CREATE TABLE t1 ( a int(11) NOT NULL, diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 9d7c3d98952..d6f2b7a72d8 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -106,11 +106,11 @@ grp a c id a c d a 3 6 D 3 6 C 6 6 NULL NULL NULL NULL NULL NULL NULL explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions +ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); -ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions +ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a); -ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions +ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions select t1.*,t2.* from t1 inner join t2 using (a); grp a c id a c d 1 1 a 1 1 a 1 @@ -406,7 +406,7 @@ insert into t3 values (1); insert into t4 values (1,1); insert into t5 values (1,1); explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23; -ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions +ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions drop table t1,t2,t3,t4,t5; create table t1 (n int, m int, o int, key(n)); create table t2 (n int not null, m int, o int, primary key(n)); diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result index 28824de94ce..9b4621edc42 100644 --- a/mysql-test/r/key.result +++ b/mysql-test/r/key.result @@ -156,8 +156,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, UNIQUE (c,i)); INSERT INTO t1 (c) VALUES (NULL),(NULL); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2 SELECT * FROM t1; c i 1 diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 1580f51975e..fe8708f882d 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -39,9 +39,9 @@ SELECT @@medium.key_buffer_size; 0 SET @@global.key_buffer_size=@save_key_buffer; SELECT @@default.key_buffer_size; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1 SELECT @@skr.storage_engine="test"; -ERROR HY000: Variable 'storage_engine' is not a variable component (Can't be used as XXXX.variable_name) +ERROR HY000: Variable 'storage_engine' is not a variable component (can't be used as XXXX.variable_name) select @@keycache1.key_cache_block_size; @@keycache1.key_cache_block_size 0 diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 5718397e1ec..c0baabcc507 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -44,9 +44,9 @@ create table t1 (a int, b char(10)); load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; Warnings: Warning 1265 Data truncated for column 'a' at row 3 -Warning 1262 Row 3 was truncated; It contained more data than there were input columns +Warning 1262 Row 3 was truncated; it contained more data than there were input columns Warning 1265 Data truncated for column 'a' at row 5 -Warning 1262 Row 5 was truncated; It contained more data than there were input columns +Warning 1262 Row 5 was truncated; it contained more data than there were input columns select * from t1; a b 1 row 1 diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index d8c70625e35..b4b78dc4b5b 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -191,7 +191,7 @@ n d unix_timestamp(t) 1 10 1038401397 2 20 1038401397 UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1 drop table t1,t2; set timestamp=0; set sql_safe_updates=0; diff --git a/mysql-test/r/ndb_replace.result b/mysql-test/r/ndb_replace.result index 7c10101ff2e..45af0f7fcb5 100644 --- a/mysql-test/r/ndb_replace.result +++ b/mysql-test/r/ndb_replace.result @@ -11,7 +11,7 @@ insert into t1 (gesuchnr, benutzer_id) value (3,2); replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1); insert into t1 (gesuchnr,benutzer_id) values (1,1); -ERROR 23000: Can't write, duplicate key in table 't1' +ERROR 23000: Can't write; duplicate key in table 't1' replace into t1 (gesuchnr,benutzer_id) values (1,1); select * from t1 order by gesuchnr; gesuchnr benutzer_id diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result index 7391f4192bf..1d76fbf2fb3 100644 --- a/mysql-test/r/null.result +++ b/mysql-test/r/null.result @@ -97,39 +97,39 @@ Warnings: Warning 1265 Data truncated for column 'd' at row 1 UPDATE t1 SET d=NULL; Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1 INSERT INTO t1 (a) values (null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (1/null); ERROR 23000: Column 'a' cannot be null INSERT INTO t1 (a) values (null),(null); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2 INSERT INTO t1 (b) values (null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (1/null); ERROR 23000: Column 'b' cannot be null INSERT INTO t1 (b) values (null),(null); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 1 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2 INSERT INTO t1 (c) values (null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (1/null); ERROR 23000: Column 'c' cannot be null INSERT INTO t1 (c) values (null),(null); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2 INSERT INTO t1 (d) values (null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (1/null); ERROR 23000: Column 'd' cannot be null INSERT INTO t1 (d) values (null),(null); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 2 select * from t1; a b c d 0 0000-00-00 00:00:00 0 diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index e57ac321f46..4b7400e5e60 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -337,7 +337,7 @@ index (id2) ); insert into t1 values(null,null),(1,1); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'id2' at row 1 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id2' at row 1 select * from t1; id id2 NULL 0 diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 4cf6bee6123..a87d0c33559 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -10,22 +10,22 @@ select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user: 'ssl_user1'@'localhost' to database 'test' +ERROR 42000: Access denied for user 'ssl_user1'@'localhost' to database 'test' select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user: 'ssl_user2'@'localhost' to database 'test' +ERROR 42000: Access denied for user 'ssl_user2'@'localhost' to database 'test' select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user: 'ssl_user3'@'localhost' to database 'test' +ERROR 42000: Access denied for user 'ssl_user3'@'localhost' to database 'test' select * from t1; f1 5 delete from t1; -ERROR 42000: Access denied for user: 'ssl_user4'@'localhost' to database 'test' +ERROR 42000: Access denied for user 'ssl_user4'@'localhost' to database 'test' delete from mysql.user where user='ssl_user%'; delete from mysql.db where user='ssl_user%'; flush privileges; diff --git a/mysql-test/r/packet.result b/mysql-test/r/packet.result index 5729d7af166..29bbcf4466f 100644 --- a/mysql-test/r/packet.result +++ b/mysql-test/r/packet.result @@ -12,7 +12,7 @@ select @@net_buffer_length, @@max_allowed_packet; @@net_buffer_length @@max_allowed_packet 1024 1024 SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len; -ERROR 08S01: Got a packet bigger than 'max_allowed_packet' +ERROR 08S01: Got a packet bigger than 'max_allowed_packet' bytes set global max_allowed_packet=default; set max_allowed_packet=default; set global net_buffer_length=default; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index ccf855a927b..fd3a7d54b4d 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -23,13 +23,13 @@ a b deallocate prepare no_such_statement; ERROR HY000: Unknown prepared statement handler (no_such_statement) given to DEALLOCATE PREPARE execute stmt1; -ERROR HY000: Wrong arguments to EXECUTE +ERROR HY000: Incorrect arguments to EXECUTE prepare stmt2 from 'prepare nested_stmt from "select 1"'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"select 1"' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"select 1"' at line 1 prepare stmt2 from 'execute stmt1'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt1' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt1' at line 1 prepare stmt2 from 'deallocate prepare z'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'z' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'z' at line 1 prepare stmt3 from 'insert into t1 values (?,?)'; set @arg1=5, @arg2='five'; execute stmt3 using @arg1, @arg2; @@ -84,11 +84,11 @@ NULL NULL NULL prepare stmt6 from 'select 1; select2'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1 prepare stmt6 from 'insert into t1 values (5,"five"); select2'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1 explain prepare stmt6 from 'insert into t1 values (5,"five"); select2'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'from 'insert into t1 values (5,"five"); select2'' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from 'insert into t1 values (5,"five"); select2'' at line 1 create table t2 ( a int @@ -99,13 +99,13 @@ prepare stmt1 from 'select 1 FROM t2 where a=?' ; execute stmt1 using @arg00 ; 1 prepare stmt1 from @nosuchvar; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 set @ivar= 1234; prepare stmt1 from @ivar; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1234' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1234' at line 1 set @fvar= 123.4567; prepare stmt1 from @fvar; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '123.4567' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '123.4567' at line 1 set @str1 = 'select ?'; set @str2 = convert(@str1 using ucs2); prepare stmt1 from @str2; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 185961c53ff..a93ea1aa7fe 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -593,7 +593,7 @@ select * from t1; a set GLOBAL query_cache_size=1024; Warnings: -Warning 1282 Query cache failed to set size 1024, new query cache size is 0 +Warning 1282 Query cache failed to set size 1024; new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -601,7 +601,7 @@ select * from t1; a set GLOBAL query_cache_size=10240; Warnings: -Warning 1282 Query cache failed to set size 10240, new query cache size is 0 +Warning 1282 Query cache failed to set size 10240; new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -609,7 +609,7 @@ select * from t1; a set GLOBAL query_cache_size=20480; Warnings: -Warning 1282 Query cache failed to set size 20480, new query cache size is 0 +Warning 1282 Query cache failed to set size 20480; new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 @@ -617,7 +617,7 @@ select * from t1; a set GLOBAL query_cache_size=40960; Warnings: -Warning 1282 Query cache failed to set size 40960, new query cache size is 0 +Warning 1282 Query cache failed to set size 40960; new query cache size is 0 show global variables like "query_cache_size"; Variable_name Value query_cache_size 0 diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index 20755d265aa..62e5522fad9 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -1,11 +1,11 @@ drop table if exists t1, t2, t3, t4; drop table if exists t1, t2, t3, t4; start slave; -ERROR HY000: Could not initialize master info structure, more error messages can be found in the MySQL error log +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log start slave; -ERROR HY000: Could not initialize master info structure, more error messages can be found in the MySQL error log +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; -ERROR HY000: Could not initialize master info structure, more error messages can be found in the MySQL error log +ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log reset slave; change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; reset master; diff --git a/mysql-test/r/rpl_temporary.result b/mysql-test/r/rpl_temporary.result index 6900f29b9cb..b9865d282fa 100644 --- a/mysql-test/r/rpl_temporary.result +++ b/mysql-test/r/rpl_temporary.result @@ -7,12 +7,12 @@ start slave; reset master; SET @save_select_limit=@@session.sql_select_limit; SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; -ERROR HY000: Access denied. You need the SUPER privilege for this operation +ERROR HY000: Access denied; you need the SUPER privilege for this operation SELECT @@session.sql_select_limit = @save_select_limit; @@session.sql_select_limit = @save_select_limit 1 SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; -ERROR HY000: Access denied. You need the SUPER privilege for this operation +ERROR HY000: Access denied; you need the SUPER privilege for this operation SELECT @@session.sql_select_limit = @save_select_limit; @@session.sql_select_limit = @save_select_limit 1 diff --git a/mysql-test/r/rpl_until.result b/mysql-test/r/rpl_until.result index 120c3d7a57f..5772f176919 100644 --- a/mysql-test/r/rpl_until.result +++ b/mysql-test/r/rpl_until.result @@ -57,15 +57,15 @@ show slave status; Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 561 # Master master-bin.000001 561 No # start slave until master_log_file='master-bin', master_log_pos=561; -ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; -ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001'; -ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until relay_log_file='slave-relay-bin.000002'; -ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; -ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL +ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave sql_thread; start slave until master_log_file='master-bin.000001', master_log_pos=561; Warnings: diff --git a/mysql-test/r/select_safe.result b/mysql-test/r/select_safe.result index 6bffdd85aa4..766ee8c0e14 100644 --- a/mysql-test/r/select_safe.result +++ b/mysql-test/r/select_safe.result @@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with delete from t1 where a+0=1; ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5; -ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok +ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay update t1 set b="a" limit 1; update t1 set b="a" where b="b" limit 2; delete from t1 where b="test" limit 1; @@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS; 2 0 insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"); SELECT * from t1 order by a; -ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok +ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SET SQL_BIG_SELECTS=1; SELECT * from t1 order by a; a b @@ -52,7 +52,7 @@ a b 5 a SET MAX_JOIN_SIZE=2; SELECT * from t1; -ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok +ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay SET MAX_JOIN_SIZE=DEFAULT; SELECT * from t1; a b diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 86a90d553da..653a8e7302e 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -378,21 +378,21 @@ show create database test_$1; Database Create Database test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */ drop table t1; -ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1' drop database test_$1; -ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1' select * from test_$1.t1; -ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' show create database test_$1; -ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' drop table test_$1.t1; -ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' drop database test_$1; -ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1' select * from test_$1.t1; -ERROR 42000: Access denied for user: 'mysqltest_3'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1' show create database test_$1; -ERROR 42000: Access denied for user: 'mysqltest_3'@'localhost' to database 'test_$1' +ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1' drop table test_$1.t1; drop database test_$1; delete from mysql.user diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index b8b899f4850..202219d04cf 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -6,7 +6,7 @@ explain extended select (select 2); 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 optimisation +Note 1249 Select 2 was reduced during optimization Note 1003 select 2 AS `(select 2)` SELECT (SELECT 1) UNION SELECT (SELECT 2); (SELECT 1) @@ -18,8 +18,8 @@ id select_type table type possible_keys key key_len ref rows Extra 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used NULL UNION RESULT ALL NULL NULL NULL NULL NULL Warnings: -Note 1249 Select 2 was reduced during optimisation -Note 1249 Select 4 was reduced during optimisation +Note 1249 Select 2 was reduced during optimization +Note 1249 Select 4 was reduced during optimization Note 1003 select 1 AS `(SELECT 1)` union select 2 AS `(SELECT 2)` SELECT (SELECT (SELECT 0 UNION SELECT 0)); (SELECT (SELECT 0 UNION SELECT 0)) @@ -31,7 +31,7 @@ id select_type table type possible_keys key key_len ref rows Extra 4 UNION NULL NULL NULL NULL NULL NULL NULL No tables used NULL UNION RESULT ALL NULL NULL NULL NULL NULL Warnings: -Note 1249 Select 2 was reduced during optimisation +Note 1249 Select 2 was reduced during optimization Note 1003 select (select 0 AS `0` union select 0 AS `0`) AS `(SELECT (SELECT 0 UNION SELECT 0))` SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a; ERROR 42S22: Reference 'a' not supported (forward reference in item list) @@ -73,7 +73,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); 1 1 select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); -ERROR HY000: Wrong usage of PROCEDURE and subquery +ERROR HY000: Incorrect usage of PROCEDURE and subquery SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); ERROR HY000: Incorrect parameters to procedure 'ANALYSE' SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; @@ -333,7 +333,7 @@ Warnings: Note 1276 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1 Note 1003 select test.t6.patient_uq AS `patient_uq`,test.t6.clinic_uq AS `clinic_uq` from test.t6 where exists(select 1 AS `Not_used` from test.t7 where (test.t7.uq = test.t6.clinic_uq)) select * from t1 where a= (select a from t2,t4 where t2.b=t4.b); -ERROR 23000: Column: 'a' in field list is ambiguous +ERROR 23000: Column 'a' in field list is ambiguous drop table t1,t2,t3; CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0'); INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b'); @@ -712,7 +712,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index Warnings: -Note 1249 Select 2 was reduced during optimisation +Note 1249 Select 2 was reduced during optimization Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = 1) SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); id @@ -724,8 +724,8 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index Warnings: -Note 1249 Select 3 was reduced during optimisation -Note 1249 Select 2 was reduced during optimisation +Note 1249 Select 3 was reduced during optimization +Note 1249 Select 2 was reduced during optimization Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = (1 + 1)) EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); id select_type table type possible_keys key key_len ref rows Extra @@ -859,7 +859,7 @@ id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 3 Warnings: Note 1276 Field or reference 'a' of SELECT #2 was resolved in SELECT #1 -Note 1249 Select 2 was reduced during optimisation +Note 1249 Select 2 was reduced during optimization Note 1003 select (test.t1.a + 1) AS `(select a+1)` from test.t1 select (select a+1) from t1; (select a+1) @@ -976,7 +976,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist CREATE TABLE t1 (a int, KEY(a)); HANDLER t1 OPEN; HANDLER t1 READ a=((SELECT 1)); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1))' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1))' at line 1 HANDLER t1 CLOSE; drop table t1; create table t1 (a int); @@ -1714,7 +1714,7 @@ create table t1(id int); create table t2(id int); create table t3(flag int); select (select * from t3 where id not null) from t1, t2; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'null) from t1, t2' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null) from t1, t2' at line 1 drop table t1,t2,t3; CREATE TABLE t1 (id INT); CREATE TABLE t2 (id INT); diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 6792f2f4c2c..580fc9a8d0b 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -27,7 +27,7 @@ t3 CREATE TABLE `t3` ( drop table t1,t2,t3 #; CREATE TABLE t1 (a char(257) default "hello"); -ERROR 42000: Too big column length for column 'a' (max = 255). Use BLOB instead +ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB instead CREATE TABLE t2 (a blob default "hello"); ERROR 42000: BLOB/TEXT column 'a' can't have a default value drop table if exists t1,t2; diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 66eb744e7ce..8e86ce990b1 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -36,11 +36,11 @@ test.t1 check status OK delete from t1; insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030102030460"),("20030102036301"),("20030102240401"),("20030132030401"),("20031302030460"); Warnings: -Warning 1264 Data truncated, out of range for column 't' at row 14 -Warning 1264 Data truncated, out of range for column 't' at row 15 -Warning 1264 Data truncated, out of range for column 't' at row 16 -Warning 1264 Data truncated, out of range for column 't' at row 17 -Warning 1264 Data truncated, out of range for column 't' at row 18 +Warning 1264 Data truncated; out of range for column 't' at row 14 +Warning 1264 Data truncated; out of range for column 't' at row 15 +Warning 1264 Data truncated; out of range for column 't' at row 16 +Warning 1264 Data truncated; out of range for column 't' at row 17 +Warning 1264 Data truncated; out of range for column 't' at row 18 select * from t1; t 2000-01-01 00:00:00 diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result index dc78369f583..e39c4c2b132 100644 --- a/mysql-test/r/type_decimal.result +++ b/mysql-test/r/type_decimal.result @@ -158,14 +158,14 @@ insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 Warning 1265 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: Warning 1265 Data truncated for column 'a' at row 3 @@ -201,29 +201,29 @@ drop table t1; create table t1 (a decimal(10,2) unsigned); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 6 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 6 insert into t1 values ("-.1"),("+.1"),(".1"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 Warning 1265 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: Warning 1265 Data truncated for column 'a' at row 3 @@ -259,29 +259,29 @@ drop table t1; create table t1 (a decimal(10,2) zerofill); insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 6 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 6 insert into t1 values ("-.1"),("+.1"),(".1"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000"); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 Warning 1265 Data truncated for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0"); Warnings: Warning 1265 Data truncated for column 'a' at row 3 @@ -321,13 +321,13 @@ insert into t1 values (00000000000001),(+0000000000001),(-0000000000001); insert into t1 values (+111111111.11),(111111111.11),(-11111111.11); insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values (1e+100),(1e-100),(-1e+100); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 3 insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0); select * from t1; a @@ -361,8 +361,8 @@ drop table t1; create table t1 (a decimal); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 7 select * from t1; a -9999999999 @@ -376,9 +376,9 @@ drop table t1; create table t1 (a decimal unsigned); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 7 select * from t1; a 0 @@ -392,9 +392,9 @@ drop table t1; create table t1 (a decimal zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 7 select * from t1; a 0000000000 @@ -408,9 +408,9 @@ drop table t1; create table t1 (a decimal unsigned zerofill); insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999); Warnings: -Warning 1264 Data truncated, out of range for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 7 +Warning 1264 Data truncated; out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 2 +Warning 1264 Data truncated; out of range for column 'a' at row 7 select * from t1; a 0000000000 @@ -425,7 +425,7 @@ create table t1(a decimal(10,0)); insert into t1 values ("1e4294967295"); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 select * from t1; a 99999999999 @@ -433,17 +433,17 @@ delete from t1; insert into t1 values("1e4294967297"); Warnings: Warning 1265 Data truncated for column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'a' at row 1 select * from t1; a 99999999999 drop table t1; CREATE TABLE t1 (a_dec DECIMAL(-1,0)); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,0))' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,0))' at line 1 CREATE TABLE t1 (a_dec DECIMAL(-2,1)); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-2,1))' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-2,1))' at line 1 CREATE TABLE t1 (a_dec DECIMAL(-1,1)); -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,1))' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1,1))' at line 1 create table t1(a decimal(7,3)); insert into t1 values ('1'),('+1'),('-1'),('0000000001'),('+0000000001'),('-0000000001'),('10'),('+10'),('-10'),('0000000010'),('+0000000010'),('-0000000010'),('100'),('+100'),('-100'),('0000000100'),('+0000000100'),('-0000000100'),('1000'),('+1000'),('-1000'),('0000001000'),('+0000001000'),('-0000001000'),('10000'),('+10000'),('-10000'),('0000010000'),('+0000010000'),('-0000010000'),('100000'),('+100000'),('-100000'),('0000100000'),('+0000100000'),('-0000100000'),('1000000'),('+1000000'),('-1000000'),('0001000000'),('+0001000000'),('-0001000000'),('10000000'),('+10000000'),('-10000000'),('0010000000'),('+0010000000'),('-0010000000'),('100000000'),('+100000000'),('-100000000'),('0100000000'),('+0100000000'),('-0100000000'),('1000000000'),('+1000000000'),('-1000000000'),('1000000000'),('+1000000000'),('-1000000000'); select * from t1; diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index f044ced2342..30de1e62df7 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -15,8 +15,8 @@ f1 float NULL YES NULL select,insert,update,references f2 double NULL YES NULL select,insert,update,references insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150); Warnings: -Warning 1264 Data truncated, out of range for column 'f1' at row 7 -Warning 1264 Data truncated, out of range for column 'f1' at row 8 +Warning 1264 Data truncated; out of range for column 'f1' at row 7 +Warning 1264 Data truncated; out of range for column 'f1' at row 8 insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150); select * from t1; f1 f2 diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result index 8d80f342c1c..e803fde14a6 100644 --- a/mysql-test/r/type_ranges.result +++ b/mysql-test/r/type_ranges.result @@ -89,33 +89,33 @@ insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,N insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); Warnings: -Warning 1264 Data truncated, out of range for column 'utiny' at row 1 -Warning 1264 Data truncated, out of range for column 'ushort' at row 1 -Warning 1264 Data truncated, out of range for column 'umedium' at row 1 -Warning 1264 Data truncated, out of range for column 'ulong' at row 1 +Warning 1264 Data truncated; out of range for column 'utiny' at row 1 +Warning 1264 Data truncated; out of range for column 'ushort' at row 1 +Warning 1264 Data truncated; out of range for column 'umedium' at row 1 +Warning 1264 Data truncated; out of range for column 'ulong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'flags' at row 1 insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); Warnings: Warning 1265 Data truncated for column 'string' at row 1 -Warning 1264 Data truncated, out of range for column 'tiny' at row 1 -Warning 1264 Data truncated, out of range for column 'short' at row 1 -Warning 1264 Data truncated, out of range for column 'medium' at row 1 -Warning 1264 Data truncated, out of range for column 'long_int' at row 1 -Warning 1264 Data truncated, out of range for column 'utiny' at row 1 -Warning 1264 Data truncated, out of range for column 'ushort' at row 1 -Warning 1264 Data truncated, out of range for column 'umedium' at row 1 -Warning 1264 Data truncated, out of range for column 'ulong' at row 1 +Warning 1264 Data truncated; out of range for column 'tiny' at row 1 +Warning 1264 Data truncated; out of range for column 'short' at row 1 +Warning 1264 Data truncated; out of range for column 'medium' at row 1 +Warning 1264 Data truncated; out of range for column 'long_int' at row 1 +Warning 1264 Data truncated; out of range for column 'utiny' at row 1 +Warning 1264 Data truncated; out of range for column 'ushort' at row 1 +Warning 1264 Data truncated; out of range for column 'umedium' at row 1 +Warning 1264 Data truncated; out of range for column 'ulong' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); Warnings: -Warning 1264 Data truncated, out of range for column 'tiny' at row 1 -Warning 1264 Data truncated, out of range for column 'short' at row 1 -Warning 1264 Data truncated, out of range for column 'medium' at row 1 -Warning 1264 Data truncated, out of range for column 'long_int' at row 1 -Warning 1264 Data truncated, out of range for column 'utiny' at row 1 -Warning 1264 Data truncated, out of range for column 'ushort' at row 1 -Warning 1264 Data truncated, out of range for column 'umedium' at row 1 +Warning 1264 Data truncated; out of range for column 'tiny' at row 1 +Warning 1264 Data truncated; out of range for column 'short' at row 1 +Warning 1264 Data truncated; out of range for column 'medium' at row 1 +Warning 1264 Data truncated; out of range for column 'long_int' at row 1 +Warning 1264 Data truncated; out of range for column 'utiny' at row 1 +Warning 1264 Data truncated; out of range for column 'ushort' at row 1 +Warning 1264 Data truncated; out of range for column 'umedium' at row 1 Warning 1265 Data truncated for column 'options' at row 1 insert into t1 (tiny) values (1); select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result index 68b56802120..c4e1b33bb99 100644 --- a/mysql-test/r/type_time.result +++ b/mysql-test/r/type_time.result @@ -25,11 +25,11 @@ t 36:30:31 insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); Warnings: -Note 1292 Truncated wrong time value: '10.22.22' -Warning 1264 Data truncated, out of range for column 't' at row 2 -Warning 1264 Data truncated, out of range for column 't' at row 3 -Warning 1264 Data truncated, out of range for column 't' at row 4 -Note 1292 Truncated wrong time value: '12.45a' +Note 1292 Truncated incorrect time value: '10.22.22' +Warning 1264 Data truncated; out of range for column 't' at row 2 +Warning 1264 Data truncated; out of range for column 't' at row 3 +Warning 1264 Data truncated; out of range for column 't' at row 4 +Note 1292 Truncated incorrect time value: '12.45a' select * from t1; t 10:22:33 diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 976b3e72385..9a6eac683e0 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -129,15 +129,15 @@ t2 t4 t6 t8 t10 t12 t14 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 drop table t1; create table t1 (t1 timestamp, t2 timestamp default now()); -ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause create table t1 (t1 timestamp, t2 timestamp on update now()); -ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause create table t1 (t1 timestamp, t2 timestamp default now() on update now()); -ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause create table t1 (t1 timestamp default now(), t2 timestamp on update now()); -ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause create table t1 (t1 timestamp on update now(), t2 timestamp default now() on update now()); -ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause +ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause create table t1 (t1 timestamp default '2003-01-01 00:00:00', t2 datetime, t3 timestamp); SET TIMESTAMP=1000000000; insert into t1 values (); diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result index f312e9b7f64..07eb47faa7c 100644 --- a/mysql-test/r/type_uint.result +++ b/mysql-test/r/type_uint.result @@ -4,7 +4,7 @@ create table t1 (this int unsigned); insert into t1 values (1); insert into t1 values (-1); Warnings: -Warning 1264 Data truncated, out of range for column 'this' at row 1 +Warning 1264 Data truncated; out of range for column 'this' at row 1 select * from t1; this 1 diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 0735ea4dc40..da4915294b1 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -81,7 +81,7 @@ a b 2 b 1 a (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b; -ERROR 42000: Table 't1' from one of SELECT's can not be used in global ORDER clause +ERROR 42000: Table 't1' from one of the SELECTs cannot be used in global ORDER clause explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 @@ -117,11 +117,11 @@ ERROR 21000: The used SELECT statements have a different number of columns explain select a,b from t1 union select 1 limit 0; ERROR 21000: The used SELECT statements have a different number of columns select a,b from t1 into outfile 'skr' union select a,b from t2; -ERROR HY000: Wrong usage of UNION and INTO +ERROR HY000: Incorrect usage of UNION and INTO select a,b from t1 order by a union select a,b from t2; -ERROR HY000: Wrong usage of UNION and ORDER BY +ERROR HY000: Incorrect usage of UNION and ORDER BY insert into t3 select a from t1 order by a union select a from t2; -ERROR HY000: Wrong usage of UNION and ORDER BY +ERROR HY000: Incorrect usage of UNION and ORDER BY create table t3 select a,b from t1 union select a from t2; ERROR 21000: The used SELECT statements have a different number of columns select a,b from t1 union select a from t2; @@ -131,7 +131,7 @@ ERROR 21000: The used SELECT statements have a different number of columns select a from t1 union select * from t2; ERROR 21000: The used SELECT statements have a different number of columns select * from t1 union select SQL_BUFFER_RESULT * from t2; -ERROR 42000: Wrong usage/placement of 'SQL_BUFFER_RESULT' +ERROR 42000: Incorrect usage/placement of 'SQL_BUFFER_RESULT' create table t3 select a,b from t1 union all select a,b from t2; insert into t3 select a,b from t1 union all select a,b from t2; replace into t3 select a,b as c from t1 union all select a,b from t2; @@ -341,7 +341,7 @@ select found_rows(); found_rows() 4 (SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2; a 1 @@ -424,7 +424,7 @@ a 3 3 (SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1; -ERROR 42000: Wrong usage/placement of 'SQL_CALC_FOUND_ROWS' +ERROR 42000: Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS' create temporary table t1 select a from t1 union select a from t2; drop temporary table t1; create table t1 select a from t1 union select a from t2; diff --git a/mysql-test/r/varbinary.result b/mysql-test/r/varbinary.result index 26ce91286da..ab5779859ae 100644 --- a/mysql-test/r/varbinary.result +++ b/mysql-test/r/varbinary.result @@ -18,7 +18,7 @@ Warnings: Note 1003 select test.t1.ID AS `ID`,test.t1.UNIQ AS `UNIQ` from test.t1 where (test.t1.UNIQ = 4084688022709641610) drop table t1; select x'hello'; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'x'hello'' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'x'hello'' at line 1 select 0xfg; ERROR 42S22: Unknown column '0xfg' in 'field list' create table t1 select 1 as x, 2 as xx; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index cd86c69d8f0..41ea95cf933 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -217,7 +217,7 @@ ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF' set unknown_variable=1; ERROR HY000: Unknown system variable 'unknown_variable' set max_join_size="hello"; -ERROR 42000: Wrong argument type to variable 'max_join_size' +ERROR 42000: Incorrect argument type to variable 'max_join_size' set storage_engine=UNKNOWN_TABLE_TYPE; ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE' set storage_engine=INNODB, big_tables=2; @@ -427,12 +427,12 @@ select @a, @b; @a @b 2 1 set @@global.global.key_buffer_size= 1; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1 set GLOBAL global.key_buffer_size= 1; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1 SELECT @@global.global.key_buffer_size; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 SELECT @@global.session.key_buffer_size; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 SELECT @@global.local.key_buffer_size; -ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 19d44ab6fea..d883feb7ce2 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -43,13 +43,13 @@ drop table t1; create table t1(a tinyint, b int not null, c date, d char(5)); load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2 Warning 1265 Data truncated for column 'd' at row 3 Warning 1265 Data truncated for column 'c' at row 4 Warning 1261 Row 5 doesn't contain data for all columns Warning 1265 Data truncated for column 'b' at row 6 -Warning 1262 Row 7 was truncated; It contained more data than there were input columns -Warning 1264 Data truncated, out of range for column 'a' at row 8 +Warning 1262 Row 7 was truncated; it contained more data than there were input columns +Warning 1264 Data truncated; out of range for column 'a' at row 8 select @@warning_count; @@warning_count 7 @@ -57,11 +57,11 @@ drop table t1; create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 -Warning 1264 Data truncated, out of range for column 'b' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1 +Warning 1264 Data truncated; out of range for column 'b' at row 2 Warning 1265 Data truncated for column 'c' at row 2 -Warning 1264 Data truncated, out of range for column 'a' at row 3 -Warning 1264 Data truncated, out of range for column 'b' at row 3 +Warning 1264 Data truncated; out of range for column 'a' at row 3 +Warning 1264 Data truncated; out of range for column 'b' at row 3 Warning 1265 Data truncated for column 'c' at row 3 alter table t1 modify c char(4); Warnings: @@ -70,7 +70,7 @@ Warning 1265 Data truncated for column 'c' at row 2 alter table t1 add d char(2); update t1 set a=NULL where a=10; Warnings: -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2 update t1 set c='mysql ab' where c='test'; Warnings: Warning 1265 Data truncated for column 'c' at row 4 @@ -86,7 +86,7 @@ Warnings: Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 3 -Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 +Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4 Warning 1265 Data truncated for column 'b' at row 4 insert into t2(b) values('mysqlab'); Warnings: @@ -125,11 +125,11 @@ Warning 1266 Using storage engine MyISAM for table 't1' drop table t1; create table t1 (id int) type=heap; Warnings: -Warning 1287 'TYPE=storage_engine' is deprecated, use 'ENGINE=storage_engine' instead +Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead alter table t1 type=myisam; Warnings: -Warning 1287 'TYPE=storage_engine' is deprecated, use 'ENGINE=storage_engine' instead +Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead drop table t1; set table_type=MYISAM; Warnings: -Warning 1287 'table_type' is deprecated, use 'storage_engine' instead +Warning 1287 'table_type' is deprecated; use 'storage_engine' instead diff --git a/mysql-test/t/ctype_uca.test b/mysql-test/t/ctype_uca.test new file mode 100644 index 00000000000..6ff1407247f --- /dev/null +++ b/mysql-test/t/ctype_uca.test @@ -0,0 +1,181 @@ +-- source include/have_ucs2.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +# +# Test Unicode collations. +# + +set names utf8; +create table t1 (c1 char(10) character set utf8 collate utf8_bin); + +# +# Basic Latin +# +insert into t1 values ('A'),('a'); +insert into t1 values ('B'),('b'); +insert into t1 values ('C'),('c'); +insert into t1 values ('D'),('d'); +insert into t1 values ('E'),('e'); +insert into t1 values ('F'),('f'); +insert into t1 values ('G'),('g'); +insert into t1 values ('H'),('h'); +insert into t1 values ('I'),('i'); +insert into t1 values ('J'),('j'); +insert into t1 values ('K'),('k'); +insert into t1 values ('L'),('l'); +insert into t1 values ('M'),('m'); +insert into t1 values ('N'),('n'); +insert into t1 values ('O'),('o'); +insert into t1 values ('P'),('p'); +insert into t1 values ('Q'),('q'); +insert into t1 values ('R'),('r'); +insert into t1 values ('S'),('s'); +insert into t1 values ('T'),('t'); +insert into t1 values ('U'),('u'); +insert into t1 values ('V'),('v'); +insert into t1 values ('W'),('w'); +insert into t1 values ('X'),('x'); +insert into t1 values ('Y'),('y'); +insert into t1 values ('Z'),('z'); + +# +# Latin1 suppliment +# +insert into t1 values (_ucs2 0x00e0),(_ucs2 0x00c0); +insert into t1 values (_ucs2 0x00e1),(_ucs2 0x00c1); +insert into t1 values (_ucs2 0x00e2),(_ucs2 0x00c2); +insert into t1 values (_ucs2 0x00e3),(_ucs2 0x00c3); +insert into t1 values (_ucs2 0x00e4),(_ucs2 0x00c4); +insert into t1 values (_ucs2 0x00e5),(_ucs2 0x00c5); +insert into t1 values (_ucs2 0x00e6),(_ucs2 0x00c6); +insert into t1 values (_ucs2 0x00e7),(_ucs2 0x00c7); +insert into t1 values (_ucs2 0x00e8),(_ucs2 0x00c8); +insert into t1 values (_ucs2 0x00e9),(_ucs2 0x00c9); +insert into t1 values (_ucs2 0x00ea),(_ucs2 0x00ca); +insert into t1 values (_ucs2 0x00eb),(_ucs2 0x00cb); +insert into t1 values (_ucs2 0x00ec),(_ucs2 0x00cc); +insert into t1 values (_ucs2 0x00ed),(_ucs2 0x00cd); +insert into t1 values (_ucs2 0x00ee),(_ucs2 0x00ce); +insert into t1 values (_ucs2 0x00ef),(_ucs2 0x00cf); + +insert into t1 values (_ucs2 0x00f0),(_ucs2 0x00d0); +insert into t1 values (_ucs2 0x00f1),(_ucs2 0x00d1); +insert into t1 values (_ucs2 0x00f2),(_ucs2 0x00d2); +insert into t1 values (_ucs2 0x00f3),(_ucs2 0x00d3); +insert into t1 values (_ucs2 0x00f4),(_ucs2 0x00d4); +insert into t1 values (_ucs2 0x00f5),(_ucs2 0x00d5); +insert into t1 values (_ucs2 0x00f6),(_ucs2 0x00d6); +insert into t1 values (_ucs2 0x00f7),(_ucs2 0x00d7); +insert into t1 values (_ucs2 0x00f8),(_ucs2 0x00d8); +insert into t1 values (_ucs2 0x00f9),(_ucs2 0x00d9); +insert into t1 values (_ucs2 0x00fa),(_ucs2 0x00da); +insert into t1 values (_ucs2 0x00fb),(_ucs2 0x00db); +insert into t1 values (_ucs2 0x00fc),(_ucs2 0x00dc); +insert into t1 values (_ucs2 0x00fd),(_ucs2 0x00dd); +insert into t1 values (_ucs2 0x00fe),(_ucs2 0x00de); +insert into t1 values (_ucs2 0x00ff),(_ucs2 0x00df); + +# +# Latin extended-A, 0100-017F +# +insert into t1 values (_ucs2 0x0100),(_ucs2 0x0101),(_ucs2 0x0102),(_ucs2 0x0103); +insert into t1 values (_ucs2 0x0104),(_ucs2 0x0105),(_ucs2 0x0106),(_ucs2 0x0107); +insert into t1 values (_ucs2 0x0108),(_ucs2 0x0109),(_ucs2 0x010a),(_ucs2 0x010b); +insert into t1 values (_ucs2 0x010c),(_ucs2 0x010d),(_ucs2 0x010e),(_ucs2 0x010f); +insert into t1 values (_ucs2 0x0110),(_ucs2 0x0111),(_ucs2 0x0112),(_ucs2 0x0113); +insert into t1 values (_ucs2 0x0114),(_ucs2 0x0115),(_ucs2 0x0116),(_ucs2 0x0117); +insert into t1 values (_ucs2 0x0118),(_ucs2 0x0119),(_ucs2 0x011a),(_ucs2 0x011b); +insert into t1 values (_ucs2 0x011c),(_ucs2 0x011d),(_ucs2 0x011e),(_ucs2 0x011f); +insert into t1 values (_ucs2 0x0120),(_ucs2 0x0121),(_ucs2 0x0122),(_ucs2 0x0123); +insert into t1 values (_ucs2 0x0124),(_ucs2 0x0125),(_ucs2 0x0126),(_ucs2 0x0127); +insert into t1 values (_ucs2 0x0128),(_ucs2 0x0129),(_ucs2 0x012a),(_ucs2 0x012b); +insert into t1 values (_ucs2 0x012c),(_ucs2 0x012d),(_ucs2 0x012e),(_ucs2 0x012f); +insert into t1 values (_ucs2 0x0130),(_ucs2 0x0131),(_ucs2 0x0132),(_ucs2 0x0133); +insert into t1 values (_ucs2 0x0134),(_ucs2 0x0135),(_ucs2 0x0136),(_ucs2 0x0137); +insert into t1 values (_ucs2 0x0138),(_ucs2 0x0139),(_ucs2 0x013a),(_ucs2 0x013b); +insert into t1 values (_ucs2 0x013c),(_ucs2 0x013d),(_ucs2 0x013e),(_ucs2 0x013f); +insert into t1 values (_ucs2 0x0140),(_ucs2 0x0141),(_ucs2 0x0142),(_ucs2 0x0143); +insert into t1 values (_ucs2 0x0144),(_ucs2 0x0145),(_ucs2 0x0146),(_ucs2 0x0147); +insert into t1 values (_ucs2 0x0148),(_ucs2 0x0149),(_ucs2 0x014a),(_ucs2 0x014b); +insert into t1 values (_ucs2 0x014c),(_ucs2 0x014d),(_ucs2 0x014e),(_ucs2 0x014f); +insert into t1 values (_ucs2 0x0150),(_ucs2 0x0151),(_ucs2 0x0152),(_ucs2 0x0153); +insert into t1 values (_ucs2 0x0154),(_ucs2 0x0155),(_ucs2 0x0156),(_ucs2 0x0157); +insert into t1 values (_ucs2 0x0158),(_ucs2 0x0159),(_ucs2 0x015a),(_ucs2 0x015b); +insert into t1 values (_ucs2 0x015c),(_ucs2 0x015d),(_ucs2 0x015e),(_ucs2 0x015f); +insert into t1 values (_ucs2 0x0160),(_ucs2 0x0161),(_ucs2 0x0162),(_ucs2 0x0163); +insert into t1 values (_ucs2 0x0164),(_ucs2 0x0165),(_ucs2 0x0166),(_ucs2 0x0167); +insert into t1 values (_ucs2 0x0168),(_ucs2 0x0169),(_ucs2 0x016a),(_ucs2 0x016b); +insert into t1 values (_ucs2 0x016c),(_ucs2 0x016d),(_ucs2 0x016e),(_ucs2 0x016f); +insert into t1 values (_ucs2 0x0170),(_ucs2 0x0171),(_ucs2 0x0172),(_ucs2 0x0173); +insert into t1 values (_ucs2 0x0174),(_ucs2 0x0175),(_ucs2 0x0176),(_ucs2 0x0177); +insert into t1 values (_ucs2 0x0178),(_ucs2 0x0179),(_ucs2 0x017a),(_ucs2 0x017b); +insert into t1 values (_ucs2 0x017c),(_ucs2 0x017d),(_ucs2 0x017e),(_ucs2 0x017f); + +# +# Latin extended-B, 0180-024F +# +insert into t1 values (_ucs2 0x0180),(_ucs2 0x0181),(_ucs2 0x0182),(_ucs2 0x0183); +insert into t1 values (_ucs2 0x0184),(_ucs2 0x0185),(_ucs2 0x0186),(_ucs2 0x0187); +insert into t1 values (_ucs2 0x0188),(_ucs2 0x0189),(_ucs2 0x018a),(_ucs2 0x018b); +insert into t1 values (_ucs2 0x018c),(_ucs2 0x018d),(_ucs2 0x018e),(_ucs2 0x018f); +insert into t1 values (_ucs2 0x0190),(_ucs2 0x0191),(_ucs2 0x0192),(_ucs2 0x0193); +insert into t1 values (_ucs2 0x0194),(_ucs2 0x0195),(_ucs2 0x0196),(_ucs2 0x0197); +insert into t1 values (_ucs2 0x0198),(_ucs2 0x0199),(_ucs2 0x019a),(_ucs2 0x019b); +insert into t1 values (_ucs2 0x019c),(_ucs2 0x019d),(_ucs2 0x019e),(_ucs2 0x019f); +insert into t1 values (_ucs2 0x01a0),(_ucs2 0x01a1),(_ucs2 0x01a2),(_ucs2 0x01a3); +insert into t1 values (_ucs2 0x01a4),(_ucs2 0x01a5),(_ucs2 0x01a6),(_ucs2 0x01a7); +insert into t1 values (_ucs2 0x01a8),(_ucs2 0x01a9),(_ucs2 0x01aa),(_ucs2 0x01ab); +insert into t1 values (_ucs2 0x01ac),(_ucs2 0x01ad),(_ucs2 0x01ae),(_ucs2 0x01af); +insert into t1 values (_ucs2 0x01b0),(_ucs2 0x01b1),(_ucs2 0x01b2),(_ucs2 0x01b3); +insert into t1 values (_ucs2 0x01b4),(_ucs2 0x01b5),(_ucs2 0x01b6),(_ucs2 0x01b7); +insert into t1 values (_ucs2 0x01b8),(_ucs2 0x01b9),(_ucs2 0x01ba),(_ucs2 0x01bb); +insert into t1 values (_ucs2 0x01bc),(_ucs2 0x01bd),(_ucs2 0x01be),(_ucs2 0x01bf); +insert into t1 values (_ucs2 0x01c0),(_ucs2 0x01c1),(_ucs2 0x01c2),(_ucs2 0x01c3); +insert into t1 values (_ucs2 0x01c4),(_ucs2 0x01c5),(_ucs2 0x01c6),(_ucs2 0x01c7); +insert into t1 values (_ucs2 0x01c8),(_ucs2 0x01c9),(_ucs2 0x01ca),(_ucs2 0x01cb); +insert into t1 values (_ucs2 0x01cc),(_ucs2 0x01cd),(_ucs2 0x01ce),(_ucs2 0x01cf); +insert into t1 values (_ucs2 0x01d0),(_ucs2 0x01d1),(_ucs2 0x01d2),(_ucs2 0x01d3); +insert into t1 values (_ucs2 0x01d4),(_ucs2 0x01d5),(_ucs2 0x01d6),(_ucs2 0x01d7); +insert into t1 values (_ucs2 0x01d8),(_ucs2 0x01d9),(_ucs2 0x01da),(_ucs2 0x01db); +insert into t1 values (_ucs2 0x01dc),(_ucs2 0x01dd),(_ucs2 0x01de),(_ucs2 0x01df); +insert into t1 values (_ucs2 0x01e0),(_ucs2 0x01e1),(_ucs2 0x01e2),(_ucs2 0x01e3); +insert into t1 values (_ucs2 0x01e4),(_ucs2 0x01e5),(_ucs2 0x01e6),(_ucs2 0x01e7); +insert into t1 values (_ucs2 0x01e8),(_ucs2 0x01e9),(_ucs2 0x01ea),(_ucs2 0x01eb); +insert into t1 values (_ucs2 0x01ec),(_ucs2 0x01ed),(_ucs2 0x01ee),(_ucs2 0x01ef); +insert into t1 values (_ucs2 0x01f0),(_ucs2 0x01f1),(_ucs2 0x01f2),(_ucs2 0x01f3); +insert into t1 values (_ucs2 0x01f4),(_ucs2 0x01f5),(_ucs2 0x01f6),(_ucs2 0x01f7); +insert into t1 values (_ucs2 0x01f8),(_ucs2 0x01f9),(_ucs2 0x01fa),(_ucs2 0x01fb); +insert into t1 values (_ucs2 0x01fc),(_ucs2 0x01fd),(_ucs2 0x01fe),(_ucs2 0x01ff); + + +insert into t1 values ('AA'),('Aa'),('aa'),('aA'); +insert into t1 values ('CH'),('Ch'),('ch'),('cH'); +insert into t1 values ('DZ'),('Dz'),('dz'),('dZ'); +insert into t1 values ('IJ'),('Ij'),('ij'),('iJ'); +insert into t1 values ('LJ'),('Lj'),('lj'),('lJ'); +insert into t1 values ('LL'),('Ll'),('ll'),('lL'); +insert into t1 values ('NJ'),('Nj'),('nj'),('nJ'); +insert into t1 values ('OE'),('Oe'),('oe'),('oE'); +insert into t1 values ('SS'),('Ss'),('ss'),('sS'); +insert into t1 values ('RR'),('Rr'),('rr'),('rR'); + +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_unicode_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_icelandic_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_latvian_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_romanian_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovenian_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_polish_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_estonian_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_swedish_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_turkish_ci; + +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_czech_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_danish_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_ci; +--select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci; +select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci; + diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test index 91e81c5dbe0..66df5b1cb92 100644 --- a/mysql-test/t/fulltext.test +++ b/mysql-test/t/fulltext.test @@ -279,3 +279,12 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); DROP TABLE t1; +# +# bug#3964 +# + +CREATE TABLE t1 (s varchar(255), FULLTEXT (s)) DEFAULT CHARSET=utf8; +insert into t1 (s) values ('pära para para'),('para para para'); +select * from t1 where match(s) against('para' in boolean mode); +select * from t1 where match(s) against('par*' in boolean mode); +DROP TABLE t1; diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 2448a1d3209..5ddc93e767b 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -189,3 +189,15 @@ INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1), (2); SELECT GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) FROM t1, t2 GROUP BY t1.a; DROP TABLE t1, t2; + +# +# Bug #4035: group_concat() and HAVING +# + +CREATE TABLE t1 (a char(4)); +INSERT INTO t1 VALUES ('John'), ('Anna'), ('Bill'); +SELECT GROUP_CONCAT(a SEPARATOR '||') AS names FROM t1 + HAVING names LIKE '%An%'; +SELECT GROUP_CONCAT(a SEPARATOR '###') AS names FROM t1 + HAVING LEFT(names, 1) ='J'; +DROP TABLE t1; diff --git a/mysql-test/t/rpl000015.test b/mysql-test/t/rpl000015.test index b0119526deb..b7fff94f7f3 100644 --- a/mysql-test/t/rpl000015.test +++ b/mysql-test/t/rpl000015.test @@ -12,7 +12,7 @@ show slave status; change master to master_host='127.0.0.1'; # The following needs to be cleaned up when change master is fixed ---replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT +--replace_result $MASTER_MYPORT MASTER_PORT $MYSQL_TCP_PORT MASTER_PORT --replace_column 1 # 33 # show slave status; --replace_result $MASTER_MYPORT MASTER_PORT diff --git a/mysys/charset-def.c b/mysys/charset-def.c index 4f988608d13..73e36688594 100644 --- a/mysys/charset-def.c +++ b/mysys/charset-def.c @@ -33,6 +33,29 @@ extern CHARSET_INFO my_charset_ucs2_estonian_uca_ci; extern CHARSET_INFO my_charset_ucs2_spanish_uca_ci; extern CHARSET_INFO my_charset_ucs2_swedish_uca_ci; extern CHARSET_INFO my_charset_ucs2_turkish_uca_ci; +extern CHARSET_INFO my_charset_ucs2_czech_uca_ci; +extern CHARSET_INFO my_charset_ucs2_danish_uca_ci; +extern CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci; +extern CHARSET_INFO my_charset_ucs2_slovak_uca_ci; +extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci; +#endif + +#ifdef HAVE_CHARSET_utf8 +extern CHARSET_INFO my_charset_utf8_general_uca_ci; +extern CHARSET_INFO my_charset_utf8_icelandic_uca_ci; +extern CHARSET_INFO my_charset_utf8_latvian_uca_ci; +extern CHARSET_INFO my_charset_utf8_romanian_uca_ci; +extern CHARSET_INFO my_charset_utf8_slovenian_uca_ci; +extern CHARSET_INFO my_charset_utf8_polish_uca_ci; +extern CHARSET_INFO my_charset_utf8_estonian_uca_ci; +extern CHARSET_INFO my_charset_utf8_spanish_uca_ci; +extern CHARSET_INFO my_charset_utf8_swedish_uca_ci; +extern CHARSET_INFO my_charset_utf8_turkish_uca_ci; +extern CHARSET_INFO my_charset_utf8_czech_uca_ci; +extern CHARSET_INFO my_charset_utf8_danish_uca_ci; +extern CHARSET_INFO my_charset_utf8_lithuanian_uca_ci; +extern CHARSET_INFO my_charset_utf8_slovak_uca_ci; +extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci; #endif my_bool init_compiled_charsets(myf flags __attribute__((unused))) @@ -87,7 +110,6 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) add_compiled_collation(&my_charset_ucs2_general_ci); add_compiled_collation(&my_charset_ucs2_bin); add_compiled_collation(&my_charset_ucs2_general_uca); - add_compiled_collation(&my_charset_ucs2_general_uca); add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci); add_compiled_collation(&my_charset_ucs2_latvian_uca_ci); add_compiled_collation(&my_charset_ucs2_romanian_uca_ci); @@ -97,6 +119,11 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) add_compiled_collation(&my_charset_ucs2_spanish_uca_ci); add_compiled_collation(&my_charset_ucs2_swedish_uca_ci); add_compiled_collation(&my_charset_ucs2_turkish_uca_ci); + add_compiled_collation(&my_charset_ucs2_czech_uca_ci); + add_compiled_collation(&my_charset_ucs2_danish_uca_ci); + add_compiled_collation(&my_charset_ucs2_lithuanian_uca_ci); + add_compiled_collation(&my_charset_ucs2_slovak_uca_ci); + add_compiled_collation(&my_charset_ucs2_spanish2_uca_ci); #endif #ifdef HAVE_CHARSET_ujis @@ -107,6 +134,21 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) #ifdef HAVE_CHARSET_utf8 add_compiled_collation(&my_charset_utf8_general_ci); add_compiled_collation(&my_charset_utf8_bin); + add_compiled_collation(&my_charset_utf8_general_uca_ci); + add_compiled_collation(&my_charset_utf8_icelandic_uca_ci); + add_compiled_collation(&my_charset_utf8_latvian_uca_ci); + add_compiled_collation(&my_charset_utf8_romanian_uca_ci); + add_compiled_collation(&my_charset_utf8_slovenian_uca_ci); + add_compiled_collation(&my_charset_utf8_polish_uca_ci); + add_compiled_collation(&my_charset_utf8_estonian_uca_ci); + add_compiled_collation(&my_charset_utf8_spanish_uca_ci); + add_compiled_collation(&my_charset_utf8_swedish_uca_ci); + add_compiled_collation(&my_charset_utf8_turkish_uca_ci); + add_compiled_collation(&my_charset_utf8_czech_uca_ci); + add_compiled_collation(&my_charset_utf8_danish_uca_ci); + add_compiled_collation(&my_charset_utf8_lithuanian_uca_ci); + add_compiled_collation(&my_charset_utf8_slovak_uca_ci); + add_compiled_collation(&my_charset_utf8_spanish2_uca_ci); #endif /* Copy compiled charsets */ diff --git a/mysys/charset.c b/mysys/charset.c index 72f102a2296..1388fc40c6d 100644 --- a/mysys/charset.c +++ b/mysys/charset.c @@ -469,7 +469,6 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) } cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL; } - pthread_mutex_unlock(&THR_LOCK_charset); if (cs && !(cs->state & MY_CS_READY)) { if ((cs->cset->init && cs->cset->init(cs, cs_alloc)) || @@ -478,6 +477,7 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) else cs->state|= MY_CS_READY; } + pthread_mutex_unlock(&THR_LOCK_charset); return cs; } diff --git a/mysys/my_handler.c b/mysys/my_handler.c index de0fba56d21..6003808df25 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -21,13 +21,11 @@ int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, uchar *b, uint b_length, my_bool part_key, my_bool skip_end_space) { - if (part_key && b_length < a_length) - a_length=b_length; if (skip_end_space) return charset_info->coll->strnncollsp(charset_info, a, a_length, b, b_length); return charset_info->coll->strnncoll(charset_info, a, a_length, - b, b_length); + b, b_length, part_key); } diff --git a/ndb/Makefile.am b/ndb/Makefile.am index 5cd52010f1d..82f424fcfb4 100644 --- a/ndb/Makefile.am +++ b/ndb/Makefile.am @@ -1,4 +1,5 @@ -SUBDIRS = src tools . include $(ndb_opt_test_subdirs) +SUBDIRS = src tools . include @ndb_opt_subdirs@ +DIST_SUBDIRS = src tools include test docs EXTRA_DIST = config include $(top_srcdir)/ndb/config/common.mk.am diff --git a/ndb/bin/mysqlcluster b/ndb/bin/mysqlcluster deleted file mode 100755 index 81fc7308942..00000000000 --- a/ndb/bin/mysqlcluster +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP" ]; then - echo "MYSQLCLUSTER_TOP not set or directory does not exist" - exit 1 -fi -if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP/ndb" ]; then - echo "$MYSQLCLUSTER_TOP/ndb directory does not exist" - exit 1 -fi - -mysql --socket=$MYSQLCLUSTER_TOP/data/mysqlcluster.sock $* diff --git a/ndb/bin/mysqlcluster_install_db b/ndb/bin/mysqlcluster_install_db deleted file mode 100755 index 6fe95ff105d..00000000000 --- a/ndb/bin/mysqlcluster_install_db +++ /dev/null @@ -1,119 +0,0 @@ -#!/bin/sh - -NDB_HOME= -export NDB_CONNECTSTRING -if [ -z "$MYSQLCLUSTER_TOP" ]; then - echo "MYSQLCLUSTER_TOP not set" - exit 1 -fi -if [ -d "$MYSQLCLUSTER_TOP" ]; then :; else - echo "$MYSQLCLUSTER_TOP directory does not exist" - exit 1 -fi -if [ -d "$MYSQLCLUSTER_TOP/ndb" ]; then :; else - echo "$MYSQLCLUSTER_TOP/ndb directory does not exist" - exit 1 -fi - -start_default_ndbcluster() { - -# configurable parameters, make sure to change in mysqlcluterd as well -MYSQLCLUSTER_FILESYSTEM=$MYSQLCLUSTER_TOP/data/mysqlclusterfs -MYSQLCLUSTER_PORT_BASE="22" # using ports MYSQLCLUSTER_PORT_BASE{"00","01", etc} -# end configurable parameters - -# do some checks - -NDB_CONNECTSTRING= - -[ -d "$MYSQLCLUSTER_FILESYSTEM" ] || mkdir "$MYSQLCLUSTER_FILESYSTEM" -if [ -d "$MYSQLCLUSTER_FILESYSTEM" ]; then :; else - echo "$MYSQLCLUSTER_FILESYSTEM filesystem directory does not exist" - exit 1 -fi - - -# set som help variables - -NDB_HOST="localhost" -NDB_PORT=$MYSQLCLUSTER_PORT_BASE"00" -NDB_CONNECTSTRING_BASE="host=$NDB_HOST:$NDB_PORT;nodeid=" - - -# Edit file system path and ports in config file - -cd $MYSQLCLUSTER_FILESYSTEM -sed \ - -e s,"WRITE_PATH_TO_FILESYSTEM_2_HERE",$MYSQLCLUSTER_FILESYSTEM,g \ - -e s,"CHOOSE_PORT_BASE",$MYSQLCLUSTER_PORT_BASE,g \ - < $MYSQLCLUSTER_TOP/ndb/demos/config-templates/config_template-install.ini \ - > config.ini - - -# Start management server as deamon - -NDB_ID="1" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -#xterm -e mgmtsrvr -c $MYSQLCLUSTER_FILESYSTEM/config.ini & -if mgmtsrvr -d -c $MYSQLCLUSTER_FILESYSTEM/config.ini ; then :; else - echo "Unable to start mgmtsrvr" - exit 1 -fi - - -# Start database node - -cd $MYSQLCLUSTER_FILESYSTEM # the output from the database node gets where it starts -NDB_ID="2" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -#xterm -T "NDB Cluster DB Node" -geometry 80x10 -xrm *.hold:true -e ndb -i & -ndb -d -i & - -# Start xterm for application programs - -NDB_ID="3" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -#xterm -T "NDB Cluster API Node" -geometry 80x10 & -echo set before running ndbApi programs > export NDB_CONNECTSTRING=$NDB_CONNECTSTRING - -# Start management client - -#xterm -T "NDB Management Client" -geometry 80x10 -xrm *.hold:true -e mgmtclient $NDB_HOST $NDB_PORT & -echo "NDB Management Client starts with: mgmtclient $NDB_HOST $NDB_PORT" - -# test if Ndb Cluster starts properly - -NDB_ID="11" -NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID -if list_tables | grep "NDBT_ProgramExit: 0 - OK"; then :; else - echo "Ndbcluster startup failed" - exit 1 -fi -} - -start_mysql_install_db() { - # run install of regular MySQL Server - - cd $MYSQLCLUSTER_TOP - scripts/mysql_install_db --basedir=$MYSQLCLUSTER_TOP --datadir=$MYSQLCLUSTER_TOP/data --socket=$MYSQLCLUSTER_TOP/data/mysqlcluster.sock $* -} - -if test "$1" = "ndb_started" -then - shift - mgmt_host=$1 - shift - mgmt_port=$1 - shift - if [ -z "$mgmt_host" -o -z "$mgmt_port" ]; then - echo "syntax: ndb_started hostname port" - exit 1 - fi - NDB_CONNECTSTRING="host=$mgmt_host:$mgmt_port;nodeid=11" - echo using NDB_CONNECTSTRING=$NDB_CONNECTSTRING - start_mysql_install_db $* -else - start_default_ndbcluster - start_mysql_install_db -fi - diff --git a/ndb/bin/mysqlclusterd b/ndb/bin/mysqlclusterd deleted file mode 100755 index 3b4deb3ed48..00000000000 --- a/ndb/bin/mysqlclusterd +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# configurable parameters -MYSQLCLUSTER_PORT_BASE="22" -# end configurable parameters - -if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP" ]; then - echo "MYSQLCLUSTER_TOP not set or directory does not exist" - exit 1 -fi -if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP/ndb" ]; then - echo "$MYSQLCLUSTER_TOP/ndb directory does not exist" - exit 1 -fi - -if test "$1" = "ndb_started" -then - shift - mgmt_host=$1 - shift - mgmt_port=$1 - shift - if [ -z "$mgmt_host" -o -z "$mgmt_port" ]; then - echo "syntax: ndb_started hostname port" - exit 1 - fi - NDB_CONNECTSTRING="host=$mgmt_host:$mgmt_port;nodeid=11" - echo using NDB_CONNECTSTRING=$NDB_CONNECTSTRING -else - NDB_CONNECTSTRING="host=localhost:"$MYSQLCLUSTER_PORT_BASE"00;nodeid=11" -fi -export NDB_CONNECTSTRING - -mysqld --default-table-type=ndbcluster --basedir=$MYSQLCLUSTER_TOP --datadir=$MYSQLCLUSTER_TOP/data --socket=$MYSQLCLUSTER_TOP/data/mysqlcluster.sock $* diff --git a/ndb/config/common.mk.am b/ndb/config/common.mk.am index 593e00d8959..869e2fae91d 100644 --- a/ndb/config/common.mk.am +++ b/ndb/config/common.mk.am @@ -9,5 +9,4 @@ mgmapiincludedir = "$(pkgincludedir)/ndb/mgmapi" INCLUDES = $(INCLUDES_LOC) LDADD = $(top_srcdir)/ndb/src/common/portlib/gcc.cpp $(LDADD_LOC) DEFS = @DEFS@ @NDB_DEFS@ $(DEFS_LOC) $(NDB_EXTRA_FLAGS) -# ndb cannot be compiled with -fno-implicit-templaces -NDB_CXXFLAGS=-fimplicit-templates +NDB_CXXFLAGS=@ndb_cxxflags_fix@ $(NDB_CXXFLAGS_LOC) diff --git a/ndb/docs/Makefile.am b/ndb/docs/Makefile.am index fb367fb9345..554b2fb256e 100644 --- a/ndb/docs/Makefile.am +++ b/ndb/docs/Makefile.am @@ -1,7 +1,8 @@ +DOXYDIR = doxygen +noinst_HEADERS = $(DOXYDIR)/predoxy.pl $(DOXYDIR)/postdoxy.pl $(DOXYDIR)/Doxyfile.ndbapi $(DOXYDIR)/Doxyfile.mgmapi $(DOXYDIR)/header.ndbapi.tex $(DOXYDIR)/header.mgmapi.tex all: do-check ndbapidoc mgmapidoc -DOXYDIR = doxygen DOXYTMP = .doxytmp DOXYOUT = .doxyout @@ -35,7 +36,7 @@ do-check: # ndbapidoc: ndbapi.pdf -ndbapi.pdf: $(top_srcdir)/ndb/include/ndb_version.h +ndbapi.pdf: $(noinst_HEADERS) @set -x; \ export NDB_RELEASE=$(NDB_RELEASE) \ @RM@ -f ndbapi.pdf ndbapi.html; \ @@ -59,7 +60,7 @@ ndbapi.pdf: $(top_srcdir)/ndb/include/ndb_version.h # mgmapidoc: mgmapi.pdf -mgmapi.pdf: $(top_srcdir)/ndb/include/ndb_version.h +mgmapi.pdf: $(noinst_HEADERS) @set -x; \ export NDB_RELEASE=$(NDB_RELEASE) \ @RM@ -f mgmapi.pdf mgmapi.html; \ diff --git a/ndb/include/Makefile.am b/ndb/include/Makefile.am index e4c82cc161f..2565a78238b 100644 --- a/ndb/include/Makefile.am +++ b/ndb/include/Makefile.am @@ -16,6 +16,7 @@ ndbapi/NdbError.hpp \ ndbapi/NdbEventOperation.hpp \ ndbapi/NdbIndexOperation.hpp \ ndbapi/NdbOperation.hpp \ +ndbapi/NdbBlob.hpp \ ndbapi/NdbPool.hpp \ ndbapi/NdbRecAttr.hpp \ ndbapi/NdbReceiver.hpp \ diff --git a/ndb/include/kernel/ndb_limits.h b/ndb/include/kernel/ndb_limits.h index 65f729af1f2..68ffe310328 100644 --- a/ndb/include/kernel/ndb_limits.h +++ b/ndb/include/kernel/ndb_limits.h @@ -91,4 +91,9 @@ #define MAX_TTREE_PREF_SIZE 4 // words in min/max prefix each #define MAX_TTREE_NODE_SLACK 3 // diff between max and min occupancy +/* + * Blobs. + */ +#define NDB_BLOB_HEAD_SIZE 2 // sizeof(NdbBlob::Head) >> 2 + #endif diff --git a/ndb/include/kernel/signaldata/DictTabInfo.hpp b/ndb/include/kernel/signaldata/DictTabInfo.hpp index 813b0063d35..d5f27257eb8 100644 --- a/ndb/include/kernel/signaldata/DictTabInfo.hpp +++ b/ndb/include/kernel/signaldata/DictTabInfo.hpp @@ -309,7 +309,9 @@ public: ExtBinary = NdbSqlUtil::Type::Binary, ExtVarbinary = NdbSqlUtil::Type::Varbinary, ExtDatetime = NdbSqlUtil::Type::Datetime, - ExtTimespec = NdbSqlUtil::Type::Timespec + ExtTimespec = NdbSqlUtil::Type::Timespec, + ExtBlob = NdbSqlUtil::Type::Blob, + ExtClob = NdbSqlUtil::Type::Clob }; // Attribute data interpretation @@ -432,6 +434,13 @@ public: AttributeSize = DictTabInfo::an8Bit; AttributeArraySize = 12 * AttributeExtLength; return true; + case DictTabInfo::ExtBlob: + case DictTabInfo::ExtClob: + AttributeType = DictTabInfo::StringType; + AttributeSize = DictTabInfo::an8Bit; + // head + inline part [ attr precision ] + AttributeArraySize = (NDB_BLOB_HEAD_SIZE << 2) + AttributeExtPrecision; + return true; }; return false; } diff --git a/ndb/include/kernel/signaldata/TupAccess.hpp b/ndb/include/kernel/signaldata/TupAccess.hpp index 5cfb8c0d153..ab56a73322c 100644 --- a/ndb/include/kernel/signaldata/TupAccess.hpp +++ b/ndb/include/kernel/signaldata/TupAccess.hpp @@ -129,6 +129,8 @@ private: /* * Operate on entire tuple. Used by TUX where the table has a single * Uint32 array attribute representing an index tree node. + * + * XXX this signal is no longer used by TUX and can be removed */ class TupStoreTh { friend class Dbtup; diff --git a/ndb/include/kernel/signaldata/TupFrag.hpp b/ndb/include/kernel/signaldata/TupFrag.hpp index ffde2217893..fc88dacd48f 100644 --- a/ndb/include/kernel/signaldata/TupFrag.hpp +++ b/ndb/include/kernel/signaldata/TupFrag.hpp @@ -69,7 +69,7 @@ class TuxFragReq { friend class Dblqh; friend class Dbtux; public: - STATIC_CONST( SignalLength = 9 ); + STATIC_CONST( SignalLength = 14 ); private: Uint32 userPtr; Uint32 userRef; @@ -80,6 +80,9 @@ private: Uint32 fragOff; Uint32 tableType; Uint32 primaryTableId; + Uint32 tupIndexFragPtrI; + Uint32 tupTableFragPtrI[2]; + Uint32 accTableFragPtrI[2]; }; class TuxFragConf { diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index 2945d9e37dd..ef4bf8b7642 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -879,6 +879,7 @@ class NdbCall; class Table; class BaseString; class NdbEventOperation; +class NdbBlob; typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*); @@ -965,6 +966,7 @@ class Ndb friend class NdbIndexScanOperation; friend class NdbDictionaryImpl; friend class NdbDictInterface; + friend class NdbBlob; public: /** @@ -1453,6 +1455,7 @@ private: NdbIndexOperation* getIndexOperation();// Get an index operation from idle class NdbGlobalEventBufferHandle* getGlobalEventBufferHandle(); + NdbBlob* getNdbBlob();// Get a blob handle etc void releaseSignal(NdbApiSignal* anApiSignal); void releaseSignalsInList(NdbApiSignal** pList); @@ -1464,6 +1467,7 @@ private: void releaseRecAttr (NdbRecAttr* aRecAttr); void releaseOperation(NdbOperation* anOperation); void releaseScanOperation(NdbIndexScanOperation*); + void releaseNdbBlob(NdbBlob* aBlob); void check_send_timeout(); void remove_sent_list(Uint32); @@ -1506,6 +1510,7 @@ private: void freeNdbSubroutine();// Free the first idle NdbSubroutine obj void freeNdbCall(); // Free the first idle NdbCall obj void freeNdbScanRec(); // Free the first idle NdbScanRec obj + void freeNdbBlob(); // Free the first etc NdbConnection* getNdbCon(); // Get a connection from idle list @@ -1613,6 +1618,7 @@ private: NdbSubroutine* theSubroutineList; // First subroutine descriptor in NdbCall* theCallList; // First call descriptor in list NdbReceiver* theScanList; + NdbBlob* theNdbBlobIdleList; Uint32 theMyRef; // My block reference Uint32 theNode; // The node number of our node diff --git a/ndb/include/ndbapi/NdbApi.hpp b/ndb/include/ndbapi/NdbApi.hpp index 4f721940332..add733cccd7 100644 --- a/ndb/include/ndbapi/NdbApi.hpp +++ b/ndb/include/ndbapi/NdbApi.hpp @@ -30,4 +30,5 @@ #include "NdbDictionary.hpp" #include "NdbEventOperation.hpp" #include "NdbPool.hpp" +#include "NdbBlob.hpp" #endif diff --git a/ndb/include/ndbapi/NdbBlob.hpp b/ndb/include/ndbapi/NdbBlob.hpp new file mode 100644 index 00000000000..9398f77c474 --- /dev/null +++ b/ndb/include/ndbapi/NdbBlob.hpp @@ -0,0 +1,293 @@ +/* Copyright (C) 2003 MySQL AB + + 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#ifndef NdbBlob_H +#define NdbBlob_H + +#include +#include +#include +#include + +class Ndb; +class NdbConnection; +class NdbOperation; +class NdbRecAttr; +class NdbTableImpl; +class NdbColumnImpl; + +/** + * @class NdbBlob + * @brief Blob handle + * + * Blob data is stored in 2 places: + * + * - "header" and "inline bytes" stored in the blob attribute + * - "blob parts" stored in a separate table NDB$BLOB___ + * + * Inline and part sizes can be set via NdbDictionary::Column methods + * when the table is created. + * + * NdbBlob is a blob handle. To access blob data, the handle must be + * created using NdbOperation::getBlobHandle in operation prepare phase. + * The handle has following states: + * + * - prepared: before the operation is executed + * - active: after execute or next result but before transaction commit + * - closed: after transaction commit + * - invalid: after rollback or transaction close + * + * NdbBlob supports 2 styles of data access: + * + * - in prepare phase, NdbBlob methods getValue and setValue are used to + * prepare a read or write of a single blob value of known size + * + * - in active phase, NdbBlob methods readData and writeData are used to + * read or write blob data of undetermined size + * + * NdbBlob methods return -1 on error and 0 on success, and use output + * parameters when necessary. + * + * Notes: + * - table and its blob part tables are not created atomically + * - blob data operations take effect at next transaction execute + * - NdbBlob may need to do implicit executes on the transaction + * - read and write of complete parts is much more efficient + * - scan must use the "new" interface NdbScanOperation + * - scan with blobs applies hold-read-lock (at minimum) + * - to update a blob in a read op requires exclusive tuple lock + * - update op in scan must do its own getBlobHandle + * - delete creates implicit, not-accessible blob handles + * - NdbOperation::writeTuple does not support blobs + * - there is no support for an asynchronous interface + * + * Bugs / limitations: + * - scan must use exclusive locking for now + * + * Todo: + * - add scan method hold-read-lock-until-next + return-keyinfo + * - better check of keyinfo length when setting keys + * - better check of allowed blob op vs locking mode + */ +class NdbBlob { +public: + enum State { + Idle = 0, + Prepared = 1, + Active = 2, + Closed = 3, + Invalid = 9 + }; + State getState(); + /** + * Prepare to read blob value. The value is available after execute. + * Use isNull to check for NULL and getLength to get the real length + * and to check for truncation. Sets current read/write position to + * after the data read. + */ + int getValue(void* data, Uint32 bytes); + /** + * Prepare to insert or update blob value. An existing longer blob + * value will be truncated. The data buffer must remain valid until + * execute. Sets current read/write position to after the data. Set + * data to null pointer (0) to create a NULL value. + */ + int setValue(const void* data, Uint32 bytes); + /** + * Check if blob is null. + */ + int getNull(bool& isNull); + /** + * Set blob to NULL. + */ + int setNull(); + /** + * Get current length in bytes. Use isNull to distinguish between + * length 0 blob and NULL blob. + */ + int getLength(Uint64& length); + /** + * Truncate blob to given length. Has no effect if the length is + * larger than current length. + */ + int truncate(Uint64 length = 0); + /** + * Get current read/write position. + */ + int getPos(Uint64& pos); + /** + * Set read/write position. Must be between 0 and current length. + * "Sparse blobs" are not supported. + */ + int setPos(Uint64 pos); + /** + * Read at current position and set new position to first byte after + * the data read. A read past blob end returns actual number of bytes + * read in the in/out bytes parameter. + */ + int readData(void* data, Uint32& bytes); + /** + * Read at given position. Does not use or update current position. + */ + int readData(Uint64 pos, void* data, Uint32& bytes); + /** + * Write at current position and set new position to first byte after + * the data written. A write past blob end extends the blob value. + */ + int writeData(const void* data, Uint32 bytes); + /** + * Write at given position. Does not use or update current position. + */ + int writeData(Uint64 pos, const void* data, Uint32 bytes); + /** + * Return the blob column. + */ + const NdbDictionary::Column* getColumn(); + /** + * Get blob parts table name. Useful only to test programs. + */ + static const unsigned BlobTableNameSize = 40; + static int getBlobTableName(char* btname, Ndb* anNdb, const char* tableName, const char* columnName); + /** + * Return error object. The error may be blob specific (below) or may + * be copied from a failed implicit operation. + */ + const NdbError& getNdbError() const; + // "Invalid blob attributes or invalid blob parts table" + static const int ErrTable = 4263; + // "Invalid usage of blob attribute" + static const int ErrUsage = 4264; + // "Method is not valid in current blob state" + static const int ErrState = 4265; + // "Invalid blob seek position" + static const int ErrSeek = 4266; + // "Corrupted blob value" + static const int ErrCorrupt = 4267; + // "Error in blob head update forced rollback of transaction" + static const int ErrAbort = 4268; + // "Unknown blob error" + static const int ErrUnknown = 4269; + +private: + friend class Ndb; + friend class NdbConnection; + friend class NdbOperation; + friend class NdbScanOperation; + friend class NdbDictionaryImpl; + // state + State theState; + void setState(State newState); + // define blob table + static void getBlobTableName(char* btname, const NdbTableImpl* t, const NdbColumnImpl* c); + static void getBlobTable(NdbTableImpl& bt, const NdbTableImpl* t, const NdbColumnImpl* c); + // table name + char theBlobTableName[BlobTableNameSize]; + // ndb api stuff + Ndb* theNdb; + NdbConnection* theNdbCon; + NdbOperation* theNdbOp; + NdbTableImpl* theTable; + NdbTableImpl* theAccessTable; + const NdbColumnImpl* theColumn; + char theFillChar; + // sizes + Uint32 theInlineSize; + Uint32 thePartSize; + Uint32 theStripeSize; + // getValue/setValue + bool theGetFlag; + char* theGetBuf; + bool theSetFlag; + const char* theSetBuf; + Uint32 theGetSetBytes; + // head + struct Head { + Uint64 length; + }; + // buffers + struct Buf { + char* data; + unsigned size; + unsigned maxsize; + Buf(); + ~Buf(); + void alloc(unsigned n); + }; + Buf theKeyBuf; + Buf theAccessKeyBuf; + Buf theHeadInlineBuf; + Buf thePartBuf; + Head* theHead; + char* theInlineData; + NdbRecAttr* theHeadInlineRecAttr; + bool theHeadInlineUpdateFlag; + bool theNewPartFlag; + // length and read/write position + int theNullFlag; + Uint64 theLength; + Uint64 thePos; + // errors + NdbError theError; + // for keeping in lists + NdbBlob* theNext; + // initialization + NdbBlob(); + void init(); + void release(); + // classify operations + bool isTableOp(); + bool isIndexOp(); + bool isKeyOp(); + bool isReadOp(); + bool isInsertOp(); + bool isUpdateOp(); + bool isDeleteOp(); + bool isScanOp(); + // computations + Uint32 getPartNumber(Uint64 pos); + Uint32 getPartCount(); + Uint32 getDistKey(Uint32 part); + // getters and setters + int getTableKeyValue(NdbOperation* anOp); + int setTableKeyValue(NdbOperation* anOp); + int setAccessKeyValue(NdbOperation* anOp); + int setPartKeyValue(NdbOperation* anOp, Uint32 part); + int getHeadInlineValue(NdbOperation* anOp); + void getHeadFromRecAttr(); + int setHeadInlineValue(NdbOperation* anOp); + // data operations + int readDataPrivate(Uint64 pos, char* buf, Uint32& bytes); + int writeDataPrivate(Uint64 pos, const char* buf, Uint32 bytes); + int readParts(char* buf, Uint32 part, Uint32 count); + int insertParts(const char* buf, Uint32 part, Uint32 count); + int updateParts(const char* buf, Uint32 part, Uint32 count); + int deleteParts(Uint32 part, Uint32 count); + // blob handle maintenance + int atPrepare(NdbConnection* aCon, NdbOperation* anOp, const NdbColumnImpl* aColumn); + int preExecute(ExecType anExecType, bool& batch); + int postExecute(ExecType anExecType); + int preCommit(); + int atNextResult(); + // errors + void setErrorCode(int anErrorCode, bool invalidFlag = true); + void setErrorCode(NdbOperation* anOp, bool invalidFlag = true); + void setErrorCode(NdbConnection* aCon, bool invalidFlag = true); +#ifdef VM_TRACE + friend class NdbOut& operator<<(NdbOut&, const NdbBlob&); +#endif +}; + +#endif diff --git a/ndb/include/ndbapi/NdbConnection.hpp b/ndb/include/ndbapi/NdbConnection.hpp index 42e011419dd..e57bb5c2465 100644 --- a/ndb/include/ndbapi/NdbConnection.hpp +++ b/ndb/include/ndbapi/NdbConnection.hpp @@ -27,6 +27,7 @@ class NdbIndexScanOperation; class NdbIndexOperation; class NdbApiSignal; class Ndb; +class NdbBlob; /** @@ -159,6 +160,7 @@ class NdbConnection friend class NdbScanOperation; friend class NdbIndexOperation; friend class NdbIndexScanOperation; + friend class NdbBlob; public: @@ -449,6 +451,10 @@ private: ~NdbConnection(); void init(); // Initialize connection object for new transaction + + int executeNoBlobs(ExecType execType, + AbortOption abortOption = AbortOnError, + int force = 0 ); /** * Set Connected node id @@ -532,10 +538,12 @@ private: void setOperationErrorCodeAbort(int anErrorCode); int checkMagicNumber(); // Verify correct object - NdbOperation* getNdbOperation(class NdbTableImpl* aTable); + NdbOperation* getNdbOperation(class NdbTableImpl* aTable, + NdbOperation* aNextOp = 0); NdbIndexScanOperation* getNdbScanOperation(class NdbTableImpl* aTable); NdbIndexOperation* getNdbIndexOperation(class NdbIndexImpl* anIndex, - class NdbTableImpl* aTable); + class NdbTableImpl* aTable, + NdbOperation* aNextOp = 0); void handleExecuteCompletion(); @@ -632,6 +640,8 @@ private: // The operation actually performing the scan NdbScanOperation* theScanningOp; Uint32 theBuddyConPtr; + // optim: any blobs + bool theBlobFlag; static void sendTC_COMMIT_ACK(NdbApiSignal *, Uint32 transId1, Uint32 transId2, diff --git a/ndb/include/ndbapi/NdbDictionary.hpp b/ndb/include/ndbapi/NdbDictionary.hpp index 4dd74e15008..3b38e33ec91 100644 --- a/ndb/include/ndbapi/NdbDictionary.hpp +++ b/ndb/include/ndbapi/NdbDictionary.hpp @@ -182,7 +182,8 @@ public: Varbinary, ///< Max len Datetime, ///< Precision down to 1 sec (sizeof(Datetime) == 8 bytes ) Timespec, ///< Precision down to 1 nsec(sizeof(Datetime) == 12 bytes ) - Blob ///< Binary large object (see NdbBlob) + Blob, ///< Binary large object (see NdbBlob) + Clob ///< Text blob }; /** @@ -297,7 +298,29 @@ public: * Array length for column or max length for variable length arrays. */ int getLength() const; - + + /** + * For blob, set or get "inline size" i.e. number of initial bytes + * to store in table's blob attribute. This part is normally in + * main memory and can be indexed and interpreted. + */ + void setInlineSize(int size) { setPrecision(size); } + int getInlineSize() const { return getPrecision(); } + + /** + * For blob, set or get "part size" i.e. number of bytes to store in + * each tuple of the "blob table". Must be less than 64k. + */ + void setPartSize(int size) { setScale(size); } + int getPartSize() const { return getScale(); } + + /** + * For blob, set or get "stripe size" i.e. number of consecutive + * parts to store in each node group. + */ + void setStripeSize(int size) { setLength(size); } + int getStripeSize() const { return getLength(); } + /** * Get size of element */ @@ -1029,6 +1052,7 @@ public: private: friend class NdbDictionaryImpl; friend class UtilTransactions; + friend class NdbBlob; class NdbDictionaryImpl & m_impl; Dictionary(NdbDictionaryImpl&); const Table * getIndexTable(const char * indexName, diff --git a/ndb/include/ndbapi/NdbOperation.hpp b/ndb/include/ndbapi/NdbOperation.hpp index 89f83f4ee4b..0d51d3e8d43 100644 --- a/ndb/include/ndbapi/NdbOperation.hpp +++ b/ndb/include/ndbapi/NdbOperation.hpp @@ -28,6 +28,7 @@ class NdbRecAttr; class NdbOperation; class NdbConnection; class NdbColumnImpl; +class NdbBlob; /** * @class NdbOperation @@ -42,7 +43,7 @@ class NdbOperation friend class NdbScanFilter; friend class NdbScanFilterImpl; friend class NdbReceiver; - + friend class NdbBlob; public: /** * @name Define Standard Operation Type @@ -337,6 +338,17 @@ public: virtual int setValue(Uint32 anAttrId, Int64 aValue); virtual int setValue(Uint32 anAttrId, float aValue); virtual int setValue(Uint32 anAttrId, double aValue); + + /** + * This method replaces getValue/setValue for blobs. It creates + * a blob handle NdbBlob. A second call with same argument returns + * the previously created handle. The handle is linked to the + * operation and is maintained automatically. + * + * See NdbBlob for details. + */ + virtual NdbBlob* getBlobHandle(const char* anAttrName); + virtual NdbBlob* getBlobHandle(Uint32 anAttrId); /** @} *********************************************************************/ /** @@ -644,6 +656,11 @@ public: */ int getNdbErrorLine(); + /** + * Get table name of this operation. + */ + const char* getTableName() const; + /** @} *********************************************************************/ /** @@ -751,6 +768,7 @@ protected: Uint32 len); NdbRecAttr* getValue_impl(const NdbColumnImpl* anAttrObject, char* aValue = 0); int setValue(const NdbColumnImpl* anAttrObject, const char* aValue, Uint32 len); + NdbBlob* getBlobHandle(NdbConnection* aCon, const NdbColumnImpl* anAttrObject); int incValue(const NdbColumnImpl* anAttrObject, Uint32 aValue); int incValue(const NdbColumnImpl* anAttrObject, Uint64 aValue); int subValue(const NdbColumnImpl* anAttrObject, Uint32 aValue); @@ -789,6 +807,9 @@ protected: Uint32 ptr2int() { return theReceiver.getId(); }; + // get table or index key from prepared signals + int getKeyFromTCREQ(Uint32* data, unsigned size); + int getKeyFromKEYINFO20(Uint32* data, unsigned size); /****************************************************************************** * These are the private variables that are defined in the operation objects. *****************************************************************************/ @@ -869,6 +890,8 @@ protected: // saveBoundATTRINFO() moves ATTRINFO here when setBound() is ready NdbApiSignal* theBoundATTRINFO; Uint32 theTotalBoundAI_Len; + // Blobs in this operation + NdbBlob* theBlobList; }; diff --git a/ndb/include/ndbapi/NdbScanOperation.hpp b/ndb/include/ndbapi/NdbScanOperation.hpp index a329505ef1b..94c9d09cbc2 100644 --- a/ndb/include/ndbapi/NdbScanOperation.hpp +++ b/ndb/include/ndbapi/NdbScanOperation.hpp @@ -31,6 +31,8 @@ #include +class NdbBlob; + /** * @class NdbScanOperation * @brief Class of scan operations for use in transactions. @@ -93,6 +95,10 @@ public: protected: CursorType m_cursor_type; + NdbBlob* getBlobHandle(const char* anAttrName); + NdbBlob* getBlobHandle(Uint32 anAttrId); + +private: NdbScanOperation(Ndb* aNdb); ~NdbScanOperation(); diff --git a/ndb/include/util/NdbSqlUtil.hpp b/ndb/include/util/NdbSqlUtil.hpp index bb573eea17b..dae12bd11a0 100644 --- a/ndb/include/util/NdbSqlUtil.hpp +++ b/ndb/include/util/NdbSqlUtil.hpp @@ -19,6 +19,7 @@ #include #include +#include class NdbSqlUtil { public: @@ -77,7 +78,9 @@ public: Binary, // Len Varbinary, // Max len Datetime, // Precision down to 1 sec (size 8 bytes) - Timespec // Precision down to 1 nsec (size 12 bytes) + Timespec, // Precision down to 1 nsec (size 12 bytes) + Blob, // Blob + Clob // Text blob }; Enum m_typeId; Cmp* m_cmp; // set to NULL if cmp not implemented @@ -121,6 +124,8 @@ private: static Cmp cmpVarbinary; static Cmp cmpDatetime; static Cmp cmpTimespec; + static Cmp cmpBlob; + static Cmp cmpClob; }; inline int @@ -350,6 +355,23 @@ NdbSqlUtil::cmp(Uint32 typeId, const Uint32* p1, const Uint32* p2, Uint32 full, break; case Type::Timespec: // XXX fix this break; + case Type::Blob: // XXX fix + break; + case Type::Clob: + { + // skip blob head, the rest is varchar + const unsigned skip = NDB_BLOB_HEAD_SIZE; + if (size >= skip + 1) { + union { const Uint32* p; const char* v; } u1, u2; + u1.p = p1 + skip; + u2.p = p2 + skip; + // length in first 2 bytes + int k = strncmp(u1.v + 2, u2.v + 2, ((size - skip) << 2) - 2); + return k < 0 ? -1 : k > 0 ? +1 : full == size ? 0 : CmpUnknown; + } + return CmpUnknown; + } + break; } return CmpError; } diff --git a/ndb/src/common/debugger/signaldata/BackupImpl.cpp b/ndb/src/common/debugger/signaldata/BackupImpl.cpp index be9e43e3df1..bdc34d614cf 100644 --- a/ndb/src/common/debugger/signaldata/BackupImpl.cpp +++ b/ndb/src/common/debugger/signaldata/BackupImpl.cpp @@ -24,7 +24,7 @@ printDEFINE_BACKUP_REQ(FILE * out, const Uint32 * data, Uint32 len, Uint16 bno){ sig->backupPtr, sig->backupId, sig->clientRef, sig->clientData); fprintf(out, " backupKey: [ %08x%08x ] DataLength: %d\n", sig->backupKey[0], sig->backupKey[1], sig->backupDataLen); - char buf[sig->nodes.TextLength + 1]; + char buf[_NDB_NODE_BITMASK_SIZE * 8 + 1]; fprintf(out, " Nodes: %s\n", sig->nodes.getText(buf)); return true; } diff --git a/ndb/src/common/debugger/signaldata/CreateTrig.cpp b/ndb/src/common/debugger/signaldata/CreateTrig.cpp index d8360dec4d5..ddd45080cba 100644 --- a/ndb/src/common/debugger/signaldata/CreateTrig.cpp +++ b/ndb/src/common/debugger/signaldata/CreateTrig.cpp @@ -87,7 +87,7 @@ bool printCREATE_TRIG_REQ(FILE * output, const Uint32 * theData, Uint32 len, Uin fprintf(output, "Monitor all attributes: %s ", (sig->getMonitorAllAttributes())?"true":"false"); const AttributeMask& attributeMask = sig->getAttributeMask(); - char buf[attributeMask.TextLength + 1]; + char buf[MAXNROFATTRIBUTESINWORDS * 8 + 1]; fprintf(output, "Attribute mask: %s", attributeMask.getText(buf)); fprintf(output, "\n"); diff --git a/ndb/src/common/portlib/NdbThread.c b/ndb/src/common/portlib/NdbThread.c index b023e851d29..8683a37edcb 100644 --- a/ndb/src/common/portlib/NdbThread.c +++ b/ndb/src/common/portlib/NdbThread.c @@ -58,7 +58,9 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func, pthread_attr_setguardsize(&thread_attr, 2048); #endif +#ifdef PTHREAD_CREATE_JOINABLE /* needed on SCO */ pthread_attr_setdetachstate(&thread_attr, PTHREAD_CREATE_JOINABLE); +#endif result = pthread_create(&tmpThread->thread, &thread_attr, p_thread_func, diff --git a/ndb/src/common/util/NdbSqlUtil.cpp b/ndb/src/common/util/NdbSqlUtil.cpp index e91ade374cf..e34d6d18539 100644 --- a/ndb/src/common/util/NdbSqlUtil.cpp +++ b/ndb/src/common/util/NdbSqlUtil.cpp @@ -155,6 +155,14 @@ NdbSqlUtil::m_typeList[] = { { Type::Timespec, NULL // cmpTimespec + }, + { + Type::Blob, + NULL // cmpDatetime + }, + { + Type::Clob, + cmpClob } }; @@ -284,6 +292,18 @@ NdbSqlUtil::cmpTimespec(const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 return cmp(Type::Timespec, p1, p2, full, size); } +int +NdbSqlUtil::cmpBlob(const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size) +{ + return cmp(Type::Blob, p1, p2, full, size); +} + +int +NdbSqlUtil::cmpClob(const Uint32* p1, const Uint32* p2, Uint32 full, Uint32 size) +{ + return cmp(Type::Clob, p1, p2, full, size); +} + #ifdef NDB_SQL_UTIL_TEST #include diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index 02474f6bee0..933ee2cf8e1 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -2432,6 +2432,7 @@ void Dbacc::execACC_LOCKREQ(Signal* signal) } fragrecptr.i = req->fragPtrI; ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec); + ndbrequire(req->fragId == fragrecptr.p->myfid); // caller must be explicit here ndbrequire(req->accOpPtr == RNIL); // seize operation to hold the lock diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 4f21b66b4d0..5dc4013607e 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -1227,6 +1227,18 @@ Dblqh::sendAddFragReq(Signal* signal) tuxreq->fragOff = addfragptr.p->lh3DistrBits; tuxreq->tableType = addfragptr.p->tableType; tuxreq->primaryTableId = addfragptr.p->primaryTableId; + // pointer to index fragment in TUP + tuxreq->tupIndexFragPtrI = + addfragptr.p->addfragStatus == AddFragRecord::WAIT_TWO_TUX ? + fragptr.p->tupFragptr[0] : fragptr.p->tupFragptr[1]; + // pointers to table fragments in TUP and ACC + FragrecordPtr tFragPtr; + tFragPtr.i = fragptr.p->tableFragptr; + ptrCheckGuard(tFragPtr, cfragrecFileSize, fragrecord); + tuxreq->tupTableFragPtrI[0] = tFragPtr.p->tupFragptr[0]; + tuxreq->tupTableFragPtrI[1] = tFragPtr.p->tupFragptr[1]; + tuxreq->accTableFragPtrI[0] = tFragPtr.p->accFragptr[0]; + tuxreq->accTableFragPtrI[1] = tFragPtr.p->accFragptr[1]; sendSignal(fragptr.p->tuxBlockref, GSN_TUXFRAGREQ, signal, TuxFragReq::SignalLength, JBB); return; diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index e822dfd8c51..f259cd8e391 100644 --- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -2675,8 +2675,8 @@ void Dbtc::execTCKEYREQ(Signal* signal) case ZUPDATE: jam(); if (Tattrlength == 0) { - TCKEY_abort(signal, 5); - return; + //TCKEY_abort(signal, 5); + //return; }//if /*---------------------------------------------------------------------*/ // The missing break is intentional since we also want to set the opLock @@ -5889,62 +5889,70 @@ void Dbtc::checkStartFragTimeout(Signal* signal) /* BEEN DELAYED FOR SO LONG THAT WE ARE FORCED TO PERFORM */ /* SOME ACTION, EITHER ABORT OR RESEND OR REMOVE A NODE FROM */ /* THE WAITING PART OF A PROTOCOL. */ +/* +The algorithm used here is to check 1024 transactions at a time before +doing a real-time break. +To avoid aborting both transactions in a deadlock detected by time-out +we insert a random extra time-out of upto 630 ms by using the lowest +six bits of the api connect reference. +We spread it out from 0 to 630 ms if base time-out is larger than 3 sec, +we spread it out from 0 to 70 ms if base time-out is smaller than 300 msec, +and otherwise we spread it out 310 ms. +*/ /*------------------------------------------------------------------*/ -void Dbtc::timeOutLoopStartLab(Signal* signal, Uint32 TapiConPtr) +void Dbtc::timeOutLoopStartLab(Signal* signal, Uint32 api_con_ptr) { - UintR texpiredTime[8]; - UintR TloopCount = 0; + Uint32 end_ptr, time_passed, time_out_value, mask_value; + const Uint32 api_con_sz= capiConnectFilesize; + const Uint32 tc_timer= ctcTimer; + const Uint32 time_out_param= ctimeOutValue; - ctimeOutCheckHeartbeat = ctcTimer; + ctimeOutCheckHeartbeat = tc_timer; - const Uint32 TapiConSz = capiConnectFilesize; - const Uint32 TtcTimer = ctcTimer; - const Uint32 TtimeOutValue = ctimeOutValue; - - while ((TapiConPtr + 8) < TapiConSz) { + if (api_con_ptr + 1024 < api_con_sz) { jam(); - texpiredTime[0] = TtcTimer - getApiConTimer(TapiConPtr + 0); - texpiredTime[1] = TtcTimer - getApiConTimer(TapiConPtr + 1); - texpiredTime[2] = TtcTimer - getApiConTimer(TapiConPtr + 2); - texpiredTime[3] = TtcTimer - getApiConTimer(TapiConPtr + 3); - texpiredTime[4] = TtcTimer - getApiConTimer(TapiConPtr + 4); - texpiredTime[5] = TtcTimer - getApiConTimer(TapiConPtr + 5); - texpiredTime[6] = TtcTimer - getApiConTimer(TapiConPtr + 6); - texpiredTime[7] = TtcTimer - getApiConTimer(TapiConPtr + 7); - for (Uint32 Ti = 0; Ti < 8; Ti++) { - if (getApiConTimer(TapiConPtr + Ti) != 0) { - if (texpiredTime[Ti] > TtimeOutValue) { - jam(); - timeOutFoundLab(signal, TapiConPtr + Ti); - return; - }//if - }//if - }//for - TapiConPtr += 8; - if (TloopCount++ > 128) { - jam(); - sendContinueTimeOutControl(signal, TapiConPtr); - return; - }//if - }//while - for ( ; TapiConPtr < TapiConSz; TapiConPtr++) { + end_ptr= api_con_ptr + 1024; + } else { jam(); - if (getApiConTimer(TapiConPtr) != 0) { - texpiredTime[0] = TtcTimer - getApiConTimer(TapiConPtr); - if (texpiredTime[0] > TtimeOutValue) { + end_ptr= api_con_sz; + } + if (time_out_param > 300) { + jam(); + mask_value= 63; + } else if (time_out_param < 30) { + jam(); + mask_value= 7; + } else { + jam(); + mask_value= 31; + } + for ( ; api_con_ptr < end_ptr; api_con_ptr++) { + Uint32 api_timer= getApiConTimer(api_con_ptr); + jam(); + if (api_timer != 0) { + time_out_value= time_out_param + (api_con_ptr & mask_value); + time_passed= tc_timer - api_timer; + if (time_passed > time_out_value) { jam(); - timeOutFoundLab(signal, TapiConPtr); + timeOutFoundLab(signal, api_con_ptr); return; - }//if - }//if - }//for - /*------------------------------------------------------------------*/ - /* */ - /* WE HAVE NOW CHECKED ALL TRANSACTIONS FOR TIME-OUT AND ALSO */ - /* STARTED TIME-OUT HANDLING OF THOSE WE FOUND. WE ARE NOW */ - /* READY AND CAN WAIT FOR THE NEXT TIME-OUT CHECK. */ - /*------------------------------------------------------------------*/ - ctimeOutCheckActive = TOCS_FALSE; + } + } + } + if (api_con_ptr == api_con_sz) { + jam(); + /*------------------------------------------------------------------*/ + /* */ + /* WE HAVE NOW CHECKED ALL TRANSACTIONS FOR TIME-OUT AND ALSO */ + /* STARTED TIME-OUT HANDLING OF THOSE WE FOUND. WE ARE NOW */ + /* READY AND CAN WAIT FOR THE NEXT TIME-OUT CHECK. */ + /*------------------------------------------------------------------*/ + ctimeOutCheckActive = TOCS_FALSE; + } else { + jam(); + sendContinueTimeOutControl(signal, api_con_ptr); + } + return; }//Dbtc::timeOutLoopStartLab() void Dbtc::timeOutFoundLab(Signal* signal, Uint32 TapiConPtr) diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 70b8a739fef..ef82876d5b8 100644 --- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -993,6 +993,14 @@ public: Dbtup(const class Configuration &); virtual ~Dbtup(); + /* + * TUX index in TUP has single Uint32 array attribute which stores an + * index node. TUX uses following methods. + */ + int tuxAllocNode(Signal* signal, Uint32 fragPtrI, Uint32& pageId, Uint32& pageOffset, Uint32*& node); + void tuxFreeNode(Signal* signal, Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* node); + void tuxGetNode(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32*& node); + private: BLOCK_DEFINES(Dbtup); diff --git a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp index 3a074f7fe5b..baa738a8c42 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp @@ -179,6 +179,64 @@ Dbtup::execTUP_QUERY_TH(Signal* signal) return; } +int +Dbtup::tuxAllocNode(Signal* signal, Uint32 fragPtrI, Uint32& pageId, Uint32& pageOffset, Uint32*& node) +{ + FragrecordPtr fragPtr; + fragPtr.i = fragPtrI; + ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord); + TablerecPtr tablePtr; + tablePtr.i = fragPtr.p->fragTableId; + ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); + PagePtr pagePtr; + terrorCode = 0; + if (! allocTh(fragPtr.p, tablePtr.p, NORMAL_PAGE, signal, pageOffset, pagePtr)) { + jam(); + ndbrequire(terrorCode != 0); + return terrorCode; + } + pageId = pagePtr.i; + Uint32 attrDescIndex = tablePtr.p->tabDescriptor + (0 << ZAD_LOG_SIZE); + Uint32 attrDataOffset = AttributeOffset::getOffset(tableDescriptor[attrDescIndex + 1].tabDescr); + node = &pagePtr.p->pageWord[pageOffset] + attrDataOffset; + return 0; +} + +void +Dbtup::tuxFreeNode(Signal* signal, Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* node) +{ + FragrecordPtr fragPtr; + fragPtr.i = fragPtrI; + ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord); + TablerecPtr tablePtr; + tablePtr.i = fragPtr.p->fragTableId; + ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); + PagePtr pagePtr; + pagePtr.i = pageId; + ptrCheckGuard(pagePtr, cnoOfPage, page); + Uint32 attrDescIndex = tablePtr.p->tabDescriptor + (0 << ZAD_LOG_SIZE); + Uint32 attrDataOffset = AttributeOffset::getOffset(tableDescriptor[attrDescIndex + 1].tabDescr); + ndbrequire(node == &pagePtr.p->pageWord[pageOffset] + attrDataOffset); + freeTh(fragPtr.p, tablePtr.p, signal, pagePtr.p, pageOffset); +} + +void +Dbtup::tuxGetNode(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32*& node) +{ + FragrecordPtr fragPtr; + fragPtr.i = fragPtrI; + ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord); + TablerecPtr tablePtr; + tablePtr.i = fragPtr.p->fragTableId; + ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); + PagePtr pagePtr; + pagePtr.i = pageId; + ptrCheckGuard(pagePtr, cnoOfPage, page); + Uint32 attrDescIndex = tablePtr.p->tabDescriptor + (0 << ZAD_LOG_SIZE); + Uint32 attrDataOffset = AttributeOffset::getOffset(tableDescriptor[attrDescIndex + 1].tabDescr); + node = &pagePtr.p->pageWord[pageOffset] + attrDataOffset; +} + void Dbtup::execTUP_STORE_TH(Signal* signal) { diff --git a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp index e871fc86dea..dba778ccebe 100644 --- a/ndb/src/kernel/blocks/dbtux/Dbtux.hpp +++ b/ndb/src/kernel/blocks/dbtux/Dbtux.hpp @@ -25,6 +25,9 @@ #include #include +// big brother +#include + // signal classes #include #include @@ -92,15 +95,13 @@ public: Dbtux(const Configuration& conf); virtual ~Dbtux(); + // pointer to TUP instance in this thread + Dbtup* c_tup; + private: // sizes are in words (Uint32) static const unsigned MaxIndexFragments = 2 * NO_OF_FRAG_PER_NODE; static const unsigned MaxIndexAttributes = MAX_ATTRIBUTES_IN_INDEX; -#ifdef VM_TRACE - static const unsigned MaxNodeHandles = 10000; // More space for printTree -#else - static const unsigned MaxNodeHandles = 128; // enough for 1 operation -#endif static const unsigned MaxAttrDataSize = 2048; public: static const unsigned DescPageSize = 256; @@ -153,8 +154,7 @@ private: static const unsigned AttributeHeaderSize = 1; /* - * Logical tuple address, "local key". Identifies both table tuples - * and index tuples. The code assumes it is one word. + * Logical tuple address, "local key". Identifies table tuples. */ typedef Uint32 TupAddr; static const unsigned NullTupAddr = (Uint32)-1; @@ -168,8 +168,18 @@ private: Uint32 m_pageId; // page i-value Uint16 m_pageOffset; // page offset in words TupLoc(); + TupLoc(Uint32 pageId, Uint16 pageOffset); + bool operator==(const TupLoc& loc) const; + bool operator!=(const TupLoc& loc) const; }; + /* + * There is no const member NullTupLoc since the compiler may not be + * able to optimize it to TupLoc() constants. Instead null values are + * constructed on the stack with TupLoc(). + */ +#define NullTupLoc TupLoc() + // tree definitions /* @@ -183,7 +193,7 @@ private: TupAddr m_tupAddr; // address of original tuple Uint16 m_tupVersion; // version Uint8 m_fragBit; // which duplicated table fragment - Uint8 unused1; + Uint8 pad1; TreeEnt(); // methods int cmp(const TreeEnt ent) const; @@ -196,7 +206,7 @@ private: * prefix 3) max and min entries 4) rest of entries 5) one extra entry * used as work space. * - * struct TreeNode part 1 + * struct TreeNode part 1, size 6 words * min prefix part 2, size TreeHead::m_prefSize * max prefix part 2, size TreeHead::m_prefSize * max entry part 3 @@ -204,6 +214,10 @@ private: * rest of entries part 4 * work entry part 5 * + * There are 3 links to other nodes: left child, right child, parent. + * These are in TupLoc format but the pageIds and pageOffsets are + * stored in separate arrays (saves 1 word). + * * Occupancy (number of entries) is at least 1 except temporarily when * a node is about to be removed. If occupancy is 1, only max entry * is present but both min and max prefixes are set. @@ -211,11 +225,12 @@ private: struct TreeNode; friend struct TreeNode; struct TreeNode { - TupAddr m_link[3]; // link to 0-left child 1-right child 2-parent - Uint8 m_side; // we are 0-left child 1-right child 2-root + Uint32 m_linkPI[3]; // link to 0-left child 1-right child 2-parent + Uint16 m_linkPO[3]; // page offsets for above real page ids + unsigned m_side : 2; // we are 0-left child 1-right child 2-root + int m_balance : 2; // balance -1, 0, +1 + unsigned pad1 : 4; Uint8 m_occup; // current number of entries - Int8 m_balance; // balance -1, 0, +1 - Uint8 unused1; Uint32 m_nodeScan; // list of scans at this node TreeNode(); }; @@ -243,7 +258,7 @@ private: Uint8 m_prefSize; // words in min/max prefix each Uint8 m_minOccup; // min entries in internal node Uint8 m_maxOccup; // max entries in node - TupAddr m_root; // root node + TupLoc m_root; // root node TreeHead(); // methods unsigned getSize(AccSize acc) const; @@ -261,8 +276,7 @@ private: struct TreePos; friend struct TreePos; struct TreePos { - TupAddr m_addr; // logical node address - TupLoc m_loc; // physical address + TupLoc m_loc; // physical node address Uint16 m_pos; // position 0 to m_occup Uint8 m_match; // at an existing entry Uint8 m_dir; // from link (0-2) or within node (3) @@ -443,9 +457,11 @@ private: Uint16 m_descOff; Uint16 m_numAttrs; TreeHead m_tree; - Uint32 m_nodeList; // node cache of current operation - Uint32 m_nodeFree; // one node pre-allocated for insert + TupLoc m_freeLoc; // one node pre-allocated for insert DLList m_scanList; // current scans on this fragment + Uint32 m_tupIndexFragPtrI; + Uint32 m_tupTableFragPtrI[2]; + Uint32 m_accTableFragPtrI[2]; union { Uint32 nextPool; }; @@ -476,62 +492,39 @@ private: // node handles /* - * A tree operation builds a cache of accessed nodes. This allows - * different implementations of index memory access. The cache is - * committed and released at the end of the operation. + * A node handle is a reference to a tree node in TUP. It is used to + * operate on the node. Node handles are allocated on the stack. */ struct NodeHandle; friend struct NodeHandle; struct NodeHandle { - enum Flags { - // bits 0,1 mark need for left,right prefix - DoInsert = (1 << 2), - DoDelete = (1 << 3), - DoUpdate = (1 << 4) - }; - Dbtux& m_tux; // this block Frag& m_frag; // fragment using the node - TupAddr m_addr; // logical node address TupLoc m_loc; // physical node address - AccSize m_acc; // accessed size - unsigned m_flags; // flags - union { - Uint32 m_next; // next active node under fragment - Uint32 nextPool; - }; TreeNode* m_node; // pointer to node storage - Uint32 m_cache[MaxTreeNodeSize]; - NodeHandle(Dbtux& tux, Frag& frag); + AccSize m_acc; // accessed size + NodeHandle(Frag& frag); + NodeHandle(const NodeHandle& node); + NodeHandle& operator=(const NodeHandle& node); // getters - TupAddr getLink(unsigned i); + TupLoc getLink(unsigned i); unsigned getChilds(); // cannot spell unsigned getSide(); unsigned getOccup(); int getBalance(); Uint32 getNodeScan(); - Data getPref(unsigned i); - TreeEnt getEnt(unsigned pos); - TreeEnt getMinMax(unsigned i); // setters - void setLink(unsigned i, TupAddr addr); + void setLink(unsigned i, TupLoc loc); void setSide(unsigned i); void setOccup(unsigned n); void setBalance(int b); void setNodeScan(Uint32 scanPtrI); - // operations XXX maybe these should move to Dbtux level - void pushUp(Signal* signal, unsigned pos, const TreeEnt& ent); - void popDown(Signal* signal, unsigned pos, TreeEnt& ent); - void pushDown(Signal* signal, unsigned pos, TreeEnt& ent); - void popUp(Signal* signal, unsigned pos, TreeEnt& ent); - void slide(Signal* signal, Ptr nodePtr, unsigned i); - void linkScan(Dbtux::ScanOpPtr scanPtr); - void unlinkScan(Dbtux::ScanOpPtr scanPtr); - bool islinkScan(Dbtux::ScanOpPtr scanPtr); - // for ndbrequire - void progError(int line, int cause, const char* extra); + // access other parts of the node + Data getPref(unsigned i); + TreeEnt getEnt(unsigned pos); + TreeEnt getMinMax(unsigned i); + // for ndbrequire and ndbassert + void progError(int line, int cause, const char* file); }; - typedef Ptr NodeHandlePtr; - ArrayPool c_nodeHandlePool; // parameters for methods @@ -562,17 +555,6 @@ private: ReadPar(); }; - /* - * Node storage operation. - */ - struct StorePar { - TupStoreTh::OpCode m_opCode;// operation code - unsigned m_offset; // data offset in words - unsigned m_size; // number of words - Uint32 m_errorCode; // terrorCode from TUP - StorePar(); - }; - /* * Tree search for entry. */ @@ -642,20 +624,26 @@ private: void execTUX_MAINT_REQ(Signal* signal); void tupReadAttrs(Signal* signal, const Frag& frag, ReadPar& readPar); void tupReadKeys(Signal* signal, const Frag& frag, ReadPar& readPar); - void tupStoreTh(Signal* signal, const Frag& frag, NodeHandlePtr nodePtr, StorePar storePar); /* * DbtuxNode.cpp */ - void seizeNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr); - void preallocNode(Signal* signal, Frag& frag, Uint32& errorCode); - void findNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, TupAddr addr); - void selectNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, TupAddr addr, AccSize acc); - void insertNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, AccSize acc); - void deleteNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr); - void accessNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, AccSize acc); - void setNodePref(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, unsigned i); - void commitNodes(Signal* signal, Frag& frag, bool updateOk); + int allocNode(Signal* signal, NodeHandle& node); + void accessNode(Signal* signal, NodeHandle& node, AccSize acc); + void selectNode(Signal* signal, NodeHandle& node, TupLoc loc, AccSize acc); + void insertNode(Signal* signal, NodeHandle& node, AccSize acc); + void deleteNode(Signal* signal, NodeHandle& node); + void setNodePref(Signal* signal, NodeHandle& node, unsigned i); + // node operations + void nodePushUp(Signal* signal, NodeHandle& node, unsigned pos, const TreeEnt& ent); + void nodePopDown(Signal* signal, NodeHandle& node, unsigned pos, TreeEnt& ent); + void nodePushDown(Signal* signal, NodeHandle& node, unsigned pos, TreeEnt& ent); + void nodePopUp(Signal* signal, NodeHandle& node, unsigned pos, TreeEnt& ent); + void nodeSlide(Signal* signal, NodeHandle& dstNode, NodeHandle& srcNode, unsigned i); + // scans linked to node + void linkScan(NodeHandle& node, ScanOpPtr scanPtr); + void unlinkScan(NodeHandle& node, ScanOpPtr scanPtr); + bool islinkScan(NodeHandle& node, ScanOpPtr scanPtr); /* * DbtuxTree.cpp @@ -663,8 +651,8 @@ private: void treeSearch(Signal* signal, Frag& frag, SearchPar searchPar, TreePos& treePos); void treeAdd(Signal* signal, Frag& frag, TreePos treePos, TreeEnt ent); void treeRemove(Signal* signal, Frag& frag, TreePos treePos); - void treeRotateSingle(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, unsigned i); - void treeRotateDouble(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, unsigned i); + void treeRotateSingle(Signal* signal, Frag& frag, NodeHandle& node, unsigned i); + void treeRotateDouble(Signal* signal, Frag& frag, NodeHandle& node, unsigned i); /* * DbtuxScan.cpp @@ -698,23 +686,24 @@ private: struct PrintPar { char m_path[100]; // LR prefix unsigned m_side; // expected side - TupAddr m_parent; // expected parent address + TupLoc m_parent; // expected parent address int m_depth; // returned depth unsigned m_occup; // returned occupancy bool m_ok; // returned status PrintPar(); }; void printTree(Signal* signal, Frag& frag, NdbOut& out); - void printNode(Signal* signal, Frag& frag, NdbOut& out, TupAddr addr, PrintPar& par); + void printNode(Signal* signal, Frag& frag, NdbOut& out, TupLoc loc, PrintPar& par); + friend class NdbOut& operator<<(NdbOut&, const TupLoc&); friend class NdbOut& operator<<(NdbOut&, const TreeEnt&); friend class NdbOut& operator<<(NdbOut&, const TreeNode&); friend class NdbOut& operator<<(NdbOut&, const TreeHead&); friend class NdbOut& operator<<(NdbOut&, const TreePos&); friend class NdbOut& operator<<(NdbOut&, const DescAttr&); + friend class NdbOut& operator<<(NdbOut&, const ScanOp&); friend class NdbOut& operator<<(NdbOut&, const Index&); friend class NdbOut& operator<<(NdbOut&, const Frag&); friend class NdbOut& operator<<(NdbOut&, const NodeHandle&); - friend class NdbOut& operator<<(NdbOut&, const ScanOp&); FILE* debugFile; NdbOut debugOut; unsigned debugFlags; @@ -831,8 +820,45 @@ Dbtux::ConstData::operator=(Data data) return *this; } +// Dbtux::TupLoc + +inline +Dbtux::TupLoc::TupLoc() : + m_pageId(RNIL), + m_pageOffset(0) +{ +} + +inline +Dbtux::TupLoc::TupLoc(Uint32 pageId, Uint16 pageOffset) : + m_pageId(pageId), + m_pageOffset(pageOffset) +{ +} + +inline bool +Dbtux::TupLoc::operator==(const TupLoc& loc) const +{ + return m_pageId == loc.m_pageId && m_pageOffset == loc.m_pageOffset; +} + +inline bool +Dbtux::TupLoc::operator!=(const TupLoc& loc) const +{ + return ! (*this == loc); +} + // Dbtux::TreeEnt +inline +Dbtux::TreeEnt::TreeEnt() : + m_tupAddr(NullTupAddr), + m_tupVersion(0), + m_fragBit(255), + pad1(0) +{ +} + inline int Dbtux::TreeEnt::cmp(const TreeEnt ent) const { @@ -852,8 +878,36 @@ Dbtux::TreeEnt::cmp(const TreeEnt ent) const return 0; } +// Dbtux::TreeNode + +inline +Dbtux::TreeNode::TreeNode() : + m_side(2), + m_balance(0), + pad1(0), + m_occup(0), + m_nodeScan(RNIL) +{ + m_linkPI[0] = NullTupLoc.m_pageId; + m_linkPO[0] = NullTupLoc.m_pageOffset; + m_linkPI[1] = NullTupLoc.m_pageId; + m_linkPO[1] = NullTupLoc.m_pageOffset; + m_linkPI[2] = NullTupLoc.m_pageId; + m_linkPO[2] = NullTupLoc.m_pageOffset; +} + // Dbtux::TreeHead +inline +Dbtux::TreeHead::TreeHead() : + m_nodeSize(0), + m_prefSize(0), + m_minOccup(0), + m_maxOccup(0), + m_root() +{ +} + inline unsigned Dbtux::TreeHead::getSize(AccSize acc) const { @@ -885,52 +939,10 @@ Dbtux::TreeHead::getEntList(TreeNode* node) const return (TreeEnt*)ptr; } -// Dbtux - -// constructors - -inline -Dbtux::TupLoc::TupLoc() : - m_pageId(RNIL), - m_pageOffset(0) -{ -} - -inline -Dbtux::TreeEnt::TreeEnt() : - m_tupAddr(NullTupAddr), - m_tupVersion(0), - m_fragBit(255), - unused1(0) -{ -} - -inline -Dbtux::TreeNode::TreeNode() : - m_side(255), - m_occup(0), - m_balance(0), - unused1(0xa1), - m_nodeScan(RNIL) -{ - m_link[0] = NullTupAddr; - m_link[1] = NullTupAddr; - m_link[2] = NullTupAddr; -} - -inline -Dbtux::TreeHead::TreeHead() : - m_nodeSize(0), - m_prefSize(0), - m_minOccup(0), - m_maxOccup(0), - m_root(0) -{ -} +// Dbtux::TreePos inline Dbtux::TreePos::TreePos() : - m_addr(NullTupAddr), m_loc(), m_pos(ZNIL), m_match(false), @@ -939,6 +951,8 @@ Dbtux::TreePos::TreePos() : { } +// Dbtux::DescPage + inline Dbtux::DescPage::DescPage() : m_nextPage(RNIL), @@ -953,62 +967,7 @@ Dbtux::DescPage::DescPage() : } } -inline -Dbtux::Index::Index() : - m_state(NotDefined), - m_tableType(DictTabInfo::UndefTableType), - m_tableId(RNIL), - m_numFrags(0), - m_descPage(RNIL), - m_descOff(0), - m_numAttrs(0) -{ - for (unsigned i = 0; i < MaxIndexFragments; i++) { - m_fragId[i] = ZNIL; - m_fragPtrI[i] = RNIL; - }; -}; - -inline -Dbtux::Frag::Frag(ArrayPool& scanOpPool) : - m_tableId(RNIL), - m_indexId(RNIL), - m_fragOff(ZNIL), - m_fragId(ZNIL), - m_descPage(RNIL), - m_descOff(0), - m_numAttrs(ZNIL), - m_tree(), - m_nodeList(RNIL), - m_nodeFree(RNIL), - m_scanList(scanOpPool) -{ -} - -inline -Dbtux::FragOp::FragOp() : - m_userPtr(RNIL), - m_userRef(RNIL), - m_indexId(RNIL), - m_fragId(ZNIL), - m_fragPtrI(RNIL), - m_fragNo(ZNIL), - m_numAttrsRecvd(ZNIL) -{ -}; - -inline -Dbtux::NodeHandle::NodeHandle(Dbtux& tux, Frag& frag) : - m_tux(tux), - m_frag(frag), - m_addr(NullTupAddr), - m_loc(), - m_acc(AccNone), - m_flags(0), - m_next(RNIL), - m_node(0) -{ -} +// Dbtux::ScanOp inline Dbtux::ScanOp::ScanOp(ScanBoundPool& scanBoundPool) : @@ -1041,6 +1000,196 @@ Dbtux::ScanOp::ScanOp(ScanBoundPool& scanBoundPool) : } } +// Dbtux::Index + +inline +Dbtux::Index::Index() : + m_state(NotDefined), + m_tableType(DictTabInfo::UndefTableType), + m_tableId(RNIL), + m_numFrags(0), + m_descPage(RNIL), + m_descOff(0), + m_numAttrs(0) +{ + for (unsigned i = 0; i < MaxIndexFragments; i++) { + m_fragId[i] = ZNIL; + m_fragPtrI[i] = RNIL; + }; +}; + +// Dbtux::Frag + +inline +Dbtux::Frag::Frag(ArrayPool& scanOpPool) : + m_tableId(RNIL), + m_indexId(RNIL), + m_fragOff(ZNIL), + m_fragId(ZNIL), + m_descPage(RNIL), + m_descOff(0), + m_numAttrs(ZNIL), + m_tree(), + m_freeLoc(), + m_scanList(scanOpPool), + m_tupIndexFragPtrI(RNIL) +{ + m_tupTableFragPtrI[0] = RNIL; + m_tupTableFragPtrI[1] = RNIL; + m_accTableFragPtrI[0] = RNIL; + m_accTableFragPtrI[1] = RNIL; +} + +// Dbtux::FragOp + +inline +Dbtux::FragOp::FragOp() : + m_userPtr(RNIL), + m_userRef(RNIL), + m_indexId(RNIL), + m_fragId(ZNIL), + m_fragPtrI(RNIL), + m_fragNo(ZNIL), + m_numAttrsRecvd(ZNIL) +{ +}; + +// Dbtux::NodeHandle + +inline +Dbtux::NodeHandle::NodeHandle(Frag& frag) : + m_frag(frag), + m_loc(), + m_node(0), + m_acc(AccNone) +{ +} + +inline +Dbtux::NodeHandle::NodeHandle(const NodeHandle& node) : + m_frag(node.m_frag), + m_loc(node.m_loc), + m_node(node.m_node), + m_acc(node.m_acc) +{ +} + +inline Dbtux::NodeHandle& +Dbtux::NodeHandle::operator=(const NodeHandle& node) +{ + ndbassert(&m_frag == &node.m_frag); + m_loc = node.m_loc; + m_node = node.m_node; + m_acc = node.m_acc; + return *this; +} + +inline Dbtux::TupLoc +Dbtux::NodeHandle::getLink(unsigned i) +{ + ndbrequire(i <= 2); + return TupLoc(m_node->m_linkPI[i], m_node->m_linkPO[i]); +} + +inline unsigned +Dbtux::NodeHandle::getChilds() +{ + return (getLink(0) != NullTupLoc) + (getLink(1) != NullTupLoc); +} + +inline unsigned +Dbtux::NodeHandle::getSide() +{ + return m_node->m_side; +} + +inline unsigned +Dbtux::NodeHandle::getOccup() +{ + return m_node->m_occup; +} + +inline int +Dbtux::NodeHandle::getBalance() +{ + return m_node->m_balance; +} + +inline Uint32 +Dbtux::NodeHandle::getNodeScan() +{ + return m_node->m_nodeScan; +} + +inline void +Dbtux::NodeHandle::setLink(unsigned i, TupLoc loc) +{ + ndbrequire(i <= 2); + m_node->m_linkPI[i] = loc.m_pageId; + m_node->m_linkPO[i] = loc.m_pageOffset; +} + +inline void +Dbtux::NodeHandle::setSide(unsigned i) +{ + ndbrequire(i <= 2); + m_node->m_side = i; +} + +inline void +Dbtux::NodeHandle::setOccup(unsigned n) +{ + TreeHead& tree = m_frag.m_tree; + ndbrequire(n <= tree.m_maxOccup); + m_node->m_occup = n; +} + +inline void +Dbtux::NodeHandle::setBalance(int b) +{ + ndbrequire(abs(b) <= 1); + m_node->m_balance = b; +} + +inline void +Dbtux::NodeHandle::setNodeScan(Uint32 scanPtrI) +{ + m_node->m_nodeScan = scanPtrI; +} + +inline Dbtux::Data +Dbtux::NodeHandle::getPref(unsigned i) +{ + TreeHead& tree = m_frag.m_tree; + ndbrequire(m_acc >= AccPref && i <= 1); + return tree.getPref(m_node, i); +} + +inline Dbtux::TreeEnt +Dbtux::NodeHandle::getEnt(unsigned pos) +{ + TreeHead& tree = m_frag.m_tree; + TreeEnt* entList = tree.getEntList(m_node); + const unsigned occup = m_node->m_occup; + ndbrequire(pos < occup); + if (pos == 0 || pos == occup - 1) { + ndbrequire(m_acc >= AccPref) + } else { + ndbrequire(m_acc == AccFull) + } + return entList[(1 + pos) % occup]; +} + +inline Dbtux::TreeEnt +Dbtux::NodeHandle::getMinMax(unsigned i) +{ + const unsigned occup = m_node->m_occup; + ndbrequire(i <= 1 && occup != 0); + return getEnt(i == 0 ? 0 : occup - 1); +} + +// parameters for methods + inline Dbtux::CopyPar::CopyPar() : m_items(0), @@ -1061,15 +1210,6 @@ Dbtux::ReadPar::ReadPar() : { } -inline -Dbtux::StorePar::StorePar() : - m_opCode(TupStoreTh::OpUndefined), - m_offset(0), - m_size(0), - m_errorCode(0) -{ -} - inline Dbtux::SearchPar::SearchPar() : m_data(0), @@ -1103,7 +1243,7 @@ Dbtux::PrintPar::PrintPar() : // caller fills in m_path(), m_side(255), - m_parent(NullTupAddr), + m_parent(), // default return values m_depth(0), m_occup(0), @@ -1112,118 +1252,6 @@ Dbtux::PrintPar::PrintPar() : } #endif -// node handles - -inline Dbtux::TupAddr -Dbtux::NodeHandle::getLink(unsigned i) -{ - ndbrequire(i <= 2); - return m_node->m_link[i]; -} - -inline unsigned -Dbtux::NodeHandle::getChilds() -{ - return - (m_node->m_link[0] != NullTupAddr) + - (m_node->m_link[1] != NullTupAddr); -} - -inline Dbtux::TupAddr -Dbtux::NodeHandle::getSide() -{ - return m_node->m_side; -} - -inline unsigned -Dbtux::NodeHandle::getOccup() -{ - return m_node->m_occup; -} - -inline int -Dbtux::NodeHandle::getBalance() -{ - return m_node->m_balance; -} - -inline Uint32 -Dbtux::NodeHandle::getNodeScan() -{ - return m_node->m_nodeScan; -} - -inline Dbtux::Data -Dbtux::NodeHandle::getPref(unsigned i) -{ - TreeHead& tree = m_frag.m_tree; - ndbrequire(m_acc >= AccPref && i <= 1); - return tree.getPref(m_node, i); -} - -inline Dbtux::TreeEnt -Dbtux::NodeHandle::getEnt(unsigned pos) -{ - TreeHead& tree = m_frag.m_tree; - TreeEnt* entList = tree.getEntList(m_node); - const unsigned occup = m_node->m_occup; - ndbrequire(pos < occup); - if (pos == 0 || pos == occup - 1) { - ndbrequire(m_acc >= AccPref) - } else { - ndbrequire(m_acc == AccFull) - } - return entList[(1 + pos) % occup]; -} - -inline Dbtux::TreeEnt -Dbtux::NodeHandle::getMinMax(unsigned i) -{ - const unsigned occup = m_node->m_occup; - ndbrequire(i <= 1 && occup != 0); - return getEnt(i == 0 ? 0 : occup - 1); -} - -inline void -Dbtux::NodeHandle::setLink(unsigned i, TupAddr addr) -{ - ndbrequire(i <= 2); - m_node->m_link[i] = addr; - m_flags |= DoUpdate; -} - -inline void -Dbtux::NodeHandle::setSide(unsigned i) -{ - // ndbrequire(i <= 1); - m_node->m_side = i; - m_flags |= DoUpdate; -} - -inline void -Dbtux::NodeHandle::setOccup(unsigned n) -{ - TreeHead& tree = m_frag.m_tree; - ndbrequire(n <= tree.m_maxOccup); - m_node->m_occup = n; - m_flags |= DoUpdate; -} - -inline void -Dbtux::NodeHandle::setBalance(int b) -{ - ndbrequire(abs(b) <= 1); - m_node->m_balance = b; - m_flags |= DoUpdate; -} - -inline void -Dbtux::NodeHandle::setNodeScan(Uint32 scanPtrI) -{ - m_node->m_nodeScan = scanPtrI; - m_flags |= DoUpdate; -} - // other methods inline Dbtux::DescEnt& diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp index c5d24205d1a..11411c886be 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxDebug.cpp @@ -97,7 +97,7 @@ Dbtux::printTree(Signal* signal, Frag& frag, NdbOut& out) PrintPar par; strcpy(par.m_path, "."); par.m_side = 2; - par.m_parent = NullTupAddr; + par.m_parent = NullTupLoc; printNode(signal, frag, out, tree.m_root, par); out.m_out->flush(); if (! par.m_ok) { @@ -106,26 +106,24 @@ Dbtux::printTree(Signal* signal, Frag& frag, NdbOut& out) signal->theData[1] = 1; execDUMP_STATE_ORD(signal); if (debugFile != 0) { - commitNodes(signal, frag, false); printTree(signal, frag, debugOut); } } ndbrequire(false); } - commitNodes(signal, frag, false); } void -Dbtux::printNode(Signal* signal, Frag& frag, NdbOut& out, TupAddr addr, PrintPar& par) +Dbtux::printNode(Signal* signal, Frag& frag, NdbOut& out, TupLoc loc, PrintPar& par) { - if (addr == NullTupAddr) { + if (loc == NullTupLoc) { par.m_depth = 0; return; } TreeHead& tree = frag.m_tree; - NodeHandlePtr nodePtr; - selectNode(signal, frag, nodePtr, addr, AccFull); - out << par.m_path << " " << *nodePtr.p << endl; + NodeHandle node(frag); + selectNode(signal, node, loc, AccFull); + out << par.m_path << " " << node << endl; // check children PrintPar cpar[2]; ndbrequire(strlen(par.m_path) + 1 < sizeof(par.m_path)); @@ -133,57 +131,57 @@ Dbtux::printNode(Signal* signal, Frag& frag, NdbOut& out, TupAddr addr, PrintPar sprintf(cpar[i].m_path, "%s%c", par.m_path, "LR"[i]); cpar[i].m_side = i; cpar[i].m_depth = 0; - cpar[i].m_parent = addr; - printNode(signal, frag, out, nodePtr.p->getLink(i), cpar[i]); + cpar[i].m_parent = loc; + printNode(signal, frag, out, node.getLink(i), cpar[i]); if (! cpar[i].m_ok) { par.m_ok = false; } } // check child-parent links - if (nodePtr.p->getLink(2) != par.m_parent) { + if (node.getLink(2) != par.m_parent) { par.m_ok = false; out << par.m_path << " *** "; - out << "parent addr " << hex << nodePtr.p->getLink(2); + out << "parent loc " << hex << node.getLink(2); out << " should be " << hex << par.m_parent << endl; } - if (nodePtr.p->getSide() != par.m_side) { + if (node.getSide() != par.m_side) { par.m_ok = false; out << par.m_path << " *** "; - out << "side " << dec << nodePtr.p->getSide(); + out << "side " << dec << node.getSide(); out << " should be " << dec << par.m_side << endl; } // check balance const int balance = -cpar[0].m_depth + cpar[1].m_depth; - if (nodePtr.p->getBalance() != balance) { + if (node.getBalance() != balance) { par.m_ok = false; out << par.m_path << " *** "; - out << "balance " << nodePtr.p->getBalance(); + out << "balance " << node.getBalance(); out << " should be " << balance << endl; } - if (abs(nodePtr.p->getBalance()) > 1) { + if (abs(node.getBalance()) > 1) { par.m_ok = false; out << par.m_path << " *** "; - out << "balance " << nodePtr.p->getBalance() << " is invalid" << endl; + out << "balance " << node.getBalance() << " is invalid" << endl; } // check occupancy - if (nodePtr.p->getOccup() > tree.m_maxOccup) { + if (node.getOccup() > tree.m_maxOccup) { par.m_ok = false; out << par.m_path << " *** "; - out << "occupancy " << nodePtr.p->getOccup(); + out << "occupancy " << node.getOccup(); out << " greater than max " << tree.m_maxOccup << endl; } // check for occupancy of interior node - if (nodePtr.p->getChilds() == 2 && nodePtr.p->getOccup() < tree.m_minOccup) { + if (node.getChilds() == 2 && node.getOccup() < tree.m_minOccup) { par.m_ok = false; out << par.m_path << " *** "; - out << "occupancy " << nodePtr.p->getOccup() << " of interior node"; + out << "occupancy " << node.getOccup() << " of interior node"; out << " less than min " << tree.m_minOccup << endl; } // check missed half-leaf/leaf merge for (unsigned i = 0; i <= 1; i++) { - if (nodePtr.p->getLink(i) != NullTupAddr && - nodePtr.p->getLink(1 - i) == NullTupAddr && - nodePtr.p->getOccup() + cpar[i].m_occup <= tree.m_maxOccup) { + if (node.getLink(i) != NullTupLoc && + node.getLink(1 - i) == NullTupLoc && + node.getOccup() + cpar[i].m_occup <= tree.m_maxOccup) { par.m_ok = false; out << par.m_path << " *** "; out << "missed merge with child " << i << endl; @@ -191,7 +189,19 @@ Dbtux::printNode(Signal* signal, Frag& frag, NdbOut& out, TupAddr addr, PrintPar } // return values par.m_depth = 1 + max(cpar[0].m_depth, cpar[1].m_depth); - par.m_occup = nodePtr.p->getOccup(); + par.m_occup = node.getOccup(); +} + +NdbOut& +operator<<(NdbOut& out, const Dbtux::TupLoc& loc) +{ + if (loc == Dbtux::NullTupLoc) { + out << "null"; + } else { + out << hex << loc.m_pageId; + out << "." << dec << loc.m_pageOffset; + } + return out; } NdbOut& @@ -206,10 +216,13 @@ operator<<(NdbOut& out, const Dbtux::TreeEnt& ent) NdbOut& operator<<(NdbOut& out, const Dbtux::TreeNode& node) { + Dbtux::TupLoc link0(node.m_linkPI[0], node.m_linkPO[0]); + Dbtux::TupLoc link1(node.m_linkPI[1], node.m_linkPO[1]); + Dbtux::TupLoc link2(node.m_linkPI[2], node.m_linkPO[2]); out << "[TreeNode " << hex << &node; - out << " [left " << hex << node.m_link[0] << "]"; - out << " [right " << hex << node.m_link[1] << "]"; - out << " [up " << hex << node.m_link[2] << "]"; + out << " [left " << link0 << "]"; + out << " [right " << link1 << "]"; + out << " [up " << link2 << "]"; out << " [side " << dec << node.m_side << "]"; out << " [occup " << dec << node.m_occup << "]"; out << " [balance " << dec << (int)node.m_balance << "]"; @@ -238,7 +251,7 @@ NdbOut& operator<<(NdbOut& out, const Dbtux::TreePos& pos) { out << "[TreePos " << hex << &pos; - out << " [addr " << hex << pos.m_addr << "]"; + out << " [loc " << pos.m_loc << "]"; out << " [pos " << dec << pos.m_pos << "]"; out << " [match " << dec << pos.m_match << "]"; out << " [dir " << dec << pos.m_dir << "]"; @@ -338,9 +351,8 @@ operator<<(NdbOut& out, const Dbtux::NodeHandle& node) const Dbtux::Frag& frag = node.m_frag; const Dbtux::TreeHead& tree = frag.m_tree; out << "[NodeHandle " << hex << &node; - out << " [addr " << hex << node.m_addr << "]"; + out << " [loc " << node.m_loc << "]"; out << " [acc " << dec << node.m_acc << "]"; - out << " [flags " << hex << node.m_flags << "]"; out << " [node " << *node.m_node << "]"; if (node.m_acc >= Dbtux::AccPref) { for (unsigned i = 0; i <= 1; i++) { diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp index 082b243bcb1..788d29f3bce 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxGen.cpp @@ -21,6 +21,7 @@ Dbtux::Dbtux(const Configuration& conf) : SimulatedBlock(DBTUX, conf), + c_tup(0), c_descPageList(RNIL), #ifdef VM_TRACE debugFile(0), @@ -123,6 +124,8 @@ Dbtux::execSTTOR(Signal* signal) case 1: jam(); CLEAR_ERROR_INSERT_VALUE; + c_tup = (Dbtup*)globalData.getBlock(DBTUP); + ndbrequire(c_tup != 0); break; case 3: jam(); @@ -175,12 +178,11 @@ Dbtux::execREAD_CONFIG_REQ(Signal* signal) c_fragPool.setSize(nFragment); c_descPagePool.setSize(nDescPage); c_fragOpPool.setSize(MaxIndexFragments); - c_nodeHandlePool.setSize(MaxNodeHandles); c_scanOpPool.setSize(nScanOp); c_scanBoundPool.setSize(nScanBoundWords); /* * Index id is physical array index. We seize and initialize all - * index records now. This assumes ArrayPool is an array. + * index records now. */ IndexPtr indexPtr; while (1) { diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp index a6b2485067c..e674cdfca74 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxMaint.cpp @@ -72,7 +72,6 @@ Dbtux::execTUX_MAINT_REQ(Signal* signal) } ndbrequire(fragPtr.i != RNIL); Frag& frag = *fragPtr.p; - ndbrequire(frag.m_nodeList == RNIL); // set up index entry TreeEnt ent; ent.m_tupAddr = req->tupAddr; @@ -143,17 +142,18 @@ Dbtux::execTUX_MAINT_REQ(Signal* signal) } /* * At most one new node is inserted in the operation. We keep one - * free node pre-allocated so the operation cannot fail. This also - * gives a real TupAddr for links to the new node. + * free node pre-allocated so the operation cannot fail. */ - if (frag.m_nodeFree == RNIL) { + if (frag.m_freeLoc == NullTupLoc) { jam(); - preallocNode(signal, frag, req->errorCode); + NodeHandle node(frag); + req->errorCode = allocNode(signal, node); if (req->errorCode != 0) { jam(); break; } - ndbrequire(frag.m_nodeFree != RNIL); + frag.m_freeLoc = node.m_loc; + ndbrequire(frag.m_freeLoc != NullTupLoc); } treeAdd(signal, frag, treePos, ent); break; @@ -175,7 +175,6 @@ Dbtux::execTUX_MAINT_REQ(Signal* signal) break; } // commit and release nodes - commitNodes(signal, frag, req->errorCode == 0); #ifdef VM_TRACE if (debugFlags & DebugTree) { printTree(signal, frag, debugOut); @@ -199,7 +198,7 @@ Dbtux::tupReadAttrs(Signal* signal, const Frag& frag, ReadPar& readPar) req->requestInfo = 0; req->tableId = frag.m_tableId; req->fragId = frag.m_fragId | (ent.m_fragBit << frag.m_fragOff); - req->fragPtrI = RNIL; + req->fragPtrI = frag.m_tupTableFragPtrI[ent.m_fragBit]; req->tupAddr = ent.m_tupAddr; req->tupVersion = ent.m_tupVersion; req->pageId = RNIL; @@ -246,7 +245,7 @@ Dbtux::tupReadKeys(Signal* signal, const Frag& frag, ReadPar& readPar) req->requestInfo = TupReadAttrs::ReadKeys; req->tableId = frag.m_tableId; req->fragId = frag.m_fragId | (ent.m_fragBit << frag.m_fragOff); - req->fragPtrI = RNIL; + req->fragPtrI = frag.m_tupTableFragPtrI[ent.m_fragBit]; req->tupAddr = ent.m_tupAddr; req->tupVersion = RNIL; // not used req->pageId = RNIL; @@ -270,100 +269,3 @@ Dbtux::tupReadKeys(Signal* signal, const Frag& frag, ReadPar& readPar) readPar.m_count = numKeys; readPar.m_size = copyPar.m_numwords; } - -/* - * Operate on index node tuple in TUP. The data is copied between node - * cache and index storage via signal data. - */ -void -Dbtux::tupStoreTh(Signal* signal, const Frag& frag, NodeHandlePtr nodePtr, StorePar storePar) -{ - const TreeHead& tree = frag.m_tree; - // define the direct signal - TupStoreTh* req = (TupStoreTh*)signal->getDataPtrSend(); - req->errorCode = RNIL; - req->tableId = frag.m_indexId; - req->fragId = frag.m_fragId; - req->fragPtrI = RNIL; - req->tupAddr = nodePtr.p->m_addr; - req->tupVersion = 0; - req->pageId = nodePtr.p->m_loc.m_pageId; - req->pageOffset = nodePtr.p->m_loc.m_pageOffset; - req->bufferId = 0; - req->opCode = storePar.m_opCode; - ndbrequire(storePar.m_offset + storePar.m_size <= tree.m_nodeSize); - req->dataOffset = storePar.m_offset; - req->dataSize = storePar.m_size; - // the node cache - ndbrequire(nodePtr.p->m_node != 0); - // the buffer in signal data - Uint32* const buffer = (Uint32*)req + TupStoreTh::SignalLength; - // copy in data - switch (storePar.m_opCode) { - case TupStoreTh::OpRead: - jam(); - #ifdef VM_TRACE - { - Uint32* dst = buffer + storePar.m_offset; - memset(dst, 0xa9, storePar.m_size << 2); - } - #endif - break; - case TupStoreTh::OpInsert: - jam(); - // fallthru - case TupStoreTh::OpUpdate: - jam(); - // copy from cache to signal data - { - Uint32* dst = buffer + storePar.m_offset; - const Uint32* src = (const Uint32*)nodePtr.p->m_node + storePar.m_offset; - memcpy(dst, src, storePar.m_size << 2); - } - break; - case TupStoreTh::OpDelete: - jam(); - break; - default: - ndbrequire(false); - break; - } - // execute - EXECUTE_DIRECT(DBTUP, GSN_TUP_STORE_TH, signal, TupStoreTh::SignalLength); - jamEntry(); - if (req->errorCode != 0) { - jam(); - storePar.m_errorCode = req->errorCode; - return; - } - ndbrequire(req->errorCode == 0); - // copy out data - switch (storePar.m_opCode) { - case TupStoreTh::OpRead: - jam(); - { - Uint32* dst = (Uint32*)nodePtr.p->m_node + storePar.m_offset; - const Uint32* src = (const Uint32*)buffer + storePar.m_offset; - memcpy(dst, src, storePar.m_size << 2); - } - // fallthru - case TupStoreTh::OpInsert: - jam(); - // fallthru - case TupStoreTh::OpUpdate: - jam(); - nodePtr.p->m_addr = req->tupAddr; - nodePtr.p->m_loc.m_pageId = req->pageId; - nodePtr.p->m_loc.m_pageOffset = req->pageOffset; - break; - case TupStoreTh::OpDelete: - jam(); - nodePtr.p->m_addr = NullTupAddr; - nodePtr.p->m_loc.m_pageId = RNIL; - nodePtr.p->m_loc.m_pageOffset = 0; - break; - default: - ndbrequire(false); - break; - } -} diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp index 2ffd599429c..9e17f182798 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp @@ -85,6 +85,11 @@ Dbtux::execTUXFRAGREQ(Signal* signal) fragPtr.p->m_fragOff = req->fragOff; fragPtr.p->m_fragId = req->fragId; fragPtr.p->m_numAttrs = req->noOfAttr; + fragPtr.p->m_tupIndexFragPtrI = req->tupIndexFragPtrI; + fragPtr.p->m_tupTableFragPtrI[0] = req->tupTableFragPtrI[0]; + fragPtr.p->m_tupTableFragPtrI[1] = req->tupTableFragPtrI[1]; + fragPtr.p->m_accTableFragPtrI[0] = req->accTableFragPtrI[0]; + fragPtr.p->m_accTableFragPtrI[1] = req->accTableFragPtrI[1]; // add the fragment to the index indexPtr.p->m_fragId[indexPtr.p->m_numFrags] = req->fragId; indexPtr.p->m_fragPtrI[indexPtr.p->m_numFrags] = fragPtr.i; @@ -197,6 +202,7 @@ Dbtux::execTUX_ADD_ATTRREQ(Signal* signal) jam(); // initialize tree header TreeHead& tree = fragPtr.p->m_tree; + new (&tree) TreeHead(); // make these configurable later tree.m_nodeSize = MAX_TTREE_NODE_SIZE; tree.m_prefSize = MAX_TTREE_PREF_SIZE; @@ -222,8 +228,8 @@ Dbtux::execTUX_ADD_ATTRREQ(Signal* signal) break; } tree.m_minOccup = tree.m_maxOccup - maxSlack; - // root node does not exist - tree.m_root = NullTupAddr; + // root node does not exist (also set by ctor) + tree.m_root = NullTupLoc; // fragment is defined c_fragOpPool.release(fragOpPtr); } @@ -310,12 +316,6 @@ Dbtux::dropIndex(Signal* signal, IndexPtr indexPtr, Uint32 senderRef, Uint32 sen unsigned i = --indexPtr.p->m_numFrags; FragPtr fragPtr; c_fragPool.getPtr(fragPtr, indexPtr.p->m_fragPtrI[i]); - Frag& frag = *fragPtr.p; - ndbrequire(frag.m_nodeList == RNIL); - if (frag.m_nodeFree != RNIL) { - c_nodeHandlePool.release(frag.m_nodeFree); - frag.m_nodeFree = RNIL; - } c_fragPool.release(fragPtr); // the real time break is not used for anything currently signal->theData[0] = TuxContinueB::DropIndex; diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp index 6733a87da97..6b3508d21c2 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxNode.cpp @@ -18,175 +18,107 @@ #include "Dbtux.hpp" /* - * Node handles. - * - * We use the "cache" implementation. Node operations are done on - * cached copies. Index memory is updated at the end of the operation. - * At most one node is inserted and it is always pre-allocated. - * - * An alternative "pointer" implementation which writes directly into - * index memory is planned for later. + * Allocate index node in TUP. */ - -// Dbtux - -void -Dbtux::seizeNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr) +int +Dbtux::allocNode(Signal* signal, NodeHandle& node) { - if (! c_nodeHandlePool.seize(nodePtr)) { + Frag& frag = node.m_frag; + Uint32 pageId = NullTupLoc.m_pageId; + Uint32 pageOffset = NullTupLoc.m_pageOffset; + Uint32* node32 = 0; + int errorCode = c_tup->tuxAllocNode(signal, frag.m_tupIndexFragPtrI, pageId, pageOffset, node32); + if (errorCode == 0) { jam(); - return; + node.m_loc = TupLoc(pageId, pageOffset); + node.m_node = reinterpret_cast(node32); + node.m_acc = AccNone; + ndbrequire(node.m_loc != NullTupLoc && node.m_node != 0); } - new (nodePtr.p) NodeHandle(*this, frag); - nodePtr.p->m_next = frag.m_nodeList; - frag.m_nodeList = nodePtr.i; - // node cache used always - nodePtr.p->m_node = (TreeNode*)nodePtr.p->m_cache; - new (nodePtr.p->m_node) TreeNode(); -#ifdef VM_TRACE - TreeHead& tree = frag.m_tree; - TreeNode* node = nodePtr.p->m_node; - memset(tree.getPref(node, 0), 0xa2, tree.m_prefSize << 2); - memset(tree.getPref(node, 1), 0xa2, tree.m_prefSize << 2); - TreeEnt* entList = tree.getEntList(node); - memset(entList, 0xa4, (tree.m_maxOccup + 1) * (TreeEntSize << 2)); -#endif -} - -void -Dbtux::preallocNode(Signal* signal, Frag& frag, Uint32& errorCode) -{ - ndbrequire(frag.m_nodeFree == RNIL); - NodeHandlePtr nodePtr; - seizeNode(signal, frag, nodePtr); - ndbrequire(nodePtr.i != RNIL); - // remove from cache XXX ugly - frag.m_nodeFree = frag.m_nodeList; - frag.m_nodeList = nodePtr.p->m_next; - StorePar storePar; - storePar.m_opCode = TupStoreTh::OpInsert; - storePar.m_offset = 0; - storePar.m_size = 0; - tupStoreTh(signal, frag, nodePtr, storePar); - if (storePar.m_errorCode != 0) { - jam(); - errorCode = storePar.m_errorCode; - c_nodeHandlePool.release(nodePtr); - frag.m_nodeFree = RNIL; - } -} - -/* - * Find node in the cache. XXX too slow, use direct links instead - */ -void -Dbtux::findNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, TupAddr addr) -{ - NodeHandlePtr tmpPtr; - tmpPtr.i = frag.m_nodeList; - while (tmpPtr.i != RNIL) { - jam(); - c_nodeHandlePool.getPtr(tmpPtr); - if (tmpPtr.p->m_addr == addr) { - jam(); - nodePtr = tmpPtr; - return; - } - tmpPtr.i = tmpPtr.p->m_next; - } - nodePtr.i = RNIL; - nodePtr.p = 0; -} - -/* - * Get handle for existing node. - */ -void -Dbtux::selectNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, TupAddr addr, AccSize acc) -{ - ndbrequire(addr != NullTupAddr && acc > AccNone); - NodeHandlePtr tmpPtr; - // search in cache - findNode(signal, frag, tmpPtr, addr); - if (tmpPtr.i == RNIL) { - jam(); - // add new node - seizeNode(signal, frag, tmpPtr); - ndbrequire(tmpPtr.i != RNIL); - tmpPtr.p->m_addr = addr; - } - if (tmpPtr.p->m_acc < acc) { - jam(); - accessNode(signal, frag, tmpPtr, acc); - } - nodePtr = tmpPtr; -} - -/* - * Create new node in the cache and mark it for insert. - */ -void -Dbtux::insertNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, AccSize acc) -{ - ndbrequire(acc > AccNone); - NodeHandlePtr tmpPtr; - // use the pre-allocated node - tmpPtr.i = frag.m_nodeFree; - frag.m_nodeFree = RNIL; - c_nodeHandlePool.getPtr(tmpPtr); - // move it to the cache - tmpPtr.p->m_next = frag.m_nodeList; - frag.m_nodeList = tmpPtr.i; - tmpPtr.p->m_acc = acc; - tmpPtr.p->m_flags |= NodeHandle::DoInsert; - nodePtr = tmpPtr; -} - -/* - * Mark existing node for deletion. - */ -void -Dbtux::deleteNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr) -{ - NodeHandlePtr tmpPtr = nodePtr; - ndbrequire(tmpPtr.p->getOccup() == 0); - tmpPtr.p->m_flags |= NodeHandle::DoDelete; - // scans have already been moved by popDown or popUp + return errorCode; } /* * Access more of the node. */ void -Dbtux::accessNode(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, AccSize acc) +Dbtux::accessNode(Signal* signal, NodeHandle& node, AccSize acc) { - TreeHead& tree = frag.m_tree; - NodeHandlePtr tmpPtr = nodePtr; - if (tmpPtr.p->m_acc >= acc) + ndbrequire(node.m_loc != NullTupLoc && node.m_node != 0); + if (node.m_acc >= acc) return; - if (! (tmpPtr.p->m_flags & NodeHandle::DoInsert)) { - jam(); - StorePar storePar; - storePar.m_opCode = TupStoreTh::OpRead; - storePar.m_offset = tree.getSize(tmpPtr.p->m_acc); - storePar.m_size = tree.getSize(acc) - tree.getSize(tmpPtr.p->m_acc); - tmpPtr.p->m_tux.tupStoreTh(signal, frag, tmpPtr, storePar); - ndbrequire(storePar.m_errorCode == 0); - } - tmpPtr.p->m_acc = acc; + // XXX could do prefetch + node.m_acc = acc; +} + +/* + * Set handle to point to existing node. + */ +void +Dbtux::selectNode(Signal* signal, NodeHandle& node, TupLoc loc, AccSize acc) +{ + Frag& frag = node.m_frag; + ndbrequire(loc != NullTupLoc); + Uint32 pageId = loc.m_pageId; + Uint32 pageOffset = loc.m_pageOffset; + Uint32* node32 = 0; + c_tup->tuxGetNode(frag.m_tupIndexFragPtrI, pageId, pageOffset, node32); + node.m_loc = loc; + node.m_node = reinterpret_cast(node32); + node.m_acc = AccNone; + ndbrequire(node.m_loc != NullTupLoc && node.m_node != 0); + accessNode(signal, node, acc); +} + +/* + * Set handle to point to new node. Uses the pre-allocated node. + */ +void +Dbtux::insertNode(Signal* signal, NodeHandle& node, AccSize acc) +{ + Frag& frag = node.m_frag; + TupLoc loc = frag.m_freeLoc; + frag.m_freeLoc = NullTupLoc; + selectNode(signal, node, loc, acc); + new (node.m_node) TreeNode(); +#ifdef VM_TRACE + TreeHead& tree = frag.m_tree; + memset(tree.getPref(node.m_node, 0), 0xa2, tree.m_prefSize << 2); + memset(tree.getPref(node.m_node, 1), 0xa2, tree.m_prefSize << 2); + TreeEnt* entList = tree.getEntList(node.m_node); + memset(entList, 0xa4, (tree.m_maxOccup + 1) * (TreeEntSize << 2)); +#endif +} + +/* + * Delete existing node. + */ +void +Dbtux::deleteNode(Signal* signal, NodeHandle& node) +{ + Frag& frag = node.m_frag; + ndbrequire(node.getOccup() == 0); + TupLoc loc = node.m_loc; + Uint32 pageId = loc.m_pageId; + Uint32 pageOffset = loc.m_pageOffset; + Uint32* node32 = reinterpret_cast(node.m_node); + c_tup->tuxFreeNode(signal, frag.m_tupIndexFragPtrI, pageId, pageOffset, node32); + // invalidate handle and storage + node.m_loc = NullTupLoc; + node.m_node = 0; } /* * Set prefix. */ void -Dbtux::setNodePref(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, unsigned i) +Dbtux::setNodePref(Signal* signal, NodeHandle& node, unsigned i) { + Frag& frag = node.m_frag; TreeHead& tree = frag.m_tree; - NodeHandlePtr tmpPtr = nodePtr; ReadPar readPar; ndbrequire(i <= 1); - readPar.m_ent = tmpPtr.p->getMinMax(i); + readPar.m_ent = node.getMinMax(i); readPar.m_first = 0; readPar.m_count = frag.m_numAttrs; // leave in signal data @@ -198,61 +130,11 @@ Dbtux::setNodePref(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, unsigned copyPar.m_items = readPar.m_count; copyPar.m_headers = true; copyPar.m_maxwords = tree.m_prefSize; - Data pref = tmpPtr.p->getPref(i); + Data pref = node.getPref(i); copyAttrs(pref, readPar.m_data, copyPar); - nodePtr.p->m_flags |= NodeHandle::DoUpdate; } -/* - * Commit and release nodes at the end of an operation. Used also on - * error since no changes have been made (updateOk false). - */ -void -Dbtux::commitNodes(Signal* signal, Frag& frag, bool updateOk) -{ - TreeHead& tree = frag.m_tree; - NodeHandlePtr nodePtr; - nodePtr.i = frag.m_nodeList; - frag.m_nodeList = RNIL; - while (nodePtr.i != RNIL) { - c_nodeHandlePool.getPtr(nodePtr); - const unsigned flags = nodePtr.p->m_flags; - if (flags & NodeHandle::DoDelete) { - jam(); - ndbrequire(updateOk); - // delete - StorePar storePar; - storePar.m_opCode = TupStoreTh::OpDelete; - nodePtr.p->m_tux.tupStoreTh(signal, frag, nodePtr, storePar); - ndbrequire(storePar.m_errorCode == 0); - } else if (flags & NodeHandle::DoUpdate) { - jam(); - ndbrequire(updateOk); - // set prefixes - if (flags & (1 << 0)) { - jam(); - setNodePref(signal, frag, nodePtr, 0); - } - if (flags & (1 << 1)) { - jam(); - setNodePref(signal, frag, nodePtr, 1); - } - // update - StorePar storePar; - storePar.m_opCode = TupStoreTh::OpUpdate; - storePar.m_offset = 0; - storePar.m_size = tree.getSize(nodePtr.p->m_acc); - nodePtr.p->m_tux.tupStoreTh(signal, frag, nodePtr, storePar); - ndbrequire(storePar.m_errorCode == 0); - } - // release - NodeHandlePtr tmpPtr = nodePtr; - nodePtr.i = nodePtr.p->m_next; - c_nodeHandlePool.release(tmpPtr); - } -} - -// Dbtux::NodeHandle +// node operations /* * Add entry at position. Move entries greater than or equal to the old @@ -264,25 +146,26 @@ Dbtux::commitNodes(Signal* signal, Frag& frag, bool updateOk) * 0 1 2 3 4 5 6 0 1 2 3 4 5 6 */ void -Dbtux::NodeHandle::pushUp(Signal* signal, unsigned pos, const TreeEnt& ent) +Dbtux::nodePushUp(Signal* signal, NodeHandle& node, unsigned pos, const TreeEnt& ent) { - TreeHead& tree = m_frag.m_tree; - const unsigned occup = getOccup(); + Frag& frag = node.m_frag; + TreeHead& tree = frag.m_tree; + const unsigned occup = node.getOccup(); ndbrequire(occup < tree.m_maxOccup && pos <= occup); // fix scans ScanOpPtr scanPtr; - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); if (scanPos.m_pos >= pos) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At pushUp pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At pushUp pos=" << pos << " " << node << endl; } #endif scanPos.m_pos++; @@ -290,7 +173,7 @@ Dbtux::NodeHandle::pushUp(Signal* signal, unsigned pos, const TreeEnt& ent) scanPtr.i = scanPtr.p->m_nodeScan; } // fix node - TreeEnt* const entList = tree.getEntList(m_node); + TreeEnt* const entList = tree.getEntList(node.m_node); entList[occup] = entList[0]; TreeEnt* const tmpList = entList + 1; for (unsigned i = occup; i > pos; i--) { @@ -298,18 +181,18 @@ Dbtux::NodeHandle::pushUp(Signal* signal, unsigned pos, const TreeEnt& ent) tmpList[i] = tmpList[i - 1]; } tmpList[pos] = ent; - if (occup == 0 || pos == 0) - m_flags |= (1 << 0); - if (occup == 0 || pos == occup) - m_flags |= (1 << 1); entList[0] = entList[occup + 1]; - setOccup(occup + 1); - m_flags |= DoUpdate; + node.setOccup(occup + 1); + // fix prefixes + if (occup == 0 || pos == 0) + setNodePref(signal, node, 0); + if (occup == 0 || pos == occup) + setNodePref(signal, node, 1); } /* * Remove and return entry at position. Move entries greater than the - * removed one to the left. This is the opposite of pushUp. + * removed one to the left. This is the opposite of nodePushUp. * * D * ^ ^ @@ -317,46 +200,47 @@ Dbtux::NodeHandle::pushUp(Signal* signal, unsigned pos, const TreeEnt& ent) * 0 1 2 3 4 5 6 0 1 2 3 4 5 6 */ void -Dbtux::NodeHandle::popDown(Signal* signal, unsigned pos, TreeEnt& ent) +Dbtux::nodePopDown(Signal* signal, NodeHandle& node, unsigned pos, TreeEnt& ent) { - TreeHead& tree = m_frag.m_tree; - const unsigned occup = getOccup(); + Frag& frag = node.m_frag; + TreeHead& tree = frag.m_tree; + const unsigned occup = node.getOccup(); ndbrequire(occup <= tree.m_maxOccup && pos < occup); ScanOpPtr scanPtr; // move scans whose entry disappears - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); const Uint32 nextPtrI = scanPtr.p->m_nodeScan; if (scanPos.m_pos == pos) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Move scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At popDown pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Move scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At popDown pos=" << pos << " " << node << endl; } #endif - m_tux.scanNext(signal, scanPtr); + scanNext(signal, scanPtr); } scanPtr.i = nextPtrI; } // fix other scans - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); ndbrequire(scanPos.m_pos != pos); if (scanPos.m_pos > pos) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At popDown pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At popDown pos=" << pos << " " << node << endl; } #endif scanPos.m_pos--; @@ -364,7 +248,7 @@ Dbtux::NodeHandle::popDown(Signal* signal, unsigned pos, TreeEnt& ent) scanPtr.i = scanPtr.p->m_nodeScan; } // fix node - TreeEnt* const entList = tree.getEntList(m_node); + TreeEnt* const entList = tree.getEntList(node.m_node); entList[occup] = entList[0]; TreeEnt* const tmpList = entList + 1; ent = tmpList[pos]; @@ -372,13 +256,13 @@ Dbtux::NodeHandle::popDown(Signal* signal, unsigned pos, TreeEnt& ent) jam(); tmpList[i] = tmpList[i + 1]; } - if (occup != 1 && pos == 0) - m_flags |= (1 << 0); - if (occup != 1 && pos == occup - 1) - m_flags |= (1 << 1); entList[0] = entList[occup - 1]; - setOccup(occup - 1); - m_flags |= DoUpdate; + node.setOccup(occup - 1); + // fix prefixes + if (occup != 1 && pos == 0) + setNodePref(signal, node, 0); + if (occup != 1 && pos == occup - 1) + setNodePref(signal, node, 1); } /* @@ -391,47 +275,48 @@ Dbtux::NodeHandle::popDown(Signal* signal, unsigned pos, TreeEnt& ent) * 0 1 2 3 4 5 6 0 1 2 3 4 5 6 */ void -Dbtux::NodeHandle::pushDown(Signal* signal, unsigned pos, TreeEnt& ent) +Dbtux::nodePushDown(Signal* signal, NodeHandle& node, unsigned pos, TreeEnt& ent) { - TreeHead& tree = m_frag.m_tree; - const unsigned occup = getOccup(); + Frag& frag = node.m_frag; + TreeHead& tree = frag.m_tree; + const unsigned occup = node.getOccup(); ndbrequire(occup <= tree.m_maxOccup && pos < occup); ScanOpPtr scanPtr; // move scans whose entry disappears - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); const Uint32 nextPtrI = scanPtr.p->m_nodeScan; if (scanPos.m_pos == 0) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Move scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At pushDown pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Move scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At pushDown pos=" << pos << " " << node << endl; } #endif // here we may miss a valid entry "X" XXX known bug - m_tux.scanNext(signal, scanPtr); + scanNext(signal, scanPtr); } scanPtr.i = nextPtrI; } // fix other scans - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); ndbrequire(scanPos.m_pos != 0); if (scanPos.m_pos <= pos) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At pushDown pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At pushDown pos=" << pos << " " << node << endl; } #endif scanPos.m_pos--; @@ -439,7 +324,7 @@ Dbtux::NodeHandle::pushDown(Signal* signal, unsigned pos, TreeEnt& ent) scanPtr.i = scanPtr.p->m_nodeScan; } // fix node - TreeEnt* const entList = tree.getEntList(m_node); + TreeEnt* const entList = tree.getEntList(node.m_node); entList[occup] = entList[0]; TreeEnt* const tmpList = entList + 1; TreeEnt oldMin = tmpList[0]; @@ -449,18 +334,18 @@ Dbtux::NodeHandle::pushDown(Signal* signal, unsigned pos, TreeEnt& ent) } tmpList[pos] = ent; ent = oldMin; - if (true) - m_flags |= (1 << 0); - if (occup == 1 || pos == occup - 1) - m_flags |= (1 << 1); entList[0] = entList[occup]; - m_flags |= DoUpdate; + // fix prefixes + if (true) + setNodePref(signal, node, 0); + if (occup == 1 || pos == occup - 1) + setNodePref(signal, node, 1); } /* * Remove and return entry at position. Move entries less than the * removed one to the right. Replace min entry by the input entry. - * This is the opposite of pushDown. + * This is the opposite of nodePushDown. * * X D * v ^ ^ @@ -468,47 +353,48 @@ Dbtux::NodeHandle::pushDown(Signal* signal, unsigned pos, TreeEnt& ent) * 0 1 2 3 4 5 6 0 1 2 3 4 5 6 */ void -Dbtux::NodeHandle::popUp(Signal* signal, unsigned pos, TreeEnt& ent) +Dbtux::nodePopUp(Signal* signal, NodeHandle& node, unsigned pos, TreeEnt& ent) { - TreeHead& tree = m_frag.m_tree; - const unsigned occup = getOccup(); + Frag& frag = node.m_frag; + TreeHead& tree = frag.m_tree; + const unsigned occup = node.getOccup(); ndbrequire(occup <= tree.m_maxOccup && pos < occup); ScanOpPtr scanPtr; // move scans whose entry disappears - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); const Uint32 nextPtrI = scanPtr.p->m_nodeScan; if (scanPos.m_pos == pos) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Move scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At popUp pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Move scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At popUp pos=" << pos << " " << node << endl; } #endif // here we may miss a valid entry "X" XXX known bug - m_tux.scanNext(signal, scanPtr); + scanNext(signal, scanPtr); } scanPtr.i = nextPtrI; } // fix other scans - scanPtr.i = getNodeScan(); + scanPtr.i = node.getNodeScan(); while (scanPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(scanPtr); + c_scanOpPool.getPtr(scanPtr); TreePos& scanPos = scanPtr.p->m_scanPos; - ndbrequire(scanPos.m_addr == m_addr && scanPos.m_pos < occup); + ndbrequire(scanPos.m_loc == node.m_loc && scanPos.m_pos < occup); ndbrequire(scanPos.m_pos != pos); if (scanPos.m_pos < pos) { jam(); #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "At popUp pos=" << pos << " " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Fix scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "At popUp pos=" << pos << " " << node << endl; } #endif scanPos.m_pos++; @@ -516,7 +402,7 @@ Dbtux::NodeHandle::popUp(Signal* signal, unsigned pos, TreeEnt& ent) scanPtr.i = scanPtr.p->m_nodeScan; } // fix node - TreeEnt* const entList = tree.getEntList(m_node); + TreeEnt* const entList = tree.getEntList(node.m_node); entList[occup] = entList[0]; TreeEnt* const tmpList = entList + 1; TreeEnt newMin = ent; @@ -526,12 +412,12 @@ Dbtux::NodeHandle::popUp(Signal* signal, unsigned pos, TreeEnt& ent) tmpList[i] = tmpList[i - 1]; } tmpList[0] = newMin; - if (true) - m_flags |= (1 << 0); - if (occup == 1 || pos == occup - 1) - m_flags |= (1 << 1); entList[0] = entList[occup]; - m_flags |= DoUpdate; + // fix prefixes + if (true) + setNodePref(signal, node, 0); + if (occup == 1 || pos == occup - 1) + setNodePref(signal, node, 1); } /* @@ -539,14 +425,15 @@ Dbtux::NodeHandle::popUp(Signal* signal, unsigned pos, TreeEnt& ent) * after the max (i=1). XXX can be optimized */ void -Dbtux::NodeHandle::slide(Signal* signal, NodeHandlePtr nodePtr, unsigned i) +Dbtux::nodeSlide(Signal* signal, NodeHandle& dstNode, NodeHandle& srcNode, unsigned i) { + Frag& frag = dstNode.m_frag; + TreeHead& tree = frag.m_tree; ndbrequire(i <= 1); - TreeHead& tree = m_frag.m_tree; - while (getOccup() < tree.m_maxOccup && nodePtr.p->getOccup() != 0) { + while (dstNode.getOccup() < tree.m_maxOccup && srcNode.getOccup() != 0) { TreeEnt ent; - nodePtr.p->popDown(signal, i == 0 ? nodePtr.p->getOccup() - 1 : 0, ent); - pushUp(signal, i == 0 ? 0 : getOccup(), ent); + nodePopDown(signal, srcNode, i == 0 ? srcNode.getOccup() - 1 : 0, ent); + nodePushUp(signal, dstNode, i == 0 ? 0 : dstNode.getOccup(), ent); } } @@ -555,50 +442,50 @@ Dbtux::NodeHandle::slide(Signal* signal, NodeHandlePtr nodePtr, unsigned i) * ordering does not matter. */ void -Dbtux::NodeHandle::linkScan(Dbtux::ScanOpPtr scanPtr) +Dbtux::linkScan(NodeHandle& node, ScanOpPtr scanPtr) { #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Link scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "To node " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Link scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "To node " << node << endl; } #endif - ndbrequire(! islinkScan(scanPtr) && scanPtr.p->m_nodeScan == RNIL); - scanPtr.p->m_nodeScan = getNodeScan(); - setNodeScan(scanPtr.i); + ndbrequire(! islinkScan(node, scanPtr) && scanPtr.p->m_nodeScan == RNIL); + scanPtr.p->m_nodeScan = node.getNodeScan(); + node.setNodeScan(scanPtr.i); } /* * Unlink a scan from the list under the node. */ void -Dbtux::NodeHandle::unlinkScan(Dbtux::ScanOpPtr scanPtr) +Dbtux::unlinkScan(NodeHandle& node, ScanOpPtr scanPtr) { #ifdef VM_TRACE - if (m_tux.debugFlags & m_tux.DebugScan) { - m_tux.debugOut << "Unlink scan " << scanPtr.i << " " << *scanPtr.p << endl; - m_tux.debugOut << "From node " << *this << endl; + if (debugFlags & DebugScan) { + debugOut << "Unlink scan " << scanPtr.i << " " << *scanPtr.p << endl; + debugOut << "From node " << node << endl; } #endif - Dbtux::ScanOpPtr currPtr; - currPtr.i = getNodeScan(); - Dbtux::ScanOpPtr prevPtr; + ScanOpPtr currPtr; + currPtr.i = node.getNodeScan(); + ScanOpPtr prevPtr; prevPtr.i = RNIL; while (true) { jam(); - m_tux.c_scanOpPool.getPtr(currPtr); + c_scanOpPool.getPtr(currPtr); Uint32 nextPtrI = currPtr.p->m_nodeScan; if (currPtr.i == scanPtr.i) { jam(); if (prevPtr.i == RNIL) { - setNodeScan(nextPtrI); + node.setNodeScan(nextPtrI); } else { jam(); prevPtr.p->m_nodeScan = nextPtrI; } scanPtr.p->m_nodeScan = RNIL; // check for duplicates - ndbrequire(! islinkScan(scanPtr)); + ndbrequire(! islinkScan(node, scanPtr)); return; } prevPtr = currPtr; @@ -610,13 +497,13 @@ Dbtux::NodeHandle::unlinkScan(Dbtux::ScanOpPtr scanPtr) * Check if a scan is linked to this node. Only for ndbrequire. */ bool -Dbtux::NodeHandle::islinkScan(Dbtux::ScanOpPtr scanPtr) +Dbtux::islinkScan(NodeHandle& node, ScanOpPtr scanPtr) { - Dbtux::ScanOpPtr currPtr; - currPtr.i = getNodeScan(); + ScanOpPtr currPtr; + currPtr.i = node.getNodeScan(); while (currPtr.i != RNIL) { jam(); - m_tux.c_scanOpPool.getPtr(currPtr); + c_scanOpPool.getPtr(currPtr); if (currPtr.i == scanPtr.i) { jam(); return true; @@ -627,7 +514,7 @@ Dbtux::NodeHandle::islinkScan(Dbtux::ScanOpPtr scanPtr) } void -Dbtux::NodeHandle::progError(int line, int cause, const char* extra) +Dbtux::NodeHandle::progError(int line, int cause, const char* file) { - m_tux.progError(line, cause, extra); + ErrorReporter::handleAssert("Dbtux::NodeHandle: assert failed", file, line); } diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp index eaa539d9cfc..7baea224c93 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp @@ -42,12 +42,11 @@ Dbtux::execACC_SCANREQ(Signal* signal) } ndbrequire(fragPtr.i != RNIL); Frag& frag = *fragPtr.p; - ndbrequire(frag.m_nodeList == RNIL); // must be normal DIH/TC fragment ndbrequire(frag.m_fragId < (1 << frag.m_fragOff)); TreeHead& tree = frag.m_tree; // check for empty fragment - if (tree.m_root == NullTupAddr) { + if (tree.m_root == NullTupLoc) { jam(); AccScanConf* const conf = (AccScanConf*)signal->getDataPtrSend(); conf->scanPtr = req->senderData; @@ -241,7 +240,6 @@ Dbtux::execNEXT_SCANREQ(Signal* signal) debugOut << "NEXT_SCANREQ scan " << scanPtr.i << " " << scan << endl; } #endif - ndbrequire(frag.m_nodeList == RNIL); // handle unlock previous and close scan switch (req->scanFlag) { case NextScanReq::ZSCAN_NEXT: @@ -275,13 +273,13 @@ Dbtux::execNEXT_SCANREQ(Signal* signal) case NextScanReq::ZSCAN_CLOSE: jam(); // unlink from tree node first to avoid state changes - if (scan.m_scanPos.m_addr != NullTupAddr) { + if (scan.m_scanPos.m_loc != NullTupLoc) { jam(); - const TupAddr addr = scan.m_scanPos.m_addr; - NodeHandlePtr nodePtr; - selectNode(signal, frag, nodePtr, addr, AccHead); - nodePtr.p->unlinkScan(scanPtr); - scan.m_scanPos.m_addr = NullTupAddr; + const TupLoc loc = scan.m_scanPos.m_loc; + NodeHandle node(frag); + selectNode(signal, node, loc, AccHead); + unlinkScan(node, scanPtr); + scan.m_scanPos.m_loc = NullTupLoc; } if (scan.m_lockwait) { jam(); @@ -295,7 +293,6 @@ Dbtux::execNEXT_SCANREQ(Signal* signal) jamEntry(); ndbrequire(lockReq->returnCode == AccLockReq::Success); scan.m_state = ScanOp::Aborting; - commitNodes(signal, frag, true); return; } if (scan.m_state == ScanOp::Locked) { @@ -350,7 +347,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) signal->theData[1] = true; EXECUTE_DIRECT(DBLQH, GSN_CHECK_LCP_STOP, signal, 2); jamEntry(); - commitNodes(signal, frag, true); return; // stop } if (scan.m_lockwait) { @@ -365,7 +361,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) // if TC has ordered scan close, it will be detected here sendSignal(scan.m_userRef, GSN_NEXT_SCANCONF, signal, signalLength, JBB); - commitNodes(signal, frag, true); return; // stop } if (scan.m_state == ScanOp::First) { @@ -407,8 +402,7 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) lockReq->userRef = reference(); lockReq->tableId = scan.m_tableId; lockReq->fragId = frag.m_fragId | (ent.m_fragBit << frag.m_fragOff); - // should cache this at fragment create - lockReq->fragPtrI = RNIL; + lockReq->fragPtrI = frag.m_accTableFragPtrI[ent.m_fragBit]; const Uint32* const buf32 = static_cast(keyPar.m_data); const Uint64* const buf64 = reinterpret_cast(buf32); lockReq->hashValue = md5_hash(buf64, keyPar.m_size); @@ -445,7 +439,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) signal->theData[1] = true; EXECUTE_DIRECT(DBLQH, GSN_CHECK_LCP_STOP, signal, 2); jamEntry(); - commitNodes(signal, frag, true); return; // stop break; case AccLockReq::Refused: @@ -458,7 +451,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) signal->theData[1] = true; EXECUTE_DIRECT(DBLQH, GSN_CHECK_LCP_STOP, signal, 2); jamEntry(); - commitNodes(signal, frag, true); return; // stop break; case AccLockReq::NoFreeOp: @@ -471,7 +463,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) signal->theData[1] = true; EXECUTE_DIRECT(DBLQH, GSN_CHECK_LCP_STOP, signal, 2); jamEntry(); - commitNodes(signal, frag, true); return; // stop break; default: @@ -555,7 +546,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) scan.m_lastEnt = ent; // next time look for next entry scan.m_state = ScanOp::Next; - commitNodes(signal, frag, true); return; } // XXX in ACC this is checked before req->checkLcpStop @@ -569,7 +559,6 @@ Dbtux::execACC_CHECK_SCAN(Signal* signal) unsigned signalLength = 3; sendSignal(scanPtr.p->m_userRef, GSN_NEXT_SCANCONF, signal, signalLength, JBB); - commitNodes(signal, frag, true); return; } ndbrequire(false); @@ -700,15 +689,15 @@ Dbtux::scanFirst(Signal* signal, ScanOpPtr scanPtr) ScanOp& scan = *scanPtr.p; Frag& frag = *c_fragPool.getPtr(scan.m_fragPtrI); TreeHead& tree = frag.m_tree; - if (tree.m_root == NullTupAddr) { + if (tree.m_root == NullTupLoc) { // tree may have become empty jam(); scan.m_state = ScanOp::Last; return; } TreePos pos; - pos.m_addr = tree.m_root; - NodeHandlePtr nodePtr; + pos.m_loc = tree.m_root; + NodeHandle node(frag); // unpack lower bound const ScanBound& bound = *scan.m_bound[0]; ScanBoundIterator iter; @@ -725,20 +714,20 @@ Dbtux::scanFirst(Signal* signal, ScanOpPtr scanPtr) boundPar.m_dir = 0; loop: { jam(); - selectNode(signal, frag, nodePtr, pos.m_addr, AccPref); - const unsigned occup = nodePtr.p->getOccup(); + selectNode(signal, node, pos.m_loc, AccPref); + const unsigned occup = node.getOccup(); ndbrequire(occup != 0); for (unsigned i = 0; i <= 1; i++) { jam(); // compare prefix - boundPar.m_data2 = nodePtr.p->getPref(i); + boundPar.m_data2 = node.getPref(i); boundPar.m_len2 = tree.m_prefSize; int ret = cmpScanBound(frag, boundPar); if (ret == NdbSqlUtil::CmpUnknown) { jam(); // read full value ReadPar readPar; - readPar.m_ent = nodePtr.p->getMinMax(i); + readPar.m_ent = node.getMinMax(i); readPar.m_first = 0; readPar.m_count = frag.m_numAttrs; readPar.m_data = 0; // leave in signal data @@ -751,11 +740,11 @@ loop: { } if (i == 0 && ret < 0) { jam(); - const TupAddr tupAddr = nodePtr.p->getLink(i); - if (tupAddr != NullTupAddr) { + const TupLoc loc = node.getLink(i); + if (loc != NullTupLoc) { jam(); // continue to left subtree - pos.m_addr = tupAddr; + pos.m_loc = loc; goto loop; } // start scanning this node @@ -764,34 +753,34 @@ loop: { pos.m_dir = 3; scan.m_scanPos = pos; scan.m_state = ScanOp::Next; - nodePtr.p->linkScan(scanPtr); + linkScan(node, scanPtr); return; } if (i == 1 && ret > 0) { jam(); - const TupAddr tupAddr = nodePtr.p->getLink(i); - if (tupAddr != NullTupAddr) { + const TupLoc loc = node.getLink(i); + if (loc != NullTupLoc) { jam(); // continue to right subtree - pos.m_addr = tupAddr; + pos.m_loc = loc; goto loop; } // start scanning upwards pos.m_dir = 1; scan.m_scanPos = pos; scan.m_state = ScanOp::Next; - nodePtr.p->linkScan(scanPtr); + linkScan(node, scanPtr); return; } } // read rest of current node - accessNode(signal, frag, nodePtr, AccFull); + accessNode(signal, node, AccFull); // look for first entry ndbrequire(occup >= 2); for (unsigned j = 1; j < occup; j++) { jam(); ReadPar readPar; - readPar.m_ent = nodePtr.p->getEnt(j); + readPar.m_ent = node.getEnt(j); readPar.m_first = 0; readPar.m_count = frag.m_numAttrs; readPar.m_data = 0; // leave in signal data @@ -809,7 +798,7 @@ loop: { pos.m_dir = 3; scan.m_scanPos = pos; scan.m_state = ScanOp::Next; - nodePtr.p->linkScan(scanPtr); + linkScan(node, scanPtr); return; } } @@ -869,31 +858,31 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) // use copy of position TreePos pos = scan.m_scanPos; // get and remember original node - NodeHandlePtr origNodePtr; - selectNode(signal, frag, origNodePtr, pos.m_addr, AccHead); - ndbrequire(origNodePtr.p->islinkScan(scanPtr)); + NodeHandle origNode(frag); + selectNode(signal, origNode, pos.m_loc, AccHead); + ndbrequire(islinkScan(origNode, scanPtr)); // current node in loop - NodeHandlePtr nodePtr = origNodePtr; + NodeHandle node = origNode; while (true) { jam(); if (pos.m_dir == 2) { // coming up from root ends the scan jam(); - pos.m_addr = NullTupAddr; + pos.m_loc = NullTupLoc; scan.m_state = ScanOp::Last; break; } - if (nodePtr.p->m_addr != pos.m_addr) { + if (node.m_loc != pos.m_loc) { jam(); - selectNode(signal, frag, nodePtr, pos.m_addr, AccHead); + selectNode(signal, node, pos.m_loc, AccHead); } if (pos.m_dir == 4) { // coming down from parent proceed to left child jam(); - TupAddr addr = nodePtr.p->getLink(0); - if (addr != NullTupAddr) { + TupLoc loc = node.getLink(0); + if (loc != NullTupLoc) { jam(); - pos.m_addr = addr; + pos.m_loc = loc; pos.m_dir = 4; // unchanged continue; } @@ -910,10 +899,10 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) if (pos.m_dir == 3) { // within node jam(); - unsigned occup = nodePtr.p->getOccup(); + unsigned occup = node.getOccup(); ndbrequire(occup >= 1); // access full node - accessNode(signal, frag, nodePtr, AccFull); + accessNode(signal, node, AccFull); // advance position if (! pos.m_match) pos.m_match = true; @@ -921,7 +910,7 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) pos.m_pos++; if (pos.m_pos < occup) { jam(); - pos.m_ent = nodePtr.p->getEnt(pos.m_pos); + pos.m_ent = node.getEnt(pos.m_pos); pos.m_dir = 3; // unchanged // XXX implement prefix optimization ReadPar readPar; @@ -938,7 +927,7 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) if (ret < 0) { jam(); // hit upper bound of single range scan - pos.m_addr = NullTupAddr; + pos.m_loc = NullTupLoc; scan.m_state = ScanOp::Last; break; } @@ -952,10 +941,10 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) break; } // after node proceed to right child - TupAddr addr = nodePtr.p->getLink(1); - if (addr != NullTupAddr) { + TupLoc loc = node.getLink(1); + if (loc != NullTupLoc) { jam(); - pos.m_addr = addr; + pos.m_loc = loc; pos.m_dir = 4; continue; } @@ -965,8 +954,8 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) if (pos.m_dir == 1) { // coming from right child proceed to parent jam(); - pos.m_addr = nodePtr.p->getLink(2); - pos.m_dir = nodePtr.p->getSide(); + pos.m_loc = node.getLink(2); + pos.m_dir = node.getSide(); continue; } ndbrequire(false); @@ -975,16 +964,16 @@ Dbtux::scanNext(Signal* signal, ScanOpPtr scanPtr) scan.m_scanPos = pos; // relink if (scan.m_state == ScanOp::Current) { - ndbrequire(pos.m_addr == nodePtr.p->m_addr); - if (origNodePtr.i != nodePtr.i) { + ndbrequire(pos.m_loc == node.m_loc); + if (origNode.m_loc != node.m_loc) { jam(); - origNodePtr.p->unlinkScan(scanPtr); - nodePtr.p->linkScan(scanPtr); + unlinkScan(origNode, scanPtr); + linkScan(node, scanPtr); } } else if (scan.m_state == ScanOp::Last) { jam(); - ndbrequire(pos.m_addr == NullTupAddr); - origNodePtr.p->unlinkScan(scanPtr); + ndbrequire(pos.m_loc == NullTupLoc); + unlinkScan(origNode, scanPtr); } else { ndbrequire(false); } @@ -1044,7 +1033,6 @@ void Dbtux::scanClose(Signal* signal, ScanOpPtr scanPtr) { ScanOp& scan = *scanPtr.p; - Frag& frag = *c_fragPool.getPtr(scanPtr.p->m_fragPtrI); ndbrequire(! scan.m_lockwait && scan.m_accLockOp == RNIL); // unlock all not unlocked by LQH for (unsigned i = 0; i < MaxAccLockOps; i++) { @@ -1069,7 +1057,6 @@ Dbtux::scanClose(Signal* signal, ScanOpPtr scanPtr) sendSignal(scanPtr.p->m_userRef, GSN_NEXT_SCANCONF, signal, signalLength, JBB); releaseScanOp(scanPtr); - commitNodes(signal, frag, true); } void diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp index 860aa65414f..ede828b5fc3 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxTree.cpp @@ -30,19 +30,19 @@ Dbtux::treeSearch(Signal* signal, Frag& frag, SearchPar searchPar, TreePos& tree { const TreeHead& tree = frag.m_tree; const unsigned numAttrs = frag.m_numAttrs; - treePos.m_addr = tree.m_root; - NodeHandlePtr nodePtr; - if (treePos.m_addr == NullTupAddr) { + treePos.m_loc = tree.m_root; + if (treePos.m_loc == NullTupLoc) { // empty tree jam(); treePos.m_pos = 0; treePos.m_match = false; return; } + NodeHandle node(frag); loop: { jam(); - selectNode(signal, frag, nodePtr, treePos.m_addr, AccPref); - const unsigned occup = nodePtr.p->getOccup(); + selectNode(signal, node, treePos.m_loc, AccPref); + const unsigned occup = node.getOccup(); ndbrequire(occup != 0); // number of equal initial attributes in bounding node unsigned numEq = ZNIL; @@ -51,7 +51,7 @@ loop: { // compare prefix CmpPar cmpPar; cmpPar.m_data1 = searchPar.m_data; - cmpPar.m_data2 = nodePtr.p->getPref(i); + cmpPar.m_data2 = node.getPref(i); cmpPar.m_len2 = tree.m_prefSize; cmpPar.m_first = 0; cmpPar.m_numEq = 0; @@ -60,7 +60,7 @@ loop: { jam(); // read full value ReadPar readPar; - readPar.m_ent = nodePtr.p->getMinMax(i); + readPar.m_ent = node.getMinMax(i); ndbrequire(cmpPar.m_numEq < numAttrs); readPar.m_first = cmpPar.m_numEq; readPar.m_count = numAttrs - cmpPar.m_numEq; @@ -78,19 +78,18 @@ loop: { if (ret == 0) { jam(); // keys are equal, compare entry values - ret = searchPar.m_ent.cmp(nodePtr.p->getMinMax(i)); + ret = searchPar.m_ent.cmp(node.getMinMax(i)); } if (i == 0 ? (ret < 0) : (ret > 0)) { jam(); - const TupAddr tupAddr = nodePtr.p->getLink(i); - if (tupAddr != NullTupAddr) { + const TupLoc loc = node.getLink(i); + if (loc != NullTupLoc) { jam(); // continue to left/right subtree - treePos.m_addr = tupAddr; + treePos.m_loc = loc; goto loop; } // position is immediately before/after this node - // XXX disallow second case treePos.m_pos = (i == 0 ? 0 : occup); treePos.m_match = false; return; @@ -103,8 +102,8 @@ loop: { return; } } - // read rest of the bounding node - accessNode(signal, frag, nodePtr, AccFull); + // access rest of the bounding node + accessNode(signal, node, AccFull); // position is strictly within the node ndbrequire(occup >= 2); const unsigned numWithin = occup - 2; @@ -115,7 +114,7 @@ loop: { if (numEq < numAttrs) { jam(); ReadPar readPar; - readPar.m_ent = nodePtr.p->getEnt(j); + readPar.m_ent = node.getEnt(j); readPar.m_first = numEq; readPar.m_count = numAttrs - numEq; readPar.m_data = 0; // leave in signal data @@ -132,7 +131,7 @@ loop: { if (ret == 0) { jam(); // keys are equal, compare entry values - ret = searchPar.m_ent.cmp(nodePtr.p->getEnt(j)); + ret = searchPar.m_ent.cmp(node.getEnt(j)); } if (ret <= 0) { jam(); @@ -157,94 +156,94 @@ Dbtux::treeAdd(Signal* signal, Frag& frag, TreePos treePos, TreeEnt ent) { TreeHead& tree = frag.m_tree; unsigned pos = treePos.m_pos; - NodeHandlePtr nodePtr; + NodeHandle node(frag); // check for empty tree - if (treePos.m_addr == NullTupAddr) { + if (treePos.m_loc == NullTupLoc) { jam(); - insertNode(signal, frag, nodePtr, AccPref); - nodePtr.p->pushUp(signal, 0, ent); - nodePtr.p->setSide(2); - tree.m_root = nodePtr.p->m_addr; + insertNode(signal, node, AccPref); + nodePushUp(signal, node, 0, ent); + node.setSide(2); + tree.m_root = node.m_loc; return; } // access full node - selectNode(signal, frag, nodePtr, treePos.m_addr, AccFull); + selectNode(signal, node, treePos.m_loc, AccFull); // check if it is bounding node - if (pos != 0 && pos != nodePtr.p->getOccup()) { + if (pos != 0 && pos != node.getOccup()) { jam(); // check if room for one more - if (nodePtr.p->getOccup() < tree.m_maxOccup) { + if (node.getOccup() < tree.m_maxOccup) { jam(); - nodePtr.p->pushUp(signal, pos, ent); + nodePushUp(signal, node, pos, ent); return; } // returns min entry - nodePtr.p->pushDown(signal, pos - 1, ent); + nodePushDown(signal, node, pos - 1, ent); // find position to add the removed min entry - TupAddr childAddr = nodePtr.p->getLink(0); - if (childAddr == NullTupAddr) { + TupLoc childLoc = node.getLink(0); + if (childLoc == NullTupLoc) { jam(); // left child will be added pos = 0; } else { jam(); // find glb node - while (childAddr != NullTupAddr) { + while (childLoc != NullTupLoc) { jam(); - selectNode(signal, frag, nodePtr, childAddr, AccHead); - childAddr = nodePtr.p->getLink(1); + selectNode(signal, node, childLoc, AccHead); + childLoc = node.getLink(1); } // access full node again - accessNode(signal, frag, nodePtr, AccFull); - pos = nodePtr.p->getOccup(); + accessNode(signal, node, AccFull); + pos = node.getOccup(); } // fall thru to next case } // adding new min or max unsigned i = (pos == 0 ? 0 : 1); - ndbrequire(nodePtr.p->getLink(i) == NullTupAddr); + ndbrequire(node.getLink(i) == NullTupLoc); // check if the half-leaf/leaf has room for one more - if (nodePtr.p->getOccup() < tree.m_maxOccup) { + if (node.getOccup() < tree.m_maxOccup) { jam(); - nodePtr.p->pushUp(signal, pos, ent); + nodePushUp(signal, node, pos, ent); return; } // add a new node - NodeHandlePtr childPtr; - insertNode(signal, frag, childPtr, AccPref); - childPtr.p->pushUp(signal, 0, ent); + NodeHandle childNode(frag); + insertNode(signal, childNode, AccPref); + nodePushUp(signal, childNode, 0, ent); // connect parent and child - nodePtr.p->setLink(i, childPtr.p->m_addr); - childPtr.p->setLink(2, nodePtr.p->m_addr); - childPtr.p->setSide(i); + node.setLink(i, childNode.m_loc); + childNode.setLink(2, node.m_loc); + childNode.setSide(i); // re-balance tree at each node while (true) { // height of subtree i has increased by 1 int j = (i == 0 ? -1 : +1); - int b = nodePtr.p->getBalance(); + int b = node.getBalance(); if (b == 0) { // perfectly balanced jam(); - nodePtr.p->setBalance(j); + node.setBalance(j); // height change propagates up } else if (b == -j) { // height of shorter subtree increased jam(); - nodePtr.p->setBalance(0); + node.setBalance(0); // height of tree did not change - done break; } else if (b == j) { // height of longer subtree increased jam(); - NodeHandlePtr childPtr; - selectNode(signal, frag, childPtr, nodePtr.p->getLink(i), AccHead); - int b2 = childPtr.p->getBalance(); + NodeHandle childNode(frag); + selectNode(signal, childNode, node.getLink(i), AccHead); + int b2 = childNode.getBalance(); if (b2 == b) { jam(); - treeRotateSingle(signal, frag, nodePtr, i); + treeRotateSingle(signal, frag, node, i); } else if (b2 == -b) { jam(); - treeRotateDouble(signal, frag, nodePtr, i); + treeRotateDouble(signal, frag, node, i); } else { // height of subtree increased so it cannot be perfectly balanced ndbrequire(false); @@ -254,14 +253,14 @@ Dbtux::treeAdd(Signal* signal, Frag& frag, TreePos treePos, TreeEnt ent) } else { ndbrequire(false); } - TupAddr parentAddr = nodePtr.p->getLink(2); - if (parentAddr == NullTupAddr) { + TupLoc parentLoc = node.getLink(2); + if (parentLoc == NullTupLoc) { jam(); // root node - done break; } - i = nodePtr.p->getSide(); - selectNode(signal, frag, nodePtr, parentAddr, AccHead); + i = node.getSide(); + selectNode(signal, node, parentLoc, AccHead); } } @@ -273,101 +272,101 @@ Dbtux::treeRemove(Signal* signal, Frag& frag, TreePos treePos) { TreeHead& tree = frag.m_tree; unsigned pos = treePos.m_pos; - NodeHandlePtr nodePtr; + NodeHandle node(frag); // access full node - selectNode(signal, frag, nodePtr, treePos.m_addr, AccFull); + selectNode(signal, node, treePos.m_loc, AccFull); TreeEnt ent; // check interior node first - if (nodePtr.p->getChilds() == 2) { + if (node.getChilds() == 2) { jam(); - ndbrequire(nodePtr.p->getOccup() >= tree.m_minOccup); + ndbrequire(node.getOccup() >= tree.m_minOccup); // check if no underflow - if (nodePtr.p->getOccup() > tree.m_minOccup) { + if (node.getOccup() > tree.m_minOccup) { jam(); - nodePtr.p->popDown(signal, pos, ent); + nodePopDown(signal, node, pos, ent); return; } // save current handle - NodeHandlePtr parentPtr = nodePtr; + NodeHandle parentNode = node; // find glb node - TupAddr childAddr = nodePtr.p->getLink(0); - while (childAddr != NullTupAddr) { + TupLoc childLoc = node.getLink(0); + while (childLoc != NullTupLoc) { jam(); - selectNode(signal, frag, nodePtr, childAddr, AccHead); - childAddr = nodePtr.p->getLink(1); + selectNode(signal, node, childLoc, AccHead); + childLoc = node.getLink(1); } // access full node again - accessNode(signal, frag, nodePtr, AccFull); + accessNode(signal, node, AccFull); // use glb max as new parent min - ent = nodePtr.p->getEnt(nodePtr.p->getOccup() - 1); - parentPtr.p->popUp(signal, pos, ent); + ent = node.getEnt(node.getOccup() - 1); + nodePopUp(signal, parentNode, pos, ent); // set up to remove glb max - pos = nodePtr.p->getOccup() - 1; + pos = node.getOccup() - 1; // fall thru to next case } // remove the element - nodePtr.p->popDown(signal, pos, ent); - ndbrequire(nodePtr.p->getChilds() <= 1); + nodePopDown(signal, node, pos, ent); + ndbrequire(node.getChilds() <= 1); // handle half-leaf for (unsigned i = 0; i <= 1; i++) { jam(); - TupAddr childAddr = nodePtr.p->getLink(i); - if (childAddr != NullTupAddr) { + TupLoc childLoc = node.getLink(i); + if (childLoc != NullTupLoc) { // move to child - selectNode(signal, frag, nodePtr, childAddr, AccFull); + selectNode(signal, node, childLoc, AccFull); // balance of half-leaf parent requires child to be leaf break; } } - ndbrequire(nodePtr.p->getChilds() == 0); + ndbrequire(node.getChilds() == 0); // get parent if any - TupAddr parentAddr = nodePtr.p->getLink(2); - NodeHandlePtr parentPtr; - unsigned i = nodePtr.p->getSide(); + TupLoc parentLoc = node.getLink(2); + NodeHandle parentNode(frag); + unsigned i = node.getSide(); // move all that fits into parent - if (parentAddr != NullTupAddr) { + if (parentLoc != NullTupLoc) { jam(); - selectNode(signal, frag, parentPtr, nodePtr.p->getLink(2), AccFull); - parentPtr.p->slide(signal, nodePtr, i); + selectNode(signal, parentNode, node.getLink(2), AccFull); + nodeSlide(signal, parentNode, node, i); // fall thru to next case } // non-empty leaf - if (nodePtr.p->getOccup() >= 1) { + if (node.getOccup() >= 1) { jam(); return; } // remove empty leaf - deleteNode(signal, frag, nodePtr); - if (parentAddr == NullTupAddr) { + deleteNode(signal, node); + if (parentLoc == NullTupLoc) { jam(); // tree is now empty - tree.m_root = NullTupAddr; + tree.m_root = NullTupLoc; return; } - nodePtr = parentPtr; - nodePtr.p->setLink(i, NullTupAddr); + node = parentNode; + node.setLink(i, NullTupLoc); #ifdef dbtux_min_occup_less_max_occup // check if we created a half-leaf - if (nodePtr.p->getBalance() == 0) { + if (node.getBalance() == 0) { jam(); // move entries from the other child - TupAddr childAddr = nodePtr.p->getLink(1 - i); - NodeHandlePtr childPtr; - selectNode(signal, frag, childPtr, childAddr, AccFull); - nodePtr.p->slide(signal, childPtr, 1 - i); - if (childPtr.p->getOccup() == 0) { + TupLoc childLoc = node.getLink(1 - i); + NodeHandle childNode(frag); + selectNode(signal, childNode, childLoc, AccFull); + nodeSlide(signal, node, childNode, 1 - i); + if (childNode.getOccup() == 0) { jam(); - deleteNode(signal, frag, childPtr); - nodePtr.p->setLink(1 - i, NullTupAddr); + deleteNode(signal, childNode); + node.setLink(1 - i, NullTupLoc); // we are balanced again but our parent balance changes by -1 - parentAddr = nodePtr.p->getLink(2); - if (parentAddr == NullTupAddr) { + parentLoc = node.getLink(2); + if (parentLoc == NullTupLoc) { jam(); return; } // fix side and become parent - i = nodePtr.p->getSide(); - selectNode(signal, frag, nodePtr, parentAddr, AccHead); + i = node.getSide(); + selectNode(signal, node, parentLoc, AccHead); } } #endif @@ -375,50 +374,50 @@ Dbtux::treeRemove(Signal* signal, Frag& frag, TreePos treePos) while (true) { // height of subtree i has decreased by 1 int j = (i == 0 ? -1 : +1); - int b = nodePtr.p->getBalance(); + int b = node.getBalance(); if (b == 0) { // perfectly balanced jam(); - nodePtr.p->setBalance(-j); + node.setBalance(-j); // height of tree did not change - done return; } else if (b == j) { // height of longer subtree has decreased jam(); - nodePtr.p->setBalance(0); + node.setBalance(0); // height change propagates up } else if (b == -j) { // height of shorter subtree has decreased jam(); - NodeHandlePtr childPtr; // child on the other side - selectNode(signal, frag, childPtr, nodePtr.p->getLink(1 - i), AccHead); - int b2 = childPtr.p->getBalance(); + NodeHandle childNode(frag); + selectNode(signal, childNode, node.getLink(1 - i), AccHead); + int b2 = childNode.getBalance(); if (b2 == b) { jam(); - treeRotateSingle(signal, frag, nodePtr, 1 - i); + treeRotateSingle(signal, frag, node, 1 - i); // height of tree decreased and propagates up } else if (b2 == -b) { jam(); - treeRotateDouble(signal, frag, nodePtr, 1 - i); + treeRotateDouble(signal, frag, node, 1 - i); // height of tree decreased and propagates up } else { jam(); - treeRotateSingle(signal, frag, nodePtr, 1 - i); + treeRotateSingle(signal, frag, node, 1 - i); // height of tree did not change - done return; } } else { ndbrequire(false); } - TupAddr parentAddr = nodePtr.p->getLink(2); - if (parentAddr == NullTupAddr) { + TupLoc parentLoc = node.getLink(2); + if (parentLoc == NullTupLoc) { jam(); // root node - done return; } - i = nodePtr.p->getSide(); - selectNode(signal, frag, nodePtr, parentAddr, AccHead); + i = node.getSide(); + selectNode(signal, node, parentLoc, AccHead); } } @@ -441,55 +440,55 @@ Dbtux::treeRemove(Signal* signal, Frag& frag, TreePos treePos) void Dbtux::treeRotateSingle(Signal* signal, Frag& frag, - NodeHandlePtr& nodePtr, + NodeHandle& node, unsigned i) { ndbrequire(i <= 1); /* 5 is the old top node that have been unbalanced due to an insert or delete. The balance is still the old balance before the update. - Verify that n5Bal is 1 if RR rotate and -1 if LL rotate. + Verify that bal5 is 1 if RR rotate and -1 if LL rotate. */ - NodeHandlePtr n5Ptr = nodePtr; - const TupAddr n5Addr = n5Ptr.p->m_addr; - const int n5Bal = n5Ptr.p->getBalance(); - const int n5side = n5Ptr.p->getSide(); - ndbrequire(n5Bal + (1 - i) == i); + NodeHandle node5 = node; + const TupLoc loc5 = node5.m_loc; + const int bal5 = node5.getBalance(); + const int side5 = node5.getSide(); + ndbrequire(bal5 + (1 - i) == i); /* 3 is the new root of this part of the tree which is to swap place with node 5. For an insert to cause this it must have the same balance as 5. For deletes it can have the balance 0. */ - TupAddr n3Addr = n5Ptr.p->getLink(i); - NodeHandlePtr n3Ptr; - selectNode(signal, frag, n3Ptr, n3Addr, AccHead); - const int n3Bal = n3Ptr.p->getBalance(); + TupLoc loc3 = node5.getLink(i); + NodeHandle node3(frag); + selectNode(signal, node3, loc3, AccHead); + const int bal3 = node3.getBalance(); /* 2 must always be there but is not changed. Thus we mereley check that it exists. */ - ndbrequire(n3Ptr.p->getLink(i) != NullTupAddr); + ndbrequire(node3.getLink(i) != NullTupLoc); /* 4 is not necessarily there but if it is there it will move from one side of 3 to the other side of 5. For LL it moves from the right side to the left side and for RR it moves from the left side to the right side. This means that it also changes parent from 3 to 5. */ - TupAddr n4Addr = n3Ptr.p->getLink(1 - i); - NodeHandlePtr n4Ptr; - if (n4Addr != NullTupAddr) { + TupLoc loc4 = node3.getLink(1 - i); + NodeHandle node4(frag); + if (loc4 != NullTupLoc) { jam(); - selectNode(signal, frag, n4Ptr, n4Addr, AccHead); - ndbrequire(n4Ptr.p->getSide() == (1 - i) && - n4Ptr.p->getLink(2) == n3Addr); - n4Ptr.p->setSide(i); - n4Ptr.p->setLink(2, n5Addr); + selectNode(signal, node4, loc4, AccHead); + ndbrequire(node4.getSide() == (1 - i) && + node4.getLink(2) == loc3); + node4.setSide(i); + node4.setLink(2, loc5); }//if /* Retrieve the address of 5's parent before it is destroyed */ - TupAddr n0Addr = n5Ptr.p->getLink(2); + TupLoc loc0 = node5.getLink(2); /* The next step is to perform the rotation. 3 will inherit 5's parent @@ -503,22 +502,22 @@ Dbtux::treeRotateSingle(Signal* signal, 1. 3 must have had 5 as parent before the change. 2. 3's side is left for LL and right for RR before change. */ - ndbrequire(n3Ptr.p->getLink(2) == n5Addr); - ndbrequire(n3Ptr.p->getSide() == i); - n3Ptr.p->setLink(1 - i, n5Addr); - n3Ptr.p->setLink(2, n0Addr); - n3Ptr.p->setSide(n5side); - n5Ptr.p->setLink(i, n4Addr); - n5Ptr.p->setLink(2, n3Addr); - n5Ptr.p->setSide(1 - i); - if (n0Addr != NullTupAddr) { + ndbrequire(node3.getLink(2) == loc5); + ndbrequire(node3.getSide() == i); + node3.setLink(1 - i, loc5); + node3.setLink(2, loc0); + node3.setSide(side5); + node5.setLink(i, loc4); + node5.setLink(2, loc3); + node5.setSide(1 - i); + if (loc0 != NullTupLoc) { jam(); - NodeHandlePtr n0Ptr; - selectNode(signal, frag, n0Ptr, n0Addr, AccHead); - n0Ptr.p->setLink(n5side, n3Addr); + NodeHandle node0(frag); + selectNode(signal, node0, loc0, AccHead); + node0.setLink(side5, loc3); } else { jam(); - frag.m_tree.m_root = n3Addr; + frag.m_tree.m_root = loc3; }//if /* The final step of the change is to update the balance of 3 and 5 that changed places. There are two cases here. The first case is @@ -531,22 +530,22 @@ Dbtux::treeRotateSingle(Signal* signal, In this case 5 will change balance but still be unbalanced and 3 will be unbalanced in the opposite direction of 5. */ - if (n3Bal == n5Bal) { + if (bal3 == bal5) { jam(); - n3Ptr.p->setBalance(0); - n5Ptr.p->setBalance(0); - } else if (n3Bal == 0) { + node3.setBalance(0); + node5.setBalance(0); + } else if (bal3 == 0) { jam(); - n3Ptr.p->setBalance(-n5Bal); - n5Ptr.p->setBalance(n5Bal); + node3.setBalance(-bal5); + node5.setBalance(bal5); } else { ndbrequire(false); }//if /* - Set nodePtr to 3 as return parameter for enabling caller to continue + Set node to 3 as return parameter for enabling caller to continue traversing the tree. */ - nodePtr = n3Ptr; + node = node3; } /* @@ -651,105 +650,105 @@ Dbtux::treeRotateSingle(Signal* signal, * */ void -Dbtux::treeRotateDouble(Signal* signal, Frag& frag, NodeHandlePtr& nodePtr, unsigned i) +Dbtux::treeRotateDouble(Signal* signal, Frag& frag, NodeHandle& node, unsigned i) { // old top node - NodeHandlePtr n6Ptr = nodePtr; - const TupAddr n6Addr = n6Ptr.p->m_addr; + NodeHandle node6 = node; + const TupLoc loc6 = node6.m_loc; // the un-updated balance - const int n6Bal = n6Ptr.p->getBalance(); - const unsigned n6Side = n6Ptr.p->getSide(); + const int bal6 = node6.getBalance(); + const unsigned side6 = node6.getSide(); // level 1 - TupAddr n2Addr = n6Ptr.p->getLink(i); - NodeHandlePtr n2Ptr; - selectNode(signal, frag, n2Ptr, n2Addr, AccHead); - const int n2Bal = n2Ptr.p->getBalance(); + TupLoc loc2 = node6.getLink(i); + NodeHandle node2(frag); + selectNode(signal, node2, loc2, AccHead); + const int bal2 = node2.getBalance(); // level 2 - TupAddr n4Addr = n2Ptr.p->getLink(1 - i); - NodeHandlePtr n4Ptr; - selectNode(signal, frag, n4Ptr, n4Addr, AccHead); - const int n4Bal = n4Ptr.p->getBalance(); + TupLoc loc4 = node2.getLink(1 - i); + NodeHandle node4(frag); + selectNode(signal, node4, loc4, AccHead); + const int bal4 = node4.getBalance(); ndbrequire(i <= 1); - ndbrequire(n6Bal + (1 - i) == i); - ndbrequire(n2Bal == -n6Bal); - ndbrequire(n2Ptr.p->getLink(2) == n6Addr); - ndbrequire(n2Ptr.p->getSide() == i); - ndbrequire(n4Ptr.p->getLink(2) == n2Addr); + ndbrequire(bal6 + (1 - i) == i); + ndbrequire(bal2 == -bal6); + ndbrequire(node2.getLink(2) == loc6); + ndbrequire(node2.getSide() == i); + ndbrequire(node4.getLink(2) == loc2); // level 3 - TupAddr n3Addr = n4Ptr.p->getLink(i); - TupAddr n5Addr = n4Ptr.p->getLink(1 - i); + TupLoc loc3 = node4.getLink(i); + TupLoc loc5 = node4.getLink(1 - i); // fill up leaf before it becomes internal - if (n3Addr == NullTupAddr && n5Addr == NullTupAddr) { + if (loc3 == NullTupLoc && loc5 == NullTupLoc) { jam(); TreeHead& tree = frag.m_tree; - accessNode(signal, frag, n2Ptr, AccFull); - accessNode(signal, frag, n4Ptr, AccFull); - n4Ptr.p->slide(signal, n2Ptr, i); + accessNode(signal, node2, AccFull); + accessNode(signal, node4, AccFull); + nodeSlide(signal, node4, node2, i); // implied by rule of merging half-leaves with leaves - ndbrequire(n4Ptr.p->getOccup() >= tree.m_minOccup); - ndbrequire(n2Ptr.p->getOccup() != 0); + ndbrequire(node4.getOccup() >= tree.m_minOccup); + ndbrequire(node2.getOccup() != 0); } else { - if (n3Addr != NullTupAddr) { + if (loc3 != NullTupLoc) { jam(); - NodeHandlePtr n3Ptr; - selectNode(signal, frag, n3Ptr, n3Addr, AccHead); - n3Ptr.p->setLink(2, n2Addr); - n3Ptr.p->setSide(1 - i); + NodeHandle node3(frag); + selectNode(signal, node3, loc3, AccHead); + node3.setLink(2, loc2); + node3.setSide(1 - i); } - if (n5Addr != NullTupAddr) { + if (loc5 != NullTupLoc) { jam(); - NodeHandlePtr n5Ptr; - selectNode(signal, frag, n5Ptr, n5Addr, AccHead); - n5Ptr.p->setLink(2, n6Ptr.p->m_addr); - n5Ptr.p->setSide(i); + NodeHandle node5(frag); + selectNode(signal, node5, loc5, AccHead); + node5.setLink(2, node6.m_loc); + node5.setSide(i); } } // parent - TupAddr n0Addr = n6Ptr.p->getLink(2); - NodeHandlePtr n0Ptr; + TupLoc loc0 = node6.getLink(2); + NodeHandle node0(frag); // perform the rotation - n6Ptr.p->setLink(i, n5Addr); - n6Ptr.p->setLink(2, n4Addr); - n6Ptr.p->setSide(1 - i); + node6.setLink(i, loc5); + node6.setLink(2, loc4); + node6.setSide(1 - i); - n2Ptr.p->setLink(1 - i, n3Addr); - n2Ptr.p->setLink(2, n4Addr); + node2.setLink(1 - i, loc3); + node2.setLink(2, loc4); - n4Ptr.p->setLink(i, n2Addr); - n4Ptr.p->setLink(1 - i, n6Addr); - n4Ptr.p->setLink(2, n0Addr); - n4Ptr.p->setSide(n6Side); + node4.setLink(i, loc2); + node4.setLink(1 - i, loc6); + node4.setLink(2, loc0); + node4.setSide(side6); - if (n0Addr != NullTupAddr) { + if (loc0 != NullTupLoc) { jam(); - selectNode(signal, frag, n0Ptr, n0Addr, AccHead); - n0Ptr.p->setLink(n6Side, n4Addr); + selectNode(signal, node0, loc0, AccHead); + node0.setLink(side6, loc4); } else { jam(); - frag.m_tree.m_root = n4Addr; + frag.m_tree.m_root = loc4; } // set balance of changed nodes - n4Ptr.p->setBalance(0); - if (n4Bal == 0) { + node4.setBalance(0); + if (bal4 == 0) { jam(); - n2Ptr.p->setBalance(0); - n6Ptr.p->setBalance(0); - } else if (n4Bal == -n2Bal) { + node2.setBalance(0); + node6.setBalance(0); + } else if (bal4 == -bal2) { jam(); - n2Ptr.p->setBalance(0); - n6Ptr.p->setBalance(n2Bal); - } else if (n4Bal == n2Bal) { + node2.setBalance(0); + node6.setBalance(bal2); + } else if (bal4 == bal2) { jam(); - n2Ptr.p->setBalance(-n2Bal); - n6Ptr.p->setBalance(0); + node2.setBalance(-bal2); + node6.setBalance(0); } else { ndbrequire(false); } // new top node - nodePtr = n4Ptr; + node = node4; } diff --git a/ndb/src/kernel/blocks/dbtux/Makefile.am b/ndb/src/kernel/blocks/dbtux/Makefile.am index 5ba59e8b3b7..0b48ad5724f 100644 --- a/ndb/src/kernel/blocks/dbtux/Makefile.am +++ b/ndb/src/kernel/blocks/dbtux/Makefile.am @@ -10,6 +10,8 @@ libdbtux_a_SOURCES = \ DbtuxCmp.cpp \ DbtuxDebug.cpp +INCLUDES_LOC = -I$(top_srcdir)/ndb/src/kernel/blocks/dbtup + include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/type_kernel.mk.am diff --git a/ndb/src/kernel/blocks/dbtux/Times.txt b/ndb/src/kernel/blocks/dbtux/Times.txt new file mode 100644 index 00000000000..78e35804b9d --- /dev/null +++ b/ndb/src/kernel/blocks/dbtux/Times.txt @@ -0,0 +1,37 @@ +index maintenance overhead +========================== + +"mc02" 2x1700 MHz linux-2.4.9 gcc-2.96 -O3 one db-node + +case a: index on Unsigned +testOIBasic -case u -table 1 -index 1 -fragtype small -threads 10 -rows 100000 -subloop 1 -nologging + +case b: index on Varchar(5) + Varchar(5) + Varchar(20) + Unsigned +testOIBasic -case u -table 2 -index 4 -fragtype small -threads 10 -rows 100000 -subloop 1 -nologging + +1 million rows, pk update without index, pk update with index +shows ms / 1000 rows for each and pct overhead +the figures are based on single run on idle machine + +040616 mc02/a 40 ms 87 ms 114 pct + mc02/b 51 ms 128 ms 148 pct + +optim 1 mc02/a 38 ms 85 ms 124 pct + mc02/b 51 ms 123 ms 140 pct + +optim 2 mc02/a 41 ms 80 ms 96 pct + mc02/b 51 ms 117 ms 128 pct + +optim 3 mc02/a 43 ms 80 ms 85 pct + mc02/b 54 ms 118 ms 117 pct + +optim 4 mc02/a 42 ms 80 ms 87 pct + mc02/b 51 ms 119 ms 129 pct + +optim 5 mc02/a 43 ms 77 ms 77 pct + mc02/b 54 ms 118 ms 117 pct + +optim 6 mc02/a 42 ms 70 ms 66 pct + mc02/b 53 ms 109 ms 105 pct + +vim: set et: diff --git a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp index ac29614bc70..f2d2edb615d 100644 --- a/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp +++ b/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp @@ -525,7 +525,7 @@ void Qmgr::execCM_REGREQ(Signal* signal) cmRegConf->dynamicId = TdynId; c_clusterNodes.copyto(NdbNodeBitmask::Size, cmRegConf->allNdbNodes); sendSignal(Tblockref, GSN_CM_REGCONF, signal, - CmRegConf::SignalLength, JBB); + CmRegConf::SignalLength, JBA); DEBUG_START(GSN_CM_REGCONF, refToNode(Tblockref), ""); /** @@ -847,7 +847,7 @@ void Qmgr::execCM_NODEINFOCONF(Signal* signal) nodePtr.i = getOwnNodeId(); ptrAss(nodePtr, nodeRec); ndbrequire(nodePtr.p->phase == ZSTARTING); - ndbrequire(c_start.m_gsn = GSN_CM_NODEINFOREQ); + ndbrequire(c_start.m_gsn == GSN_CM_NODEINFOREQ); c_start.m_nodes.clearWaitingFor(nodeId); /** @@ -1019,7 +1019,7 @@ void Qmgr::execCM_ADD(Signal* signal) ndbrequire(addNodePtr.i == nodePtr.i); switch(type){ case CmAdd::Prepare: - ndbrequire(c_start.m_gsn = GSN_CM_NODEINFOREQ); + ndbrequire(c_start.m_gsn == GSN_CM_NODEINFOREQ); /** * Wait for CM_NODEINFO_CONF */ diff --git a/ndb/src/ndbapi/Makefile.am b/ndb/src/ndbapi/Makefile.am index f1a6dc366ea..14badb0c62f 100644 --- a/ndb/src/ndbapi/Makefile.am +++ b/ndb/src/ndbapi/Makefile.am @@ -33,7 +33,8 @@ libndbapi_la_SOURCES = \ NdbReceiver.cpp \ NdbDictionary.cpp \ NdbDictionaryImpl.cpp \ - DictCache.cpp + DictCache.cpp \ + NdbBlob.cpp INCLUDES_LOC = -I$(top_srcdir)/ndb/src/mgmapi diff --git a/ndb/src/ndbapi/Makefile_old b/ndb/src/ndbapi/Makefile_old index 648c8cbb016..54de9ba96f4 100644 --- a/ndb/src/ndbapi/Makefile_old +++ b/ndb/src/ndbapi/Makefile_old @@ -51,8 +51,8 @@ SOURCES = \ NdbRecAttr.cpp \ NdbUtil.cpp \ NdbReceiver.cpp \ - NdbDictionary.cpp NdbDictionaryImpl.cpp DictCache.cpp \ - NdbSchemaCon.cpp NdbSchemaOp.cpp + NdbDictionary.cpp NdbDictionaryImpl.cpp DictCache.cpp + NdbBlob.cpp include $(NDB_TOP)/Epilogue.mk diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 6dcafef8082..c02f2c2a928 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -38,6 +38,10 @@ Name: Ndb.cpp #include #include +#ifndef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) +#endif + /**************************************************************************** void connect(); diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp new file mode 100644 index 00000000000..8e067f770e8 --- /dev/null +++ b/ndb/src/ndbapi/NdbBlob.cpp @@ -0,0 +1,1349 @@ +/* Copyright (C) 2003 MySQL AB + + 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 + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +#include "Ndb.hpp" +#include "NdbDictionaryImpl.hpp" +#include "NdbConnection.hpp" +#include "NdbOperation.hpp" +#include "NdbIndexOperation.hpp" +#include "NdbRecAttr.hpp" +#include "NdbBlob.hpp" + +#ifdef NDB_BLOB_DEBUG +#define DBG(x) \ + do { \ + static const char* p = getenv("NDB_BLOB_DEBUG"); \ + if (p == 0 || *p == 0 || *p == '0') break; \ + const char* cname = theColumn == NULL ? "BLOB" : theColumn->m_name.c_str(); \ + ndbout << cname << " " << __LINE__ << " " << x << " " << *this << endl; \ + } while (0) +#define EXE() assert(theNdbCon->executeNoBlobs(NoCommit) == 0) +#else +#define DBG(x) +#endif + +static char* +ndb_blob_debug(const Uint32* data, unsigned size) +{ + static char buf[128 + 1]; // MT irrelevant + buf[0] = 0; + for (unsigned i = 0; i < size && i < 128 / 4; i++) { + sprintf(buf + strlen(buf), "%*s%08x", i != 0, "", data[i]); + } + return buf; +} + +/* + * Reading index table directly (as a table) is faster but there are + * bugs or limitations. Keep the code but make possible to choose. + */ +static const bool g_ndb_blob_ok_to_read_index_table = false; + +// state (inline) + +inline void +NdbBlob::setState(State newState) +{ + DBG("setState " << newState); + theState = newState; +} + +// define blob table + +int +NdbBlob::getBlobTableName(char* btname, Ndb* anNdb, const char* tableName, const char* columnName) +{ + NdbTableImpl* t = anNdb->theDictionary->m_impl.getTable(tableName); + if (t == NULL) + return -1; + NdbColumnImpl* c = t->getColumn(columnName); + if (c == NULL) + return -1; + getBlobTableName(btname, t, c); + return 0; +} + +void +NdbBlob::getBlobTableName(char* btname, const NdbTableImpl* t, const NdbColumnImpl* c) +{ + assert(t != 0 && c != 0 && c->getBlobType()); + memset(btname, 0, BlobTableNameSize); + sprintf(btname, "NDB$BLOB_%d_%d_%d", (int)t->m_tableId, (int)t->m_version, (int)c->m_attrId); +} + +void +NdbBlob::getBlobTable(NdbTableImpl& bt, const NdbTableImpl* t, const NdbColumnImpl* c) +{ + char btname[BlobTableNameSize]; + getBlobTableName(btname, t, c); + bt.setName(btname); + bt.setLogging(t->getLogging()); + bt.setFragmentType(t->getFragmentType()); + { NdbDictionary::Column bc("DIST"); + bc.setType(NdbDictionary::Column::Unsigned); + bc.setPrimaryKey(true); + bc.setDistributionKey(true); + bt.addColumn(bc); + } + { NdbDictionary::Column bc("PART"); + bc.setType(NdbDictionary::Column::Unsigned); + bc.setPrimaryKey(true); + bt.addColumn(bc); + } + { NdbDictionary::Column bc("PK"); + bc.setType(NdbDictionary::Column::Unsigned); + assert(t->m_sizeOfKeysInWords != 0); + bc.setLength(t->m_sizeOfKeysInWords); + bc.setPrimaryKey(true); + bt.addColumn(bc); + } + { NdbDictionary::Column bc("DATA"); + switch (c->m_type) { + case NdbDictionary::Column::Blob: + bc.setType(NdbDictionary::Column::Binary); + break; + case NdbDictionary::Column::Clob: + bc.setType(NdbDictionary::Column::Char); + break; + default: + assert(false); + break; + } + bc.setLength(c->getPartSize()); + bt.addColumn(bc); + } +} + +// initialization + +NdbBlob::NdbBlob() +{ + init(); +} + +void +NdbBlob::init() +{ + theState = Idle; + theBlobTableName[0] = 0; + theNdb = NULL; + theNdbCon = NULL; + theNdbOp = NULL; + theTable = NULL; + theAccessTable = NULL; + theColumn = NULL; + theFillChar = 0; + theInlineSize = 0; + thePartSize = 0; + theStripeSize = 0; + theGetFlag = false; + theGetBuf = NULL; + theSetFlag = false; + theSetBuf = NULL; + theGetSetBytes = 0; + theHead = NULL; + theInlineData = NULL; + theHeadInlineRecAttr = NULL; + theHeadInlineUpdateFlag = false; + theNewPartFlag = false; + theNullFlag = -1; + theLength = 0; + thePos = 0; + theNext = NULL; +} + +void +NdbBlob::release() +{ + setState(Idle); +} + +// buffers + +NdbBlob::Buf::Buf() : + data(NULL), + size(0), + maxsize(0) +{ +} + +NdbBlob::Buf::~Buf() +{ + delete [] data; +} + +void +NdbBlob::Buf::alloc(unsigned n) +{ + size = n; + if (maxsize < n) { + delete [] data; + // align to Uint64 + if (n % 8 != 0) + n += 8 - n % 8; + data = new char [n]; + maxsize = n; + } +#ifdef VM_TRACE + memset(data, 'X', maxsize); +#endif +} + +// classify operations (inline) + +inline bool +NdbBlob::isTableOp() +{ + return theTable == theAccessTable; +} + +inline bool +NdbBlob::isIndexOp() +{ + return theTable != theAccessTable; +} + +inline bool +NdbBlob::isKeyOp() +{ + return + theNdbOp->theOperationType == NdbOperation::InsertRequest || + theNdbOp->theOperationType == NdbOperation::UpdateRequest || + theNdbOp->theOperationType == NdbOperation::ReadRequest || + theNdbOp->theOperationType == NdbOperation::ReadExclusive || + theNdbOp->theOperationType == NdbOperation::DeleteRequest; +} + +inline bool +NdbBlob::isReadOp() +{ + return + theNdbOp->theOperationType == NdbOperation::ReadRequest || + theNdbOp->theOperationType == NdbOperation::ReadExclusive; +} + +inline bool +NdbBlob::isInsertOp() +{ + return + theNdbOp->theOperationType == NdbOperation::InsertRequest; +} + +inline bool +NdbBlob::isUpdateOp() +{ + return + theNdbOp->theOperationType == NdbOperation::UpdateRequest; +} + +inline bool +NdbBlob::isDeleteOp() +{ + return + theNdbOp->theOperationType == NdbOperation::DeleteRequest; +} + +inline bool +NdbBlob::isScanOp() +{ + return + theNdbOp->theOperationType == NdbOperation::OpenScanRequest || + theNdbOp->theOperationType == NdbOperation::OpenRangeScanRequest; +} + +// computations (inline) + +inline Uint32 +NdbBlob::getPartNumber(Uint64 pos) +{ + assert(pos >= theInlineSize); + return (pos - theInlineSize) / thePartSize; +} + +inline Uint32 +NdbBlob::getPartCount() +{ + if (theLength <= theInlineSize) + return 0; + return 1 + getPartNumber(theLength - 1); +} + +inline Uint32 +NdbBlob::getDistKey(Uint32 part) +{ + assert(theStripeSize != 0); + return (part / theStripeSize) % theStripeSize; +} + +// getters and setters + +int +NdbBlob::getTableKeyValue(NdbOperation* anOp) +{ + Uint32* data = (Uint32*)theKeyBuf.data; + unsigned pos = 0; + DBG("getTableKeyValue"); + for (unsigned i = 0; i < theTable->m_columns.size(); i++) { + NdbColumnImpl* c = theTable->m_columns[i]; + assert(c != NULL); + if (c->m_pk) { + unsigned len = c->m_attrSize * c->m_arraySize; + if (anOp->getValue(c, (char*)&data[pos]) == NULL) { + setErrorCode(anOp); + return -1; + } + // odd bytes receive no data and must be zeroed + while (len % 4 != 0) { + char* p = (char*)&data[pos] + len++; + *p = 0; + } + pos += len / 4; + } + } + assert(pos == theKeyBuf.size / 4); + return 0; +} + +int +NdbBlob::setTableKeyValue(NdbOperation* anOp) +{ + const Uint32* data = (const Uint32*)theKeyBuf.data; + unsigned pos = 0; + const unsigned size = theTable->m_columns.size(); + DBG("setTableKeyValue key=" << ndb_blob_debug(data, size)); + for (unsigned i = 0; i < size; i++) { + NdbColumnImpl* c = theTable->m_columns[i]; + assert(c != NULL); + if (c->m_pk) { + unsigned len = c->m_attrSize * c->m_arraySize; + if (anOp->equal_impl(c, (const char*)&data[pos], len) == -1) { + setErrorCode(anOp); + return -1; + } + pos += (len + 3) / 4; + } + } + assert(pos == theKeyBuf.size / 4); + return 0; +} + +int +NdbBlob::setAccessKeyValue(NdbOperation* anOp) +{ + const Uint32* data = (const Uint32*)theAccessKeyBuf.data; + unsigned pos = 0; + const unsigned size = theAccessTable->m_columns.size(); + DBG("setAccessKeyValue key=" << ndb_blob_debug(data, size)); + for (unsigned i = 0; i < size; i++) { + NdbColumnImpl* c = theAccessTable->m_columns[i]; + assert(c != NULL); + if (c->m_pk) { + unsigned len = c->m_attrSize * c->m_arraySize; + if (anOp->equal_impl(c, (const char*)&data[pos], len) == -1) { + setErrorCode(anOp); + return -1; + } + pos += (len + 3) / 4; + } + } + assert(pos == theAccessKeyBuf.size / 4); + return 0; +} + +int +NdbBlob::setPartKeyValue(NdbOperation* anOp, Uint32 part) +{ + Uint32* data = (Uint32*)theKeyBuf.data; + unsigned size = theTable->m_sizeOfKeysInWords; + DBG("setPartKeyValue dist=" << getDistKey(part) << " part=" << part << " key=" << ndb_blob_debug(data, size)); + if (anOp->equal((Uint32)0, getDistKey(part)) == -1 || + anOp->equal((Uint32)1, part) == -1 || + anOp->equal((Uint32)2, theKeyBuf.data) == -1) { + setErrorCode(anOp); + return -1; + } + return 0; +} + +int +NdbBlob::getHeadInlineValue(NdbOperation* anOp) +{ + DBG("getHeadInlineValue"); + theHeadInlineRecAttr = anOp->getValue(theColumn, theHeadInlineBuf.data); + if (theHeadInlineRecAttr == NULL) { + setErrorCode(anOp); + return -1; + } + return 0; +} + +void +NdbBlob::getHeadFromRecAttr() +{ + assert(theHeadInlineRecAttr != NULL); + theNullFlag = theHeadInlineRecAttr->isNULL(); + assert(theNullFlag != -1); + theLength = ! theNullFlag ? theHead->length : 0; + DBG("getHeadFromRecAttr out"); +} + +int +NdbBlob::setHeadInlineValue(NdbOperation* anOp) +{ + DBG("setHeadInlineValue"); + theHead->length = theLength; + if (theLength < theInlineSize) + memset(theInlineData + theLength, 0, theInlineSize - theLength); + assert(theNullFlag != -1); + const char* aValue = theNullFlag ? 0 : theHeadInlineBuf.data; + if (anOp->setValue(theColumn, aValue, theHeadInlineBuf.size) == -1) { + setErrorCode(anOp); + return -1; + } + theHeadInlineUpdateFlag = false; + return 0; +} + +// getValue/setValue + +int +NdbBlob::getValue(void* data, Uint32 bytes) +{ + DBG("getValue data=" << hex << data << " bytes=" << dec << bytes); + if (theGetFlag || theState != Prepared) { + setErrorCode(ErrState); + return -1; + } + if (! isReadOp() && ! isScanOp()) { + setErrorCode(ErrUsage); + return -1; + } + if (data == NULL && bytes != 0) { + setErrorCode(ErrUsage); + return -1; + } + theGetFlag = true; + theGetBuf = static_cast(data); + theGetSetBytes = bytes; + return 0; +} + +int +NdbBlob::setValue(const void* data, Uint32 bytes) +{ + DBG("setValue data=" << hex << data << " bytes=" << dec << bytes); + if (theSetFlag || theState != Prepared) { + setErrorCode(ErrState); + return -1; + } + if (! isInsertOp() && ! isUpdateOp()) { + setErrorCode(ErrUsage); + return -1; + } + if (data == NULL && bytes != 0) { + setErrorCode(ErrUsage); + return -1; + } + theSetFlag = true; + theSetBuf = static_cast(data); + theGetSetBytes = bytes; + if (isInsertOp()) { + // write inline part now + if (theSetBuf != 0) { + unsigned n = theGetSetBytes; + if (n > theInlineSize) + n = theInlineSize; + if (writeDataPrivate(0, theSetBuf, n) == -1) + return -1; + } else { + theNullFlag = true; + theLength = 0; + } + if (setHeadInlineValue(theNdbOp) == -1) + return -1; + } + return 0; +} + +// misc operations + +int +NdbBlob::getNull(bool& isNull) +{ + if (theState == Prepared && theSetFlag) { + isNull = (theSetBuf == NULL); + return 0; + } + if (theNullFlag == -1) { + setErrorCode(ErrState); + return -1; + } + isNull = theNullFlag; + return 0; +} + +int +NdbBlob::setNull() +{ + DBG("setNull"); + if (theNullFlag == -1) { + if (theState == Prepared) { + return setValue(0, 0); + } + setErrorCode(ErrState); + return -1; + } + if (theNullFlag) + return 0; + if (deleteParts(0, getPartCount()) == -1) + return -1; + theNullFlag = true; + theLength = 0; + theHeadInlineUpdateFlag = true; + return 0; +} + +int +NdbBlob::getLength(Uint64& len) +{ + if (theState == Prepared && theSetFlag) { + len = theGetSetBytes; + return 0; + } + if (theNullFlag == -1) { + setErrorCode(ErrState); + return -1; + } + len = theLength; + return 0; +} + +int +NdbBlob::truncate(Uint64 length) +{ + DBG("truncate kength=" << length); + if (theNullFlag == -1) { + setErrorCode(ErrState); + return -1; + } + if (theLength > length) { + if (length >= theInlineSize) { + Uint32 part1 = getPartNumber(length); + Uint32 part2 = getPartNumber(theLength - 1); + assert(part2 >= part1); + if (deleteParts(part1, part2 - part1) == -1) + return -1; + } else { + if (deleteParts(0, getPartCount()) == -1) + return -1; + } + theLength = length; + theHeadInlineUpdateFlag = true; + } + return 0; +} + +int +NdbBlob::getPos(Uint64& pos) +{ + if (theNullFlag == -1) { + setErrorCode(ErrState); + return -1; + } + pos = thePos; + return 0; +} + +int +NdbBlob::setPos(Uint64 pos) +{ + if (theNullFlag == -1) { + setErrorCode(ErrState); + return -1; + } + if (pos > theLength) { + setErrorCode(ErrSeek); + return -1; + } + thePos = pos; + return 0; +} + +// read/write + +int +NdbBlob::readData(void* data, Uint32& bytes) +{ + if (readData(thePos, data, bytes) == -1) + return -1; + thePos += bytes; + assert(thePos <= theLength); + return 0; +} + +int +NdbBlob::readData(Uint64 pos, void* data, Uint32& bytes) +{ + if (theState != Active) { + setErrorCode(ErrState); + return -1; + } + char* buf = static_cast(data); + return readDataPrivate(pos, buf, bytes); +} + +int +NdbBlob::readDataPrivate(Uint64 pos, char* buf, Uint32& bytes) +{ + DBG("readData pos=" << pos << " bytes=" << bytes); + if (pos > theLength) { + setErrorCode(ErrSeek); + return -1; + } + if (bytes > theLength - pos) + bytes = theLength - pos; + Uint32 len = bytes; + if (len > 0) { + // inline part + if (pos < theInlineSize) { + Uint32 n = theInlineSize - pos; + if (n > len) + n = len; + memcpy(buf, theInlineData + pos, n); + pos += n; + buf += n; + len -= n; + } + } + if (len > 0) { + assert(pos >= theInlineSize); + Uint32 off = (pos - theInlineSize) % thePartSize; + // partial first block + if (off != 0) { + DBG("partial first block pos=" << pos << " len=" << len); + Uint32 part = (pos - theInlineSize) / thePartSize; + if (readParts(thePartBuf.data, part, 1) == -1) + return -1; + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode(theNdbOp); + return -1; + } + Uint32 n = thePartSize - off; + if (n > len) + n = len; + memcpy(buf, thePartBuf.data + off, n); + pos += n; + buf += n; + len -= n; + } + } + if (len > 0) { + assert((pos - theInlineSize) % thePartSize == 0); + // complete blocks in the middle + if (len >= thePartSize) { + Uint32 part = (pos - theInlineSize) / thePartSize; + Uint32 count = len / thePartSize; + if (readParts(buf, part, count) == -1) + return -1; + Uint32 n = thePartSize * count; + pos += n; + buf += n; + len -= n; + } + } + if (len > 0) { + // partial last block + DBG("partial last block pos=" << pos << " len=" << len); + assert((pos - theInlineSize) % thePartSize == 0 && len < thePartSize); + Uint32 part = (pos - theInlineSize) / thePartSize; + if (readParts(thePartBuf.data, part, 1) == -1) + return -1; + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode(theNdbOp); + return -1; + } + memcpy(buf, thePartBuf.data, len); + Uint32 n = len; + pos += n; + buf += n; + len -= n; + } + assert(len == 0); + return 0; +} + +int +NdbBlob::writeData(const void* data, Uint32 bytes) +{ + if (writeData(thePos, data, bytes) == -1) + return -1; + thePos += bytes; + assert(thePos <= theLength); + return 0; +} + +int +NdbBlob::writeData(Uint64 pos, const void* data, Uint32 bytes) +{ + if (theState != Active) { + setErrorCode(ErrState); + return -1; + } + const char* buf = static_cast(data); + return writeDataPrivate(pos, buf, bytes); +} + +int +NdbBlob::writeDataPrivate(Uint64 pos, const char* buf, Uint32 bytes) +{ + DBG("writeData pos=" << pos << " bytes=" << bytes); + if (pos > theLength) { + setErrorCode(ErrSeek); + return -1; + } + Uint32 len = bytes; + // any write makes blob not NULL + if (theNullFlag) { + theNullFlag = false; + theHeadInlineUpdateFlag = true; + } + if (len > 0) { + // inline part + if (pos < theInlineSize) { + Uint32 n = theInlineSize - pos; + if (n > len) + n = len; + memcpy(theInlineData + pos, buf, n); + theHeadInlineUpdateFlag = true; + pos += n; + buf += n; + len -= n; + } + } + if (len > 0) { + assert(pos >= theInlineSize); + Uint32 off = (pos - theInlineSize) % thePartSize; + // partial first block + if (off != 0) { + DBG("partial first block pos=" << pos << " len=" << len); + if (theNewPartFlag) { + // must flush insert to guarantee read + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode(theNdbOp); + return -1; + } + theNewPartFlag = false; + } + Uint32 part = (pos - theInlineSize) / thePartSize; + if (readParts(thePartBuf.data, part, 1) == -1) + return -1; + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode(theNdbOp); + return -1; + } + Uint32 n = thePartSize - off; + if (n > len) { + memset(thePartBuf.data + off + len, theFillChar, n - len); + n = len; + } + memcpy(thePartBuf.data + off, buf, n); + if (updateParts(thePartBuf.data, part, 1) == -1) + return -1; + pos += n; + buf += n; + len -= n; + } + } + if (len > 0) { + assert((pos - theInlineSize) % thePartSize == 0); + // complete blocks in the middle + if (len >= thePartSize) { + Uint32 part = (pos - theInlineSize) / thePartSize; + Uint32 count = len / thePartSize; + for (unsigned i = 0; i < count; i++) { + if (part + i < getPartCount()) { + if (updateParts(buf, part + i, 1) == -1) + return -1; + } else { + if (insertParts(buf, part + i, 1) == -1) + return -1; + } + Uint32 n = thePartSize; + pos += n; + buf += n; + len -= n; + } + } + } + if (len > 0) { + // partial last block + DBG("partial last block pos=" << pos << " len=" << len); + assert((pos - theInlineSize) % thePartSize == 0 && len < thePartSize); + Uint32 part = (pos - theInlineSize) / thePartSize; + if (theLength > pos + len) { + if (theNewPartFlag) { + // must flush insert to guarantee read + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode(theNdbOp); + return -1; + } + theNewPartFlag = false; + } + if (readParts(thePartBuf.data, part, 1) == -1) + return -1; + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode(theNdbOp); + return -1; + } + memcpy(thePartBuf.data, buf, len); + if (updateParts(thePartBuf.data, part, 1) == -1) + return -1; + } else { + memcpy(thePartBuf.data, buf, len); + memset(thePartBuf.data + len, theFillChar, thePartSize - len); + if (part < getPartCount()) { + if (updateParts(thePartBuf.data, part, 1) == -1) + return -1; + } else { + if (insertParts(thePartBuf.data, part, 1) == -1) + return -1; + } + } + Uint32 n = len; + pos += n; + buf += n; + len -= n; + } + assert(len == 0); + if (theLength < pos) { + theLength = pos; + theHeadInlineUpdateFlag = true; + } + DBG("writeData out"); + return 0; +} + +int +NdbBlob::readParts(char* buf, Uint32 part, Uint32 count) +{ + DBG("readParts part=" << part << " count=" << count); + Uint32 n = 0; + while (n < count) { + NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTableName); + if (tOp == NULL || + tOp->readTuple() == -1 || + setPartKeyValue(tOp, part + n) == -1 || + tOp->getValue((Uint32)3, buf) == NULL) { + setErrorCode(tOp); + return -1; + } + buf += thePartSize; + n++; + } + return 0; +} + +int +NdbBlob::insertParts(const char* buf, Uint32 part, Uint32 count) +{ + DBG("insertParts part=" << part << " count=" << count); + Uint32 n = 0; + while (n < count) { + NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTableName); + if (tOp == NULL || + tOp->insertTuple() == -1 || + setPartKeyValue(tOp, part + n) == -1 || + tOp->setValue((Uint32)3, buf) == -1) { + setErrorCode(tOp); + return -1; + } + buf += thePartSize; + n++; + theNewPartFlag = true; + } + return 0; +} + +int +NdbBlob::updateParts(const char* buf, Uint32 part, Uint32 count) +{ + DBG("updateParts part=" << part << " count=" << count); + Uint32 n = 0; + while (n < count) { + NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTableName); + if (tOp == NULL || + tOp->updateTuple() == -1 || + setPartKeyValue(tOp, part + n) == -1 || + tOp->setValue((Uint32)3, buf) == -1) { + setErrorCode(tOp); + return -1; + } + buf += thePartSize; + n++; + theNewPartFlag = true; + } + return 0; +} + +int +NdbBlob::deleteParts(Uint32 part, Uint32 count) +{ + DBG("deleteParts part=" << part << " count=" << count); + Uint32 n = 0; + while (n < count) { + NdbOperation* tOp = theNdbCon->getNdbOperation(theBlobTableName); + if (tOp == NULL || + tOp->deleteTuple() == -1 || + setPartKeyValue(tOp, part + n) == -1) { + setErrorCode(tOp); + return -1; + } + n++; + } + return 0; +} + +// blob handle maintenance + +/* + * Prepare blob handle linked to an operation. Checks blob table. + * Allocates buffers. For key operation fetches key data from signal + * data. For read operation adds read of head+inline. + */ +int +NdbBlob::atPrepare(NdbConnection* aCon, NdbOperation* anOp, const NdbColumnImpl* aColumn) +{ + assert(theState == Idle); + // ndb api stuff + theNdb = anOp->theNdb; + theNdbCon = aCon; // for scan, this is the real transaction (m_transConnection) + theNdbOp = anOp; + theTable = anOp->m_currentTable; + theAccessTable = anOp->m_accessTable; + theColumn = aColumn; + DBG("atPrepare"); + NdbDictionary::Column::Type partType = NdbDictionary::Column::Undefined; + switch (theColumn->getType()) { + case NdbDictionary::Column::Blob: + partType = NdbDictionary::Column::Binary; + theFillChar = 0x0; + break; + case NdbDictionary::Column::Clob: + partType = NdbDictionary::Column::Char; + theFillChar = 0x20; + break; + default: + setErrorCode(ErrUsage); + return -1; + } + // sizes + theInlineSize = theColumn->getInlineSize(); + thePartSize = theColumn->getPartSize(); + theStripeSize = theColumn->getStripeSize(); + // blob table sanity check + assert((NDB_BLOB_HEAD_SIZE << 2) == sizeof(Head)); + assert(theColumn->m_attrSize * theColumn->m_arraySize == sizeof(Head) + theInlineSize); + getBlobTableName(theBlobTableName, theTable, theColumn); + const NdbDictionary::Table* bt; + const NdbDictionary::Column* bc; + if (theInlineSize >= (1 << 16) || + thePartSize == 0 || + thePartSize >= (1 << 16) || + theStripeSize == 0 || + (bt = theNdb->theDictionary->getTable(theBlobTableName)) == NULL || + (bc = bt->getColumn("DATA")) == NULL || + bc->getType() != partType || + bc->getLength() != (int)thePartSize) { + setErrorCode(ErrTable); + return -1; + } + // buffers + theKeyBuf.alloc(theTable->m_sizeOfKeysInWords << 2); + theAccessKeyBuf.alloc(theAccessTable->m_sizeOfKeysInWords << 2); + theHeadInlineBuf.alloc(sizeof(Head) + theInlineSize); + thePartBuf.alloc(thePartSize); + theHead = (Head*)theHeadInlineBuf.data; + theInlineData = theHeadInlineBuf.data + sizeof(Head); + // handle different operation types + bool supportedOp = false; + if (isKeyOp()) { + if (isTableOp()) { + // get table key + Uint32* data = (Uint32*)theKeyBuf.data; + unsigned size = theTable->m_sizeOfKeysInWords; + if (theNdbOp->getKeyFromTCREQ(data, size) == -1) { + setErrorCode(ErrUsage); + return -1; + } + } + if (isIndexOp()) { + // get index key + Uint32* data = (Uint32*)theAccessKeyBuf.data; + unsigned size = theAccessTable->m_sizeOfKeysInWords; + if (theNdbOp->getKeyFromTCREQ(data, size) == -1) { + setErrorCode(ErrUsage); + return -1; + } + } + if (isReadOp()) { + // add read of head+inline in this op + if (getHeadInlineValue(theNdbOp) == -1) + return -1; + } + if (isInsertOp()) { + // becomes NULL unless set before execute + theNullFlag = true; + theLength = 0; + } + supportedOp = true; + } + if (isScanOp()) { + // add read of head+inline in this op + if (getHeadInlineValue(theNdbOp) == -1) + return -1; + supportedOp = true; + } + if (! supportedOp) { + setErrorCode(ErrUsage); + return -1; + } + setState(Prepared); + DBG("atPrepare out"); + return 0; +} + +/* + * Before execute of prepared operation. May add new operations before + * this one. May ask that this operation and all before it (a "batch") + * is executed immediately in no-commit mode. + */ +int +NdbBlob::preExecute(ExecType anExecType, bool& batch) +{ + DBG("preExecute"); + if (theState == Invalid) + return -1; + assert(theState == Prepared); + // handle different operation types + assert(isKeyOp()); + if (isReadOp()) { + if (theGetFlag && theGetSetBytes > theInlineSize) { + // need blob head before proceeding + batch = true; + } + } + if (isInsertOp()) { + if (theSetFlag && theGetSetBytes > theInlineSize) { + // add ops to write rest of a setValue + assert(theSetBuf != 0); + Uint64 pos = theInlineSize; + const char* buf = theSetBuf + theInlineSize; + Uint32 bytes = theGetSetBytes - theInlineSize; + if (writeDataPrivate(pos, buf, bytes) == -1) + return -1; + if (anExecType == Commit && theHeadInlineUpdateFlag) { + // add an operation to update head+inline + NdbOperation* tOp = theNdbCon->getNdbOperation(theTable); + if (tOp == NULL || + tOp->updateTuple() == -1 || + setTableKeyValue(tOp) == -1 || + setHeadInlineValue(tOp) == -1) { + setErrorCode(ErrAbort); + return -1; + } + } + } + } + if (isTableOp()) { + if (isUpdateOp() || isDeleteOp()) { + // add operation before this one to read head+inline + NdbOperation* tOp = theNdbCon->getNdbOperation(theTable, theNdbOp); + if (tOp == NULL || + tOp->readTuple() == -1 || + setTableKeyValue(tOp) == -1 || + getHeadInlineValue(tOp) == -1) { + setErrorCode(tOp); + return -1; + } + // execute immediately + batch = true; + } + } + if (isIndexOp()) { + // add op before this one to read table key + NdbBlob* tFirstBlob = theNdbOp->theBlobList; + if (this == tFirstBlob) { + // first blob does it for all + if (g_ndb_blob_ok_to_read_index_table) { + Uint32 pkAttrId = theAccessTable->getNoOfColumns() - 1; + NdbOperation* tOp = theNdbCon->getNdbOperation(theAccessTable, theNdbOp); + if (tOp == NULL || + tOp->readTuple() == -1 || + setAccessKeyValue(tOp) == -1 || + tOp->getValue(pkAttrId, theKeyBuf.data) == NULL) { + setErrorCode(tOp); + return -1; + } + } else { + NdbOperation* tOp = theNdbCon->getNdbIndexOperation(theAccessTable->m_index, theTable, theNdbOp); + if (tOp == NULL || + tOp->readTuple() == -1 || + setAccessKeyValue(tOp) == -1 || + getTableKeyValue(tOp) == -1) { + setErrorCode(tOp); + return -1; + } + } + } + if (isUpdateOp() || isDeleteOp()) { + // add op before this one to read head+inline via index + NdbIndexOperation* tOp = theNdbCon->getNdbIndexOperation(theAccessTable->m_index, theTable, theNdbOp); + if (tOp == NULL || + tOp->readTuple() == -1 || + setAccessKeyValue(tOp) == -1 || + getHeadInlineValue(tOp) == -1) { + setErrorCode(tOp); + return -1; + } + // execute immediately + batch = true; + } + } + DBG("preExecute out batch=" << batch); + return 0; +} + +/* + * After execute, for any operation. If already Active, this routine + * has been done previously. Operations which requested a no-commit + * batch can add new operations after this one. They are added before + * any remaining prepared operations. + */ +int +NdbBlob::postExecute(ExecType anExecType) +{ + DBG("postExecute type=" << anExecType); + if (theState == Invalid) + return -1; + if (theState == Active) + return 0; + assert(theState == Prepared); + assert(isKeyOp()); + if (isIndexOp()) { + NdbBlob* tFirstBlob = theNdbOp->theBlobList; + if (this != tFirstBlob) { + // copy key from first blob + assert(theKeyBuf.size == tFirstBlob->theKeyBuf.size); + memcpy(theKeyBuf.data, tFirstBlob->theKeyBuf.data, tFirstBlob->theKeyBuf.size); + } + } + if (isReadOp()) { + getHeadFromRecAttr(); + if (theGetFlag && theGetSetBytes > 0) { + // copy inline bytes to user buffer + assert(theGetBuf != NULL); + unsigned n = theGetSetBytes; + if (n > theInlineSize) + n = theInlineSize; + memcpy(theGetBuf, theInlineData, n); + } + if (theGetFlag && theGetSetBytes > theInlineSize) { + // add ops to read rest of a getValue + assert(anExecType == NoCommit); + assert(theGetBuf != 0); + Uint64 pos = theInlineSize; + char* buf = theGetBuf + theInlineSize; + Uint32 bytes = theGetSetBytes - theInlineSize; + if (readDataPrivate(pos, buf, bytes) == -1) + return -1; + } + } + if (isUpdateOp()) { + assert(anExecType == NoCommit); + getHeadFromRecAttr(); + if (theSetFlag) { + // setValue overwrites everything + if (theSetBuf != 0) { + if (truncate(0) == -1) + return -1; + if (writeDataPrivate(0, theSetBuf, theGetSetBytes) == -1) + return -1; + } else { + if (setNull() == -1) + return -1; + } + } + } + if (isDeleteOp()) { + assert(anExecType == NoCommit); + getHeadFromRecAttr(); + if (deleteParts(0, getPartCount()) == -1) + return -1; + } + theNewPartFlag = false; + setState(anExecType == NoCommit ? Active : Closed); + DBG("postExecute out"); + return 0; +} + +/* + * Before commit of completed operation. For write add operation to + * update head+inline. + */ +int +NdbBlob::preCommit() +{ + DBG("preCommit"); + if (theState == Invalid) + return -1; + assert(theState == Active); + assert(isKeyOp()); + if (isInsertOp() || isUpdateOp()) { + if (theHeadInlineUpdateFlag) { + // add an operation to update head+inline + NdbOperation* tOp = theNdbCon->getNdbOperation(theTable); + if (tOp == NULL || + tOp->updateTuple() == -1 || + setTableKeyValue(tOp) == -1 || + setHeadInlineValue(tOp) == -1) { + setErrorCode(ErrAbort); + return -1; + } + } + } + DBG("preCommit out"); + return 0; +} + +/* + * After next scan result. Handle like read op above. + */ +int +NdbBlob::atNextResult() +{ + DBG("atNextResult"); + if (theState == Invalid) + return -1; + assert(isScanOp()); + getHeadFromRecAttr(); + // reset position + thePos = 0; + // get primary key + { Uint32* data = (Uint32*)theKeyBuf.data; + unsigned size = theTable->m_sizeOfKeysInWords; + if (theNdbOp->getKeyFromKEYINFO20(data, size) == -1) { + setErrorCode(ErrUsage); + return -1; + } + } + if (! theNullFlag) { + if (theGetFlag && theGetSetBytes > 0) { + // copy inline bytes to user buffer + assert(theGetBuf != NULL); + unsigned n = theGetSetBytes; + if (n > theLength) + n = theLength; + if (n > theInlineSize) + n = theInlineSize; + memcpy(theGetBuf, theInlineData, n); + } + if (theGetFlag && theGetSetBytes > theInlineSize && theLength > theInlineSize) { + // add ops to read rest of a getValue + assert(theGetBuf != 0); + Uint64 pos = theInlineSize; + char* buf = theGetBuf + theInlineSize; + Uint32 bytes = theGetSetBytes - theInlineSize; + if (readDataPrivate(pos, buf, bytes) == -1) + return -1; + // must also execute them + DBG("force execute"); + if (theNdbCon->executeNoBlobs(NoCommit) == -1) { + setErrorCode((NdbOperation*)0); + return -1; + } + } + } + setState(Active); + DBG("atNextResult out"); + return 0; +} + + +// misc + +const NdbDictionary::Column* +NdbBlob::getColumn() +{ + return theColumn; +} + +// errors + +void +NdbBlob::setErrorCode(int anErrorCode, bool invalidFlag) +{ + DBG("setErrorCode code=" << anErrorCode); + theError.code = anErrorCode; + if (invalidFlag) + setState(Invalid); +} + +void +NdbBlob::setErrorCode(NdbOperation* anOp, bool invalidFlag) +{ + int code = 0; + if (anOp != NULL && (code = anOp->theError.code) != 0) + ; + else if ((code = theNdbCon->theError.code) != 0) + ; + else if ((code = theNdb->theError.code) != 0) + ; + else + code = ErrUnknown; + setErrorCode(code, invalidFlag); +} + +void +NdbBlob::setErrorCode(NdbConnection* aCon, bool invalidFlag) +{ + int code = 0; + if (theNdbCon != NULL && (code = theNdbCon->theError.code) != 0) + ; + else if ((code = theNdb->theError.code) != 0) + ; + else + code = ErrUnknown; + setErrorCode(code, invalidFlag); +} + +#ifdef VM_TRACE +NdbOut& +operator<<(NdbOut& out, const NdbBlob& blob) +{ + ndbout << dec << "s=" << blob.theState; + ndbout << dec << " n=" << blob.theNullFlag;; + ndbout << dec << " l=" << blob.theLength; + ndbout << dec << " p=" << blob.thePos; + ndbout << dec << " u=" << blob.theHeadInlineUpdateFlag; + return out; +} +#endif diff --git a/ndb/src/ndbapi/NdbConnection.cpp b/ndb/src/ndbapi/NdbConnection.cpp index 68979d92559..bf90bb07928 100644 --- a/ndb/src/ndbapi/NdbConnection.cpp +++ b/ndb/src/ndbapi/NdbConnection.cpp @@ -36,6 +36,7 @@ Adjust: 971022 UABMNST First version. #include "NdbApiSignal.hpp" #include "TransporterFacade.hpp" #include "API.hpp" +#include "NdbBlob.hpp" #include #include @@ -87,7 +88,8 @@ NdbConnection::NdbConnection( Ndb* aNdb ) : m_firstExecutedScanOp(NULL), // Scan operations theScanningOp(NULL), - theBuddyConPtr(0xFFFFFFFF) + theBuddyConPtr(0xFFFFFFFF), + theBlobFlag(false) { theListState = NotInList; theError.code = 0; @@ -146,6 +148,8 @@ NdbConnection::init() m_theLastScanOperation = NULL; m_firstExecutedScanOp = 0; theBuddyConPtr = 0xFFFFFFFF; + // + theBlobFlag = false; }//NdbConnection::init() /***************************************************************************** @@ -261,6 +265,86 @@ int NdbConnection::execute(ExecType aTypeOfExec, AbortOption abortOption, int forceSend) +{ + if (! theBlobFlag) + return executeNoBlobs(aTypeOfExec, abortOption, forceSend); + + // execute prepared ops in batches, as requested by blobs + + ExecType tExecType; + NdbOperation* tPrepOp; + + do { + tExecType = aTypeOfExec; + tPrepOp = theFirstOpInList; + while (tPrepOp != NULL) { + bool batch = false; + NdbBlob* tBlob = tPrepOp->theBlobList; + while (tBlob != NULL) { + if (tBlob->preExecute(tExecType, batch) == -1) + return -1; + tBlob = tBlob->theNext; + } + if (batch) { + // blob asked to execute all up to here now + tExecType = NoCommit; + break; + } + tPrepOp = tPrepOp->next(); + } + // save rest of prepared ops if batch + NdbOperation* tRestOp; + NdbOperation* tLastOp; + if (tPrepOp != NULL) { + tRestOp = tPrepOp->next(); + tPrepOp->next(NULL); + tLastOp = theLastOpInList; + theLastOpInList = tPrepOp; + } + if (tExecType == Commit) { + NdbOperation* tOp = theCompletedFirstOp; + while (tOp != NULL) { + NdbBlob* tBlob = tOp->theBlobList; + while (tBlob != NULL) { + if (tBlob->preCommit() == -1) + return -1; + tBlob = tBlob->theNext; + } + tOp = tOp->next(); + } + } + if (executeNoBlobs(tExecType, abortOption, forceSend) == -1) + return -1; + { + NdbOperation* tOp = theCompletedFirstOp; + while (tOp != NULL) { + NdbBlob* tBlob = tOp->theBlobList; + while (tBlob != NULL) { + // may add new operations if batch + if (tBlob->postExecute(tExecType) == -1) + return -1; + tBlob = tBlob->theNext; + } + tOp = tOp->next(); + } + } + // add saved prepared ops if batch + if (tPrepOp != NULL && tRestOp != NULL) { + if (theFirstOpInList == NULL) + theFirstOpInList = tRestOp; + else + theLastOpInList->next(tRestOp); + theLastOpInList = tLastOp; + } + } while (theFirstOpInList != NULL || tExecType != aTypeOfExec); + + return 0; +} + +int +NdbConnection::executeNoBlobs(ExecType aTypeOfExec, + AbortOption abortOption, + int forceSend) { //------------------------------------------------------------------------ // We will start by preparing all operations in the transaction defined @@ -341,7 +425,6 @@ NdbConnection::executeAsynchPrepare( ExecType aTypeOfExec, * Reset error.code on execute */ theError.code = 0; - NdbScanOperation* tcOp = m_theFirstScanOperation; if (tcOp != 0){ // Execute any cursor operations @@ -851,7 +934,7 @@ Remark: Get an operation from NdbOperation object idlelist and object, synchronous. *****************************************************************************/ NdbOperation* -NdbConnection::getNdbOperation(NdbTableImpl * tab) +NdbConnection::getNdbOperation(NdbTableImpl * tab, NdbOperation* aNextOp) { NdbOperation* tOp; @@ -863,14 +946,28 @@ NdbConnection::getNdbOperation(NdbTableImpl * tab) tOp = theNdb->getOperation(); if (tOp == NULL) goto getNdbOp_error1; - if (theLastOpInList != NULL) { - theLastOpInList->next(tOp); - theLastOpInList = tOp; + if (aNextOp == NULL) { + if (theLastOpInList != NULL) { + theLastOpInList->next(tOp); + theLastOpInList = tOp; + } else { + theLastOpInList = tOp; + theFirstOpInList = tOp; + }//if + tOp->next(NULL); } else { - theLastOpInList = tOp; - theFirstOpInList = tOp; - }//if - tOp->next(NULL); + // add before the given op + if (theFirstOpInList == aNextOp) { + theFirstOpInList = tOp; + } else { + NdbOperation* aLoopOp = theFirstOpInList; + while (aLoopOp != NULL && aLoopOp->next() != aNextOp) + aLoopOp = aLoopOp->next(); + assert(aLoopOp != NULL); + aLoopOp->next(tOp); + } + tOp->next(aNextOp); + } if (tOp->init(tab, this) != -1) { return tOp; } else { @@ -1037,21 +1134,36 @@ Remark: Get an operation from NdbIndexOperation object idlelist and get *****************************************************************************/ NdbIndexOperation* NdbConnection::getNdbIndexOperation(NdbIndexImpl * anIndex, - NdbTableImpl * aTable) + NdbTableImpl * aTable, + NdbOperation* aNextOp) { NdbIndexOperation* tOp; tOp = theNdb->getIndexOperation(); if (tOp == NULL) goto getNdbOp_error1; - if (theLastOpInList != NULL) { - theLastOpInList->next(tOp); - theLastOpInList = tOp; + if (aNextOp == NULL) { + if (theLastOpInList != NULL) { + theLastOpInList->next(tOp); + theLastOpInList = tOp; + } else { + theLastOpInList = tOp; + theFirstOpInList = tOp; + }//if + tOp->next(NULL); } else { - theLastOpInList = tOp; - theFirstOpInList = tOp; - }//if - tOp->next(NULL); + // add before the given op + if (theFirstOpInList == aNextOp) { + theFirstOpInList = tOp; + } else { + NdbOperation* aLoopOp = theFirstOpInList; + while (aLoopOp != NULL && aLoopOp->next() != aNextOp) + aLoopOp = aLoopOp->next(); + assert(aLoopOp != NULL); + aLoopOp->next(tOp); + } + tOp->next(aNextOp); + } if (tOp->indxInit(anIndex, aTable, this)!= -1) { return tOp; } else { diff --git a/ndb/src/ndbapi/NdbDictionary.cpp b/ndb/src/ndbapi/NdbDictionary.cpp index 55b6d6d8f99..413ad0745db 100644 --- a/ndb/src/ndbapi/NdbDictionary.cpp +++ b/ndb/src/ndbapi/NdbDictionary.cpp @@ -273,6 +273,9 @@ NdbDictionary::Table::addColumn(const Column & c){ if(c.getPrimaryKey()){ m_impl.m_noOfKeys++; } + if (col->getBlobType()) { + m_impl.m_noOfBlobs++; + } m_impl.buildColumnHash(); } diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index e7fa63056b0..844b48c893a 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -34,6 +34,7 @@ #include #include #include "NdbEventOperationImpl.hpp" +#include "NdbBlob.hpp" #define DEBUG_PRINT 0 #define INCOMPATIBLE_VERSION -2 @@ -178,7 +179,14 @@ NdbColumnImpl::equal(const NdbColumnImpl& col) const case NdbDictionary::Column::Double: case NdbDictionary::Column::Datetime: case NdbDictionary::Column::Timespec: + break; case NdbDictionary::Column::Blob: + case NdbDictionary::Column::Clob: + if (m_precision != col.m_precision || + m_scale != col.m_scale || + m_length != col.m_length) { + return false; + } break; } if (m_autoIncrement != col.m_autoIncrement){ @@ -223,6 +231,8 @@ NdbTableImpl::NdbTableImpl() : NdbDictionary::Table(* this), m_facade(this) { m_noOfKeys = 0; + m_sizeOfKeysInWords = 0; + m_noOfBlobs = 0; m_index = 0; init(); } @@ -258,6 +268,8 @@ NdbTableImpl::init(){ m_noOfKeys = 0; m_fragmentCount = 0; + m_sizeOfKeysInWords = 0; + m_noOfBlobs = 0; } bool @@ -336,6 +348,8 @@ NdbTableImpl::assign(const NdbTableImpl& org) m_index = org.m_index; m_noOfKeys = org.m_noOfKeys; + m_sizeOfKeysInWords = org.m_sizeOfKeysInWords; + m_noOfBlobs = org.m_noOfBlobs; m_version = org.m_version; m_status = org.m_status; @@ -1077,6 +1091,8 @@ columnTypeMapping[] = { { DictTabInfo::ExtVarbinary, NdbDictionary::Column::Varbinary }, { DictTabInfo::ExtDatetime, NdbDictionary::Column::Datetime }, { DictTabInfo::ExtTimespec, NdbDictionary::Column::Timespec }, + { DictTabInfo::ExtBlob, NdbDictionary::Column::Blob }, + { DictTabInfo::ExtClob, NdbDictionary::Column::Clob }, { -1, -1 } }; @@ -1133,6 +1149,7 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, Uint32 keyInfoPos = 0; Uint32 keyCount = 0; + Uint32 blobCount; for(Uint32 i = 0; i < tableDesc.NoOfAttributes; i++) { DictTabInfo::Attribute attrDesc; attrDesc.init(); @@ -1189,6 +1206,8 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, } else { col->m_keyInfoPos = 0; } + if (col->getBlobType()) + blobCount++; NdbColumnImpl * null = 0; impl->m_columns.fill(attrDesc.AttributeId, null); @@ -1202,7 +1221,8 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, } impl->m_noOfKeys = keyCount; impl->m_keyLenInWords = keyInfoPos; - + impl->m_sizeOfKeysInWords = keyInfoPos; + impl->m_noOfBlobs = blobCount; * ret = impl; return 0; } @@ -1210,6 +1230,43 @@ NdbDictInterface::parseTableInfo(NdbTableImpl ** ret, /***************************************************************** * Create table and alter table */ +int +NdbDictionaryImpl::createTable(NdbTableImpl &t) +{ + if (m_receiver.createTable(m_ndb, t) != 0) + return -1; + if (t.m_noOfBlobs == 0) + return 0; + // update table def from DICT + NdbTableImpl * tp = getTable(t.m_externalName.c_str()); + if (tp == NULL) { + m_error.code = 709; + return -1; + } + if (createBlobTables(* tp) != 0) { + int save_code = m_error.code; + (void)dropTable(t); + m_error.code = save_code; + return -1; + } + return 0; +} + +int +NdbDictionaryImpl::createBlobTables(NdbTableImpl &t) +{ + for (unsigned i = 0; i < t.m_columns.size(); i++) { + NdbColumnImpl & c = *t.m_columns[i]; + if (! c.getBlobType()) + continue; + NdbTableImpl bt; + NdbBlob::getBlobTable(bt, &t, &c); + if (createTable(bt) != 0) + return -1; + } + return 0; +} + int NdbDictInterface::createTable(Ndb & ndb, NdbTableImpl & impl) @@ -1544,6 +1601,12 @@ NdbDictionaryImpl::dropTable(NdbTableImpl & impl) if (dropIndex(element.name, name) == -1) return -1; } + + if (impl.m_noOfBlobs != 0) { + if (dropBlobTables(impl) != 0) + return -1; + } + int ret = m_receiver.dropTable(impl); if(ret == 0){ const char * internalTableName = impl.m_internalName.c_str(); @@ -1558,6 +1621,23 @@ NdbDictionaryImpl::dropTable(NdbTableImpl & impl) return ret; } +int +NdbDictionaryImpl::dropBlobTables(NdbTableImpl & t) +{ + for (unsigned i = 0; i < t.m_columns.size(); i++) { + NdbColumnImpl & c = *t.m_columns[i]; + if (! c.getBlobType()) + continue; + char btname[NdbBlob::BlobTableNameSize]; + NdbBlob::getBlobTableName(btname, &t, &c); + if (dropTable(btname) != 0) { + if (m_error.code != 709) + return -1; + } + } + return 0; +} + int NdbDictInterface::dropTable(const NdbTableImpl & impl) { diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.hpp b/ndb/src/ndbapi/NdbDictionaryImpl.hpp index e04930fc127..f7ddafbbbc9 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.hpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.hpp @@ -81,6 +81,7 @@ public: Uint32 m_keyInfoPos; Uint32 m_extType; // used by restore (kernel type in versin v2x) bool getInterpretableType() const ; + bool getBlobType() const; /** * Equality/assign @@ -143,6 +144,8 @@ public: * Aggregates */ Uint32 m_noOfKeys; + unsigned short m_sizeOfKeysInWords; + unsigned short m_noOfBlobs; /** * Equality/assign @@ -355,13 +358,12 @@ public: bool setTransporter(class Ndb * ndb, class TransporterFacade * tf); bool setTransporter(class TransporterFacade * tf); - int createTable(NdbTableImpl &t) - { - return m_receiver.createTable(m_ndb, t); - } + int createTable(NdbTableImpl &t); + int createBlobTables(NdbTableImpl &); int alterTable(NdbTableImpl &t); int dropTable(const char * name); int dropTable(NdbTableImpl &); + int dropBlobTables(NdbTableImpl &); int invalidateObject(NdbTableImpl &); int removeCachedObject(NdbTableImpl &); @@ -434,6 +436,13 @@ NdbColumnImpl::getInterpretableType() const { m_type == NdbDictionary::Column::Bigunsigned); } +inline +bool +NdbColumnImpl::getBlobType() const { + return (m_type == NdbDictionary::Column::Blob || + m_type == NdbDictionary::Column::Clob); +} + inline NdbTableImpl & NdbTableImpl::getImpl(NdbDictionary::Table & t){ diff --git a/ndb/src/ndbapi/NdbIndexOperation.cpp b/ndb/src/ndbapi/NdbIndexOperation.cpp index d976c912c5e..84a4611cd67 100644 --- a/ndb/src/ndbapi/NdbIndexOperation.cpp +++ b/ndb/src/ndbapi/NdbIndexOperation.cpp @@ -372,6 +372,17 @@ int NdbIndexOperation::equal_impl(const NdbColumnImpl* tAttrInfo, } else if ((tOpType == ReadRequest) || (tOpType == DeleteRequest) || (tOpType == ReadExclusive)) { theStatus = GetValue; + // create blob handles automatically + if (tOpType == DeleteRequest && m_currentTable->m_noOfBlobs != 0) { + for (unsigned i = 0; i < m_currentTable->m_columns.size(); i++) { + NdbColumnImpl* c = m_currentTable->m_columns[i]; + assert(c != 0); + if (c->getBlobType()) { + if (getBlobHandle(theNdbCon, c) == NULL) + return -1; + } + } + } return 0; } else if ((tOpType == InsertRequest) || (tOpType == WriteRequest)) { theStatus = SetValue; diff --git a/ndb/src/ndbapi/NdbOperation.cpp b/ndb/src/ndbapi/NdbOperation.cpp index 74d6a462ac8..889c8d75d8e 100644 --- a/ndb/src/ndbapi/NdbOperation.cpp +++ b/ndb/src/ndbapi/NdbOperation.cpp @@ -31,6 +31,7 @@ #include "NdbApiSignal.hpp" #include "NdbRecAttr.hpp" #include "NdbUtil.hpp" +#include "NdbBlob.hpp" #include "ndbapi_limits.h" #include #include "NdbDictionaryImpl.hpp" @@ -88,7 +89,8 @@ NdbOperation::NdbOperation(Ndb* aNdb) : m_tcReqGSN(GSN_TCKEYREQ), m_keyInfoGSN(GSN_KEYINFO), m_attrInfoGSN(GSN_ATTRINFO), - theBoundATTRINFO(NULL) + theBoundATTRINFO(NULL), + theBlobList(NULL) { theReceiver.init(NdbReceiver::NDB_OPERATION, this, false); theError.code = 0; @@ -177,6 +179,7 @@ NdbOperation::init(NdbTableImpl* tab, NdbConnection* myConnection){ theTotalNrOfKeyWordInSignal = 8; theMagicNumber = 0xABCDEF01; theBoundATTRINFO = NULL; + theBlobList = NULL; tSignal = theNdb->getSignal(); if (tSignal == NULL) @@ -215,6 +218,8 @@ NdbOperation::release() NdbCall* tSaveCall; NdbSubroutine* tSubroutine; NdbSubroutine* tSaveSubroutine; + NdbBlob* tBlob; + NdbBlob* tSaveBlob; if (theTCREQ != NULL) { @@ -278,6 +283,14 @@ NdbOperation::release() } theBoundATTRINFO = NULL; } + tBlob = theBlobList; + while (tBlob != NULL) + { + tSaveBlob = tBlob; + tBlob = tBlob->theNext; + theNdb->releaseNdbBlob(tSaveBlob); + } + theBlobList = NULL; } NdbRecAttr* @@ -325,6 +338,18 @@ NdbOperation::setValue( Uint32 anAttrId, return setValue(m_currentTable->getColumn(anAttrId), aValuePassed, len); } +NdbBlob* +NdbOperation::getBlobHandle(const char* anAttrName) +{ + return getBlobHandle(theNdbCon, m_currentTable->getColumn(anAttrName)); +} + +NdbBlob* +NdbOperation::getBlobHandle(Uint32 anAttrId) +{ + return getBlobHandle(theNdbCon, m_currentTable->getColumn(anAttrId)); +} + int NdbOperation::incValue(const char* anAttrName, Uint32 aValue) { @@ -385,4 +410,8 @@ NdbOperation::write_attr(Uint32 anAttrId, Uint32 RegDest) return write_attr(m_currentTable->getColumn(anAttrId), RegDest); } - +const char* +NdbOperation::getTableName() const +{ + return m_currentTable->m_externalName.c_str(); +} diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp index 98d6caf60d4..025c3ca693f 100644 --- a/ndb/src/ndbapi/NdbOperationDefine.cpp +++ b/ndb/src/ndbapi/NdbOperationDefine.cpp @@ -35,6 +35,7 @@ #include "NdbOut.hpp" #include "NdbImpl.hpp" #include +#include "NdbBlob.hpp" #include @@ -548,6 +549,33 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, return 0; }//NdbOperation::setValue() +NdbBlob* +NdbOperation::getBlobHandle(NdbConnection* aCon, const NdbColumnImpl* tAttrInfo) +{ + NdbBlob* tBlob = theBlobList; + NdbBlob* tLastBlob = NULL; + while (tBlob != NULL) { + if (tBlob->theColumn == tAttrInfo) + return tBlob; + tLastBlob = tBlob; + tBlob = tBlob->theNext; + } + tBlob = theNdb->getNdbBlob(); + if (tBlob == NULL) + return NULL; + if (tBlob->atPrepare(aCon, this, tAttrInfo) == -1) { + theNdb->releaseNdbBlob(tBlob); + return NULL; + } + if (tLastBlob == NULL) + theBlobList = tBlob; + else + tLastBlob->theNext = tBlob; + tBlob->theNext = NULL; + theNdbCon->theBlobFlag = true; + return tBlob; +} + /**************************************************************************** * int insertATTRINFO( Uint32 aData ); * diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp index 8b9b89dcf07..19cb133dbf7 100644 --- a/ndb/src/ndbapi/NdbOperationSearch.cpp +++ b/ndb/src/ndbapi/NdbOperationSearch.cpp @@ -251,6 +251,17 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, } else if ((tOpType == ReadRequest) || (tOpType == DeleteRequest) || (tOpType == ReadExclusive)) { theStatus = GetValue; + // create blob handles automatically + if (tOpType == DeleteRequest && m_currentTable->m_noOfBlobs != 0) { + for (unsigned i = 0; i < m_currentTable->m_columns.size(); i++) { + NdbColumnImpl* c = m_currentTable->m_columns[i]; + assert(c != 0); + if (c->getBlobType()) { + if (getBlobHandle(theNdbCon, c) == NULL) + return -1; + } + } + } return 0; } else if ((tOpType == InsertRequest) || (tOpType == WriteRequest)) { theStatus = SetValue; @@ -497,3 +508,24 @@ LastWordLabel: return 0; } + +int +NdbOperation::getKeyFromTCREQ(Uint32* data, unsigned size) +{ + assert(m_accessTable != 0 && m_accessTable->m_sizeOfKeysInWords != 0); + assert(m_accessTable->m_sizeOfKeysInWords == size); + unsigned pos = 0; + while (pos < 8 && pos < size) { + data[pos++] = theKEYINFOptr[pos]; + } + NdbApiSignal* tSignal = theFirstKEYINFO; + unsigned n = 0; + while (pos < size) { + if (n == 20) { + tSignal = tSignal->next(); + n = 0; + } + data[pos++] = tSignal->getDataPtrSend()[3 + n++]; + } + return 0; +} diff --git a/ndb/src/ndbapi/Ndberr.cpp b/ndb/src/ndbapi/Ndberr.cpp index 14982116bbd..a8b968da03f 100644 --- a/ndb/src/ndbapi/Ndberr.cpp +++ b/ndb/src/ndbapi/Ndberr.cpp @@ -20,6 +20,7 @@ #include "NdbDictionaryImpl.hpp" #include #include +#include static void @@ -65,3 +66,10 @@ NdbOperation::getNdbError() const { update(theError); return theError; } + +const +NdbError & +NdbBlob::getNdbError() const { + update(theError); + return theError; +} diff --git a/ndb/src/ndbapi/Ndbinit.cpp b/ndb/src/ndbapi/Ndbinit.cpp index e42bc31e94c..03baff4aefd 100644 --- a/ndb/src/ndbapi/Ndbinit.cpp +++ b/ndb/src/ndbapi/Ndbinit.cpp @@ -85,6 +85,7 @@ Ndb::Ndb( const char* aDataBase , const char* aDataBaseSchema) : theSubroutineList(NULL), theCallList(NULL), theScanList(NULL), + theNdbBlobIdleList(NULL), theNoOfDBnodes(0), theDBnodes(NULL), the_release_ind(NULL), @@ -235,6 +236,8 @@ Ndb::~Ndb() freeNdbCall(); while (theScanList != NULL) freeNdbScanRec(); + while (theNdbBlobIdleList != NULL) + freeNdbBlob(); releaseTransactionArrays(); startTransactionNodeSelectionData.release(); diff --git a/ndb/src/ndbapi/Ndblist.cpp b/ndb/src/ndbapi/Ndblist.cpp index 8cc8ba1a079..e88573d41a8 100644 --- a/ndb/src/ndbapi/Ndblist.cpp +++ b/ndb/src/ndbapi/Ndblist.cpp @@ -24,6 +24,7 @@ #include #include "NdbUtil.hpp" #include "API.hpp" +#include "NdbBlob.hpp" void Ndb::checkFailedNode() @@ -432,6 +433,19 @@ Ndb::getSignal() return tSignal; } +NdbBlob* +Ndb::getNdbBlob() +{ + NdbBlob* tBlob = theNdbBlobIdleList; + if (tBlob != NULL) { + theNdbBlobIdleList = tBlob->theNext; + tBlob->init(); + } else { + tBlob = new NdbBlob; + } + return tBlob; +} + /*************************************************************************** void releaseNdbBranch(NdbBranch* aNdbBranch); @@ -598,6 +612,14 @@ Ndb::releaseSignalsInList(NdbApiSignal** pList){ } } +void +Ndb::releaseNdbBlob(NdbBlob* aBlob) +{ + aBlob->release(); + aBlob->theNext = theNdbBlobIdleList; + theNdbBlobIdleList = aBlob; +} + /*************************************************************************** void freeOperation(); @@ -742,6 +764,14 @@ Ndb::freeSignal() cfreeSignals++; } +void +Ndb::freeNdbBlob() +{ + NdbBlob* tBlob = theNdbBlobIdleList; + theNdbBlobIdleList = tBlob->theNext; + delete tBlob; +} + /**************************************************************************** int releaseConnectToNdb(NdbConnection* aConnectConnection); diff --git a/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c index ea7cf4de426..760322d669d 100644 --- a/ndb/src/ndbapi/ndberror.c +++ b/ndb/src/ndbapi/ndberror.c @@ -418,8 +418,14 @@ ErrorBundle ErrorCodes[] = { { 4259, AE, "Invalid set of range scan bounds" }, { 4260, UD, "NdbScanFilter: Operator is not defined in NdbScanFilter::Group"}, { 4261, UD, "NdbScanFilter: Column is NULL"}, - { 4262, UD, "NdbScanFilter: Condition is out of bounds"} - + { 4262, UD, "NdbScanFilter: Condition is out of bounds"}, + { 4263, IE, "Invalid blob attributes or invalid blob parts table" }, + { 4264, AE, "Invalid usage of blob attribute" }, + { 4265, AE, "Method is not valid in current blob state" }, + { 4266, AE, "Invalid blob seek position" }, + { 4267, IE, "Corrupted blob value" }, + { 4268, IE, "Error in blob head update forced rollback of transaction" }, + { 4268, IE, "Unknown blob error" } }; static diff --git a/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp b/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp index d49344849d2..07d8017e5ed 100644 --- a/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp +++ b/ndb/src/old_files/client/odbc/codegen/SimpleGram.ypp @@ -88,6 +88,7 @@ struct PhysAttr { int storage; int logging; }; struct PhysAttr* m_phys_attr; NdbDictionary::Object::FragmentType m_storage_attr; bool m_logging_attr; + SqlType::Type m_sql_type; } /* keywords */ @@ -100,6 +101,7 @@ struct PhysAttr { int storage; int logging; }; T_BLOB T_BY T_CHAR + T_CLOB T_CONSTRAINT T_CREATE T_DATETIME @@ -128,6 +130,7 @@ struct PhysAttr { int storage; int logging; }; T_LIMIT T_LOGGING T_LONGBLOB + T_LONGCLOB T_MEDIUM T_NOLOGGING T_NOT @@ -248,6 +251,7 @@ struct PhysAttr { int storage; int logging; }; %type phys_attr2 %type storage_attr %type logging_attr +%type blob_type %% @@ -606,10 +610,10 @@ data_type: $$ = dataType; } | - blob_keyword + blob_type { Plan_root* root = simpleParser.root(); - SqlType sqlType(SqlType::Blob, true); + SqlType sqlType($1, true); Plan_data_type* dataType = new Plan_data_type(root, sqlType); root->saveNode(dataType); $$ = dataType; @@ -620,10 +624,26 @@ dummy_binary: | T_BINARY ; -blob_keyword: +blob_type: T_BLOB + { + $$ = SqlType::Blob; + } | T_LONGBLOB + { + $$ = SqlType::Blob; + } + | + T_CLOB + { + $$ = SqlType::Clob; + } + | + T_LONGCLOB + { + $$ = SqlType::Clob; + } ; create_column_rest: /* empty */ diff --git a/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp b/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp index bd930c08cfa..29aa876f669 100644 --- a/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp +++ b/ndb/src/old_files/client/odbc/codegen/SimpleScan.lpp @@ -149,6 +149,7 @@ static const SqlKeyword sqlKeyword[] = { { "BLOB", T_BLOB, StateType }, { "BY", T_BY, -1 }, { "CHAR", T_CHAR, StateType }, + { "CLOB", T_CLOB, StateType }, { "CONSTRAINT", T_CONSTRAINT, -1 }, { "CREATE", T_CREATE, -1 }, { "DATETIME", T_DATETIME, StateType }, @@ -177,6 +178,7 @@ static const SqlKeyword sqlKeyword[] = { { "LIMIT", T_LIMIT, -1 }, { "LOGGING", T_LOGGING, StatePhys }, { "LONGBLOB", T_LONGBLOB, StateType }, + { "LONGCLOB", T_LONGCLOB, StateType }, { "MEDIUM", T_MEDIUM, StatePhys }, { "NOLOGGING", T_NOLOGGING, StatePhys }, { "NOT", T_NOT, -1 }, diff --git a/ndb/src/old_files/client/odbc/common/DataType.cpp b/ndb/src/old_files/client/odbc/common/DataType.cpp index 9c9629f1d24..96f6a6e0877 100644 --- a/ndb/src/old_files/client/odbc/common/DataType.cpp +++ b/ndb/src/old_files/client/odbc/common/DataType.cpp @@ -78,6 +78,9 @@ SqlType::setType(Ctx& ctx, Type type, bool nullable) case Blob: setType(ctx, Varbinary, FAKE_BLOB_SIZE, nullable); // XXX BLOB hack return; + case Clob: + setType(ctx, Varchar, FAKE_BLOB_SIZE, nullable); // XXX BLOB hack + return; case Null: case Unbound: break; @@ -193,6 +196,9 @@ SqlType::setType(Ctx& ctx, const NdbDictionary::Column* ndbColumn) case NdbDictionary::Column::Blob: setType(ctx, Blob, nullable); return; + case NdbDictionary::Column::Clob: + setType(ctx, Clob, nullable); + return; default: break; } diff --git a/ndb/src/old_files/client/odbc/common/DataType.hpp b/ndb/src/old_files/client/odbc/common/DataType.hpp index ac2ca337e22..e03e445cf05 100644 --- a/ndb/src/old_files/client/odbc/common/DataType.hpp +++ b/ndb/src/old_files/client/odbc/common/DataType.hpp @@ -74,6 +74,7 @@ public: Date = SQL_DATE, Datetime = SQL_TYPE_TIMESTAMP, Blob = SQL_BLOB, + Clob = SQL_CLOB, Null = NullDataType, // not an ODBC SQL type Unbound = UnboundDataType // special for placeholders }; diff --git a/ndb/test/ndbapi/Makefile.am b/ndb/test/ndbapi/Makefile.am index c79a613f32b..a0a3692bfd4 100644 --- a/ndb/test/ndbapi/Makefile.am +++ b/ndb/test/ndbapi/Makefile.am @@ -13,6 +13,7 @@ flexTT \ testBackup \ testBasic \ testBasicAsynch \ +testBlobs \ testDataBuffers \ testDict \ testIndex \ @@ -45,7 +46,7 @@ flexTT_SOURCES = flexTT.cpp testBackup_SOURCES = testBackup.cpp testBasic_SOURCES = testBasic.cpp testBasicAsynch_SOURCES = testBasicAsynch.cpp -#testBlobs_SOURCES = testBlobs.cpp +testBlobs_SOURCES = testBlobs.cpp testDataBuffers_SOURCES = testDataBuffers.cpp testDict_SOURCES = testDict.cpp testIndex_SOURCES = testIndex.cpp @@ -75,3 +76,4 @@ testBackup_LDADD = $(LDADD) bank/libbank.a # Don't update the files from bitkeeper %::SCCS/s.% + diff --git a/ndb/test/ndbapi/Makefile_old b/ndb/test/ndbapi/Makefile_old index 2e20f05ecc9..c3198096ec0 100644 --- a/ndb/test/ndbapi/Makefile_old +++ b/ndb/test/ndbapi/Makefile_old @@ -35,7 +35,8 @@ BIN_DIRS = \ indexTest \ test_event \ indexTest2 \ - testGrep + testGrep \ + testBlobs ifeq ($(NDB_OS), SOLARIS) ifeq ($(NDB_COMPILER), FORTE6) diff --git a/ndb/test/ndbapi/testBlobs.cpp b/ndb/test/ndbapi/testBlobs.cpp index e2be1def71c..001ec83630a 100644 --- a/ndb/test/ndbapi/testBlobs.cpp +++ b/ndb/test/ndbapi/testBlobs.cpp @@ -19,176 +19,1195 @@ */ #include - #include #include -#include -#include -#include #include -#include -struct Opt { - bool m_core; - const char* m_table; - Opt() : - m_core(false), - m_table("TB1") - { - } +struct Bcol { + bool m_nullable; + unsigned m_inline; + unsigned m_partsize; + unsigned m_stripe; + char m_btname[NdbBlob::BlobTableNameSize]; + Bcol(bool a, unsigned b, unsigned c, unsigned d) : + m_nullable(a), + m_inline(b), + m_partsize(c), + m_stripe(d) + {} }; -static Opt opt; +struct Opt { + bool m_core; + bool m_dbg; + bool m_dbgall; + bool m_full; + unsigned m_loop; + unsigned m_parts; + unsigned m_rows; + unsigned m_seed; + char m_skip[255]; + // metadata + const char* m_tname; + const char* m_x1name; // hash index + const char* m_x2name; // ordered index + unsigned m_pk1off; + unsigned m_pk2len; + bool m_oneblob; + Bcol m_blob1; + Bcol m_blob2; + // bugs + int m_bug; + int (*m_bugtest)(); + Opt() : + m_core(false), + m_dbg(false), + m_dbgall(false), + m_full(false), + m_loop(1), + m_parts(10), + m_rows(100), + m_seed(0), + // metadata + m_tname("TBLOB1"), + m_x1name("TBLOB1X1"), + m_x2name("TBLOB1X2"), + m_pk1off(0x12340000), + m_pk2len(55), + m_oneblob(false), + m_blob1(false, 7, 1137, 10), + m_blob2(true, 99, 55, 1), + // bugs + m_bug(0), + m_bugtest(0) { + memset(m_skip, false, sizeof(m_skip)); + } +}; -static void printusage() -{ - Opt d; - ndbout - << "usage: testBlobs [options]" << endl - << "-core dump core on error - default " << d.m_core << endl - ; -} - -static Ndb* myNdb = 0; -static NdbDictionary::Dictionary* myDic = 0; -static NdbConnection* myCon = 0; -static NdbOperation* myOp = 0; -static NdbBlob* myBlob = 0; +static const unsigned g_max_pk2len = 256; static void -fatal(const char* fmt, ...) +printusage() { - va_list ap; - char buf[200]; - va_start(ap, fmt); - vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - ndbout << "fatal: " << buf << endl; - if (myNdb != 0 && myNdb->getNdbError().code != 0) - ndbout << "ndb - " << myNdb->getNdbError() << endl; - if (myDic != 0 && myDic->getNdbError().code != 0) - ndbout << "dic - " << myDic->getNdbError() << endl; - if (opt.m_core) - abort(); - NDBT_ProgramExit(NDBT_FAILED); - exit(1); + Opt d; + ndbout + << "usage: testBlobs options [default/max]" << endl + << " -core dump core on error" << endl + << " -dbg print debug" << endl + << " -dbgall print also NDB API debug (if compiled in)" << endl + << " -full read/write only full blob values" << endl + << " -inline read/write only blobs which fit inline" << endl + << " -loop N loop N times 0=forever [" << d.m_loop << "]" << endl + << " -parts N max parts in blob value [" << d.m_parts << "]" << endl + << " -rows N number of rows [" << d.m_rows << "]" << endl + << " -seed N random seed 0=loop number [" << d.m_seed << "]" << endl + << " -skip xxx skip these tests (see list)" << endl + << "metadata" << endl + << " -pk2len N length of PK2 [" << d.m_pk2len << "/" << g_max_pk2len <<"]" << endl + << " -oneblob only 1 blob attribute [default 2]" << endl + << "testcases for -skip" << endl + << " k primary key ops" << endl + << " i hash index ops" << endl + << " s table scans" << endl + << " r ordered index scans" << endl + << " u update blob value" << endl + << " v getValue / setValue" << endl + << " w readData / writeData" << endl + << "bug tests (no blob test)" << endl + << " -bug 4088 ndb api hang with mixed ops on index table" << endl + << " -bug 2222 delete + write gives 626" << endl + << " -bug 3333 acc crash on delete and long key" << endl + ; } -static void -dropBlobsTable() +static Opt g_opt; + +static char& +skip(unsigned x) { - NdbDictionary::Table tab(NDB_BLOB_TABLE_NAME); - if (myDic->dropTable(tab) == -1) - if (myDic->getNdbError().code != 709) - fatal("dropTable"); + assert(x < sizeof(g_opt.m_skip)); + return g_opt.m_skip[x]; } -static void -createBlobsTable() -{ - NdbDictionary::Table tab(NDB_BLOB_TABLE_NAME); - // col 0 - NdbDictionary::Column col0("BLOBID"); - col0.setPrimaryKey(true); - col0.setType(NdbDictionary::Column::Bigunsigned); - tab.addColumn(col0); - // col 1 - NdbDictionary::Column col1("DATA"); - col1.setPrimaryKey(false); - col1.setType(NdbDictionary::Column::Binary); - col1.setLength(NDB_BLOB_PIECE_SIZE); - tab.addColumn(col1); - // create - if (myDic->createTable(tab) == -1) - fatal("createTable"); -} +static Ndb* g_ndb = 0; +static NdbDictionary::Dictionary* g_dic = 0; +static NdbConnection* g_con = 0; +static NdbOperation* g_opr = 0; +static NdbIndexOperation* g_opx = 0; +static NdbScanOperation* g_ops = 0; +static NdbBlob* g_bh1 = 0; +static NdbBlob* g_bh2 = 0; +static bool g_printerror = true; static void +printerror(int line, const char* msg) +{ + ndbout << "line " << line << ": " << msg << " failed" << endl; + if (! g_printerror) { + return; + } + if (g_ndb != 0 && g_ndb->getNdbError().code != 0) { + ndbout << "ndb: " << g_ndb->getNdbError() << endl; + } + if (g_dic != 0 && g_dic->getNdbError().code != 0) { + ndbout << "dic: " << g_dic->getNdbError() << endl; + } + if (g_con != 0 && g_con->getNdbError().code != 0) { + ndbout << "con: " << g_con->getNdbError() << endl; + if (g_opr != 0 && g_opr->getNdbError().code != 0) { + ndbout << "opr: table=" << g_opr->getTableName() << " " << g_opr->getNdbError() << endl; + } + if (g_opx != 0 && g_opx->getNdbError().code != 0) { + ndbout << "opx: table=" << g_opx->getTableName() << " " << g_opx->getNdbError() << endl; + } + if (g_ops != 0 && g_ops->getNdbError().code != 0) { + ndbout << "ops: table=" << g_ops->getTableName() << " " << g_ops->getNdbError() << endl; + } + NdbOperation* ope = g_con->getNdbErrorOperation(); + if (ope != 0 && ope->getNdbError().code != 0) { + if (ope != g_opr && ope != g_opx && ope != g_ops) + ndbout << "ope: table=" << ope->getTableName() << " " << ope->getNdbError() << endl; + } + } + if (g_bh1 != 0 && g_bh1->getNdbError().code != 0) { + ndbout << "bh1: " << g_bh1->getNdbError() << endl; + } + if (g_bh2 != 0 && g_bh2->getNdbError().code != 0) { + ndbout << "bh2: " << g_bh2->getNdbError() << endl; + } + if (g_opt.m_core) { + abort(); + } + g_printerror = false; +} + +#define CHK(x) \ + do { \ + if (x) break; \ + printerror(__LINE__, #x); return -1; \ + } while (0) +#define DBG(x) \ + do { \ + if (! g_opt.m_dbg) break; \ + ndbout << "line " << __LINE__ << " " << x << endl; \ + } while (0) + +static int dropTable() { - NdbDictionary::Table tab(opt.m_table); - if (myDic->dropTable(tab) == -1) - if (myDic->getNdbError().code != 709) - fatal("dropTable"); + NdbDictionary::Table tab(g_opt.m_tname); + if (g_dic->getTable(g_opt.m_tname) != 0) + CHK(g_dic->dropTable(tab) == 0); + return 0; } -static void +static int createTable() { - NdbDictionary::Table tab(opt.m_table); - // col 0 - NdbDictionary::Column col0("A"); - col0.setPrimaryKey(true); - col0.setType(NdbDictionary::Column::Unsigned); - tab.addColumn(col0); - // col 1 - NdbDictionary::Column col1("B"); - col1.setPrimaryKey(false); - col1.setType(NdbDictionary::Column::Blob); - tab.addColumn(col1); - // create - if (myDic->createTable(tab) == -1) - fatal("createTable"); + NdbDictionary::Table tab(g_opt.m_tname); + // col PK1 - Uint32 + { NdbDictionary::Column col("PK1"); + col.setType(NdbDictionary::Column::Unsigned); + col.setPrimaryKey(true); + tab.addColumn(col); + } + // col BL1 - Blob not-nullable + { NdbDictionary::Column col("BL1"); + const Bcol& b = g_opt.m_blob1; + col.setType(NdbDictionary::Column::Blob); + col.setInlineSize(b.m_inline); + col.setPartSize(b.m_partsize); + col.setStripeSize(b.m_stripe); + tab.addColumn(col); + } + // col PK2 - Char[55] + if (g_opt.m_pk2len != 0) + { NdbDictionary::Column col("PK2"); + col.setType(NdbDictionary::Column::Char); + col.setLength(g_opt.m_pk2len); + col.setPrimaryKey(true); + tab.addColumn(col); + } + // col BL2 - Clob nullable + if (! g_opt.m_oneblob) + { NdbDictionary::Column col("BL2"); + const Bcol& b = g_opt.m_blob2; + col.setType(NdbDictionary::Column::Clob); + col.setNullable(true); + col.setInlineSize(b.m_inline); + col.setPartSize(b.m_partsize); + col.setStripeSize(b.m_stripe); + tab.addColumn(col); + } + // create table + CHK(g_dic->createTable(tab) == 0); + // unique hash index on PK2 + if (g_opt.m_pk2len != 0) + { NdbDictionary::Index idx(g_opt.m_x1name); + idx.setType(NdbDictionary::Index::UniqueHashIndex); + idx.setTable(g_opt.m_tname); + idx.addColumnName("PK2"); + CHK(g_dic->createIndex(idx) == 0); + } + // ordered index on PK2 + if (g_opt.m_pk2len != 0) + { NdbDictionary::Index idx(g_opt.m_x2name); + idx.setType(NdbDictionary::Index::OrderedIndex); + idx.setLogging(false); + idx.setTable(g_opt.m_tname); + idx.addColumnName("PK2"); + CHK(g_dic->createIndex(idx) == 0); + } + return 0; +} + +// tuples + +struct Bval { + char* m_val; + unsigned m_len; + char* m_buf; + unsigned m_buflen; + Bval() : + m_val(0), + m_len(0), + m_buf(0), // read/write buffer + m_buflen(0) + {} + ~Bval() { delete [] m_val; delete [] m_buf; } + void alloc(unsigned buflen) { + m_buflen = buflen; + delete [] m_buf; + m_buf = new char [m_buflen]; + trash(); + } + void copy(const Bval& v) { + m_len = v.m_len; + delete [] m_val; + if (v.m_val == 0) + m_val = 0; + else + m_val = (char*)memcpy(new char [m_len], v.m_val, m_len); + } + void trash() const { + assert(m_buf != 0); + memset(m_buf, 'x', m_buflen); + } +private: + Bval(const Bval&); + Bval& operator=(const Bval&); +}; + +struct Tup { + bool m_exists; // exists in table + Uint32 m_pk1; // primary keys concatenated like keyinfo + char m_pk2[g_max_pk2len + 1]; + Bval m_blob1; + Bval m_blob2; + Tup() : + m_exists(false) + {} + ~Tup() { } + // alloc buffers of max size + void alloc() { + m_blob1.alloc(g_opt.m_blob1.m_inline + g_opt.m_blob1.m_partsize * g_opt.m_parts); + m_blob2.alloc(g_opt.m_blob2.m_inline + g_opt.m_blob2.m_partsize * g_opt.m_parts); + } + void copy(const Tup& tup) { + assert(m_pk1 == tup.m_pk1); + m_blob1.copy(tup.m_blob1); + m_blob2.copy(tup.m_blob2); + } +private: + Tup(const Tup&); + Tup& operator=(const Tup&); +}; + +static Tup* g_tups; + +static unsigned +urandom(unsigned n) +{ + return n == 0 ? 0 : random() % n; } static void -insertData(Uint32 key) +calcBval(const Bcol& b, Bval& v, bool keepsize) { + if (b.m_nullable && urandom(10) == 0) { + v.m_len = 0; + delete v.m_val; + v.m_val = 0; + v.m_buf = new char [1]; + } else { + if (keepsize && v.m_val != 0) + ; + else if (urandom(10) == 0) + v.m_len = urandom(b.m_inline); + else + v.m_len = urandom(b.m_inline + g_opt.m_parts * b.m_partsize + 1); + delete v.m_val; + v.m_val = new char [v.m_len + 1]; + for (unsigned i = 0; i < v.m_len; i++) + v.m_val[i] = 'a' + urandom(25); + v.m_val[v.m_len] = 0; + v.m_buf = new char [v.m_len]; + } + v.m_buflen = v.m_len; + v.trash(); } static void -insertTuples() +calcTups(bool keepsize) { - for (Uint32 key = 0; key <= 99; key++) { - if ((myCon = myNdb->startTransaction()) == 0) - fatal("startTransaction"); - if ((myOp = myCon->getNdbOperation(opt.m_table)) == 0) - fatal("getNdbOperation"); - if (myOp->insertTuple() == -1) - fatal("insertTuple"); - if (myOp->setValue((unsigned)0, key) == -1) - fatal("setValue %u", (unsigned)key); - if ((myBlob = myOp->setBlob(1)) == 0) - fatal("setBlob"); - if (myCon->execute(NoCommit) == -1) - fatal("execute NoCommit"); - insertData(key); - if (myCon->execute(Commit) == -1) - fatal("execute Commit"); - myNdb->closeTransaction(myCon); - myOp = 0; - myBlob = 0; - myCon = 0; + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + tup.m_pk1 = g_opt.m_pk1off + k; + for (unsigned i = 0, n = k; i < g_opt.m_pk2len; i++) { + if (n != 0) { + tup.m_pk2[i] = '0' + n % 10; + n = n / 10; + } else { + tup.m_pk2[i] = 'a' + i % 26; + } } + calcBval(g_opt.m_blob1, tup.m_blob1, keepsize); + if (! g_opt.m_oneblob) + calcBval(g_opt.m_blob2, tup.m_blob2, keepsize); + } } -static void -testMain() +// blob handle ops + +static int +getBlobLength(NdbBlob* h, unsigned& len) { - myNdb = new Ndb("TEST_DB"); - if (myNdb->init() != 0) - fatal("init"); - if (myNdb->waitUntilReady() < 0) - fatal("waitUntilReady"); - myDic = myNdb->getDictionary(); - dropBlobsTable(); - createBlobsTable(); // until moved to Ndbcntr - dropTable(); - createTable(); - insertTuples(); + Uint64 len2 = (unsigned)-1; + CHK(h->getLength(len2) == 0); + len = (unsigned)len2; + assert(len == len2); + return 0; } +static int +setBlobValue(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + DBG("set " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + if (null) { + CHK(h->setNull() == 0); + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + CHK(h->setValue(v.m_val, v.m_len) == 0); + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + } + return 0; +} + +static int +getBlobValue(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + DBG("get " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + CHK(h->getValue(v.m_buf, v.m_buflen) == 0); + return 0; +} + +static int +getBlobValue(const Tup& tup) +{ + CHK(getBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(getBlobValue(g_bh2, tup.m_blob2) == 0); + return 0; +} + +static int +verifyBlobValue(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + if (null) { + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + isNull = true; + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + for (unsigned i = 0; i < v.m_len; i++) + CHK(v.m_val[i] == v.m_buf[i]); + } + return 0; +} + +static int +verifyBlobValue(const Tup& tup) +{ + CHK(verifyBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(verifyBlobValue(g_bh2, tup.m_blob2) == 0); + return 0; +} + +static int +writeBlobData(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + DBG("write " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + if (null) { + CHK(h->setNull() == 0); + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + unsigned n = 0; + do { + unsigned m = g_opt.m_full ? v.m_len : urandom(v.m_len + 1); + if (m > v.m_len - n) + m = v.m_len - n; + DBG("write pos=" << n << " cnt=" << m); + CHK(h->writeData(v.m_val + n, m) == 0); + n += m; + } while (n < v.m_len); + assert(n == v.m_len); + isNull = true; + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + } + return 0; +} + +static int +readBlobData(NdbBlob* h, const Bval& v) +{ + bool null = (v.m_val == 0); + bool isNull; + unsigned len; + DBG("read " << h->getColumn()->getName() << " len=" << v.m_len << " null=" << null); + if (null) { + isNull = false; + CHK(h->getNull(isNull) == 0 && isNull == true); + CHK(getBlobLength(h, len) == 0 && len == 0); + } else { + isNull = true; + CHK(h->getNull(isNull) == 0 && isNull == false); + CHK(getBlobLength(h, len) == 0 && len == v.m_len); + v.trash(); + unsigned n = 0; + while (n < v.m_len) { + unsigned m = g_opt.m_full ? v.m_len : urandom(v.m_len + 1); + if (m > v.m_len - n) + m = v.m_len - n; + DBG("read pos=" << n << " cnt=" << m); + const unsigned m2 = m; + CHK(h->readData(v.m_buf + n, m) == 0); + CHK(m2 == m); + n += m; + } + assert(n == v.m_len); + // need to execute to see the data + CHK(g_con->execute(NoCommit) == 0); + for (unsigned i = 0; i < v.m_len; i++) + CHK(v.m_val[i] == v.m_buf[i]); + } + return 0; +} + +static int +readBlobData(const Tup& tup) +{ + CHK(readBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(readBlobData(g_bh2, tup.m_blob2) == 0); + return 0; +} + +// verify blob data + +static int +verifyHeadInline(const Bcol& c, const Bval& v, NdbRecAttr* ra) +{ + if (v.m_val == 0) { + CHK(ra->isNULL() == 1); + } else { + CHK(ra->isNULL() == 0); + CHK(ra->u_64_value() == v.m_len); + } + return 0; +} + +static int +verifyHeadInline(const Tup& tup) +{ + DBG("verifyHeadInline pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->readTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + NdbRecAttr* ra1; + NdbRecAttr* ra2; + CHK((ra1 = g_opr->getValue("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((ra2 = g_opr->getValue("BL2")) != 0); + if (tup.m_exists) { + CHK(g_con->execute(Commit) == 0); + DBG("verifyHeadInline BL1"); + CHK(verifyHeadInline(g_opt.m_blob1, tup.m_blob1, ra1) == 0); + if (! g_opt.m_oneblob) { + DBG("verifyHeadInline BL2"); + CHK(verifyHeadInline(g_opt.m_blob2, tup.m_blob2, ra2) == 0); + } + } else { + CHK(g_con->execute(Commit) == -1 && g_con->getNdbError().code == 626); + } + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + return 0; +} + +static int +verifyBlobTable(const Bcol& b, const Bval& v, Uint32 pk1, bool exists) +{ + DBG("verify " << b.m_btname << " pk1=" << pk1); + NdbRecAttr* ra_pk; + NdbRecAttr* ra_part; + NdbRecAttr* ra_data; + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(b.m_btname)) != 0); + CHK(g_opr->openScanRead() == 0); + CHK((ra_pk = g_opr->getValue("PK")) != 0); + CHK((ra_part = g_opr->getValue("PART")) != 0); + CHK((ra_data = g_opr->getValue("DATA")) != 0); + CHK(g_con->executeScan() == 0); + unsigned partcount; + if (! exists || v.m_len <= b.m_inline) + partcount = 0; + else + partcount = (v.m_len - b.m_inline + b.m_partsize - 1) / b.m_partsize; + char* seen = new char [partcount]; + memset(seen, 0, partcount); + while (1) { + int ret; + CHK((ret = g_con->nextScanResult()) == 0 || ret == 1); + if (ret == 1) + break; + if (pk1 != ra_pk->u_32_value()) + continue; + Uint32 part = ra_part->u_32_value(); + DBG("part " << part << " of " << partcount); + const char* data = ra_data->aRef(); + CHK(part < partcount && ! seen[part]); + seen[part] = 1; + unsigned n = b.m_inline + part * b.m_partsize; + assert(exists && v.m_val != 0 && n < v.m_len); + unsigned m = v.m_len - n; + if (m > b.m_partsize) + m = b.m_partsize; + CHK(memcmp(data, v.m_val + n, m) == 0); + } + for (unsigned i = 0; i < partcount; i++) + CHK(seen[i] == 1); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + return 0; +} + +static int +verifyBlobTable(const Tup& tup) +{ + CHK(verifyBlobTable(g_opt.m_blob1, tup.m_blob1, tup.m_pk1, tup.m_exists) == 0); + if (! g_opt.m_oneblob) + CHK(verifyBlobTable(g_opt.m_blob2, tup.m_blob2, tup.m_pk1, tup.m_exists) == 0); + return 0; +} + +static int +verifyBlob() +{ + for (unsigned k = 0; k < g_opt.m_rows; k++) { + const Tup& tup = g_tups[k]; + DBG("verifyBlob pk1=" << tup.m_pk1); + CHK(verifyHeadInline(tup) == 0); + CHK(verifyBlobTable(tup) == 0); + } + return 0; +} + +// operations + +static int +insertPk(bool rw) +{ + DBG("--- insertPk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("insertPk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->insertTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opr->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opr->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(setBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(setBlobValue(g_bh2, tup.m_blob2) == 0); + } else { + // non-nullable must be set + CHK(g_bh1->setValue("", 0) == 0); + CHK(g_con->execute(NoCommit) == 0); + CHK(writeBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(writeBlobData(g_bh2, tup.m_blob2) == 0); + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + tup.m_exists = true; + } + return 0; +} + +static int +updatePk(bool rw) +{ + DBG("--- updatePk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("updatePk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->updateTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opr->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opr->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(setBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(setBlobValue(g_bh2, tup.m_blob2) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(writeBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(writeBlobData(g_bh2, tup.m_blob2) == 0); + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + tup.m_exists = true; + } + return 0; +} + +static int +updateIdx(bool rw) +{ + DBG("--- updateIdx ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("updateIdx pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->updateTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opx->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opx->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(setBlobValue(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(setBlobValue(g_bh2, tup.m_blob2) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(writeBlobData(g_bh1, tup.m_blob1) == 0); + if (! g_opt.m_oneblob) + CHK(writeBlobData(g_bh2, tup.m_blob2) == 0); + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opx = 0; + g_con = 0; + tup.m_exists = true; + } + return 0; +} + +static int +readPk(bool rw) +{ + DBG("--- readPk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("readPk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->readTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opr->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opr->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(getBlobValue(tup) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(readBlobData(tup) == 0); + } + CHK(g_con->execute(Commit) == 0); + if (! rw) { + CHK(verifyBlobValue(tup) == 0); + } + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + } + return 0; +} + +static int +readIdx(bool rw) +{ + DBG("--- readIdx ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("readIdx pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->readTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + CHK((g_bh1 = g_opx->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_opx->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(getBlobValue(tup) == 0); + } else { + CHK(g_con->execute(NoCommit) == 0); + CHK(readBlobData(tup) == 0); + } + CHK(g_con->execute(Commit) == 0); + if (! rw) { + CHK(verifyBlobValue(tup) == 0); + } + g_ndb->closeTransaction(g_con); + g_opx = 0; + g_con = 0; + } + return 0; +} + +static int +readScan(bool rw, bool idx) +{ + const char* func = ! idx ? "scan read table" : "scan read index"; + DBG("--- " << func << " ---"); + Tup tup; + tup.alloc(); // allocate buffers + NdbResultSet* rs; + CHK((g_con = g_ndb->startTransaction()) != 0); + if (! idx) { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_tname)) != 0); + } else { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_x2name, g_opt.m_tname)) != 0); + } + CHK((rs = g_ops->readTuples(240, NdbScanOperation::LM_Exclusive)) != 0); + CHK(g_ops->getValue("PK1", (char*)&tup.m_pk1) != 0); + if (g_opt.m_pk2len != 0) + CHK(g_ops->getValue("PK2", tup.m_pk2) != 0); + CHK((g_bh1 = g_ops->getBlobHandle("BL1")) != 0); + if (! g_opt.m_oneblob) + CHK((g_bh2 = g_ops->getBlobHandle("BL2")) != 0); + if (! rw) { + CHK(getBlobValue(tup) == 0); + } + CHK(g_con->execute(NoCommit) == 0); + unsigned rows = 0; + while (1) { + int ret; + tup.m_pk1 = (Uint32)-1; + memset(tup.m_pk2, 'x', g_opt.m_pk2len); + CHK((ret = rs->nextResult(true)) == 0 || ret == 1); + if (ret == 1) + break; + DBG(func << " pk1=" << tup.m_pk1); + Uint32 k = tup.m_pk1 - g_opt.m_pk1off; + CHK(k < g_opt.m_rows && g_tups[k].m_exists); + tup.copy(g_tups[k]); + if (! rw) { + CHK(verifyBlobValue(tup) == 0); + } else { + CHK(readBlobData(tup) == 0); + } + rows++; + } + g_ndb->closeTransaction(g_con); + g_con = 0; + g_ops = 0; + CHK(g_opt.m_rows == rows); + return 0; +} + +static int +deletePk() +{ + DBG("--- deletePk ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("deletePk pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opr = g_con->getNdbOperation(g_opt.m_tname)) != 0); + CHK(g_opr->deleteTuple() == 0); + CHK(g_opr->equal("PK1", tup.m_pk1) == 0); + if (g_opt.m_pk2len != 0) + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opr = 0; + g_con = 0; + tup.m_exists = false; + } + return 0; +} + +static int +deleteIdx() +{ + DBG("--- deleteIdx ---"); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + DBG("deleteIdx pk1=" << tup.m_pk1); + CHK((g_con = g_ndb->startTransaction()) != 0); + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->deleteTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_opx = 0; + g_con = 0; + tup.m_exists = false; + } + return 0; +} + +static int +deleteScan(bool idx) +{ + const char* func = ! idx ? "scan delete table" : "scan delete index"; + DBG("--- " << func << " ---"); + Tup tup; + NdbResultSet* rs; + CHK((g_con = g_ndb->startTransaction()) != 0); + if (! idx) { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_tname)) != 0); + } else { + CHK((g_ops = g_con->getNdbScanOperation(g_opt.m_x2name, g_opt.m_tname)) != 0); + } + CHK((rs = g_ops->readTuples(240, NdbScanOperation::LM_Exclusive)) != 0); + CHK(g_ops->getValue("PK1", (char*)&tup.m_pk1) != 0); + if (g_opt.m_pk2len != 0) + CHK(g_ops->getValue("PK2", tup.m_pk2) != 0); + CHK(g_con->execute(NoCommit) == 0); + unsigned rows = 0; + while (1) { + int ret; + tup.m_pk1 = (Uint32)-1; + memset(tup.m_pk2, 'x', g_opt.m_pk2len); + CHK((ret = rs->nextResult()) == 0 || ret == 1); + if (ret == 1) + break; + DBG(func << " pk1=" << tup.m_pk1); + CHK(rs->deleteTuple() == 0); + CHK(g_con->execute(NoCommit) == 0); + Uint32 k = tup.m_pk1 - g_opt.m_pk1off; + CHK(k < g_opt.m_rows && g_tups[k].m_exists); + g_tups[k].m_exists = false; + rows++; + } + CHK(g_con->execute(Commit) == 0); + g_ndb->closeTransaction(g_con); + g_con = 0; + g_opr = 0; + g_ops = 0; + CHK(g_opt.m_rows == rows); + return 0; +} + +// main + +static int +testmain() +{ + g_ndb = new Ndb("TEST_DB"); + CHK(g_ndb->init() == 0); + CHK(g_ndb->waitUntilReady() == 0); + g_dic = g_ndb->getDictionary(); + g_tups = new Tup [g_opt.m_rows]; + CHK(dropTable() == 0); + CHK(createTable() == 0); + if (g_opt.m_bugtest != 0) { + // test a general bug instead of blobs + CHK((*g_opt.m_bugtest)() == 0); + return 0; + } + Bcol& b1 = g_opt.m_blob1; + CHK(NdbBlob::getBlobTableName(b1.m_btname, g_ndb, g_opt.m_tname, "BL1") == 0); + DBG("BL1: inline=" << b1.m_inline << " part=" << b1.m_partsize << " table=" << b1.m_btname); + if (! g_opt.m_oneblob) { + Bcol& b2 = g_opt.m_blob2; + CHK(NdbBlob::getBlobTableName(b2.m_btname, g_ndb, g_opt.m_tname, "BL2") == 0); + DBG("BL2: inline=" << b2.m_inline << " part=" << b2.m_partsize << " table=" << b2.m_btname); + } + if (g_opt.m_seed != 0) + srandom(g_opt.m_seed); + for (unsigned loop = 0; g_opt.m_loop == 0 || loop < g_opt.m_loop; loop++) { + DBG("=== loop " << loop << " ==="); + if (g_opt.m_seed == 0) + srandom(loop); + bool llim = skip('v') ? true : false; + bool ulim = skip('w') ? false : true; + // pk + for (int rw = llim; rw <= ulim; rw++) { + if (skip('k')) + continue; + DBG("--- pk ops " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readPk(rw) == 0); + if (! skip('u')) { + calcTups(rw); + CHK(updatePk(rw) == 0); + CHK(verifyBlob() == 0); + } + CHK(readPk(rw) == 0); + CHK(deletePk() == 0); + CHK(verifyBlob() == 0); + } + // hash index + for (int rw = llim; rw <= ulim; rw++) { + if (skip('i')) + continue; + DBG("--- idx ops " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readIdx(rw) == 0); + calcTups(rw); + if (! skip('u')) { + CHK(updateIdx(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readIdx(rw) == 0); + } + CHK(deleteIdx() == 0); + CHK(verifyBlob() == 0); + } + // scan table + for (int rw = llim; rw <= ulim; rw++) { + if (skip('s')) + continue; + DBG("--- table scan " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readScan(rw, false) == 0); + CHK(deleteScan(false) == 0); + CHK(verifyBlob() == 0); + } + // scan index + for (int rw = llim; rw <= ulim; rw++) { + if (skip('r')) + continue; + DBG("--- index scan " << (! rw ? "get/set" : "read/write") << " ---"); + calcTups(false); + CHK(insertPk(rw) == 0); + CHK(verifyBlob() == 0); + CHK(readScan(rw, true) == 0); + CHK(deleteScan(true) == 0); + CHK(verifyBlob() == 0); + } + } + delete g_ndb; + return 0; +} + +// bug tests + +static int +bugtest_4088() +{ + DBG("bug test 4088 - ndb api hang with mixed ops on index table"); + // insert rows + calcTups(false); + CHK(insertPk(false) == 0); + // new trans + CHK((g_con = g_ndb->startTransaction()) != 0); + for (unsigned k = 0; k < g_opt.m_rows; k++) { + Tup& tup = g_tups[k]; + // read table pk via index as a table + const unsigned pkcnt = 2; + Tup pktup[pkcnt]; + for (unsigned i = 0; i < pkcnt; i++) { + char name[20]; + // XXX guess table id + sprintf(name, "%d/%s", 4, g_opt.m_x1name); + CHK((g_opr = g_con->getNdbOperation(name)) != 0); + CHK(g_opr->readTuple() == 0); + CHK(g_opr->equal("PK2", tup.m_pk2) == 0); + CHK(g_opr->getValue("NDB$PK", (char*)&pktup[i].m_pk1) != 0); + } + // read blob inline via index as an index + CHK((g_opx = g_con->getNdbIndexOperation(g_opt.m_x1name, g_opt.m_tname)) != 0); + CHK(g_opx->readTuple() == 0); + CHK(g_opx->equal("PK2", tup.m_pk2) == 0); + assert(tup.m_blob1.m_buf != 0); + CHK(g_opx->getValue("BL1", (char*)tup.m_blob1.m_buf) != 0); + // execute + // BUG 4088: gets 1 tckeyconf, 1 tcindxconf, then hangs + CHK(g_con->execute(Commit) == 0); + // verify + for (unsigned i = 0; i < pkcnt; i++) { + CHK(pktup[i].m_pk1 == tup.m_pk1); + CHK(memcmp(pktup[i].m_pk2, tup.m_pk2, g_opt.m_pk2len) == 0); + } + CHK(memcmp(tup.m_blob1.m_val, tup.m_blob1.m_buf, 8 + g_opt.m_blob1.m_inline) == 0); + } + return 0; +} + +static int +bugtest_2222() +{ + return 0; +} + +static int +bugtest_3333() +{ + return 0; +} + +static struct { + int m_bug; + int (*m_test)(); +} g_bugtest[] = { + { 4088, bugtest_4088 }, + { 2222, bugtest_2222 }, + { 3333, bugtest_3333 } +}; + NDB_COMMAND(testOdbcDriver, "testBlobs", "testBlobs", "testBlobs", 65535) { - while (++argv, --argc > 0) { - const char* arg = argv[0]; - if (strcmp(arg, "-core") == 0) { - opt.m_core = true; - continue; - } + while (++argv, --argc > 0) { + const char* arg = argv[0]; + if (strcmp(arg, "-core") == 0) { + g_opt.m_core = true; + continue; } - testMain(); - return NDBT_ProgramExit(NDBT_OK); + if (strcmp(arg, "-dbg") == 0) { + g_opt.m_dbg = true; + continue; + } + if (strcmp(arg, "-dbgall") == 0) { + g_opt.m_dbg = true; + g_opt.m_dbgall = true; + putenv("NDB_BLOB_DEBUG=1"); + continue; + } + if (strcmp(arg, "-full") == 0) { + g_opt.m_full = true; + continue; + } + if (strcmp(arg, "-loop") == 0) { + if (++argv, --argc > 0) { + g_opt.m_loop = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-parts") == 0) { + if (++argv, --argc > 0) { + g_opt.m_parts = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-rows") == 0) { + if (++argv, --argc > 0) { + g_opt.m_rows = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-seed") == 0) { + if (++argv, --argc > 0) { + g_opt.m_seed = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-skip") == 0) { + if (++argv, --argc > 0) { + for (const char* p = argv[0]; *p != 0; p++) { + skip(*p) = true; + } + continue; + } + } + // metadata + if (strcmp(arg, "-pk2len") == 0) { + if (++argv, --argc > 0) { + g_opt.m_pk2len = atoi(argv[0]); + if (g_opt.m_pk2len == 0) { + skip('i') = true; + skip('r') = true; + } + if (g_opt.m_pk2len <= g_max_pk2len) + continue; + } + } + if (strcmp(arg, "-oneblob") == 0) { + g_opt.m_oneblob = true; + continue; + } + // bugs + if (strcmp(arg, "-bug") == 0) { + if (++argv, --argc > 0) { + g_opt.m_bug = atoi(argv[0]); + for (unsigned i = 0; i < sizeof(g_bugtest)/sizeof(g_bugtest[0]); i++) { + if (g_opt.m_bug == g_bugtest[i].m_bug) { + g_opt.m_bugtest = g_bugtest[i].m_test; + break; + } + } + if (g_opt.m_bugtest != 0) + continue; + } + } + ndbout << "testOIBasic: unknown option " << arg << endl; + printusage(); + return NDBT_ProgramExit(NDBT_WRONGARGS); + } + if (testmain() == -1) { + return NDBT_ProgramExit(NDBT_FAILED); + } + return NDBT_ProgramExit(NDBT_OK); } -// vim: set sw=4: +// vim: set sw=2 et: diff --git a/ndb/test/ndbapi/testOIBasic.cpp b/ndb/test/ndbapi/testOIBasic.cpp index 4b82cadffa5..a255cc74331 100644 --- a/ndb/test/ndbapi/testOIBasic.cpp +++ b/ndb/test/ndbapi/testOIBasic.cpp @@ -39,6 +39,7 @@ struct Opt { NdbDictionary::Object::FragmentType m_fragtype; const char* m_index; unsigned m_loop; + bool m_nologging; unsigned m_rows; unsigned m_scanrd; unsigned m_scanex; @@ -54,6 +55,7 @@ struct Opt { m_fragtype(NdbDictionary::Object::FragUndefined), m_index(0), m_loop(1), + m_nologging(false), m_rows(1000), m_scanrd(240), m_scanex(240), @@ -82,6 +84,7 @@ printhelp() << " -fragtype T fragment type single/small/medium/large" << endl << " -index xyz only given index numbers (digits 1-9)" << endl << " -loop N loop count full suite forever=0 [" << d.m_loop << "]" << endl + << " -nologging create tables in no-logging mode" << endl << " -rows N rows per thread [" << d.m_rows << "]" << endl << " -scanrd N scan read parallelism [" << d.m_scanrd << "]" << endl << " -scanex N scan exclusive parallelism [" << d.m_scanex << "]" << endl @@ -476,7 +479,7 @@ tt1 = { "TT1", 5, tt1col, 4, tt1itab }; -// tt2 + tt2x1 tt2x2 tt2x3 +// tt2 + tt2x1 tt2x2 tt2x3 tt2x4 static const Col tt2col[] = { @@ -505,6 +508,14 @@ tt2x3col[] = { { 1, tt2col[4] } }; +static const ICol +tt2x4col[] = { + { 0, tt2col[4] }, + { 1, tt2col[3] }, + { 2, tt2col[2] }, + { 3, tt2col[1] } +}; + static const ITab tt2x1 = { "TT2X1", 2, tt2x1col @@ -520,16 +531,22 @@ tt2x3 = { "TT2X3", 2, tt2x3col }; +static const ITab +tt2x4 = { + "TT2X4", 4, tt2x4col +}; + static const ITab tt2itab[] = { tt2x1, tt2x2, - tt2x3 + tt2x3, + tt2x4 }; static const Tab tt2 = { - "TT2", 5, tt2col, 3, tt2itab + "TT2", 5, tt2col, 4, tt2itab }; // all tables @@ -825,6 +842,9 @@ createtable(Par par) if (par.m_fragtype != NdbDictionary::Object::FragUndefined) { t.setFragmentType(par.m_fragtype); } + if (par.m_nologging) { + t.setLogging(false); + } for (unsigned k = 0; k < tab.m_cols; k++) { const Col& col = tab.m_col[k]; NdbDictionary::Column c(col.m_name); @@ -2204,7 +2224,6 @@ pkupdateindexbuild(Par par) { if (par.m_no == 0) { CHK(createindex(par) == 0); - CHK(invalidateindex(par) == 0); } else { CHK(pkupdate(par) == 0); } @@ -2495,6 +2514,7 @@ tbusybuild(Par par) RUNSTEP(par, pkinsert, MT); for (unsigned i = 0; i < par.m_subloop; i++) { RUNSTEP(par, pkupdateindexbuild, MT); + RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, readverify, MT); RUNSTEP(par, dropindex, ST); } @@ -2502,9 +2522,28 @@ tbusybuild(Par par) } static int -ttiming(Par par) +ttimebuild(Par par) { - Tmr t0, t1, t2; + Tmr t1; + RUNSTEP(par, droptable, ST); + RUNSTEP(par, createtable, ST); + RUNSTEP(par, invalidatetable, MT); + for (unsigned i = 0; i < par.m_subloop; i++) { + RUNSTEP(par, pkinsert, MT); + t1.on(); + RUNSTEP(par, createindex, ST); + t1.off(par.m_totrows); + RUNSTEP(par, invalidateindex, MT); + RUNSTEP(par, dropindex, ST); + } + LL1("build index - " << t1.time()); + return 0; +} + +static int +ttimemaint(Par par) +{ + Tmr t1, t2; RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); @@ -2513,16 +2552,13 @@ ttiming(Par par) t1.on(); RUNSTEP(par, pkupdate, MT); t1.off(par.m_totrows); - t0.on(); RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); - t0.off(par.m_totrows); t2.on(); RUNSTEP(par, pkupdate, MT); t2.off(par.m_totrows); RUNSTEP(par, dropindex, ST); } - LL1("build index - " << t0.time()); LL1("update - " << t1.time()); LL1("update indexed - " << t2.time()); LL1("overhead - " << t2.over(t1)); @@ -2553,7 +2589,8 @@ tcaselist[] = { TCase("b", tpkops, "pk operations and scan reads"), TCase("c", tmixedops, "pk operations and scan operations"), TCase("d", tbusybuild, "pk operations and index build"), - TCase("t", ttiming, "time index build and maintenance"), + TCase("t", ttimebuild, "time index build"), + TCase("u", ttimemaint, "time index maintenance"), TCase("z", tdrop, "drop test tables") }; @@ -2691,6 +2728,10 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535) continue; } } + if (strcmp(arg, "-nologging") == 0) { + g_opt.m_nologging = true; + continue; + } if (strcmp(arg, "-rows") == 0) { if (++argv, --argc > 0) { g_opt.m_rows = atoi(argv[0]); diff --git a/ndb/test/run-test/README b/ndb/test/run-test/README new file mode 100644 index 00000000000..d5da8f05c17 --- /dev/null +++ b/ndb/test/run-test/README @@ -0,0 +1,43 @@ +run-test/README + +This document describes how atrt works and how to use it. + +atrt is a test program driver. +atrt supports fully distributed test and utilizes ndb_cpcd. + +================================= +atrt has the following main loop: + +/** + * Psuedo code for atrt + */ + read config file (default d.txt) + contact each ndb_cpcd + start each ndb_mgmd + connect to each ndb_mgmd + for each read(test case) + do + if previous test failed (or is first test) + stop each ndbd + start each ndbd + wait for ndbd to get started + + start each mysqld + + start each test prg + + wait while all is running and max time not elapsed + + stop each mysqld + + stop each test prg + + gather result + + done +/** + * End of psuedo code + */ + +================================= + diff --git a/ndb/test/run-test/atrt-example.tgz b/ndb/test/run-test/atrt-example.tgz new file mode 100644 index 00000000000..8455b2eb00d Binary files /dev/null and b/ndb/test/run-test/atrt-example.tgz differ diff --git a/ndb/test/run-test/basic.txt b/ndb/test/run-test/basic.txt new file mode 100644 index 00000000000..a952320db08 --- /dev/null +++ b/ndb/test/run-test/basic.txt @@ -0,0 +1,763 @@ +# BASIC FUNCTIONALITY +max-time: 500 +cmd: testBasic +args: -n PkRead + +max-time: 500 +cmd: testBasic +args: -n PkUpdate + +max-time: 500 +cmd: testBasic +args: -n PkDelete + +max-time: 500 +cmd: testBasic +args: -n PkInsert + +max-time: 600 +cmd: testBasic +args: -n UpdateAndRead + +max-time: 500 +cmd: testBasic +args: -n PkReadAndLocker T6 + +max-time: 500 +cmd: testBasic +args: -n PkReadAndLocker2 T6 + +max-time: 500 +cmd: testBasic +args: -n PkReadUpdateAndLocker T6 + +max-time: 500 +cmd: testBasic +args: -n ReadWithLocksAndInserts T6 + +max-time: 500 +cmd: testBasic +args: -n PkInsertTwice T1 T6 T10 + +max-time: 1500 +cmd: testBasic +args: -n Fill T1 + +max-time: 1500 +cmd: testBasic +args: -n Fill T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommitSleep T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommit626 T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommitAndClose T6 + +max-time: 500 +cmd: testBasic +args: -n Commit626 T6 + +max-time: 500 +cmd: testBasic +args: -n CommitTry626 T6 + +max-time: 500 +cmd: testBasic +args: -n CommitAsMuch626 T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommit626 T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommitRollback626 T1 T6 + +max-time: 500 +cmd: testBasic +args: -n Commit630 T1 T6 + +max-time: 500 +cmd: testBasic +args: -n CommitTry630 T1 T6 + +max-time: 500 +cmd: testBasic +args: -n CommitAsMuch630 T1 T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommit630 T1 T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommitRollback630 T1 T6 + +max-time: 500 +cmd: testBasic +args: -n NoCommitAndClose T1 T6 + +max-time: 500 +cmd: testBasic +args: -n RollbackUpdate T1 T6 + +max-time: 500 +cmd: testBasic +args: -n RollbackDeleteMultiple T1 T6 + +max-time: 500 +cmd: testBasic +args: -n ImplicitRollbackDelete T1 T6 + +max-time: 500 +cmd: testBasic +args: -n CommitDelete T1 T6 + +max-time: 500 +cmd: testBasic +args: -n RollbackNothing T1 T6 + +max-time: 500 +cmd: testBasicAsynch +args: -n PkInsertAsynch + +max-time: 500 +cmd: testBasicAsynch +args: -n PkReadAsynch + +max-time: 500 +cmd: testBasicAsynch +args: -n PkUpdateAsynch + +max-time: 500 +cmd: testBasicAsynch +args: -n PkDeleteAsynch + +max-time: 500 +cmd: testBasic +args: -n MassiveRollback T1 T6 T13 + +max-time: 500 +cmd: testBasic +args: -n MassiveRollback2 T1 T6 T13 + +#-m 500 1: testBasic -n ReadConsistency T6 +cmd: testTimeout +args: -n DontTimeoutTransaction T1 + +cmd: testTimeout +args: -n DontTimeoutTransaction5 T1 + +cmd: testTimeout +args: -n TimeoutTransaction T1 + +cmd: testTimeout +args: -n TimeoutTransaction5 T1 + +cmd: testTimeout +args: -n BuddyTransNoTimeout T1 + +cmd: testTimeout +args: -n BuddyTransNoTimeout5 T1 + +# +# SCAN TESTS +# +max-time: 500 +cmd: testScan +args: -n ScanRead16 + +max-time: 500 +cmd: testScan +args: -n ScanRead240 + +max-time: 500 +cmd: testScan +args: -n ScanReadCommitted240 + +max-time: 500 +cmd: testScan +args: -n ScanUpdate + +max-time: 500 +cmd: testScan +args: -n ScanUpdate2 T6 + +max-time: 500 +cmd: testScan +args: -n ScanDelete + +max-time: 500 +cmd: testScan +args: -n ScanDelete2 T10 + +max-time: 500 +cmd: testScan +args: -n ScanUpdateAndScanRead T6 + +max-time: 500 +cmd: testScan +args: -n ScanReadAndLocker T6 + +max-time: 500 +cmd: testScan +args: -n ScanReadAndPkRead T6 + +max-time: 500 +cmd: testScan +args: -n ScanRead488 -l 10 T6 + +max-time: 600 +cmd: testScan +args: -n ScanRead40 -l 100 T2 + +max-time: 1800 +cmd: testScan +args: -n ScanRead100 -l 100 T1 + +max-time: 600 +cmd: testScan +args: -n ScanRead40 -l 100 T1 + +max-time: 1800 +cmd: testScan +args: -n ScanRead40RandomTable -l 100 T1 + +max-time: 3600 +cmd: testScan +args: -n ScanRead40RandomTable -l 1000 T2 + +max-time: 500 +cmd: testScan +args: -n ScanWithLocksAndInserts T6 + +max-time: 500 +cmd: testScan +args: -n ScanReadAbort T6 + +max-time: 500 +cmd: testScan +args: -n ScanReadAbort15 T6 + +max-time: 500 +cmd: testScan +args: -n ScanReadAbort240 T6 + +max-time: 500 +cmd: testScan +args: -n ScanUpdateAbort16 T6 + +max-time: 3600 +cmd: testScan +args: -n ScanReadRestart T1 T6 T13 + +max-time: 500 +cmd: testScan +args: -n ScanUpdateRestart T6 + +max-time: 500 +cmd: testScan +args: -n CheckGetValue T6 + +max-time: 500 +cmd: testScan +args: -n CloseWithoutStop T6 + +max-time: 500 +cmd: testScan +args: -n NextScanWhenNoMore T6 + +max-time: 500 +cmd: testScan +args: -n ExecuteScanWithoutOpenScan T6 + +max-time: 500 +cmd: testScan +args: -n OnlyOpenScanOnce T6 + +max-time: 500 +cmd: testScan +args: -n OnlyOneOpInScanTrans T6 + +max-time: 500 +cmd: testScan +args: -n OnlyOneOpBeforeOpenScan T6 + +max-time: 500 +cmd: testScan +args: -n OnlyOneScanPerTrans T6 + +max-time: 500 +cmd: testScan +args: -n NoCloseTransaction T6 + +max-time: 500 +cmd: testScan +args: -n CheckInactivityTimeOut T6 + +max-time: 500 +cmd: testScan +args: -n CheckInactivityBeforeClose T6 + +max-time: 500 +cmd: testScan +args: -n CheckAfterTerror T6 + +max-time: 500 +cmd: testScan +args: -n ScanReadError5021 T1 + +max-time: 500 +cmd: testScan +args: -n ScanReaderror5022 T1 + +max-time: 500 +cmd: testScan +args: -n ScanReadError5023 T1 + +max-time: 500 +cmd: testScan +args: -n ScanReadError5024 T1 + +max-time: 500 +cmd: testScan +args: -n ScanReadError5025 T1 + +max-time: 500 +cmd: testScan +args: -n ScanReadError5030 T1 + +# OLD FLEX +max-time: 500 +cmd: flexBench +args: -c 25 -t 10 + +max-time: 500 +cmd: flexHammer +args: -r 5 -t 32 + +# +# DICT TESTS +max-time: 1500 +cmd: testDict +args: -n CreateAndDrop + +max-time: 1500 +cmd: testDict +args: -n CreateAndDropWithData + +max-time: 1500 +cmd: testDict +args: -n CreateAndDropDuring T6 T10 + +max-time: 1500 +cmd: testDict +args: -n CreateInvalidTables + +max-time: 1500 +cmd: testDict +args: -n CreateTableWhenDbIsFull T6 + +max-time: 1500 +cmd: testDict +args: -n CreateMaxTables T6 + +max-time: 500 +cmd: testDict +args: -n FragmentTypeSingle T1 + +max-time: 1500 +cmd: testDict +args: -n FragmentTypeAll T1 T6 T7 T8 + +max-time: 1500 +cmd: testDict +args: -n FragmentTypeAllLarge T1 T6 T7 T8 + +max-time: 1500 +cmd: testDict +args: -n TemporaryTables T1 T6 T7 T8 + +# +# TEST NDBAPI +# +max-time: 500 +cmd: testDataBuffers +args: + +# Testsuite: testNdbApi +# Number of tests: 5 +max-time: 500 +cmd: testNdbApi +args: -n MaxNdb T6 + +max-time: 500 +cmd: testNdbApi +args: -n MaxTransactions T1 T6 T7 T8 T13 + +max-time: 500 +cmd: testNdbApi +args: -n MaxOperations T1 T6 T7 T8 T13 + +max-time: 500 +cmd: testNdbApi +args: -n MaxGetValue T1 T6 T7 T8 T13 + +max-time: 500 +cmd: testNdbApi +args: -n MaxEqual + +max-time: 500 +cmd: testNdbApi +args: -n DeleteNdb T1 T6 + +max-time: 500 +cmd: testNdbApi +args: -n WaitUntilReady T1 T6 T7 T8 T13 + +max-time: 500 +cmd: testNdbApi +args: -n GetOperationNoTab T6 + +max-time: 500 +cmd: testNdbApi +args: -n NdbErrorOperation T6 + +max-time: 500 +cmd: testNdbApi +args: -n MissingOperation T6 + +max-time: 500 +cmd: testNdbApi +args: -n GetValueInUpdate T6 + +max-time: 500 +cmd: testNdbApi +args: -n UpdateWithoutKeys T6 + +max-time: 500 +cmd: testNdbApi +args: -n UpdateWithoutValues T6 + +max-time: 500 +cmd: testInterpreter +args: T1 + +max-time: 1500 +cmd: testOperations +args: -n ReadRead + +max-time: 1500 +cmd: testOperations +args: -n ReadReadEx + +max-time: 1500 +cmd: testOperations +args: -n ReadInsert + +max-time: 1500 +cmd: testOperations +args: -n ReadUpdate + +max-time: 1500 +cmd: testOperations +args: -n ReadDelete + +max-time: 1500 +cmd: testOperations +args: -n FReadRead + +max-time: 1500 +cmd: testOperations +args: -n FReadReadEx + +max-time: 1500 +cmd: testOperations +args: -n FReadInsert + +max-time: 1500 +cmd: testOperations +args: -n FReadUpdate + +max-time: 1500 +cmd: testOperations +args: -n FReadDelete + +max-time: 1500 +cmd: testOperations +args: -n ReadExRead + +max-time: 1500 +cmd: testOperations +args: -n ReadExReadEx + +max-time: 1500 +cmd: testOperations +args: -n ReadExInsert + +max-time: 1500 +cmd: testOperations +args: -n ReadExUpdate + +max-time: 1500 +cmd: testOperations +args: -n ReadExDelete + +max-time: 1500 +cmd: testOperations +args: -n InsertRead + +max-time: 1500 +cmd: testOperations +args: -n InsertReadEx + +max-time: 1500 +cmd: testOperations +args: -n InsertInsert + +max-time: 1500 +cmd: testOperations +args: -n InsertUpdate + +max-time: 1500 +cmd: testOperations +args: -n InsertDelete + +max-time: 1500 +cmd: testOperations +args: -n UpdateRead + +max-time: 1500 +cmd: testOperations +args: -n UpdateReadEx + +max-time: 1500 +cmd: testOperations +args: -n UpdateInsert + +max-time: 1500 +cmd: testOperations +args: -n UpdateUpdate + +max-time: 1500 +cmd: testOperations +args: -n UpdateDelete + +max-time: 1500 +cmd: testOperations +args: -n DeleteRead + +max-time: 1500 +cmd: testOperations +args: -n DeleteReadEx + +max-time: 1500 +cmd: testOperations +args: -n DeleteInsert + +max-time: 1500 +cmd: testOperations +args: -n DeleteUpdate + +max-time: 1500 +cmd: testOperations +args: -n DeleteDelete + +max-time: 1500 +cmd: testOperations +args: -n ReadSimpleRead + +max-time: 1500 +cmd: testOperations +args: -n ReadDirtyRead + +max-time: 1500 +cmd: testOperations +args: -n FReadSimpleRead + +max-time: 1500 +cmd: testOperations +args: -n FReadDirtyRead + +max-time: 1500 +cmd: testOperations +args: -n ReadExSimpleRead + +max-time: 1500 +cmd: testOperations +args: -n ReadExDirtyRead + +max-time: 1500 +cmd: testOperations +args: -n InsertSimpleRead + +max-time: 1500 +cmd: testOperations +args: -n InsertDirtyRead + +max-time: 1500 +cmd: testOperations +args: -n UpdateSimpleRead + +max-time: 1500 +cmd: testOperations +args: -n UpdateDirtyRead + +max-time: 1500 +cmd: testOperations +args: -n DeleteSimpleRead + +max-time: 1500 +cmd: testOperations +args: -n DeleteDirtyRead + +max-time: 1500 +cmd: testTransactions +args: -n ReadRead + +max-time: 1500 +cmd: testTransactions +args: -n ReadReadEx + +max-time: 1500 +cmd: testTransactions +args: -n ReadInsert + +max-time: 1500 +cmd: testTransactions +args: -n ReadUpdate + +max-time: 1500 +cmd: testTransactions +args: -n ReadDelete + +max-time: 1500 +cmd: testTransactions +args: -n ReadExRead + +max-time: 1500 +cmd: testTransactions +args: -n ReadExReadEx + +max-time: 1500 +cmd: testTransactions +args: -n ReadExInsert + +max-time: 1500 +cmd: testTransactions +args: -n ReadExUpdate + +max-time: 1500 +cmd: testTransactions +args: -n ReadExDelete + +max-time: 1500 +cmd: testTransactions +args: -n InsertRead + +max-time: 1500 +cmd: testTransactions +args: -n InsertReadEx + +max-time: 1500 +cmd: testTransactions +args: -n InsertInsert + +max-time: 1500 +cmd: testTransactions +args: -n InsertUpdate + +max-time: 1500 +cmd: testTransactions +args: -n InsertDelete + +max-time: 1500 +cmd: testTransactions +args: -n UpdateRead + +max-time: 1500 +cmd: testTransactions +args: -n UpdateReadEx + +max-time: 1500 +cmd: testTransactions +args: -n UpdateInsert + +max-time: 1500 +cmd: testTransactions +args: -n UpdateUpdate + +max-time: 1500 +cmd: testTransactions +args: -n UpdateDelete + +max-time: 1500 +cmd: testTransactions +args: -n DeleteRead + +max-time: 1500 +cmd: testTransactions +args: -n DeleteReadEx + +max-time: 1500 +cmd: testTransactions +args: -n DeleteInsert + +max-time: 1500 +cmd: testTransactions +args: -n DeleteUpdate + +max-time: 1500 +cmd: testTransactions +args: -n DeleteDelete + +max-time: 1500 +cmd: testTransactions +args: -n ReadSimpleRead + +max-time: 1500 +cmd: testTransactions +args: -n ReadDirtyRead + +max-time: 1500 +cmd: testTransactions +args: -n ReadExSimpleRead + +max-time: 1500 +cmd: testTransactions +args: -n ReadExDirtyRead + +max-time: 1500 +cmd: testTransactions +args: -n InsertSimpleRead + +max-time: 1500 +cmd: testTransactions +args: -n InsertDirtyRead + +max-time: 1500 +cmd: testTransactions +args: -n UpdateSimpleRead + +max-time: 1500 +cmd: testTransactions +args: -n UpdateDirtyRead + +max-time: 1500 +cmd: testTransactions +args: -n DeleteSimpleRead + +max-time: 1500 +cmd: testTransactions +args: -n DeleteDirtyRead + +max-time: 1500 +cmd: testRestartGci +args: T6 + diff --git a/ndb/test/run-test/main.cpp b/ndb/test/run-test/main.cpp index 8bdab14d9c2..9e318b0219e 100644 --- a/ndb/test/run-test/main.cpp +++ b/ndb/test/run-test/main.cpp @@ -30,35 +30,6 @@ #include #include "CpcClient.hpp" -/** - psuedo code for run-test.bin - - define autotest_wrapper process at each host - start ndb-processes - - for each testcase - do - start mysqld processes - start replication processes - start test programs - - wait until test program finished or max time passed - - stop test program - stop replication processes - stop mysqld processes - - write report data-file - if test failed and ! last test - restart ndb processes - - drop all tables created by test - done - - stop ndb processes - undefined wrapper processes -*/ - /** Global variables */ static const char progname[] = "ndb_atrt"; static const char * g_gather_progname = "atrt-gather-result.sh"; @@ -75,6 +46,7 @@ static const char * g_report_filename = 0; static const char * g_default_user = 0; static const char * g_default_base_dir = 0; static int g_default_base_port = 0; +static int g_mysqld_use_base = 1; static int g_report = 0; static int g_verbosity = 0; @@ -385,6 +357,7 @@ setup_config(atrt_config& config){ int lineno = 0; char buf[2048]; BaseString connect_string; + int mysql_port_offset = 0; while(fgets(buf, 2048, f)){ lineno++; @@ -416,6 +389,11 @@ setup_config(atrt_config& config){ continue; } + if(split1[0].trim() == "mysqld-use-base" && split1[1].trim() == "no"){ + g_mysqld_use_base = 0; + continue; + } + Vector hosts; if(split1[1].trim().split(hosts) <= 0){ g_logger.warning("Invalid line %d in %s - ignoring", @@ -490,6 +468,21 @@ setup_config(atrt_config& config){ proc.m_proc.m_path.assign(dir).append("/libexec/ndbd"); proc.m_proc.m_args = "-i -n"; proc.m_proc.m_cwd.appfmt("%d.ndbd", index); + } else if(split1[0] == "mysqld"){ + proc.m_type = atrt_process::MYSQL_SERVER; + proc.m_proc.m_name.assfmt("%d-%s", index, "mysqld"); + proc.m_proc.m_path.assign(dir).append("/libexec/mysqld"); + proc.m_proc.m_args = "--core-file --ndbcluster"; + proc.m_proc.m_cwd.appfmt("%d.mysqld", index); + if(mysql_port_offset > 0 || g_mysqld_use_base){ + // setup mysql specific stuff + const char * basedir = proc.m_proc.m_cwd.c_str(); + proc.m_proc.m_args.appfmt("--datadir=%s", basedir); + proc.m_proc.m_args.appfmt("--pid-file=%s/mysql.pid", basedir); + proc.m_proc.m_args.appfmt("--socket=%s/mysql.sock", basedir); + proc.m_proc.m_args.appfmt("--port=%d", + g_default_base_port-(++mysql_port_offset)); + } } else if(split1[0] == "api"){ proc.m_type = atrt_process::NDB_API; proc.m_proc.m_name.assfmt("%d-%s", index, "ndb_api"); @@ -714,7 +707,7 @@ bool start_processes(atrt_config& config, int types){ for(size_t i = 0; i & h_procs = m_procs[proc.m_host->m_index]; - bool found = false; - for(size_t j = 0; j &h_procs= m_procs[proc.m_host->m_index]; + bool found = false; + for(size_t j = 0; jm_base_dir).append("/bin/").append(tc.m_command); + proc.m_proc.m_path.assfmt("%s/bin/%s", proc.m_host->m_base_dir.c_str(), + tc.m_command.c_str()); proc.m_proc.m_args.assign(tc.m_args); - return true; + break; } } - - return false; + for(i++; i ] [ -s ] [ -d ] [ -c ] -# -# DESCRIPTION -# -# OPTIONS -# -# EXAMPLES -# -# -# ENVIRONMENT -# NDB_PROJ_HOME Home dir for ndb -# -# FILES -# $NDB_PROJ_HOME/lib/funcs.sh general shell script functions -# -# -# SEE ALSO -# -# DIAGNOSTICTS -# -# VERSION -# 1.0 -# -# AUTHOR -# Jonas Oreland -# -progname=`basename $0` -synopsis="make-html-reports.sh [ -R ] [ -s ] [ -d ] [ -c ]" +src_dir=$1 +run=$2 +date=$3 +src_file=$src_dir/report.txt -: ${NDB_PROJ_HOME:?} # If undefined, exit with error message - -: ${NDB_LOCAL_BUILD_OPTIONS:=--} # If undef, set to --. Keeps getopts happy. - # You may have to experiment a bit - # to get quoting right (if you need it). - - -. $NDB_PROJ_HOME/lib/funcs.sh # Load some good stuff - -# defaults for options related variables -# - - -src_dir=`pwd` -dst_dir=`pwd` -conf_dir=`pwd` -report_date=`date '+%Y-%m-%d'` -uniq_id=$$.$$ -verbose=yes - -# used if error when parsing the options environment variable -# -env_opterr="options environment variable: <<$options>>" - -# Option parsing, for the options variable as well as the command line. -# -# We want to be able to set options in an environment variable, -# as well as on the command line. In order not to have to repeat -# the same getopts information twice, we loop two times over the -# getopts while loop. The first time, we process options from -# the options environment variable, the second time we process -# options from the command line. -# -# The things to change are the actual options and what they do. -# -# - -for optstring in "$options" "" # 1. options variable 2. cmd line -do - - while getopts q:s:R:d:c: i $optstring # optstring empty => no arg => cmd line - do - case $i in - - q) verbose="";; # echo important things - d) dst_dir=$OPTARG;; # Destination directory - s) src_dir=$OPTARG;; # Destination directory - c) conf_dir=$OPTARG;; # - R) report_date=$OPTARG;; # - \?) syndie $env_opterr;; # print synopsis and exit - - esac - done - - [ -n "$optstring" ] && OPTIND=1 # Reset for round 2, cmdline options - - env_opterr= # Round 2 should not use the value - -done -shift `expr $OPTIND - 1` - -src_dir=`abspath $src_dir` -dst_dir=`abspath $dst_dir` -conf_dir=`abspath $conf_dir` +if [ ! -f $src_dir/report.txt ] +then + echo "$src_dir/report.txt is missing" + exit 1 +fi ### # # General html functions +trim(){ + echo $* +} + header(){ cat <$* @@ -166,64 +83,7 @@ hr(){ EOF } -# --- option parsing done --- - # -- Verify -trace "Verifying arguments" -summary_file=$src_dir/reports/summary.$report_date - -if [ ! -r $summary_file ] -then - syndie "Invalid src directory or report date: $summary_file not found" -fi - -if [ ! -d $conf_dir/configurations ] -then - syndie "Invalid src directory: $conf_dir/configurations not found" -fi - -if [ ! -d $conf_dir/testcases ] -then - syndie "Invalid src directory: $conf_dir/testcases not found" -fi - -if [ ! -d $dst_dir ] -then - syndie "Invalid dst dir..." -fi - -# --- option verifying done --- - -trace "src_dir: $src_dir" -trace "dst_dir: $dst_dir" -trace "conf_dir: $conf_dir" -trace "report date: $report_date" - -### -config_spec(){ - cat <$1 -EOF -} - -config_spec_include(){ - # Print the $1 file to the file we are generating - cat <
-EOF
-    if [ -r $conf_dir/configurations/$1 ]
-    then
-	cat -E $conf_dir/configurations/$1 | sed 's/\$/
/g' - else - cat < -EOF -} - time_spec(){ # $1 - secs _ts_tmp=$1 @@ -232,8 +92,14 @@ time_spec(){ _ts_tmp=`expr $_ts_tmp / 60` _ts_m=`expr $_ts_tmp % 60` - _ts_tmp=`expr $_ts_tmp / 60` + if [ $_ts_tmp -ge 60 ] + then + _ts_tmp=`expr $_ts_tmp / 60` + else + _ts_tmp=0 + fi + a=3 _ts_h=$_ts_tmp if [ $_ts_h -gt 0 ] @@ -247,191 +113,77 @@ time_spec(){ echo $ret } -log_spec(){ - _ff_=$src_dir/log/$report_date/$1.$2/test.$3.out - if [ -r $_ff_ ] && [ -s $_ff_ ] - then - _f2_=$dst_dir/log.$report_date.$1.$2.$3.out.gz - if [ -r $_f2_ ] - then - rm $_f2_ - fi - cp $_ff_ $dst_dir/log.$report_date.$1.$2.$3.out - gzip $dst_dir/log.$report_date.$1.$2.$3.out - rm -f $dst_dir/log.$report_date.$1.$2.$3.out - echo "Log file" - else - echo "-" - fi -} - -err_spec(){ - _ff_=$src_dir/log/$report_date/$1.$2/test.$3.err.tar - if [ -r $_ff_ ] && [ -s $_ff_ ] - then - cp $_ff_ $dst_dir/err.$report_date.$1.$2.$3.err.tar - gzip $dst_dir/err.$report_date.$1.$2.$3.err.tar - rm -f $dst_dir/err.$report_date.$1.$2.$3.err.tar - echo "Error tarball" - else - echo "-" - fi -} - -command_spec(){ - echo $* | sed 's/;/
/g' -} - ### Main -html_summary_file=$dst_dir/summary.$report_date.html +report_file=$src_dir/report.html +summary_file=$src_dir/summary.html + +passed=0 +failed=0 +total=0 + +pass(){ + passed=`expr $passed + 1` +} + +fail(){ + failed=`expr $failed + 1` +} -trace "Creating summary" ( - eval `grep "TOTAL" $summary_file | awk -F";" '{ printf("test_file=\"%s\"; elapsed=\"%s\"; started=\"%s\"; stopped=\"%s\"", $2, $3, $4, $5); }'` - - header "Autotest summary $report_date" - heading 1 "Autotest summary $report_date" - table - row ; column `bold test file: `; column $test_file ; end_row - row ; column `bold Started:` ; column "$started "; end_row - row ; column `bold Stopped:` ; column "$stopped "; end_row - row ; column `bold Elapsed:` ; column "`time_spec $elapsed secs`" ; end_row - end_table - hr - - table "border=1" - row - c_column `bold Report` - c_column `bold Tag` - c_column `bold Version` - c_column `bold Distr-Config` - c_column `bold Db-Config` - c_column `bold Type` - c_column `bold Test file` - c_column `bold Make` - c_column `bold Config` - c_column `bold Test time` - c_column `bold Passed` - c_column `bold Failed` - end_row - - grep -v "^#" $summary_file | grep -v TOTAL | sed 's/;/ /g' | \ - while read tag version config template type test_file make_res make_time conf_res conf_time test_time passed failed - do + header Report $run $date + table "border=1" row - if [ -r $src_dir/reports/report.$tag.$version.$config.$template.$type.$test_file.$report_date ] - then - column "report" - else - column "-" - fi - - column $tag - column $version - column $config - column $template - column $type - column $test_file - column "$make_res(`time_spec $make_time`)" - column "$conf_res(`time_spec $conf_time`)" - c_column "`time_spec $test_time`" - c_column `bold $passed` - c_column `bold $failed` + column `bold Test case` + column `bold Result` + column `bold Elapsed` + column `bold Log` end_row - done - end_table +) > $report_file - footer -) > $html_summary_file - -for i in $src_dir/reports/report.*.$report_date +cat $src_file | while read line do - f=`basename $i` - trace "Creating report: $f" - eval `echo $f | awk -F"." '{printf("tag=%s;version=%s;config=%s;template=%s;type=%s;test_file=%s", $2, $3, $4, $5, $6, $7);}'` + eval `echo $line | awk -F";" '{ printf("prg=\"%s\"; no=\"%s\"; res=\"%s\"; time=\"%s\"", $1, $2, $3, $4); }'` - ( - header "Autotest report $report_date" - heading 1 "Autotest report $report_date" - table #"border=1" - row ; column `bold Tag:`; column $tag ; end_row - row ; column `bold Version:` ; column $version ; end_row - row ; column `bold Configuration:` ; column `config_spec $config`; end_row - row ; column `bold Template:` ; column `config_spec $template`; end_row - row ; column `bold Type:` ; column $type ; end_row - row ; column `bold Test file:` ; column $test_file; end_row - end_table - hr + prg=`trim $prg` + no=`trim $no` + res=`trim $res` + time=`trim $time` + res_dir="log" - table "border=1" - row - c_column `bold Test case` - c_column `bold Result` - c_column `bold Test time` - c_column `bold Logfile` - c_column `bold Error tarfile` - end_row + ts=`time_spec $time` + res_txt="" + case $res in + 0) pass; res_txt="PASSED"; res_dir=" ";; + *) fail; res_txt="FAILED";; + esac + total=`expr $total + $time` - grep -v "^#" $i | sed 's/;/ /g' | \ - while read test_no test_res test_time cmd - do - row - column "`command_spec $cmd`" - case "$test_res" in - 0) - column "PASSED";; - 1001) - column "API error";; - 1002) - column "Max time expired";; - 1003) - column "Mgm port busy";; - *) - column "Unknown: $test_res";; - esac + ( + row + column $prg + column $res_txt + column $ts + column $res_dir + end_row + ) >> $report_file - column "`time_spec $test_time`" - - column "`log_spec $tag $version $test_no`" - column "`err_spec $tag $version $test_no`" - end_row - done - end_table - - # Last on page we include spec - # of used machines and template for config - # for future reference - hr - table "border=1" - row; column `bold Configuration:` $config; end_row - row; column `config_spec_include $config`; end_row - end_table - hr - table "border=1" - row; column `bold Template:` $template; end_row - row; column `config_spec_include $template`; end_row - end_table - - footer - - ) > $dst_dir/$f.html + ( + row + column $run + column $date + column $passed + column $failed + column `time_spec $total` + column "report" + column "log.txt" + end_row + ) > $summary_file done -# Re creating index -trace "Recreating index" ( - header "Autotest super-duper index" - heading 1 "
Autotest super-duper index
" - hr - for i in `ls $dst_dir/summary.*.html | sort -r -n` - do - f=`basename $i` - cat <$f

-EOF - done - footer -) > $dst_dir/index.html + end_table + footer +) >> $report_file exit 0 diff --git a/ndb/tools/ndbsql.cpp b/ndb/tools/ndbsql.cpp index 33a3e39776a..6af5f47f6f4 100644 --- a/ndb/tools/ndbsql.cpp +++ b/ndb/tools/ndbsql.cpp @@ -33,6 +33,12 @@ #include #include +#ifndef SQL_BLOB +#define SQL_BLOB 30 +#endif +#ifndef SQL_CLOB +#define SQL_CLOB 40 +#endif /************************************************************************** * ------------------------------------------------------------------------ @@ -211,8 +217,10 @@ SQLINTEGER display_length(SQLSMALLINT coltype, SQLINTEGER collen, switch (coltype) { case SQL_VARCHAR: case SQL_CHAR: - //case SQL_BLOB: - //case SQL_CLOB: + case SQL_VARBINARY: + case SQL_BINARY: + case SQL_BLOB: + case SQL_CLOB: case SQL_BIT: //case SQL_REF: //case SQL_BIT_VARYING: diff --git a/regex/regcomp.c b/regex/regcomp.c index b939429e16e..31899609e3c 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -884,7 +884,7 @@ int ch; register char *oldend = p->end; char bracket[3]; - assert(othercase(ch) != ch); /* p_bracket() would recurse */ + assert(othercase(p->charset, ch) != ch); /* p_bracket() would recurse */ p->next = bracket; p->end = bracket+2; bracket[0] = ch; diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index abde6ecbe73..1fd67b1d0ee 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -155,7 +155,7 @@ then resolved=`$bindir/resolveip localhost 2>&1` if [ $? -ne 0 ] then - echo "Neither host '$hostname' and 'localhost' could not be looked up with" + echo "Neither host '$hostname' nor 'localhost' could be looked up with" echo "$bindir/resolveip" echo "Please configure the 'hostname' command to return a correct hostname." echo "If you want to solve this at a later stage, restart this script with" diff --git a/sql/field.cc b/sql/field.cc index df9b4f84ae7..0660e774396 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -4242,9 +4242,8 @@ int Field_string::cmp(const char *a_ptr, const char *b_ptr) (const uchar*) b_ptr, field_length); } - return field_charset->coll->strnncoll(field_charset, - (const uchar*) a_ptr, field_length, - (const uchar*) b_ptr, field_length); + return my_strnncoll(field_charset,(const uchar*) a_ptr, field_length, + (const uchar*) b_ptr, field_length); } void Field_string::sort_string(char *to,uint length) diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 5d8fe8c4aef..b0c685c1c46 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -950,17 +950,10 @@ String *Item_func_left::val_str(String *str) return 0; if (length <= 0) return &my_empty_string; - length= res->charpos(length); - if (res->length() > (ulong) length) - { // Safe even if const arg - if (!res->alloced_length()) - { // Don't change const str - str_value= *res; // Not malloced string - res= &str_value; - } - res->length((uint) length); - } - return res; + if (res->length() <= (uint) length) + return res; + str_value.set(*res, 0, res->charpos(length)); + return &str_value; } diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 098ccf70861..7a8e15e0a9d 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1685,6 +1685,9 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), String tmp((char *)&buff,sizeof(buff),default_charset_info), tmp2; char *record= (char*) item->table->record[0]; + if (item->result.length()) + item->result.append(*item->separator); + tmp.length(0); for (uint i= 0; i < item->arg_count_field; i++) @@ -1714,14 +1717,6 @@ int dump_leaf_key(byte* key, uint32 count __attribute__((unused)), item->result.append(*res); } } - if (item->tree_mode) // Last item of tree - { - item->show_elements++; - if (item->show_elements < item->tree->elements_in_tree) - item->result.append(*item->separator); - } - else - item->result.append(*item->separator); /* stop if length of result more than group_concat_max_len */ if (item->result.length() > item->group_concat_max_len) @@ -1752,7 +1747,7 @@ Item_func_group_concat::Item_func_group_concat(bool is_distinct, tree_mode(0), distinct(is_distinct), warning_for_row(0), separator(is_separator), tree(&tree_base), table(0), order(0), tables_list(0), - show_elements(0), arg_count_order(0), arg_count_field(0), + arg_count_order(0), arg_count_field(0), count_cut_values(0) { Item *item_select; @@ -1818,7 +1813,6 @@ Item_func_group_concat::Item_func_group_concat(THD *thd, order(item->order), tables_list(item->tables_list), group_concat_max_len(item->group_concat_max_len), - show_elements(item->show_elements), arg_count_order(item->arg_count_order), arg_count_field(item->arg_count_field), field_list_offset(item->field_list_offset), @@ -2126,15 +2120,9 @@ String* Item_func_group_concat::val_str(String* str) return 0; if (tree_mode) { - show_elements= 0; tree_walk(tree, (tree_walk_action)&dump_leaf_key, (void*)this, left_root_right); } - else - { - if (!warning_for_row) - result.length(result.length()-separator->length()); - } if (count_cut_values && !warning_available) { warning_available= TRUE; diff --git a/sql/item_sum.h b/sql/item_sum.h index be8bb28e16b..507a36194de 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -696,7 +696,6 @@ class Item_func_group_concat : public Item_sum ORDER **order; TABLE_LIST *tables_list; ulong group_concat_max_len; - uint show_elements; uint arg_count_order; uint arg_count_field; uint field_list_offset; diff --git a/sql/protocol.h b/sql/protocol.h index 43230983db7..d7ce5425ad1 100644 --- a/sql/protocol.h +++ b/sql/protocol.h @@ -35,8 +35,10 @@ protected: enum enum_field_types *field_types; #endif uint field_count; +#ifndef EMBEDDED_LIBRARY bool net_store_data(const char *from, uint length); -#ifdef EMBEDDED_LIBRARY +#else + virtual bool net_store_data(const char *from, uint length); char **next_field; MYSQL_FIELD *next_mysql_field; MEM_ROOT *alloc; diff --git a/sql/share/czech/errmsg.txt b/sql/share/czech/errmsg.txt index 29659930579..6b9b81ec87d 100644 --- a/sql/share/czech/errmsg.txt +++ b/sql/share/czech/errmsg.txt @@ -174,7 +174,7 @@ character-set=latin2 "Zji-B¹tìn timeout pøi ètení komunikaèního packetu", "Zji-B¹tìna chyba pøi zápisu komunikaèního packetu", "Zji-B¹tìn timeout pøi zápisu komunikaèního packetu", -"V-Býsledný øetìzec je del¹í ne¾ max_allowed_packet", +"V-Býsledný øetìzec je del¹í ne¾ 'max_allowed_packet'", "Typ pou-B¾ité tabulky nepodporuje BLOB/TEXT sloupce", "Typ pou-B¾ité tabulky nepodporuje AUTO_INCREMENT sloupce", "INSERT DELAYED nen-Bí mo¾no s tabulkou '%-.64s' pou¾ít, proto¾e je zamèená pomocí LOCK TABLES", @@ -209,23 +209,23 @@ character-set=latin2 "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a mìla by být opravena", "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a poslední (automatická?) oprava se nezdaøila", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -233,26 +233,26 @@ character-set=latin2 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -260,23 +260,23 @@ character-set=latin2 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -284,13 +284,13 @@ character-set=latin2 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -305,8 +305,8 @@ character-set=latin2 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/danish/errmsg.txt b/sql/share/danish/errmsg.txt index 4fe51036579..767b1ee5f7a 100644 --- a/sql/share/danish/errmsg.txt +++ b/sql/share/danish/errmsg.txt @@ -126,7 +126,7 @@ character-set=latin1 "For mange felter", "For store poster. Max post størrelse, uden BLOB's, er %d. Du må lave nogle felter til BLOB's", "Thread stack brugt: Brugt: %ld af en %ld stak. Brug 'mysqld -O thread_stack=#' for at allokere en større stak om nødvendigt", -"Krydsreferencer fundet i OUTER JOIN. Check dine ON conditions", +"Krydsreferencer fundet i OUTER JOIN; check dine ON conditions", "Kolonne '%-.32s' bruges som UNIQUE eller INDEX men er ikke defineret som NOT NULL", "Kan ikke læse funktionen '%-.64s'", "Kan ikke starte funktionen '%-.64s'; %-.80s", @@ -168,7 +168,7 @@ character-set=latin1 "Timeout-fejl ved læsning af kommunukations-pakker (communication packets)", "Fik fejlmeddelelse ved skrivning af kommunukations-pakker (communication packets)", "Timeout-fejl ved skrivning af kommunukations-pakker (communication packets)", -"Strengen med resultater er større end max_allowed_packet", +"Strengen med resultater er større end 'max_allowed_packet'", "Denne tabeltype understøtter ikke brug af BLOB og TEXT kolonner", "Denne tabeltype understøtter ikke brug af AUTO_INCREMENT kolonner", "INSERT DELAYED kan ikke bruges med tabellen '%-.64s', fordi tabellen er låst med LOCK TABLES", @@ -208,7 +208,7 @@ character-set=latin1 "Denne handling kræver en kørende slave. Konfigurer en slave og brug kommandoen START SLAVE", "Denne server er ikke konfigureret som slave. Ret in config-filen eller brug kommandoen CHANGE MASTER TO", "Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Kunne ikke danne en slave-tråd. Check systemressourcerne", +"Kunne ikke danne en slave-tråd; check systemressourcerne", "Brugeren %-.64s har allerede mere end 'max_user_connections' aktive forbindelser", "Du må kun bruge konstantudtryk med SET", "Lock wait timeout overskredet", @@ -216,10 +216,10 @@ character-set=latin1 "Update lås kan ikke opnås under en READ UNCOMMITTED transaktion", "DROP DATABASE er ikke tilladt mens en tråd holder på globalt read lock", "CREATE DATABASE er ikke tilladt mens en tråd holder på globalt read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -227,26 +227,26 @@ character-set=latin1 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", -+ "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Variable '%-.64s' is a %s variable", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%ld) given to %s", @@ -254,23 +254,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -278,13 +278,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support, they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -299,8 +299,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Modtog fejl %d '%-.100s' fra %s", "Modtog temporary fejl %d '%-.100s' fra %s", diff --git a/sql/share/dutch/errmsg.txt b/sql/share/dutch/errmsg.txt index f49a6130299..14aa6ea7922 100644 --- a/sql/share/dutch/errmsg.txt +++ b/sql/share/dutch/errmsg.txt @@ -176,7 +176,7 @@ character-set=latin1 "Timeout bij het lezen van communicatiepakketten", "Fout bij het schrijven van communicatiepakketten", "Timeout bij het schrijven van communicatiepakketten", -"Resultaat string is langer dan max_allowed_packet", +"Resultaat string is langer dan 'max_allowed_packet'", "Het gebruikte tabel type ondersteunt geen BLOB/TEXT kolommen", "Het gebruikte tabel type ondersteunt geen AUTO_INCREMENT kolommen", "INSERT DELAYED kan niet worden gebruikt bij table '%-.64s', vanwege een 'lock met LOCK TABLES", @@ -253,8 +253,8 @@ character-set=latin1 "Kreeg fatale fout %d: '%-.128s' van master tijdens lezen van data uit binaire log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -262,23 +262,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -286,13 +286,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -307,8 +307,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/english/errmsg.txt b/sql/share/english/errmsg.txt index 59011c802b6..8e3af2afe2a 100644 --- a/sql/share/english/errmsg.txt +++ b/sql/share/english/errmsg.txt @@ -24,8 +24,8 @@ character-set=latin1 "Can't read dir of '%-.64s' (errno: %d)", "Can't change dir to '%-.64s' (errno: %d)", "Record has changed since last read in table '%-.64s'", -"Disk full (%s). Waiting for someone to free some space...", -"Can't write, duplicate key in table '%-.64s'", +"Disk full (%s); waiting for someone to free some space...", +"Can't write; duplicate key in table '%-.64s'", "Error on close of '%-.64s' (errno: %d)", "Error reading file '%-.64s' (errno: %d)", "Error on rename of '%-.64s' to '%-.64s' (errno: %d)", @@ -37,25 +37,25 @@ character-set=latin1 "Table storage engine for '%-.64s' doesn't have this option", "Can't find record in '%-.64s'", "Incorrect information in file: '%-.64s'", -"Incorrect key file for table: '%-.64s'; try to repair it", +"Incorrect key file for table '%-.64s'; try to repair it", "Old key file for table '%-.64s'; repair it!", "Table '%-.64s' is read only", -"Out of memory. Restart daemon and try again (needed %d bytes)", -"Out of sort memory. Increase daemon sort buffer size", -"Unexpected eof found when reading file '%-.64s' (errno: %d)", +"Out of memory; restart server and try again (needed %d bytes)", +"Out of sort memory; increase server sort buffer size", +"Unexpected EOF found when reading file '%-.64s' (errno: %d)", "Too many connections", -"Out of memory; Check if mysqld or some other process uses all available memory. If not you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", +"Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", "Can't get hostname for your address", "Bad handshake", -"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'", -"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)", -"No Database Selected", +"Access denied for user '%-.32s'@'%-.64s' to database '%-.64s'", +"Access denied for user '%-.32s'@'%-.64s' (using password: %s)", +"No database selected", "Unknown command", "Column '%-.64s' cannot be null", "Unknown database '%-.64s'", "Table '%-.64s' already exists", "Unknown table '%-.64s'", -"Column: '%-.64s' in %-.64s is ambiguous", +"Column '%-.64s' in %-.64s is ambiguous", "Server shutdown in progress", "Unknown column '%-.64s' in '%-.64s'", "'%-.64s' isn't in GROUP BY", @@ -73,28 +73,28 @@ character-set=latin1 "Invalid default value for '%-.64s'", "Multiple primary key defined", "Too many keys specified; max %d keys allowed", -"Too many key parts specified. Max %d parts allowed", +"Too many key parts specified; max %d parts allowed", "Specified key was too long; max key length is %d bytes", "Key column '%-.64s' doesn't exist in table", "BLOB column '%-.64s' can't be used in key specification with the used table type", -"Too big column length for column '%-.64s' (max = %d). Use BLOB instead", -"Incorrect table definition; There can only be one auto column and it must be defined as a key", +"Column length too big for column '%-.64s' (max = %d); use BLOB instead", +"Incorrect table definition; there can be only one auto column and it must be defined as a key", "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d\n", "%s: Normal shutdown\n", "%s: Got signal %d. Aborting!\n", -"%s: Shutdown Complete\n", +"%s: Shutdown complete\n", "%s: Forcing close of thread %ld user: '%-.32s'\n", "Can't create IP socket", -"Table '%-.64s' has no index like the one used in CREATE INDEX. Recreate the table", -"Field separator argument is not what is expected. Check the manual", -"You can't use fixed rowlength with BLOBs. Please use 'fields terminated by'", +"Table '%-.64s' has no index like the one used in CREATE INDEX; recreate the table", +"Field separator argument is not what is expected; check the manual", +"You can't use fixed rowlength with BLOBs; please use 'fields terminated by'", "The file '%-.64s' must be in the database directory or be readable by all", "File '%-.80s' already exists", "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld", "Records: %ld Duplicates: %ld", -"Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys", -"You can't delete all columns with ALTER TABLE. Use DROP TABLE instead", -"Can't DROP '%-.64s'. Check that column/key exists", +"Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys", +"You can't delete all columns with ALTER TABLE; use DROP TABLE instead", +"Can't DROP '%-.64s'; check that column/key exists", "Records: %ld Duplicates: %ld Warnings: %ld", "You can't specify target table '%-.64s' for update in FROM clause", "Unknown thread id: %lu", @@ -107,7 +107,7 @@ character-set=latin1 "BLOB/TEXT column '%-.64s' can't have a default value", "Incorrect database name '%-.100s'", "Incorrect table name '%-.100s'", -"The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok", +"The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay", "Unknown error", "Unknown procedure '%-.64s'", "Incorrect parameter count to procedure '%-.64s'", @@ -119,44 +119,44 @@ character-set=latin1 "A table must have at least 1 column", "The table '%-.64s' is full", "Unknown character set: '%-.64s'", -"Too many tables. MySQL can only use %d tables in a join", +"Too many tables; MySQL can only use %d tables in a join", "Too many columns", -"Too big row size. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some fields to TEXT or BLOBs", +"Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs", "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed", -"Cross dependency found in OUTER JOIN. Examine your ON conditions", +"Cross dependency found in OUTER JOIN; examine your ON conditions", "Column '%-.64s' is used with UNIQUE or INDEX but is not defined as NOT NULL", "Can't load function '%-.64s'", "Can't initialize function '%-.64s'; %-.80s", "No paths allowed for shared library", -"Function '%-.64s' already exist", +"Function '%-.64s' already exists", "Can't open shared library '%-.64s' (errno: %d %-.64s)", "Can't find function '%-.64s' in library'", "Function '%-.64s' is not defined", -"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'", +"Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", "Host '%-.64s' is not allowed to connect to this MySQL server", -"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords", +"You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", "You must have privileges to update tables in the mysql database to be able to change passwords for others", "Can't find any matching row in the user table", "Rows matched: %ld Changed: %ld Warnings: %ld", -"Can't create a new thread (errno %d). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug", +"Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", "Column count doesn't match value count at row %ld", "Can't reopen table: '%-.64s'", "Invalid use of NULL value", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used", +"%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", +"Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used", "The host or user argument to GRANT is too long", "Table '%-.64s.%-.64s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", "The used command is not allowed with this MySQL version", -"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use", +"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use", "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -165,7 +165,7 @@ character-set=latin1 "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES", @@ -174,7 +174,7 @@ character-set=latin1 "All tables in the MERGE table are not identically defined", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB/TEXT column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -200,23 +200,23 @@ character-set=latin1 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded; Try restarting transaction", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add or update a child row: a foreign key constraint fails", @@ -224,26 +224,26 @@ character-set=latin1 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -251,23 +251,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", "ZLIB: Not enough memory", "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", "ZLIB: Input data corrupted", -"%d line(s) was(were) cut by group_concat()", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -275,29 +275,29 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL. Otherwise you will get problems if you get an unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", -"Query cache failed to set size %lu, new query cache size is %lu", +"Query cache failed to set size %lu; new query cache size is %lu", "Column '%-.64s' cannot be part of FULLTEXT index", "Unknown key cache '%-.100s'", -"MySQL is started in --skip-name-resolve mode. You need to restart it without this switch for this grant to work", +"MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work", "Unknown table engine '%s'", -"'%s' is deprecated, use '%s' instead", +"'%s' is deprecated; use '%s' instead", "The target table %-.100s of the %s is not updatable", -"The '%s' feature was disabled; you need MySQL built with '%s' to have it working", +"The '%s' feature is disabled; you need MySQL built with '%s' to have it working", "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" -"Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Truncated incorrect %-.32s value: '%-.128s'" +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/estonian/errmsg.txt b/sql/share/estonian/errmsg.txt index 122d8f990ab..c6fc4987fb8 100644 --- a/sql/share/estonian/errmsg.txt +++ b/sql/share/estonian/errmsg.txt @@ -206,11 +206,11 @@ character-set=latin7 "Tabel '%-.64s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus", "Hoiatus: mõnesid transaktsioone mittetoetavaid tabeleid ei suudetud tagasi kerida", "Mitme lausendiga transaktsioon nõudis rohkem ruumi kui lubatud 'max_binlog_cache_size' muutujaga. Suurenda muutuja väärtust ja proovi uuesti", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "Kasutajal %-.64s on juba rohkem ühendusi kui lubatud 'max_user_connections' muutujaga", "Ainult konstantsed suurused on lubatud SET klauslis", "Kontrollaeg ületatud luku järel ootamisel; Proovi transaktsiooni otsast alata", @@ -235,20 +235,20 @@ character-set=latin7 "Transaktsioone toetavate ning mittetoetavate tabelite kooskasutamine ei ole lubatud", "Määrangut '%s' on lauses kasutatud topelt", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -256,23 +256,23 @@ character-set=latin7 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -280,13 +280,13 @@ character-set=latin7 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -301,8 +301,8 @@ character-set=latin7 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/french/errmsg.txt b/sql/share/french/errmsg.txt index 200edc44cd2..e6bda1b35a4 100644 --- a/sql/share/french/errmsg.txt +++ b/sql/share/french/errmsg.txt @@ -165,7 +165,7 @@ character-set=latin1 "Timeout en lecture des paquets reçus", "Erreur d'écriture des paquets envoyés", "Timeout d'écriture des paquets envoyés", -"La chaîne résultat est plus grande que max_allowed_packet", +"La chaîne résultat est plus grande que 'max_allowed_packet'", "Ce type de table ne supporte pas les colonnes BLOB/TEXT", "Ce type de table ne supporte pas les colonnes AUTO_INCREMENT", "INSERT DELAYED ne peut être utilisé avec la table '%-.64s', car elle est verrouée avec LOCK TABLES", @@ -224,26 +224,26 @@ character-set=latin1 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -251,23 +251,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -275,13 +275,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -296,8 +296,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/german/errmsg.txt b/sql/share/german/errmsg.txt index f33810c5496..e51ff9d1554 100644 --- a/sql/share/german/errmsg.txt +++ b/sql/share/german/errmsg.txt @@ -177,7 +177,7 @@ character-set=latin1 "Zeitüberschreitung beim Lesen eines Kommunikationspakets", "Fehler beim Schreiben eines Kommunikationspakets", "Zeitüberschreitung beim Schreiben eines Kommunikationspakets", -"Ergebnis ist länger als max_allowed_packet", +"Ergebnis ist länger als 'max_allowed_packet'", "Der verwendete Tabellentyp unterstützt keine BLOB- und TEXT-Spalten", "Der verwendete Tabellentyp unterstützt keine AUTO_INCREMENT-Spalten", "INSERT DELAYED kann nicht auf Tabelle '%-.64s' angewendet werden, da diese mit LOCK TABLES gesperrt ist", @@ -272,10 +272,10 @@ character-set=latin1 "Slave läuft bereits", "Slave wurde bereits angehalten", "Unkomprimierte Daten sind zu groß. Die maximale Größe beträgt %d", -"Z_MEM_ERROR: Für zlib steht nicht genug Speicher zur Verfügung", -"Z_BUF_ERROR: Im Ausgabepuffer ist nicht genug Platz für zlib vorhanden (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)", -"Z_DATA_ERROR: Eingabedaten für zlib beschädigt", -"%d Zeile(n) durch group_concat() abgeschnitten", +"ZLIB: Steht nicht genug Speicher zur Verfügung", +"ZLIB: Im Ausgabepuffer ist nicht genug Platz vorhanden (wahrscheinlich wurde die Länge der unkomprimierten Daten beschädigt)", +"ZLIB: Eingabedaten beschädigt", +"%d Zeile(n) durch GROUP_CONCAT() abgeschnitten", "Anzahl der Datensätze in Zeile %ld geringer als Anzahl der Spalten", "Anzahl der Datensätze in Zeile %ld größer als Anzahl der Spalten", "Daten abgeschnitten, NULL für NOT NULL-Spalte '%s' in Zeile %ld angegeben", @@ -308,8 +308,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/greek/errmsg.txt b/sql/share/greek/errmsg.txt index 2d742551b59..42381c4d198 100644 --- a/sql/share/greek/errmsg.txt +++ b/sql/share/greek/errmsg.txt @@ -138,16 +138,16 @@ character-set=greek "ÐñÝðåé íá Ý÷åôå äéêáßùìá äéüñèùóçò ðéíÜêùí (update) óôç âÜóç äåäïìÝíùí mysql ãéá íá ìðïñåßôå íá áëëÜîåôå ôá passwords Üëëùí ÷ñçóôþí", "Äåí åßíáé äõíáôÞ ç áíåýñåóç ôçò áíôßóôïé÷çò åããñáöÞò óôïí ðßíáêá ôùí ÷ñçóôþí", "Rows matched: %ld Changed: %ld Warnings: %ld", -"Can't create a new thread (errno %d). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug", +"Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", "Column count doesn't match value count at row %ld", "Can't reopen table: '%-.64s'", "Invalid use of NULL value", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privileges can be used.", +"%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", +"Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%-.64s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", @@ -156,7 +156,7 @@ character-set=greek "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-32s' (%-.64s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -165,7 +165,7 @@ character-set=greek "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -174,7 +174,7 @@ character-set=greek "All tables in the MERGE table are not identically defined", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -200,23 +200,23 @@ character-set=greek "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -224,26 +224,26 @@ character-set=greek "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -251,23 +251,23 @@ character-set=greek "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -275,13 +275,13 @@ character-set=greek "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -296,8 +296,8 @@ character-set=greek "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/hungarian/errmsg.txt b/sql/share/hungarian/errmsg.txt index 0b1a6fe2777..e0f0b3aa1ba 100644 --- a/sql/share/hungarian/errmsg.txt +++ b/sql/share/hungarian/errmsg.txt @@ -109,7 +109,7 @@ character-set=latin2 "A(z) '%-.64s' blob objektumnak nem lehet alapertelmezett erteke", "Hibas adatbazisnev: '%-.100s'", "Hibas tablanev: '%-.100s'", -"A SELECT tul sok rekordot fog megvizsgalni es nagyon sokaig fog tartani. Ellenorizze a WHERE-t es hasznalja a SET SQL_BIG_SELECTS=1 beallitast, ha a SELECT ok", +"A SELECT tul sok rekordot fog megvizsgalni es nagyon sokaig fog tartani. Ellenorizze a WHERE-t es hasznalja a SET SQL_BIG_SELECTS=1 beallitast, ha a SELECT okay", "Ismeretlen hiba", "Ismeretlen eljaras: '%-.64s'", "Rossz parameter a(z) '%-.64s'eljaras szamitasanal", @@ -167,7 +167,7 @@ character-set=latin2 "Idotullepes a kommunikacios adatcsomagok olvasasa soran", "Hiba a kommunikacios csomagok irasa soran", "Idotullepes a kommunikacios csomagok irasa soran", -"Ez eredmeny sztring nagyobb, mint a lehetseges maximum: max_allowed_packet", +"Ez eredmeny sztring nagyobb, mint a lehetseges maximum: 'max_allowed_packet'", "A hasznalt tabla tipus nem tamogatja a BLOB/TEXT mezoket", "A hasznalt tabla tipus nem tamogatja az AUTO_INCREMENT tipusu mezoket", "Az INSERT DELAYED nem hasznalhato a '%-.64s' tablahoz, mert a tabla zarolt (LOCK TABLES)", @@ -202,23 +202,23 @@ character-set=latin2 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -226,26 +226,26 @@ character-set=latin2 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -253,23 +253,23 @@ character-set=latin2 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -277,13 +277,13 @@ character-set=latin2 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -298,8 +298,8 @@ character-set=latin2 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/italian/errmsg.txt b/sql/share/italian/errmsg.txt index 0f79ec8c953..36204da1120 100644 --- a/sql/share/italian/errmsg.txt +++ b/sql/share/italian/errmsg.txt @@ -165,7 +165,7 @@ character-set=latin1 "Rilevato un timeout ricevendo i pacchetti di comunicazione", "Rilevato un errore inviando i pacchetti di comunicazione", "Rilevato un timeout inviando i pacchetti di comunicazione", -"La stringa di risposta e` piu` lunga di max_allowed_packet", +"La stringa di risposta e` piu` lunga di 'max_allowed_packet'", "Il tipo di tabella usata non supporta colonne di tipo BLOB/TEXT", "Il tipo di tabella usata non supporta colonne di tipo AUTO_INCREMENT", "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.64s', perche` soggetta a lock da 'LOCK TABLES'", @@ -242,8 +242,8 @@ character-set=latin1 "Errore fatale %d: '%-.128s' dal master leggendo i dati dal log binario", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -251,23 +251,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -275,13 +275,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -296,8 +296,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/japanese/errmsg.txt b/sql/share/japanese/errmsg.txt index 375efc6dea0..dbf05026da0 100644 --- a/sql/share/japanese/errmsg.txt +++ b/sql/share/japanese/errmsg.txt @@ -50,7 +50,7 @@ character-set=ujis "¤½¤Î address ¤Î hostname ¤¬°ú¤±¤Þ¤»¤ó.", "Bad handshake", "¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤Î '%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¤òµñÈݤ·¤Þ¤¹", -"¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤òµñÈݤ·¤Þ¤¹.(Using password: %s)", +"¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤òµñÈݤ·¤Þ¤¹.uUsing password: %s)", "¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ÁªÂò¤µ¤ì¤Æ¤¤¤Þ¤»¤ó.", "¤½¤Î¥³¥Þ¥ó¥É¤Ï²¿¡©", "Column '%-.64s' ¤Ï null ¤Ë¤Ï¤Ç¤­¤Ê¤¤¤Î¤Ç¤¹", @@ -75,12 +75,12 @@ character-set=ujis "Invalid default value for '%-.64s'", "Ê£¿ô¤Î primary key ¤¬ÄêµÁ¤µ¤ì¤Þ¤·¤¿", "key ¤Î»ØÄ꤬¿¤¹¤®¤Þ¤¹. key ¤ÏºÇÂç %d ¤Þ¤Ç¤Ç¤¹", -"Too many key parts specified. Max %d parts allowed", +"Too many key parts specified; max %d parts allowed", "key ¤¬Ä¹¤¹¤®¤Þ¤¹. key ¤ÎŤµ¤ÏºÇÂç %d ¤Ç¤¹", "Key column '%-.64s' ¤¬¥Æ¡¼¥Ö¥ë¤Ë¤¢¤ê¤Þ¤»¤ó.", "BLOB column '%-.64s' can't be used in key specification with the used table type", "column '%-.64s' ¤Ï,³ÎÊݤ¹¤ë column ¤ÎÂ礭¤µ¤¬Â¿¤¹¤®¤Þ¤¹. (ºÇÂç %d ¤Þ¤Ç). BLOB ¤ò¤«¤ï¤ê¤Ë»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤.", -"¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ¤¬°ã¤¤¤Þ¤¹; There can only be one auto column and it must be defined as a key", +"¥Æ¡¼¥Ö¥ë¤ÎÄêµÁ¤¬°ã¤¤¤Þ¤¹; there can be only one auto column and it must be defined as a key", "%s: ½àÈ÷´°Î»\n", "%s: Normal shutdown\n", "%s: Got signal %d. ÃæÃÇ!\n", @@ -88,15 +88,15 @@ character-set=ujis "%s: ¥¹¥ì¥Ã¥É %ld ¶¯À©½ªÎ» user: '%-.64s'\n", "IP socket ¤¬ºî¤ì¤Þ¤»¤ó", "Table '%-.64s' ¤Ï¤½¤Î¤è¤¦¤Ê index ¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó(CREATE INDEX ¼Â¹Ô»þ¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó). ¥Æ¡¼¥Ö¥ë¤òºî¤êľ¤·¤Æ¤¯¤À¤µ¤¤", -"Field separator argument is not what is expected. Check the manual", -"You can't use fixed rowlength with BLOBs. Please use 'fields terminated by'.", +"Field separator argument is not what is expected; check the manual", +"You can't use fixed rowlength with BLOBs; please use 'fields terminated by'.", "¥Õ¥¡¥¤¥ë '%-.64s' ¤Ï databse ¤Î directory ¤Ë¤¢¤ë¤«Á´¤Æ¤Î¥æ¡¼¥¶¡¼¤¬ÆÉ¤á¤ë¤è¤¦¤Ëµö²Ä¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó.", "File '%-.64s' ¤Ï´û¤Ë¸ºß¤·¤Þ¤¹", "¥ì¥³¡¼¥É¿ô: %ld ºï½ü: %ld Skipped: %ld Warnings: %ld", "¥ì¥³¡¼¥É¿ô: %ld ½ÅÊ£: %ld", -"Incorrect sub part key. The used key part isn't a string or the used length is longer than the key part", +"Incorrect sub part key; the used key part isn't a string or the used length is longer than the key part", "ALTER TABLE ¤ÇÁ´¤Æ¤Î column ¤Ïºï½ü¤Ç¤­¤Þ¤»¤ó. DROP TABLE ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤", -"'%-.64s' ¤òÇË´þ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿. Check that column/key exists", +"'%-.64s' ¤òÇË´þ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿; check that column/key exists", "¥ì¥³¡¼¥É¿ô: %ld ½ÅÊ£¿ô: %ld Warnings: %ld", "You can't specify target table '%-.64s' for update in FROM clause", "thread id: %lu ¤Ï¤¢¤ê¤Þ¤»¤ó", @@ -109,7 +109,7 @@ character-set=ujis "BLOB column '%-.64s' can't have a default value", "»ØÄꤷ¤¿ database ̾ '%-.100s' ¤¬´Ö°ã¤Ã¤Æ¤¤¤Þ¤¹", "»ØÄꤷ¤¿ table ̾ '%-.100s' ¤Ï¤Þ¤Á¤¬¤Ã¤Æ¤¤¤Þ¤¹", -"The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok", +"The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay", "Unknown error", "Unknown procedure '%-.64s'", "Incorrect parameter count to procedure '%-.64s'", @@ -121,11 +121,11 @@ character-set=ujis "¥Æ¡¼¥Ö¥ë¤ÏºÇÄã 1 ¸Ä¤Î column ¤¬É¬ÍפǤ¹", "table '%-.64s' ¤Ï¤¤¤Ã¤Ñ¤¤¤Ç¤¹", "character set '%-.64s' ¤Ï¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤»¤ó", -"¥Æ¡¼¥Ö¥ë¤¬Â¿¤¹¤®¤Þ¤¹. MySQL can only use %d tables in a join", +"¥Æ¡¼¥Ö¥ë¤¬Â¿¤¹¤®¤Þ¤¹; MySQL can only use %d tables in a join", "column ¤¬Â¿¤¹¤®¤Þ¤¹", "row size ¤¬Â礭¤¹¤®¤Þ¤¹. BLOB ¤ò´Þ¤Þ¤Ê¤¤¾ì¹ç¤Î row size ¤ÎºÇÂç¤Ï %d ¤Ç¤¹. ¤¤¤¯¤Ä¤«¤Î field ¤ò BLOB ¤ËÊѤ¨¤Æ¤¯¤À¤µ¤¤.", "Thread stack overrun: Used: %ld of a %ld stack. ¥¹¥¿¥Ã¥¯Îΰè¤ò¿¤¯¤È¤ê¤¿¤¤¾ì¹ç¡¢'mysqld -O thread_stack=#' ¤È»ØÄꤷ¤Æ¤¯¤À¤µ¤¤", -"Cross dependency found in OUTER JOIN. Examine your ON conditions", +"Cross dependency found in OUTER JOIN; examine your ON conditions", "Column '%-.64s' ¤¬ UNIQUE ¤« INDEX ¤Ç»ÈÍѤµ¤ì¤Þ¤·¤¿. ¤³¤Î¥«¥é¥à¤Ï NOT NULL ¤ÈÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó.", "function '%-.64s' ¤ò ¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó", "function '%-.64s' ¤ò½é´ü²½¤Ç¤­¤Þ¤»¤ó; %-.80s", @@ -145,11 +145,11 @@ character-set=ujis "Can't reopen table: '%-.64s'", "NULL ÃͤλÈÍÑÊýË¡¤¬ÉÔŬÀڤǤ¹", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "¥æ¡¼¥¶¡¼ '%-.32s' (¥Û¥¹¥È '%-.64s' ¤Î¥æ¡¼¥¶¡¼) ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó", "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ,¥Æ¡¼¥Ö¥ë '%-.64s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó", "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s'\n ¥«¥é¥à '%-.64s' ¥Æ¡¼¥Ö¥ë '%-.64s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó", -"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", +"Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", @@ -158,7 +158,7 @@ character-set=ujis "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -167,7 +167,7 @@ character-set=ujis "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -176,7 +176,7 @@ character-set=ujis "All tables in the MERGE table are not defined identically", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -202,23 +202,23 @@ character-set=ujis "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -226,26 +226,26 @@ character-set=ujis "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -253,23 +253,23 @@ character-set=ujis "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -277,13 +277,13 @@ character-set=ujis "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -299,7 +299,7 @@ character-set=ujis "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" "Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got NDB error %d '%-.100s'", "Got temporary NDB error %d '%-.100s'", diff --git a/sql/share/korean/errmsg.txt b/sql/share/korean/errmsg.txt index 7bbed0e9b0c..4f66ac1c1f3 100644 --- a/sql/share/korean/errmsg.txt +++ b/sql/share/korean/errmsg.txt @@ -48,7 +48,7 @@ character-set=euckr "´ç½ÅÀÇ ÄÄÇ»ÅÍÀÇ È£½ºÆ®À̸§À» ¾òÀ» ¼ö ¾øÀ¾´Ï´Ù.", "Bad handshake", "'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â '%-.64s' µ¥ÀÌŸº£À̽º¿¡ Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù.", -"'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (Using password: %s)", +"'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (using password: %s)", "¼±ÅÃµÈ µ¥ÀÌŸº£À̽º°¡ ¾ø½À´Ï´Ù.", "¸í·É¾î°¡ ¹ºÁö ¸ð¸£°Ú¾î¿ä...", "Ä®·³ '%-.64s'´Â ³Î(Null)ÀÌ µÇ¸é ¾ÈµË´Ï´Ù. ", @@ -123,7 +123,7 @@ character-set=euckr "Ä®·³ÀÌ ³Ê¹« ¸¹½À´Ï´Ù.", "³Ê¹« Å« row »çÀÌÁîÀÔ´Ï´Ù. BLOB¸¦ °è»êÇÏÁö ¾Ê°í ÃÖ´ë row »çÀÌÁî´Â %dÀÔ´Ï´Ù. ¾ó¸¶°£ÀÇ ÇʵåµéÀ» BLOB·Î ¹Ù²Ù¼Å¾ß °Ú±º¿ä..", "¾²·¹µå ½ºÅÃÀÌ ³ÑÃÆ½À´Ï´Ù. »ç¿ë: %ld°³ ½ºÅÃ: %ld°³. ¸¸¾à ÇÊ¿ä½Ã ´õÅ« ½ºÅÃÀ» ¿øÇÒ¶§¿¡´Â 'mysqld -O thread_stack=#' ¸¦ Á¤ÀÇÇϼ¼¿ä", -"Cross dependency found in OUTER JOIN. Examine your ON conditions", +"Cross dependency found in OUTER JOIN; examine your ON conditions", "'%-.64s' Ä®·³ÀÌ UNIQUE³ª INDEX¸¦ »ç¿ëÇÏ¿´Áö¸¸ NOT NULLÀÌ Á¤ÀǵÇÁö ¾Ê¾Ò±º¿ä...", "'%-.64s' ÇÔ¼ö¸¦ ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù.", "'%-.64s' ÇÔ¼ö¸¦ ÃʱâÈ­ ÇÏÁö ¸øÇß½À´Ï´Ù.; %-.80s", @@ -143,7 +143,7 @@ character-set=euckr "Å×À̺íÀ» ´Ù½Ã ¿­¼ö ¾ø±º¿ä: '%-.64s", "NULL °ªÀ» À߸ø »ç¿ëÇϼ̱º¿ä...", "regexp¿¡¼­ '%-.64s'°¡ ³µ½À´Ï´Ù.", -"Mixing of GROUP Ä®·³s (MIN(),MAX(),COUNT()...) with no GROUP Ä®·³s is illegal if there is no GROUP BY clause", +"Mixing of GROUP Ä®·³s (MIN(),MAX(),COUNT(),...) with no GROUP Ä®·³s is illegal if there is no GROUP BY clause", "»ç¿ëÀÚ '%-.32s' (È£½ºÆ® '%-.64s')¸¦ À§ÇÏ¿© Á¤ÀÇµÈ ±×·± ½ÂÀÎÀº ¾ø½À´Ï´Ù.", "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.32s'@'%-.64s' for Å×À̺í '%-.64s'", "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.32s'@'%-.64s' for Ä®·³ '%-.64s' in Å×À̺í '%-.64s'", @@ -165,7 +165,7 @@ character-set=euckr "Åë½Å ÆÐŶÀ» Àд Áß timeoutÀÌ ¹ß»ýÇÏ¿´½À´Ï´Ù.", "Åë½Å ÆÐŶÀ» ±â·ÏÇÏ´Â Áß ¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.", "Åë½Å ÆÐÆÂÀ» ±â·ÏÇÏ´Â Áß timeoutÀÌ ¹ß»ýÇÏ¿´½À´Ï´Ù.", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -174,7 +174,7 @@ character-set=euckr "All tables in the MERGE table are not defined identically", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -200,23 +200,23 @@ character-set=euckr "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -224,26 +224,26 @@ character-set=euckr "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -251,23 +251,23 @@ character-set=euckr "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -275,13 +275,13 @@ character-set=euckr "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -296,8 +296,8 @@ character-set=euckr "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/norwegian-ny/errmsg.txt b/sql/share/norwegian-ny/errmsg.txt index 8df547d38fe..64385ce17ab 100644 --- a/sql/share/norwegian-ny/errmsg.txt +++ b/sql/share/norwegian-ny/errmsg.txt @@ -121,35 +121,35 @@ character-set=latin1 "A table must have at least 1 column", "The table '%-.64s' is full", "Unknown character set: '%-.64s'", -"Too many tables. MySQL can only use %d tables in a join", -"Too many fields", -"Too big row size. The maximum row size, not counting blobs, is %d. You have to change some fields to blobs", +"Too many tables; MySQL can only use %d tables in a join", +"Too many columns", +"Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs", "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed", -"Cross dependency found in OUTER JOIN. Examine your ON conditions", +"Cross dependency found in OUTER JOIN; examine your ON conditions", "Column '%-.32s' is used with UNIQUE or INDEX but is not defined as NOT NULL", "Can't load function '%-.64s'", "Can't initialize function '%-.64s'; %-.80s", "No paths allowed for shared library", -"Function '%-.64s' already exist", +"Function '%-.64s' already exists", "Can't open shared library '%-.64s' (errno: %d %s)", "Can't find function '%-.64s' in library'", "Function '%-.64s' is not defined", -"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'", +"Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", "Host '%-.64s' is not allowed to connect to this MySQL server", -"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords", +"You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", "You must have privileges to update tables in the mysql database to be able to change passwords for others", "Can't find any matching row in the user table", "Rows matched: %ld Changed: %ld Warnings: %ld", -"Can't create a new thread (errno %d). If you are not out of available memory you can consult the manual for any possible OS dependent bug", +"Can't create a new thread (errno %d); if you are not out of available memory you can consult the manual for any possible OS dependent bug", "Column count doesn't match value count at row %ld", "Can't reopen table: '%-.64s", "Invalid use of NULL value", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", +"%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", +"Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", @@ -158,7 +158,7 @@ character-set=latin1 "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -167,7 +167,7 @@ character-set=latin1 "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -176,7 +176,7 @@ character-set=latin1 "All tables in the MERGE table are not defined identically", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -202,23 +202,23 @@ character-set=latin1 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -226,26 +226,26 @@ character-set=latin1 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -253,23 +253,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -277,13 +277,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -298,8 +298,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Mottok feil %d '%-.100s' fra %s", "Mottok temporary feil %d '%-.100s' fra %s", diff --git a/sql/share/norwegian/errmsg.txt b/sql/share/norwegian/errmsg.txt index 262e67f4a6e..c841c0e6458 100644 --- a/sql/share/norwegian/errmsg.txt +++ b/sql/share/norwegian/errmsg.txt @@ -121,35 +121,35 @@ character-set=latin1 "A table must have at least 1 column", "The table '%-.64s' is full", "Unknown character set: '%-.64s'", -"Too many tables. MySQL can only use %d tables in a join", -"Too many fields", -"Too big row size. The maximum row size, not counting blobs, is %d. You have to change some fields to blobs", +"Too many tables; MySQL can only use %d tables in a join", +"Too many columns", +"Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs", "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed", -"Cross dependency found in OUTER JOIN. Examine your ON conditions", +"Cross dependency found in OUTER JOIN; examine your ON conditions", "Column '%-.32s' is used with UNIQUE or INDEX but is not defined as NOT NULL", "Can't load function '%-.64s'", "Can't initialize function '%-.64s'; %-.80s", "No paths allowed for shared library", -"Function '%-.64s' already exist", +"Function '%-.64s' already exists", "Can't open shared library '%-.64s' (errno: %d %s)", "Can't find function '%-.64s' in library'", "Function '%-.64s' is not defined", -"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'", +"Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", "Host '%-.64s' is not allowed to connect to this MySQL server", -"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords", +"You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", "You must have privileges to update tables in the mysql database to be able to change passwords for others", "Can't find any matching row in the user table", "Rows matched: %ld Changed: %ld Warnings: %ld", -"Can't create a new thread (errno %d). If you are not out of available memory you can consult the manual for any possible OS dependent bug", +"Can't create a new thread (errno %d); if you are not out of available memory you can consult the manual for any possible OS dependent bug", "Column count doesn't match value count at row %ld", "Can't reopen table: '%-.64s", "Invalid use of NULL value", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", +"%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", +"Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", @@ -158,7 +158,7 @@ character-set=latin1 "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -167,7 +167,7 @@ character-set=latin1 "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -176,7 +176,7 @@ character-set=latin1 "All tables in the MERGE table are not defined identically", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -202,23 +202,23 @@ character-set=latin1 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -226,26 +226,26 @@ character-set=latin1 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -253,23 +253,23 @@ character-set=latin1 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -277,13 +277,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -298,8 +298,8 @@ character-set=latin1 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Mottok feil %d '%-.100s' fa %s", "Mottok temporary feil %d '%-.100s' fra %s", diff --git a/sql/share/polish/errmsg.txt b/sql/share/polish/errmsg.txt index 4c11ea0e73b..da2af606f97 100644 --- a/sql/share/polish/errmsg.txt +++ b/sql/share/polish/errmsg.txt @@ -51,8 +51,8 @@ character-set=latin2 "Zbyt ma³o miejsca/pamiêci dla w?tku", "Nie mo¿na otrzymaæ nazwy hosta dla twojego adresu", "Z³y uchwyt(handshake)", -"Access denied for user: '%-.32s'@'%-.64s' to database '%-.64s'", -"Access denied for user: '%-.32s'@'%-.64s' (Using password: %s)", +"Access denied for user '%-.32s'@'%-.64s' to database '%-.64s'", +"Access denied for user '%-.32s'@'%-.64s' (using password: %s)", "Nie wybrano ¿adnej bazy danych", "Nieznana komenda", "Kolumna '%-.64s' nie mo¿e byæ null", @@ -114,8 +114,8 @@ character-set=latin2 "Operacja SELECT bêdzie dotyczy³a zbyt wielu rekordów i prawdopodobnie zajmie bardzo du¿o czasu. Sprawd¥ warunek WHERE i u¿yj SQL_OPTION BIG_SELECTS=1 je?li operacja SELECT jest poprawna", "Unknown error", "Unkown procedure %s", -"Wrong parameter count to procedure %s", -"Wrong parameters to procedure %s", +"Incorrect parameter count to procedure %s", +"Incorrect parameters to procedure %s", "Unknown table '%-.64s' in %s", "Field '%-.64s' specified twice", "Invalid use of group function", @@ -123,35 +123,35 @@ character-set=latin2 "A table must have at least 1 column", "The table '%-.64s' is full", "Unknown character set: '%-.64s'", -"Too many tables. MySQL can only use %d tables in a join", -"Too many fields", -"Too big row size. The maximum row size, not counting blobs, is %d. You have to change some fields to blobs", +"Too many tables; MySQL can only use %d tables in a join", +"Too many columns", +"Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs", "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed", -"Cross dependency found in OUTER JOIN. Examine your ON conditions", +"Cross dependency found in OUTER JOIN; examine your ON conditions", "Column '%-.32s' is used with UNIQUE or INDEX but is not defined as NOT NULL", "Can't load function '%-.64s'", "Can't initialize function '%-.64s'; %-.80s", "No paths allowed for shared library", -"Function '%-.64s' already exist", +"Function '%-.64s' already exists", "Can't open shared library '%-.64s' (errno: %d %s)", "Can't find function '%-.64s' in library'", "Function '%-.64s' is not defined", -"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'", +"Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", "Host '%-.64s' is not allowed to connect to this MySQL server", -"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords", +"You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", "You must have privileges to update tables in the mysql database to be able to change passwords for others", "Can't find any matching row in the user table", "Rows matched: %ld Changed: %ld Warnings: %ld", -"Can't create a new thread (errno %d). If you are not out of available memory you can consult the manual for any possible OS dependent bug", +"Can't create a new thread (errno %d); if you are not out of available memory you can consult the manual for any possible OS dependent bug", "Column count doesn't match value count at row %ld", "Can't reopen table: '%-.64s", "Invalid use of NULL value", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", +"%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", +"Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", @@ -160,7 +160,7 @@ character-set=latin2 "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -169,7 +169,7 @@ character-set=latin2 "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -178,7 +178,7 @@ character-set=latin2 "All tables in the MERGE table are not defined identically", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -204,23 +204,23 @@ character-set=latin2 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -228,26 +228,26 @@ character-set=latin2 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -255,23 +255,23 @@ character-set=latin2 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -279,13 +279,13 @@ character-set=latin2 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -300,8 +300,8 @@ character-set=latin2 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/portuguese/errmsg.txt b/sql/share/portuguese/errmsg.txt index 2175bee9474..a999b765c91 100644 --- a/sql/share/portuguese/errmsg.txt +++ b/sql/share/portuguese/errmsg.txt @@ -78,7 +78,7 @@ character-set=latin1 "Chave especificada longa demais. O comprimento de chave máximo permitido é %d", "Coluna chave '%-.64s' não existe na tabela", "Coluna BLOB '%-.64s' não pode ser utilizada na especificação de chave para o tipo de tabela usado", -"Comprimento da coluna '%-.64s' grande demais (max = %d). Use BLOB em seu lugar", +"Comprimento da coluna '%-.64s' grande demais (max = %d); use BLOB em seu lugar", "Definição incorreta de tabela. Somente é permitido um único campo auto-incrementado e ele tem que ser definido como chave", "%s: Pronto para conexões\n", "%s: 'Shutdown' normal\n", @@ -94,7 +94,7 @@ character-set=latin1 "Registros: %ld - Deletados: %ld - Ignorados: %ld - Avisos: %ld", "Registros: %ld - Duplicados: %ld", "Sub parte da chave incorreta. A parte da chave usada não é uma 'string' ou o comprimento usado é maior que parte da chave ou o manipulador de tabelas não suporta sub chaves únicas", -"Você não pode deletar todas as colunas com ALTER TABLE. Use DROP TABLE em seu lugar", +"Você não pode deletar todas as colunas com ALTER TABLE; use DROP TABLE em seu lugar", "Não se pode fazer DROP '%-.64s'. Confira se esta coluna/chave existe", "Registros: %ld - Duplicados: %ld - Avisos: %ld", "You can't specify target table '%-.64s' for update in FROM clause", @@ -123,8 +123,8 @@ character-set=latin1 "Tabelas demais. O MySQL pode usar somente %d tabelas em uma junção (JOIN)", "Colunas demais", "Tamanho de linha grande demais. O máximo tamanho de linha, não contando BLOBs, é %d. Você tem que mudar alguns campos para BLOBs", -"Estouro da pilha do 'thread'. Usados %ld de uma pilha de %ld . Use 'mysqld -O thread_stack=#' para especificar uma pilha maior, se necessário", -"Dependência cruzada encontrada em junção externa (OUTER JOIN). Examine as condições utilizadas nas cláusulas 'ON'", +"Estouro da pilha do 'thread'. Usados %ld de uma pilha de %ld. Use 'mysqld -O thread_stack=#' para especificar uma pilha maior, se necessário", +"Dependência cruzada encontrada em junção externa (OUTER JOIN); examine as condições utilizadas nas cláusulas 'ON'", "Coluna '%-.64s' é usada com única (UNIQUE) ou índice (INDEX), mas não está definida como não-nula (NOT NULL)", "Não pode carregar a função '%-.64s'", "Não pode inicializar a função '%-.64s' - '%-.80s'", @@ -254,17 +254,17 @@ character-set=latin1 "Referência '%-.64s' não suportada (%s)", "Cada tabela derivada deve ter seu próprio alias", "Select %u foi reduzido durante otimização", -"Tabela '%-.64s' de um dos SELECT's não pode ser usada em %-.32s", +"Tabela '%-.64s' de um dos SELECTs não pode ser usada em %-.32s", "Cliente não suporta o protocolo de autenticação exigido pelo servidor; considere a atualização do cliente MySQL", "Todas as partes de uma SPATIAL KEY devem ser NOT NULL", "COLLATION '%s' não é válida para CHARACTER SET '%s'", "O slave já está rodando", "O slave já está parado", "Tamanho muito grande dos dados des comprimidos. O máximo tamanho é %d. (provavelmente, o comprimento dos dados descomprimidos está corrupto)", -"Z_MEM_ERROR: Não suficiente memória disponível para zlib", -"Z_BUF_ERROR: Não suficiente espaço no buffer emissor para zlib (provavelmente, o comprimento dos dados descomprimidos está corrupto)", -"Z_DATA_ERROR: Dados de entrada está corrupto para zlib", -"%d linha(s) foi(foram) cortada(s) por group_concat()", +"ZLIB: Não suficiente memória disponível", +"ZLIB: Não suficiente espaço no buffer emissor (provavelmente, o comprimento dos dados descomprimidos está corrupto)", +"ZLIB: Dados de entrada está corrupto", +"%d linha(s) foram cortada(s) por GROUP_CONCAT()", "Conta de registro é menor que a conta de coluna na linha %ld", "Conta de registro é maior que a conta de coluna na linha %ld", "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld", diff --git a/sql/share/romanian/errmsg.txt b/sql/share/romanian/errmsg.txt index 78539c22d99..ca82b19215a 100644 --- a/sql/share/romanian/errmsg.txt +++ b/sql/share/romanian/errmsg.txt @@ -111,7 +111,7 @@ character-set=latin2 "Coloana BLOB '%-.64s' nu poate avea o valoare default", "Numele bazei de date este incorect '%-.100s'", "Numele tabelei este incorect '%-.100s'", -"SELECT-ul ar examina prea multe cimpuri si probabil ar lua prea mult timp. Verifica clauza WHERE si foloseste SET SQL_BIG_SELECTS=1 daca SELECT-ul e ok", +"SELECT-ul ar examina prea multe cimpuri si probabil ar lua prea mult timp; verifica clauza WHERE si foloseste SET SQL_BIG_SELECTS=1 daca SELECT-ul e okay", "Eroare unknown", "Procedura unknown '%-.64s'", "Procedura '%-.64s' are un numar incorect de parametri", @@ -169,7 +169,7 @@ character-set=latin2 "Timeout obtinut citind pachetele de comunicatie (communication packets)", "Eroare in scrierea pachetelor de comunicatie (communication packets)", "Timeout obtinut scriind pachetele de comunicatie (communication packets)", -"Sirul rezultat este mai lung decit max_allowed_packet", +"Sirul rezultat este mai lung decit 'max_allowed_packet'", "Tipul de tabela folosit nu suporta coloane de tip BLOB/TEXT", "Tipul de tabela folosit nu suporta coloane de tip AUTO_INCREMENT", "INSERT DELAYED nu poate fi folosit cu tabela '%-.64s', deoarece este locked folosing LOCK TABLES", @@ -204,23 +204,23 @@ character-set=latin2 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", -"This operation cannot be performed with a running slave, run STOP SLAVE first", -"This operation requires a running slave, configure slave and do START SLAVE", -"The server is not configured as slave, fix in config file or with CHANGE MASTER TO", -"Could not initialize master info structure, more error messages can be found in the MySQL error log", -"Could not create slave thread, check system resources", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", +"This operation cannot be performed with a running slave; run STOP SLAVE first", +"This operation requires a running slave; configure slave and do START SLAVE", +"The server is not configured as slave; fix in config file or with CHANGE MASTER TO", +"Could not initialize master info structure; more error messages can be found in the MySQL error log", +"Could not create slave thread; check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -228,26 +228,26 @@ character-set=latin2 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -255,23 +255,23 @@ character-set=latin2 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -279,13 +279,13 @@ character-set=latin2 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -300,8 +300,8 @@ character-set=latin2 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/russian/errmsg.txt b/sql/share/russian/errmsg.txt index 7d7a1fd4a20..32da15409d0 100644 --- a/sql/share/russian/errmsg.txt +++ b/sql/share/russian/errmsg.txt @@ -244,8 +244,8 @@ character-set=koi8r "ðÏÌÕÞÅÎÁ ÎÅÉÓÐÒÁ×ÉÍÁÑ ÏÛÉÂËÁ %d: '%-.128s' ÏÔ ÇÏÌÏ×ÎÏÇÏ ÓÅÒ×ÅÒÁ × ÐÒÏÃÅÓÓÅ ×ÙÂÏÒËÉ ÄÁÎÎÙÈ ÉÚ Ä×ÏÉÞÎÏÇÏ ÖÕÒÎÁÌÁ", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "ïÐÅÒÁÎÄ ÄÏÌÖÅÎ ÓÏÄÅÒÖÁÔØ %d ËÏÌÏÎÏË", "ðÏÄÚÁÐÒÏÓ ×ÏÚ×ÒÁÝÁÅÔ ÂÏÌÅÅ ÏÄÎÏÊ ÚÁÐÉÓÉ", "Unknown prepared statement handler (%.*s) given to %s", @@ -253,23 +253,23 @@ character-set=koi8r "ãÉËÌÉÞÅÓËÁÑ ÓÓÙÌËÁ ÎÁ ÐÏÄÚÁÐÒÏÓ", "ðÒÅÏÂÒÁÚÏ×ÁÎÉÅ ÐÏÌÑ '%s' ÉÚ %s × %s", "óÓÙÌËÁ '%-.64s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ (%s)", -"Every derived table must have it's own alias", +"Every derived table must have its own alias", "Select %u ÂÙÌ ÕÐÒÁÚÄÎÅÎ × ÐÒÏÃÅÓÓÅ ÏÐÔÉÍÉÚÁÃÉÉ", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -277,13 +277,13 @@ character-set=koi8r "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "óÅÒ×ÅÒ ÚÁÐÕÝÅÎ × ÒÅÖÉÍÅ --secure-auth (ÂÅÚÏÐÁÓÎÏÊ Á×ÔÏÒÉÚÁÃÉÉ), ÎÏ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%s'@'%s' ÐÁÒÏÌØ ÓÏÈÒÁÎ£Î × ÓÔÁÒÏÍ ÆÏÒÍÁÔÅ; ÎÅÏÂÈÏÄÉÍÏ ÏÂÎÏ×ÉÔØ ÆÏÒÍÁÔ ÐÁÒÏÌÑ", "ðÏÌÅ ÉÌÉ ÓÓÙÌËÁ '%-.64s%s%-.64s%s%-.64s' ÉÚ SELECTÁ #%d ÂÙÌÁ ÎÁÊÄÅÎÁ × SELECTÅ #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -298,8 +298,8 @@ character-set=koi8r "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/serbian/errmsg.txt b/sql/share/serbian/errmsg.txt index 051417b6c3d..c143e65461b 100644 --- a/sql/share/serbian/errmsg.txt +++ b/sql/share/serbian/errmsg.txt @@ -236,20 +236,20 @@ character-set=cp1250 "Mešanje tabela koje podržavaju transakcije i onih koje ne podržavaju transakcije je iskljuèeno", "Opcija '%s' je upotrebljena dva puta u istom iskazu", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%ld) given to %s", @@ -257,23 +257,23 @@ character-set=cp1250 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", "Row %ld was truncated; it contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -281,13 +281,13 @@ character-set=cp1250 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -302,8 +302,8 @@ character-set=cp1250 "The MySQL server is running with the %s option so it cannot execute this statement" "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/slovak/errmsg.txt b/sql/share/slovak/errmsg.txt index 9160d2f7a91..87fbeb5b6ab 100644 --- a/sql/share/slovak/errmsg.txt +++ b/sql/share/slovak/errmsg.txt @@ -100,8 +100,8 @@ character-set=latin2 "Súbor '%-.64s' u¾ existuje", "Záznamov: %ld Zmazaných: %ld Preskoèených: %ld Varovania: %ld", "Záznamov: %ld Opakovaných: %ld", -"Wrong sub part key. The used key part isn't a string or the used length is longer than the key part", -"One nemô¾em zmaza» all fields with ALTER TABLE. Use DROP TABLE instead", +"Incorrect sub part key; the used key part isn't a string or the used length is longer than the key part", +"One nemô¾em zmaza» all fields with ALTER TABLE; use DROP TABLE instead", "Nemô¾em zru¹i» (DROP) '%-.64s'. Skontrolujte, èi neexistujú záznamy/kµúèe", "Záznamov: %ld Opakovaných: %ld Varovania: %ld", "You can't specify target table '%-.64s' for update in FROM clause", @@ -140,22 +140,22 @@ character-set=latin2 "Nemô¾em otvori» zdieµanú kni¾nicu '%-.64s' (chybový kód: %d %s)", "Nemô¾em nájs» funkciu '%-.64s' v kni¾nici'", "Funkcia '%-.64s' nie je definovaná", -"Host '%-.64s' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'", +"Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", "Host '%-.64s' is not allowed to connect to this MySQL server", -"You are using MySQL as an anonymous users and anonymous users are not allowed to change passwords", +"You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", "You must have privileges to update tables in the mysql database to be able to change passwords for others", "Can't find any matching row in the user table", "Rows matched: %ld Changed: %ld Warnings: %ld", -"Can't create a new thread (errno %d). If you are not out of available memory, you can consult the manual for a possible OS-dependent bug", +"Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", "Column count doesn't match value count at row %ld", "Can't reopen table: '%-.64s", "Invalid use of NULL value", "Got error '%-.64s' from regexp", -"Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause", +"Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", "There is no such grant defined for user '%-.32s' on host '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for table '%-.64s'", -"%-.16s command denied to user: '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", -"Illegal GRANT/REVOKE command. Please consult the manual which privleges can be used.", +"%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'", +"%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'", +"Illegal GRANT/REVOKE command; please consult the manual to see which privleges can be used.", "The host or user argument to GRANT is too long", "Table '%-.64s.%s' doesn't exist", "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'", @@ -164,7 +164,7 @@ character-set=latin2 "Delayed insert thread couldn't get requested lock for table %-.64s", "Too many delayed threads in use", "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)", -"Got a packet bigger than 'max_allowed_packet'", +"Got a packet bigger than 'max_allowed_packet' bytes", "Got a read error from the connection pipe", "Got an error from fcntl()", "Got packets out of order", @@ -173,7 +173,7 @@ character-set=latin2 "Got timeout reading communication packets", "Got an error writing communication packets", "Got timeout writing communication packets", -"Result string is longer than max_allowed_packet", +"Result string is longer than 'max_allowed_packet' bytes", "The used table type doesn't support BLOB/TEXT columns", "The used table type doesn't support AUTO_INCREMENT columns", "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES", @@ -182,7 +182,7 @@ character-set=latin2 "All tables in the MERGE table are not defined identically", "Can't write, because of unique constraint, to table '%-.64s'", "BLOB column '%-.64s' used in key specification without a key length", -"All parts of a PRIMARY KEY must be NOT NULL; If you need NULL in a key, use UNIQUE instead", +"All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", "Result consisted of more than one row", "This table type requires a primary key", "This version of MySQL is not compiled with RAID support", @@ -208,7 +208,7 @@ character-set=latin2 "Table '%-.64s' is marked as crashed and should be repaired", "Table '%-.64s' is marked as crashed and last (automatic?) repair failed", "Some non-transactional changed tables couldn't be rolled back", -"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage. Increase this mysqld variable and try again", +"Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again", "This operation cannot be performed with a running slave, run STOP SLAVE first", "This operation requires a running slave, configure slave and do START SLAVE", "The server is not configured as slave, fix in config file or with CHANGE MASTER TO", @@ -216,15 +216,15 @@ character-set=latin2 "Could not create slave thread, check system resources", "User %-.64s has already more than 'max_user_connections' active connections", "You may only use constant expressions with SET", -"Lock wait timeout exceeded", +"Lock wait timeout exceeded; try restarting transaction", "The total number of locks exceeds the lock table size", "Update locks cannot be acquired during a READ UNCOMMITTED transaction", "DROP DATABASE not allowed while thread is holding global read lock", "CREATE DATABASE not allowed while thread is holding global read lock", -"Wrong arguments to %s", +"Incorrect arguments to %s", "'%-.32s'@'%-.64s' is not allowed to create new users", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "The used table type doesn't support FULLTEXT indexes", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -232,26 +232,26 @@ character-set=latin2 "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "Operand should contain %d column(s)", "Subquery returns more than 1 row", "Unknown prepared statement handler (%.*s) given to %s", @@ -259,23 +259,23 @@ character-set=latin2 "Cyclic reference on subqueries", "Converting column '%s' from %s to %s", "Reference '%-.64s' not supported (%s)", -"Every derived table must have it's own alias", -"Select %u was reduced during optimisation", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Every derived table must have its own alias", +"Select %u was reduced during optimization", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -283,13 +283,13 @@ character-set=latin2 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -304,8 +304,8 @@ character-set=latin2 "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/share/spanish/errmsg.txt b/sql/share/spanish/errmsg.txt index 5f2435feb1c..3c4e2bacb9c 100644 --- a/sql/share/spanish/errmsg.txt +++ b/sql/share/spanish/errmsg.txt @@ -125,7 +125,7 @@ character-set=latin1 "Muchos campos", "Tamaño de línea muy grande. Máximo tamaño de línea, no contando blob, es %d. Tu tienes que cambiar algunos campos para blob", "Sobrecarga de la pila de thread: Usada: %ld de una %ld pila. Use 'mysqld -O thread_stack=#' para especificar una mayor pila si necesario", -"Dependencia cruzada encontrada en OUTER JOIN. Examine su condición ON", +"Dependencia cruzada encontrada en OUTER JOIN; examine su condición ON", "Columna '%-.32s' es usada con UNIQUE o INDEX pero no está definida como NOT NULL", "No puedo cargar función '%-.64s'", "No puedo inicializar función '%-.64s'; %-.80s", @@ -167,7 +167,7 @@ character-set=latin1 "Obtenido timeout leyendo paquetes de comunicación", "Obtenido un error de escribiendo paquetes de comunicación", "Obtenido timeout escribiendo paquetes de comunicación", -"La string resultante es mayor que max_allowed_packet", +"La string resultante es mayor que 'max_allowed_packet'", "El tipo de tabla usada no permite soporte para columnas BLOB/TEXT", "El tipo de tabla usada no permite soporte para columnas AUTO_INCREMENT", "INSERT DELAYED no puede ser usado con tablas '%-.64s', porque esta bloqueada con LOCK TABLES", @@ -257,15 +257,15 @@ character-set=latin1 "Select %u fué reducido durante optimización", "Tabla '%-.64s' de uno de los SELECT no puede ser usada en %-.32s", "Cliente no soporta protocolo de autenticación solicitado por el servidor; considere actualizar el cliente MySQL", -"Todas las partes de una SPATIAL KEY deben ser NOT NULL", +"Todas las partes de una SPATIAL index deben ser NOT NULL", "COLLATION '%s' no es válido para CHARACTER SET '%s'", "Slave ya está funcionando", "Slave ya fué parado", "Tamaño demasiado grande para datos descomprimidos. El máximo tamaño es %d. (probablemente, extensión de datos descomprimidos fué corrompida)", -"Z_MEM_ERROR: No suficiente memoria para zlib", -"Z_BUF_ERROR: No suficiente espacio en el búfer de salida para zlib (probablemente, extensión de datos descomprimidos fué corrompida)", -"Z_DATA_ERROR: Dato de entrada fué corrompido para zlib", -"%d línea(s) fue(fueron) cortadas por group_concat()", +"ZLIB: No suficiente memoria", +"ZLIB: No suficiente espacio en el búfer de salida (probablemente, extensión de datos descomprimidos fué corrompida)", +"ZLIB: Dato de entrada fué corrompido", +"%d línea(s) fueron cortadas por GROUP_CONCAT()", "Línea %ld no contiene datos para todas las columnas", "Línea %ld fué truncada; La misma contine mas datos que las que existen en las columnas de entrada", "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la línea %ld", diff --git a/sql/share/swedish/errmsg.txt b/sql/share/swedish/errmsg.txt index f045bae4cf6..7ee4eabd6c3 100644 --- a/sql/share/swedish/errmsg.txt +++ b/sql/share/swedish/errmsg.txt @@ -165,7 +165,7 @@ character-set=latin1 "Fick 'timeout' vid läsning från klienten", "Fick ett fel vid skrivning till klienten", "Fick 'timeout' vid skrivning till klienten", -"Resultatsträngen är längre än max_allowed_packet", +"Resultatsträngen är längre än 'max_allowed_packet'", "Den använda tabelltypen kan inte hantera BLOB/TEXT-kolumner", "Den använda tabelltypen kan inte hantera AUTO_INCREMENT-kolumner", "INSERT DELAYED kan inte användas med tabell '%-.64s', emedan den är låst med LOCK TABLES", @@ -255,19 +255,19 @@ character-set=latin1 "Select %u reducerades vid optimiering", "Tabell '%-.64s' från en SELECT kan inte användas i %-.32s", "Klienten stöder inte autentiseringsprotokollet som begärts av servern; överväg uppgradering av klientprogrammet.", -"Alla delar av en SPATIAL KEY måste vara NOT NULL", +"Alla delar av en SPATIAL index måste vara NOT NULL", "COLLATION '%s' är inte tillåtet för CHARACTER SET '%s'", "Slaven har redan startat", "Slaven har redan stoppat", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d rad(er) kapades av group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d rad(er) kapades av GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Använder handler %s för tabell '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -275,13 +275,13 @@ character-set=latin1 "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Felaktigt index namn '%-.100s'", "Felaktigt katalog namn '%-.100s'", @@ -296,8 +296,8 @@ character-set=latin1 "MySQL är startad med --skip-grant-tables. Pga av detta kan du inte använda detta kommando", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Fick felkod %d '%-.100s' från %s", "Fick tilfällig felkod %d '%-.100s' från %s", diff --git a/sql/share/ukrainian/errmsg.txt b/sql/share/ukrainian/errmsg.txt index 47b003894bd..958b6bf8674 100644 --- a/sql/share/ukrainian/errmsg.txt +++ b/sql/share/ukrainian/errmsg.txt @@ -161,7 +161,7 @@ character-set=koi8u "ç¦ÌËÁ ÄÌÑ INSERT DELAYED ÎÅ ÍÏÖÅ ÏÔÒÉÍÁÔÉ ÂÌÏËÕ×ÁÎÎÑ ÄÌÑ ÔÁÂÌÉæ %-.64s", "úÁÂÁÇÁÔÏ ÚÁÔÒÉÍÁÎÉÈ Ç¦ÌÏË ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ", "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s' (%-.64s)", -"ïÔÒÉÍÁÎÏ ÐÁËÅÔ Â¦ÌØÛÉÊ Î¦Ö max_allowed_packet", +"ïÔÒÉÍÁÎÏ ÐÁËÅÔ Â¦ÌØÛÉÊ Î¦Ö 'max_allowed_packet'", "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ ÞÉÔÁÎÎÑ Ú ËÏÍÕΦËÁæÊÎÏÇÏ ËÁÎÁÌÕ", "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËËÕ ×¦Ä fcntl()", "ïÔÒÉÍÁÎÏ ÐÁËÅÔÉ Õ ÎÅÎÁÌÅÖÎÏÍÕ ÐÏÒÑÄËÕ", @@ -170,7 +170,7 @@ character-set=koi8u "ïÔÒÉÍÁÎÏ ÚÁÔÒÉÍËÕ ÞÉÔÁÎÎÑ ËÏÍÕΦËÁæÊÎÉÈ ÐÁËÅÔ¦×", "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ ÚÁÐÉÓÕ ËÏÍÕΦËÁæÊÎÉÈ ÐÁËÅÔ¦×", "ïÔÒÉÍÁÎÏ ÚÁÔÒÉÍËÕ ÚÁÐÉÓÕ ËÏÍÕΦËÁæÊÎÉÈ ÐÁËÅÔ¦×", -"óÔÒÏËÁ ÒÅÚÕÌØÔÁÔÕ ÄÏ×ÛÁ Î¦Ö max_allowed_packet", +"óÔÒÏËÁ ÒÅÚÕÌØÔÁÔÕ ÄÏ×ÛÁ Î¦Ö 'max_allowed_packet'", "÷ÉËÏÒÉÓÔÁÎÉÊ ÔÉÐ ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕ¤ BLOB/TEXT ÓÔÏ×Âæ", "÷ÉËÏÒÉÓÔÁÎÉÊ ÔÉÐ ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕ¤ AUTO_INCREMENT ÓÔÏ×Âæ", "INSERT DELAYED ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÏ Ú ÔÁÂÌÉÃÅÀ '%-.64s', ÔÏÍÕ ÝÏ §§ ÚÁÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES", @@ -221,7 +221,7 @@ character-set=koi8u "èÉÂÎÉÊ ÁÒÇÕÍÅÎÔ ÄÌÑ %s", "ëÏÒÉÓÔÕ×ÁÞÕ '%-.32s'@'%-.64s' ÎÅ ÄÏÚ×ÏÌÅÎÏ ÓÔ×ÏÒÀ×ÁÔÉ ÎÏ×ÉÈ ËÏÒÉÓÔÕ×ÁÞ¦×", "Incorrect table definition; all MERGE tables must be in the same database", -"Deadlock found when trying to get lock; Try restarting transaction", +"Deadlock found when trying to get lock; try restarting transaction", "÷ÉËÏÒÉÓÔÁÎÉÊ ÔÉÐ ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕ¤ FULLTEXT ¦ÎÄÅËÓ¦×", "Cannot add foreign key constraint", "Cannot add a child row: a foreign key constraint fails", @@ -229,26 +229,26 @@ character-set=koi8u "Error connecting to master: %-.128s", "Error running query on master: %-.128s", "Error when executing command %s: %-.128s", -"Wrong usage of %s and %s", +"Incorrect usage of %s and %s", "The used SELECT statements have a different number of columns", "Can't execute the query because you have a conflicting read lock", "Mixing of transactional and non-transactional tables is disabled", "Option '%s' used twice in statement", "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", -"Access denied. You need the %-.128s privilege for this operation", +"Access denied; you need the %-.128s privilege for this operation", "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", "Variable '%-.64s' doesn't have a default value", "Variable '%-.64s' can't be set to the value of '%-.64s'", -"Wrong argument type to variable '%-.64s'", +"Incorrect argument type to variable '%-.64s'", "Variable '%-.64s' can only be set, not read", -"Wrong usage/placement of '%s'", +"Incorrect usage/placement of '%s'", "This version of MySQL doesn't yet support '%s'", "Got fatal error %d: '%-.128s' from master when reading data from binary log", "Slave SQL thread ignored the query because of replicate-*-table rules", "Variable '%-.64s' is a %s variable", -"Wrong foreign key definition for '%-.64s': %s", -"Key reference and table reference doesn't match", +"Incorrect foreign key definition for '%-.64s': %s", +"Key reference and table reference don't match", "ïÐÅÒÁÎÄ ÍÁ¤ ÓËÌÁÄÁÔÉÓÑ Ú %d ÓÔÏ×Âæ×", "ð¦ÄÚÁÐÉÔ ÐÏ×ÅÒÔÁ¤ Â¦ÌØÛ ÎiÖ 1 ÚÁÐÉÓ", "Unknown prepared statement handler (%.*s) given to %s", @@ -256,23 +256,23 @@ character-set=koi8u "ãÉË̦ÞÎÅ ÐÏÓÉÌÁÎÎÑ ÎÁ ЦÄÚÁÐÉÔ", "ðÅÒÅÔ×ÏÒÅÎÎÑ ÓÔÏ×ÂÃÁ '%s' Ú %s Õ %s", "ðÏÓÉÌÁÎÎÑ '%-.64s' ÎÅ ÐiÄÔÒÉÍÕÅÔÓÑ (%s)", -"Every derived table must have it's own alias", +"Every derived table must have its own alias", "Select %u was ÓËÁÓÏ×ÁÎÏ ÐÒÉ ÏÐÔÉÍiÚÁÃii", -"Table '%-.64s' from one of SELECT's can not be used in %-.32s", +"Table '%-.64s' from one of the SELECTs cannot be used in %-.32s", "Client does not support authentication protocol requested by server; consider upgrading MySQL client", -"All parts of a SPATIAL KEY must be NOT NULL", +"All parts of a SPATIAL index must be NOT NULL", "COLLATION '%s' is not valid for CHARACTER SET '%s'", "Slave is already running", "Slave has already been stopped", -"Too big size of uncompressed data. The maximum size is %d. (probably, length of uncompressed data was corrupted)", -"Z_MEM_ERROR: Not enough memory available for zlib", -"Z_BUF_ERROR: Not enough room in the output buffer for zlib (probably, length of uncompressed data was corrupted)", -"Z_DATA_ERROR: Input data was corrupted for zlib", -"%d line(s) was(were) cut by group_concat()", +"Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", +"ZLIB: Not enough memory", +"ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", +"ZLIB: Input data corrupted", +"%d line(s) were cut by GROUP_CONCAT()", "Row %ld doesn't contain data for all columns", -"Row %ld was truncated; It contained more data than there were input columns", -"Data truncated, NULL supplied to NOT NULL column '%s' at row %ld", -"Data truncated, out of range for column '%s' at row %ld", +"Row %ld was truncated; it contained more data than there were input columns", +"Data truncated; NULL supplied to NOT NULL column '%s' at row %ld", +"Data truncated; out of range for column '%s' at row %ld", "Data truncated for column '%s' at row %ld", "Using storage engine %s for table '%s'", "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", @@ -280,13 +280,13 @@ character-set=koi8u "Can't revoke all privileges, grant for one or more of the requested users", "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", "Illegal mix of collations for operation '%s'", -"Variable '%-.64s' is not a variable component (Can't be used as XXXX.variable_name)", +"Variable '%-.64s' is not a variable component (can't be used as XXXX.variable_name)", "Unknown collation: '%-.64s'", -"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later when MySQL slave with SSL will be started", +"SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", "óÔÏ×ÂÅÃØ ÁÂÏ ÐÏÓÉÌÁÎÎÑ '%-.64s%s%-.64s%s%-.64s' ¦Ú SELECTÕ #%d ÂÕÌÏ ÚÎÁÊÄÅÎÅ Õ SELECT¦ #%d", -"Wrong parameter or combination of parameters for START SLAVE UNTIL", -"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL, otherwise you are not safe in case of unexpected slave's mysqld restart", +"Incorrect parameter or combination of parameters for START SLAVE UNTIL", +"It is recommended to run with --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you are not safe in case of unexpected slave's mysqld restart", "SQL thread is not to be started so UNTIL options are ignored", "Incorrect index name '%-.100s'", "Incorrect catalog name '%-.100s'", @@ -301,8 +301,8 @@ character-set=koi8u "The MySQL server is running with the %s option so it cannot execute this statement", "Column '%-.100s' has duplicated value '%-.64s' in %s" "Truncated wrong %-.32s value: '%-.128s'" -"Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" -"Invalid ON UPDATE clause for '%-.64s' field", +"Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause" +"Invalid ON UPDATE clause for '%-.64s' column", "This command is not supported in the prepared statement protocol yet", "Got error %d '%-.100s' from %s", "Got temporary error %d '%-.100s' from %s", diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f11bc9c3475..28e833b8421 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1191,7 +1191,7 @@ int mysql_table_dump(THD* thd, char* db, char* tbl_name, int fd) } net_flush(&thd->net); if ((error= table->file->dump(thd,fd))) - my_error(ER_GET_ERRNO, MYF(0)); + my_error(ER_GET_ERRNO, MYF(0), error); err: close_thread_tables(thd); diff --git a/sql/sql_string.cc b/sql/sql_string.cc index cf4f94ba966..1ec0faafa8f 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -370,7 +370,7 @@ bool String::copy(const char *str, uint32 arg_length, bool String::set_ascii(const char *str, uint32 arg_length) { - if (!(str_charset->mbminlen > 1)) + if (str_charset->mbminlen == 1) { set(str, arg_length, str_charset); return 0; diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 33c686677f1..ff53f61c053 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -251,11 +251,12 @@ static int my_strnncoll_big5_internal(const uchar **a_res, static int my_strnncoll_big5(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, uint a_length, - const uchar *b, uint b_length) + const uchar *b, uint b_length, + my_bool b_is_prefix) { uint length= min(a_length, b_length); int res= my_strnncoll_big5_internal(&a, &b, length); - return res ? res : (int) (a_length - b_length); + return res ? res : (int)((b_is_prefix ? length : a_length) - b_length); } @@ -6299,7 +6300,6 @@ static MY_CHARSET_HANDLER my_charset_big5_handler= my_long10_to_str_8bit, my_longlong10_to_str_8bit, my_fill_8bit, - my_strntol_8bit, my_strntoul_8bit, my_strntoll_8bit, @@ -6320,6 +6320,7 @@ CHARSET_INFO my_charset_big5_chinese_ci= to_lower_big5, to_upper_big5, sort_order_big5, + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -6347,6 +6348,7 @@ CHARSET_INFO my_charset_big5_bin= to_lower_big5, to_upper_big5, sort_order_big5, + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 54fe4476ae6..cc83471f264 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -91,10 +91,20 @@ static uchar bin_char_array[] = static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *t, uint tlen, + my_bool t_is_prefix) { - int cmp= memcmp(s,t,min(slen,tlen)); - return cmp ? cmp : (int) (slen - tlen); + uint len=min(slen,tlen); + int cmp= memcmp(s,t,len); + return cmp ? cmp : (int)((t_is_prefix ? len : slen) - tlen); +} + + +static int my_strnncollsp_binary(CHARSET_INFO * cs __attribute__((unused)), + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + return my_strnncoll_binary(cs,s,slen,t,tlen,0); } @@ -335,7 +345,7 @@ MY_COLLATION_HANDLER my_collation_8bit_bin_handler = { NULL, /* init */ my_strnncoll_binary, - my_strnncoll_binary, + my_strnncollsp_binary, my_strnxfrm_bin, my_like_range_simple, my_wildcmp_bin, @@ -385,9 +395,10 @@ CHARSET_INFO my_charset_bin = bin_char_array, /* to_lower */ bin_char_array, /* to_upper */ bin_char_array, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ diff --git a/strings/ctype-czech.c b/strings/ctype-czech.c index 8fde9498ed9..6f9e9f74d35 100644 --- a/strings/ctype-czech.c +++ b/strings/ctype-czech.c @@ -242,12 +242,16 @@ while (1) \ static int my_strnncoll_czech(CHARSET_INFO *cs __attribute__((unused)), const uchar * s1, uint len1, - const uchar * s2, uint len2) + const uchar * s2, uint len2, + my_bool s2_is_prefix) { int v1, v2; const uchar * p1, * p2, * store1, * store2; int pass1 = 0, pass2 = 0; + if (s2_is_prefix && len1 > len2) + len1=len2; + p1 = s1; p2 = s2; store1 = s1; store2 = s2; @@ -276,7 +280,7 @@ int my_strnncollsp_czech(CHARSET_INFO * cs, { for ( ; slen && s[slen-1] == ' ' ; slen--); for ( ; tlen && t[tlen-1] == ' ' ; tlen--); - return my_strnncoll_czech(cs,s,slen,t,tlen); + return my_strnncoll_czech(cs,s,slen,t,tlen,0); } @@ -595,6 +599,7 @@ CHARSET_INFO my_charset_latin2_czech_ci = to_lower_czech, to_upper_czech, sort_order_czech, + NULL, /* contractions */ NULL, /* sort_order_big*/ tab_8859_2_uni, /* tab_to_uni */ idx_uni_8859_2, /* tab_from_uni */ diff --git a/strings/ctype-euc_kr.c b/strings/ctype-euc_kr.c index 1e6931244d2..fd8659a181c 100644 --- a/strings/ctype-euc_kr.c +++ b/strings/ctype-euc_kr.c @@ -8688,6 +8688,7 @@ CHARSET_INFO my_charset_euckr_korean_ci= to_lower_euc_kr, to_upper_euc_kr, sort_order_euc_kr, + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -8715,6 +8716,7 @@ CHARSET_INFO my_charset_euckr_bin= to_lower_euc_kr, to_upper_euc_kr, sort_order_euc_kr, + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c index baf1d319b00..3672dcd0b33 100644 --- a/strings/ctype-extra.c +++ b/strings/ctype-extra.c @@ -29,6 +29,7 @@ CHARSET_INFO compiled_charsets[] = { NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ diff --git a/strings/ctype-gb2312.c b/strings/ctype-gb2312.c index 2c5aae83769..b9f61256717 100644 --- a/strings/ctype-gb2312.c +++ b/strings/ctype-gb2312.c @@ -5739,9 +5739,10 @@ CHARSET_INFO my_charset_gb2312_chinese_ci= to_lower_gb2312, to_upper_gb2312, sort_order_gb2312, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -5765,9 +5766,10 @@ CHARSET_INFO my_charset_gb2312_bin= to_lower_gb2312, to_upper_gb2312, sort_order_gb2312, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index aec23366ea5..2ef75e27d9a 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2614,11 +2614,12 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res, int my_strnncoll_gbk(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, uint a_length, - const uchar *b, uint b_length) + const uchar *b, uint b_length, + my_bool b_is_prefix) { uint length= min(a_length, b_length); int res= my_strnncoll_gbk_internal(&a, &b, length); - return res ? res : (int) (a_length - b_length); + return res ? res : (int) ((b_is_prefix ? length : a_length) - b_length); } @@ -9969,9 +9970,10 @@ CHARSET_INFO my_charset_gbk_chinese_ci= to_lower_gbk, to_upper_gbk, sort_order_gbk, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -9995,9 +9997,10 @@ CHARSET_INFO my_charset_gbk_bin= to_lower_gbk, to_upper_gbk, sort_order_gbk, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c index f5e7fd8baa4..652794fa84d 100644 --- a/strings/ctype-latin1.c +++ b/strings/ctype-latin1.c @@ -418,6 +418,7 @@ CHARSET_INFO my_charset_latin1= to_lower_latin1, to_upper_latin1, sort_order_latin1, + NULL, /* contractions */ NULL, /* sort_order_big*/ cs_to_uni, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -528,7 +529,8 @@ uchar combo2map[]={ static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, uint a_length, - const uchar *b, uint b_length) + const uchar *b, uint b_length, + my_bool b_is_prefix) { const uchar *a_end= a + a_length; const uchar *b_end= b + b_length; @@ -561,7 +563,7 @@ static int my_strnncoll_latin1_de(CHARSET_INFO *cs __attribute__((unused)), A simple test of string lengths won't work -- we test to see which string ran out first */ - return ((a < a_end || a_extend) ? 1 : + return ((a < a_end || a_extend) ? (b_is_prefix ? 0 : 1) : (b < b_end || b_extend) ? -1 : 0); } @@ -699,6 +701,7 @@ CHARSET_INFO my_charset_latin1_german2_ci= to_lower_latin1, to_upper_latin1, sort_order_latin1_de, + NULL, /* contractions */ NULL, /* sort_order_big*/ cs_to_uni, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -726,6 +729,7 @@ CHARSET_INFO my_charset_latin1_bin= to_lower_latin1, to_upper_latin1, sort_order_latin1_de, + NULL, /* contractions */ NULL, /* sort_order_big*/ cs_to_uni, /* tab_to_uni */ NULL, /* tab_from_uni */ diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index c143994dbc3..7b0dadcfa19 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -322,7 +322,7 @@ uint my_instr_mb(CHARSET_INFO *cs, int mblen; if (!cs->coll->strnncoll(cs, (unsigned char*) b, s_length, - (unsigned char*) s, s_length)) + (unsigned char*) s, s_length, 0)) { if (nmatch) { @@ -352,10 +352,19 @@ uint my_instr_mb(CHARSET_INFO *cs, static int my_strnncoll_mb_bin(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *t, uint tlen, + my_bool t_is_prefix) { - int cmp= memcmp(s,t,min(slen,tlen)); - return cmp ? cmp : (int) (slen - tlen); + uint len=min(slen,tlen); + int cmp= memcmp(s,t,len); + return cmp ? cmp : (int) ((t_is_prefix ? len : slen) - tlen); +} + +static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + return my_strnncoll_mb_bin(cs,s,slen,t,tlen,0); } @@ -514,7 +523,7 @@ MY_COLLATION_HANDLER my_collation_mb_bin_handler = { NULL, /* init */ my_strnncoll_mb_bin, - my_strnncoll_mb_bin, + my_strnncollsp_mb_bin, my_strnxfrm_mb_bin, my_like_range_simple, my_wildcmp_mb_bin, diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 0d30ad28a20..8e295b9e13e 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -46,16 +46,19 @@ int my_strnxfrm_simple(CHARSET_INFO * cs, } int my_strnncoll_simple(CHARSET_INFO * cs, const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *t, uint tlen, + my_bool t_is_prefix) { int len = ( slen > tlen ) ? tlen : slen; uchar *map= cs->sort_order; + if (t_is_prefix && slen > tlen) + slen=tlen; while (len--) { if (map[*s++] != map[*t++]) return ((int) map[s[-1]] - (int) map[t[-1]]); } - return (int) (slen-tlen); + return (int) (slen - tlen); } diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 656c903c7a1..5fd005f842e 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -232,9 +232,12 @@ static int my_strnncoll_sjis_internal(CHARSET_INFO *cs, static int my_strnncoll_sjis(CHARSET_INFO *cs __attribute__((unused)), const uchar *a, uint a_length, - const uchar *b, uint b_length) + const uchar *b, uint b_length, + my_bool b_is_prefix) { int res= my_strnncoll_sjis_internal(cs, &a, a_length, &b, b_length); + if (b_is_prefix && a_length > b_length) + a_length= b_length; return res ? res : (int) (a_length - b_length); } @@ -4586,9 +4589,10 @@ CHARSET_INFO my_charset_sjis_japanese_ci= to_lower_sjis, to_upper_sjis, sort_order_sjis, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -4612,9 +4616,10 @@ CHARSET_INFO my_charset_sjis_bin= to_lower_sjis, to_upper_sjis, sort_order_sjis, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index a0ba1a266ea..c7d859a6ead 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -529,12 +529,16 @@ static uint thai2sortable(uchar *tstr, uint len) static int my_strnncoll_tis620(CHARSET_INFO *cs __attribute__((unused)), const uchar * s1, uint len1, - const uchar * s2, uint len2) + const uchar * s2, uint len2, + my_bool s2_is_prefix) { uchar buf[80] ; uchar *tc1, *tc2; int i; + if (s2_is_prefix && len1 > len2) + len1= len2; + tc1= buf; if ((len1 + len2 +2) > (int) sizeof(buf)) tc1= (uchar*) malloc(len1+len2); @@ -958,9 +962,10 @@ CHARSET_INFO my_charset_tis620_thai_ci= to_lower_tis620, to_upper_tis620, sort_order_tis620, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 4, /* strxfrm_multiply */ @@ -984,9 +989,10 @@ CHARSET_INFO my_charset_tis620_bin= to_lower_tis620, to_upper_tis620, sort_order_tis620, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c index 9997e2772e2..2e03bc8718e 100644 --- a/strings/ctype-uca.c +++ b/strings/ctype-uca.c @@ -19,14 +19,15 @@ UCA (Unicode Collation Algorithm) support. Written by Alexander Barkov - Currently supports only subset of the full UCA. - + Currently supports only subset of the full UCA: - Only Primary level key comparison + - Basic Latin letters contraction is implemented - Variable weighting is done for Non-ignorable option + + Features that are not implemented yet: - No Normalization From D is done + No decomposition is done + No Thai/Lao orderding is done - - No contraction is done - No combining marks processing is done */ @@ -36,8 +37,6 @@ #include "m_ctype.h" -#ifdef HAVE_CHARSET_ucs2 - #define MY_UCA_NPAGES 256 #define MY_UCA_NCHARS 256 #define MY_UCA_CMASK 255 @@ -6587,7 +6586,7 @@ static const char polish[]= "& N < \\u0144 <<< \\u0143 " "& O < \\u00F3 <<< \\u00D3 " "& S < \\u015B <<< \\u015A " - "& Z < \\u017A <<< \\u017B "; + "& Z < \\u017A <<< \\u0179 < \\u017C <<< \\u017B"; static const char estonian[]= "& S < \\u0161 <<< \\u0160 " @@ -6620,6 +6619,41 @@ static const char turkish[]= "& U < \\u00FC <<< \\u00DC "; +static const char czech[]= + "& C < \\u010D <<< \\u010C " + "& H < ch <<< Ch <<< CH" + "& R < \\u0159 <<< \\u0158" + "& S < \\u0161 <<< \\u0160" + "& Z < \\u017E <<< \\u017D"; + +static const char danish[]= /* Also good for Norwegian */ + "& Y << \\u00FC <<< \\u00DC << \\u0171 <<< \\u0170" + "& Z < \\u00E6 <<< \\u00C6 << \\u00E4 <<< \\u00C4" + " < \\u00F8 <<< \\u00D8 << \\u00F6 <<< \\u00D6 << \\u0151 <<< \\u0150" + " < \\u00E5 <<< \\u00C5 << aa <<< Aa <<< AA"; + +static const char lithuanian[]= + "& C << ch <<< Ch <<< CH< \\u010D <<< \\u010C" + "& E << \\u0119 <<< \\u0118 << \\u0117 <<< \\u0116" + "& I << y <<< Y" + "& S < \\u0161 <<< \\u0160" + "& Z < \\u017E <<< \\u017D"; + +static const char slovak[]= + "& A < \\u00E4 <<< \\u00C4" + "& C < \\u010D <<< \\u010C" + "& H < ch <<< Ch <<< CH" + "& O < \\u00F4 <<< \\u00D4" + "& S < \\u0161 <<< \\u0160" + "& Z < \\u017E <<< \\017D"; + +static const char spanish2[]= /* Also good for Asturian and Galician */ + "&C < ch <<< Ch <<< CH" + "&L < ll <<< Ll <<< LL" + "&N < \\u00F1 <<< \\u00D1" + "&R << rr <<< Rr <<< RR"; + + /* Unicode Collation Algorithm: Collation element (weight) scanner, @@ -6633,12 +6667,28 @@ typedef struct my_uca_scanner_st const uchar *send; /* End of the input string */ uchar *uca_length; uint16 **uca_weight; + uint16 *contractions; uint16 implicit[2]; int page; int code; + CHARSET_INFO *cs; } my_uca_scanner; +/* + Charset dependent scanner part, to optimize + some character sets. +*/ +typedef struct my_uca_scanner_handler_st +{ + void (*init)(my_uca_scanner *scanner, CHARSET_INFO *cs, + const uchar *str, uint length); + int (*next)(my_uca_scanner *scanner); +} my_uca_scanner_handler; +static uint16 nochar[]= {0}; + + +#ifdef HAVE_CHARSET_ucs2 /* Initialize collation weight scanner @@ -6650,15 +6700,15 @@ typedef struct my_uca_scanner_st length Length of the string. NOTES: + Optimized for UCS2 RETURN N/A */ -static uint16 nochar[]= {0}; -static void my_uca_scanner_init(my_uca_scanner *scanner, - CHARSET_INFO *cs __attribute__((unused)), - const uchar *str, uint length) +static void my_uca_scanner_init_ucs2(my_uca_scanner *scanner, + CHARSET_INFO *cs __attribute__((unused)), + const uchar *str, uint length) { /* Note, no needs to initialize scanner->wbeg */ scanner->sbeg= str; @@ -6666,6 +6716,7 @@ static void my_uca_scanner_init(my_uca_scanner *scanner, scanner->wbeg= nochar; scanner->uca_length= cs->sort_order; scanner->uca_weight= cs->sort_order_big; + scanner->contractions= cs->contractions; } @@ -6678,6 +6729,8 @@ static void my_uca_scanner_init(my_uca_scanner *scanner, scanner Address of a previously initialized scanner strucuture NOTES: + Optimized for UCS2 + Checks if the current character's weight string has been fully scanned, if no, then returns the next weight for this character, else scans the next character and returns its first weight. @@ -6708,7 +6761,7 @@ static void my_uca_scanner_init(my_uca_scanner *scanner, Or -1 on error (END-OF-STRING or ILLEGAL MULTIBYTE SEQUENCE) */ -static int my_uca_scanner_next(my_uca_scanner *scanner) +static int my_uca_scanner_next_ucs2(my_uca_scanner *scanner) { /* @@ -6732,6 +6785,22 @@ static int my_uca_scanner_next(my_uca_scanner *scanner) scanner->code= (unsigned char)scanner->sbeg[1]; scanner->sbeg+= 2; + if (scanner->contractions && (scanner->sbeg <= scanner->send)) + { + int cweight; + + if (!scanner->page && !scanner->sbeg[0] && + (scanner->sbeg[1] > 0x40) && (scanner->sbeg[1] < 0x80) && + (scanner->code > 0x40) && (scanner->code < 0x80) && + (cweight= scanner->contractions[(scanner->code-0x40)*0x40+scanner->sbeg[1]-0x40])) + { + scanner->implicit[0]= 0; + scanner->wbeg= scanner->implicit; + scanner->sbeg+=2; + return cweight; + } + } + if (!ucaw[scanner->page]) goto implicit; scanner->wbeg= ucaw[scanner->page] + scanner->code * ucal[scanner->page]; @@ -6758,6 +6827,111 @@ implicit: return scanner->page; } +static my_uca_scanner_handler my_ucs2_uca_scanner_handler= +{ + my_uca_scanner_init_ucs2, + my_uca_scanner_next_ucs2 +}; + +#endif + + +/* + The same two functions for any character set +*/ +static void my_uca_scanner_init_any(my_uca_scanner *scanner, + CHARSET_INFO *cs __attribute__((unused)), + const uchar *str, uint length) +{ + /* Note, no needs to initialize scanner->wbeg */ + scanner->sbeg= str; + scanner->send= str + length; + scanner->wbeg= nochar; + scanner->uca_length= cs->sort_order; + scanner->uca_weight= cs->sort_order_big; + scanner->contractions= cs->contractions; + scanner->cs= cs; +} + +static int my_uca_scanner_next_any(my_uca_scanner *scanner) +{ + + /* + Check if the weights for the previous character have been + already fully scanned. If yes, then get the next character and + initialize wbeg and wlength to its weight string. + */ + + if (scanner->wbeg[0]) + return *scanner->wbeg++; + + do + { + uint16 **ucaw= scanner->uca_weight; + uchar *ucal= scanner->uca_length; + my_wc_t wc; + int mblen; + + if (((mblen= scanner->cs->cset->mb_wc(scanner->cs, &wc, + scanner->sbeg, scanner->send)) < 0)) + return -1; + + scanner->page= wc >> 8; + scanner->code= wc & 0xFF; + scanner->sbeg+= mblen; + + if (scanner->contractions && !scanner->page && + (scanner->code > 0x40) && (scanner->code < 0x80)) + { + uint page1, code1, cweight; + + if (((mblen= scanner->cs->cset->mb_wc(scanner->cs, &wc, + scanner->sbeg, + scanner->send)) >=0) && + (!(page1= (wc >> 8))) && + ((code1= (wc & 0xFF)) > 0x40) && + (code1 < 0x80) && + (cweight= scanner->contractions[(scanner->code-0x40)*0x40 + code1-0x40])) + { + scanner->implicit[0]= 0; + scanner->wbeg= scanner->implicit; + scanner->sbeg+= mblen; + return cweight; + } + } + + if (!ucaw[scanner->page]) + goto implicit; + scanner->wbeg= ucaw[scanner->page] + scanner->code * ucal[scanner->page]; + } while (!scanner->wbeg[0]); + + return *scanner->wbeg++; + +implicit: + + scanner->code= (scanner->page << 8) + scanner->code; + scanner->implicit[0]= (scanner->code & 0x7FFF) | 0x8000; + scanner->implicit[1]= 0; + scanner->wbeg= scanner->implicit; + + scanner->page= scanner->page >> 7; + + if (scanner->code >= 0x3400 && scanner->code <= 0x4DB5) + scanner->page+= 0xFB80; + else if (scanner->code >= 0x4E00 && scanner->code <= 0x9FA5) + scanner->page+= 0xFB40; + else + scanner->page+= 0xFBC0; + + return scanner->page; +} + + +static my_uca_scanner_handler my_any_uca_scanner_handler= +{ + my_uca_scanner_init_any, + my_uca_scanner_next_any +}; /* Compares two strings according to the collation @@ -6801,28 +6975,28 @@ implicit: */ static int my_strnncoll_uca(CHARSET_INFO *cs, + my_uca_scanner_handler *scanner_handler, const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *t, uint tlen, + my_bool t_is_prefix) { my_uca_scanner sscanner; my_uca_scanner tscanner; int s_res; int t_res; - my_uca_scanner_init(&sscanner, cs, s, slen); - my_uca_scanner_init(&tscanner, cs, t, tlen); + scanner_handler->init(&sscanner, cs, s, slen); + scanner_handler->init(&tscanner, cs, t, tlen); do { - s_res= my_uca_scanner_next(&sscanner); - t_res= my_uca_scanner_next(&tscanner); + s_res= scanner_handler->next(&sscanner); + t_res= scanner_handler->next(&tscanner); } while ( s_res == t_res && s_res >0); - return ( s_res - t_res ); + return (t_is_prefix && t_res < 0) ? 0 : (s_res - t_res); } - - /* Compares two strings according to the collation, ignoring trailing spaces. @@ -6847,8 +7021,9 @@ static int my_strnncoll_uca(CHARSET_INFO *cs, */ static int my_strnncollsp_uca(CHARSET_INFO *cs, - const uchar *s, uint slen, - const uchar *t, uint tlen) + my_uca_scanner_handler *scanner_handler, + const uchar *s, uint slen, + const uchar *t, uint tlen) { my_uca_scanner sscanner; my_uca_scanner tscanner; @@ -6858,19 +7033,18 @@ static int my_strnncollsp_uca(CHARSET_INFO *cs, slen= cs->cset->lengthsp(cs, (char*) s, slen); tlen= cs->cset->lengthsp(cs, (char*) t, tlen); - my_uca_scanner_init(&sscanner, cs, s, slen); - my_uca_scanner_init(&tscanner, cs, t, tlen); + scanner_handler->init(&sscanner, cs, s, slen); + scanner_handler->init(&tscanner, cs, t, tlen); do { - s_res= my_uca_scanner_next(&sscanner); - t_res= my_uca_scanner_next(&tscanner); + s_res= scanner_handler->next(&sscanner); + t_res= scanner_handler->next(&tscanner); } while ( s_res == t_res && s_res >0); return ( s_res - t_res ); } - /* Calculates hash value for the given string, according to the collation, and ignoring trailing spaces. @@ -6895,6 +7069,7 @@ static int my_strnncollsp_uca(CHARSET_INFO *cs, */ static void my_hash_sort_uca(CHARSET_INFO *cs, + my_uca_scanner_handler *scanner_handler, const uchar *s, uint slen, ulong *n1, ulong *n2) { @@ -6902,9 +7077,9 @@ static void my_hash_sort_uca(CHARSET_INFO *cs, my_uca_scanner scanner; slen= cs->cset->lengthsp(cs, (char*) s, slen); - my_uca_scanner_init(&scanner, cs, s, slen); + scanner_handler->init(&scanner, cs, s, slen); - while ((s_res= my_uca_scanner_next(&scanner)) >0) + while ((s_res= scanner_handler->next(&scanner)) >0) { n1[0]^= (((n1[0] & 63)+n2[0])*(s_res >> 8))+ (n1[0] << 8); n2[0]+=3; @@ -6946,24 +7121,28 @@ static void my_hash_sort_uca(CHARSET_INFO *cs, */ static int my_strnxfrm_uca(CHARSET_INFO *cs, - uchar *dst, uint dstlen, - const uchar *src, uint srclen) + my_uca_scanner_handler *scanner_handler, + uchar *dst, uint dstlen, + const uchar *src, uint srclen) { uchar *de = dst + dstlen; const uchar *dst_orig = dst; int s_res; my_uca_scanner scanner; - my_uca_scanner_init(&scanner, cs, src, srclen); + scanner_handler->init(&scanner, cs, src, srclen); - while (dst < de && (s_res= my_uca_scanner_next(&scanner)) >0) + while (dst < de && (s_res= scanner_handler->next(&scanner)) >0) { dst[0]= s_res >> 8; dst[1]= s_res & 0xFF; dst+= 2; } + for ( ; dst < de; *dst++='\0'); return dst - dst_orig; } + + /* This function compares if two characters are the same. The sign +1 or -1 does not matter. The only @@ -7353,7 +7532,7 @@ static my_coll_lexem_num my_coll_lexem_next(MY_COLL_LEXEM *lexem) typedef struct my_coll_rule_item_st { uint base; /* Base character */ - uint curr; /* Current character */ + uint curr[2]; /* Current character */ int diff[3]; /* Primary, Secondary and Tertiary difference */ } MY_COLL_RULE; @@ -7370,8 +7549,8 @@ typedef struct my_coll_rule_item_st USAGE RETURN VALUES - 0 - OK - 1 - ERROR, e.g. too many items. + A positive number means the number of rules loaded. + -1 means ERROR, e.g. too many items, syntax error, etc. */ static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems, @@ -7435,7 +7614,18 @@ static int my_coll_rule_parse(MY_COLL_RULE *rule, size_t mitems, } else if (prevlexnum == MY_COLL_LEXEM_DIFF) { - item.curr= lexem.code; + MY_COLL_LEXEM savlex; + savlex= lexem; + item.curr[0]= lexem.code; + if ((lexnum= my_coll_lexem_next(&lexem)) == MY_COLL_LEXEM_CHAR) + { + item.curr[1]= lexem.code; + } + else + { + item.curr[1]= 0; + lexem=savlex; /* Restore previous parser state */ + } if (lexem.diff == 3) { item.diff[2]++; @@ -7498,7 +7688,8 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint)) const uchar *deflengths= my_charset_ucs2_general_uca.sort_order; uint16 **defweights= my_charset_ucs2_general_uca.sort_order_big; int rc, i; - + int ncontractions= 0; + if (!cs->tailoring) return 1; @@ -7506,7 +7697,7 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint)) if ((rc= my_coll_rule_parse(rule, MY_MAX_COLL_RULE, cs->tailoring, cs->tailoring + strlen(cs->tailoring), - errstr, sizeof(errstr))) <= 0) + errstr, sizeof(errstr))) < 0) { /* TODO: add error message reporting. @@ -7515,11 +7706,11 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint)) return 1; } - if (!(newweights= (uint16**) alloc(256*sizeof(uint16*)))) + if (!(newweights= (uint16**) (*alloc)(256*sizeof(uint16*)))) return 1; bzero(newweights, 256*sizeof(uint16*)); - if (!(newlengths= (uchar*) alloc(256))) + if (!(newlengths= (uchar*) (*alloc)(256))) return 1; memcpy(newlengths, deflengths, 256); @@ -7530,25 +7721,33 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint)) */ for (i=0; i < rc; i++) { - uint pageb= (rule[i].base >> 8) & 0xFF; - uint pagec= (rule[i].curr >> 8) & 0xFF; + if (!rule[i].curr[1]) /* If not a contraction */ + { + uint pageb= (rule[i].base >> 8) & 0xFF; + uint pagec= (rule[i].curr[0] >> 8) & 0xFF; - if (newlengths[pagec] < deflengths[pageb]) - newlengths[pagec]= deflengths[pageb]; + if (newlengths[pagec] < deflengths[pageb]) + newlengths[pagec]= deflengths[pageb]; + } + else + ncontractions++; } for (i=0; i < rc; i++) { uint pageb= (rule[i].base >> 8) & 0xFF; - uint pagec= (rule[i].curr >> 8) & 0xFF; + uint pagec= (rule[i].curr[0] >> 8) & 0xFF; uint chb, chc; + if (rule[i].curr[1]) /* Skip contraction */ + continue; + if (!newweights[pagec]) { /* Alloc new page and copy the default UCA weights */ uint size= 256*newlengths[pagec]*sizeof(uint16); - if (!(newweights[pagec]= (uint16*) alloc(size))) + if (!(newweights[pagec]= (uint16*) (*alloc)(size))) return 1; bzero((void*) newweights[pagec], size); @@ -7564,7 +7763,7 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint)) Aply the alternative rule: shift to the base character and primary difference. */ - chc= rule[i].curr & 0xFF; + chc= rule[i].curr[0] & 0xFF; chb= rule[i].base & 0xFF; memcpy(newweights[pagec] + chc*newlengths[pagec], defweights[pageb] + chb*deflengths[pageb], @@ -7575,45 +7774,160 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(uint)) /* Copy non-overwritten pages from the default UCA weights */ for (i= 0; i < 256 ; i++) + { if (!newweights[i]) newweights[i]= defweights[i]; + } cs->sort_order= newlengths; cs->sort_order_big= newweights; + cs->contractions= NULL; + /* Now process contractions */ + if (ncontractions) + { + uint size= 0x40*0x40*sizeof(uint16); /* 8K, for basic latin letter only */ + if (!(cs->contractions= (uint16*) (*alloc)(size))) + return 1; + bzero((void*)cs->contractions, size); + for (i=0; i < rc; i++) + { + if (rule[i].curr[1]) + { + uint pageb= (rule[i].base >> 8) & 0xFF; + uint chb= rule[i].base & 0xFF; + uint16 *offsb= defweights[pageb] + chb*deflengths[pageb]; + uint offsc; + + if (offsb[1] || + rule[i].curr[0] < 0x40 || rule[i].curr[0] > 0x7f || + rule[i].curr[1] < 0x40 || rule[i].curr[1] > 0x7f) + { + /* + TODO: add error reporting; + We support only basic latin letters contractions at this point. + Also, We don't support contractions with weight longer than one. + Otherwise, we'd need much more memory. + */ + return 1; + } + offsc= (rule[i].curr[0]-0x40)*0x40+(rule[i].curr[1]-0x40); + + /* Copy base weight applying primary difference */ + cs->contractions[offsc]= offsb[0] + rule[i].diff[0]; + } + } + } return 0; } + +/* + Universal CHARSET_INFO compatible wrappers + for the above internal functions. + Should work for any character set. +*/ + static my_bool my_coll_init_uca(CHARSET_INFO *cs, void *(*alloc)(uint)) { return create_tailoring(cs, alloc); } +static int my_strnncoll_any_uca(CHARSET_INFO *cs, + const uchar *s, uint slen, + const uchar *t, uint tlen, + my_bool t_is_prefix) +{ + return my_strnncoll_uca(cs, &my_any_uca_scanner_handler, + s, slen, t, tlen, t_is_prefix); +} + +static int my_strnncollsp_any_uca(CHARSET_INFO *cs, + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + return my_strnncollsp_uca(cs, &my_any_uca_scanner_handler, + s, slen, t, tlen); +} + +static void my_hash_sort_any_uca(CHARSET_INFO *cs, + const uchar *s, uint slen, + ulong *n1, ulong *n2) +{ + my_hash_sort_uca(cs, &my_any_uca_scanner_handler, s, slen, n1, n2); +} + +static int my_strnxfrm_any_uca(CHARSET_INFO *cs, + uchar *dst, uint dstlen, + const uchar *src, uint srclen) +{ + return my_strnxfrm_uca(cs, &my_any_uca_scanner_handler, + dst, dstlen, src, srclen); +} + + +#ifdef HAVE_CHARSET_ucs2 +/* + UCS2 optimized CHARSET_INFO compatible wrappers. +*/ +static int my_strnncoll_ucs2_uca(CHARSET_INFO *cs, + const uchar *s, uint slen, + const uchar *t, uint tlen, + my_bool t_is_prefix) +{ + return my_strnncoll_uca(cs, &my_ucs2_uca_scanner_handler, + s, slen, t, tlen, t_is_prefix); +} + +static int my_strnncollsp_ucs2_uca(CHARSET_INFO *cs, + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + return my_strnncollsp_uca(cs, &my_ucs2_uca_scanner_handler, + s, slen, t, tlen); +} + +static void my_hash_sort_ucs2_uca(CHARSET_INFO *cs, + const uchar *s, uint slen, + ulong *n1, ulong *n2) +{ + my_hash_sort_uca(cs, &my_ucs2_uca_scanner_handler, s, slen, n1, n2); +} + +static int my_strnxfrm_ucs2_uca(CHARSET_INFO *cs, + uchar *dst, uint dstlen, + const uchar *src, uint srclen) +{ + return my_strnxfrm_uca(cs, &my_ucs2_uca_scanner_handler, + dst, dstlen, src, srclen); +} + MY_COLLATION_HANDLER my_collation_ucs2_uca_handler = { my_coll_init_uca, /* init */ - my_strnncoll_uca, - my_strnncollsp_uca, - my_strnxfrm_uca, + my_strnncoll_ucs2_uca, + my_strnncollsp_ucs2_uca, + my_strnxfrm_ucs2_uca, my_like_range_simple, my_wildcmp_uca, NULL, my_instr_mb, - my_hash_sort_uca + my_hash_sort_ucs2_uca }; CHARSET_INFO my_charset_ucs2_general_uca= { - 45,0,0, /* number */ + 128,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ - "ucs2_uca_ci", /* name */ + "ucs2_unicode_ci", /* name */ "", /* comment */ - NULL, /* tailoring */ + "", /* tailoring */ NULL, /* ctype */ NULL, /* to_lower */ NULL, /* to_upper */ uca_length, /* sort_order */ + NULL, /* contractions */ uca_weight, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7628,10 +7942,9 @@ CHARSET_INFO my_charset_ucs2_general_uca= &my_collation_ucs2_uca_handler }; - CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= { - 128,0,0, /* number */ + 129,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_icelandic_ci",/* name */ @@ -7641,6 +7954,7 @@ CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7657,7 +7971,7 @@ CHARSET_INFO my_charset_ucs2_icelandic_uca_ci= CHARSET_INFO my_charset_ucs2_latvian_uca_ci= { - 129,0,0, /* number */ + 130,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_latvian_ci", /* name */ @@ -7667,6 +7981,7 @@ CHARSET_INFO my_charset_ucs2_latvian_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7683,7 +7998,7 @@ CHARSET_INFO my_charset_ucs2_latvian_uca_ci= CHARSET_INFO my_charset_ucs2_romanian_uca_ci= { - 130,0,0, /* number */ + 131,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_romanian_ci", /* name */ @@ -7693,6 +8008,7 @@ CHARSET_INFO my_charset_ucs2_romanian_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7709,7 +8025,7 @@ CHARSET_INFO my_charset_ucs2_romanian_uca_ci= CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= { - 131,0,0, /* number */ + 132,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_slovenian_ci",/* name */ @@ -7719,6 +8035,7 @@ CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7735,7 +8052,7 @@ CHARSET_INFO my_charset_ucs2_slovenian_uca_ci= CHARSET_INFO my_charset_ucs2_polish_uca_ci= { - 132,0,0, /* number */ + 133,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_polish_ci", /* name */ @@ -7745,6 +8062,7 @@ CHARSET_INFO my_charset_ucs2_polish_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7761,7 +8079,7 @@ CHARSET_INFO my_charset_ucs2_polish_uca_ci= CHARSET_INFO my_charset_ucs2_estonian_uca_ci= { - 133,0,0, /* number */ + 134,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_estonian_ci", /* name */ @@ -7771,6 +8089,7 @@ CHARSET_INFO my_charset_ucs2_estonian_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7787,7 +8106,7 @@ CHARSET_INFO my_charset_ucs2_estonian_uca_ci= CHARSET_INFO my_charset_ucs2_spanish_uca_ci= { - 134,0,0, /* number */ + 135,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_spanish_ci", /* name */ @@ -7797,6 +8116,7 @@ CHARSET_INFO my_charset_ucs2_spanish_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7813,7 +8133,7 @@ CHARSET_INFO my_charset_ucs2_spanish_uca_ci= CHARSET_INFO my_charset_ucs2_swedish_uca_ci= { - 135,0,0, /* number */ + 136,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_swedish_ci", /* name */ @@ -7823,6 +8143,7 @@ CHARSET_INFO my_charset_ucs2_swedish_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7839,7 +8160,7 @@ CHARSET_INFO my_charset_ucs2_swedish_uca_ci= CHARSET_INFO my_charset_ucs2_turkish_uca_ci= { - 136,0,0, /* number */ + 137,0,0, /* number */ MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, "ucs2", /* cs name */ "ucs2_turkish_ci", /* name */ @@ -7849,6 +8170,143 @@ CHARSET_INFO my_charset_ucs2_turkish_uca_ci= NULL, /* to_lower */ NULL, /* to_upper */ NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; + +CHARSET_INFO my_charset_ucs2_czech_uca_ci= +{ + 138,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_czech_ci", /* name */ + "", /* comment */ + czech, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; + + +CHARSET_INFO my_charset_ucs2_danish_uca_ci= +{ + 139,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_danish_ci", /* name */ + "", /* comment */ + danish, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; + +CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci= +{ + 140,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_lithuanian_ci",/* name */ + "", /* comment */ + lithuanian, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; + +CHARSET_INFO my_charset_ucs2_slovak_uca_ci= +{ + 141,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_slovak_ci", /* name */ + "", /* comment */ + slovak, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_ucs2_handler, + &my_collation_ucs2_uca_handler +}; + +CHARSET_INFO my_charset_ucs2_spanish2_uca_ci= +{ + 142,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "ucs2", /* cs name */ + "ucs2_spanish2_ci", /* name */ + "", /* comment */ + spanish2, /* tailoring */ + NULL, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ @@ -7864,3 +8322,454 @@ CHARSET_INFO my_charset_ucs2_turkish_uca_ci= }; #endif + + +#ifdef HAVE_CHARSET_utf8 +MY_COLLATION_HANDLER my_collation_any_uca_handler = +{ + my_coll_init_uca, /* init */ + my_strnncoll_any_uca, + my_strnncollsp_any_uca, + my_strnxfrm_any_uca, + my_like_range_simple, + my_wildcmp_uca, + NULL, + my_instr_mb, + my_hash_sort_any_uca +}; + +/* + We consider bytes with code more than 127 as a letter. + This garantees that word boundaries work fine with regular + expressions. Note, there is no need to mark byte 255 as a + letter, it is illegal byte in UTF8. +*/ +static uchar ctype_utf8[] = { + 0, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 72, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 132,132,132,132,132,132,132,132,132,132, 16, 16, 16, 16, 16, 16, + 16,129,129,129,129,129,129, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 16, 16, 16, 16, + 16,130,130,130,130,130,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 16, 16, 16, 16, 32, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0 +}; + +extern MY_CHARSET_HANDLER my_charset_utf8_handler; + +CHARSET_INFO my_charset_utf8_general_uca_ci= +{ + 192,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_unicode_ci", /* name */ + "", /* comment */ + "", /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + uca_length, /* sort_order */ + NULL, /* contractions */ + uca_weight, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 1, /* mbminlen */ + 3, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + + +CHARSET_INFO my_charset_utf8_icelandic_uca_ci= +{ + 193,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_icelandic_ci",/* name */ + "", /* comment */ + icelandic, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_latvian_uca_ci= +{ + 194,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_latvian_ci", /* name */ + "", /* comment */ + latvian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_romanian_uca_ci= +{ + 195,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_romanian_ci", /* name */ + "", /* comment */ + romanian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_slovenian_uca_ci= +{ + 196,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_slovenian_ci",/* name */ + "", /* comment */ + slovenian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_polish_uca_ci= +{ + 197,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_polish_ci", /* name */ + "", /* comment */ + polish, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_estonian_uca_ci= +{ + 198,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_estonian_ci", /* name */ + "", /* comment */ + estonian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_spanish_uca_ci= +{ + 199,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_spanish_ci", /* name */ + "", /* comment */ + spanish, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_swedish_uca_ci= +{ + 200,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_swedish_ci", /* name */ + "", /* comment */ + swedish, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_turkish_uca_ci= +{ + 201,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_turkish_ci", /* name */ + "", /* comment */ + turkish, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_czech_uca_ci= +{ + 202,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_czech_ci", /* name */ + "", /* comment */ + czech, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + + +CHARSET_INFO my_charset_utf8_danish_uca_ci= +{ + 203,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_danish_ci", /* name */ + "", /* comment */ + danish, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_lithuanian_uca_ci= +{ + 204,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_lithuanian_ci",/* name */ + "", /* comment */ + lithuanian, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_slovak_uca_ci= +{ + 205,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_slovak_ci", /* name */ + "", /* comment */ + slovak, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; + +CHARSET_INFO my_charset_utf8_spanish2_uca_ci= +{ + 206,0,0, /* number */ + MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE, + "utf8", /* cs name */ + "utf8_spanish2_ci", /* name */ + "", /* comment */ + spanish2, /* tailoring */ + ctype_utf8, /* ctype */ + NULL, /* to_lower */ + NULL, /* to_upper */ + NULL, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ + NULL, /* tab_to_uni */ + NULL, /* tab_from_uni */ + NULL, /* state_map */ + NULL, /* ident_map */ + 8, /* strxfrm_multiply */ + 2, /* mbminlen */ + 2, /* mbmaxlen */ + 9, /* min_sort_char */ + 0xFFFF, /* max_sort_char */ + &my_charset_utf8_handler, + &my_collation_any_uca_handler +}; +#endif diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index f05e85a9d88..20a5ff58d3a 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -182,7 +182,8 @@ static void my_casedn_str_ucs2(CHARSET_INFO *cs __attribute__((unused)), static int my_strnncoll_ucs2(CHARSET_INFO *cs, const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *t, uint tlen, + my_bool t_is_prefix) { int s_res,t_res; my_wc_t s_wc,t_wc; @@ -213,7 +214,14 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs, s+=s_res; t+=t_res; } - return ( (se-s) - (te-t) ); + return t_is_prefix ? t-te : ((se-s) - (te-t)); +} + +static int my_strnncollsp_ucs2(CHARSET_INFO *cs, + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + return my_strnncoll_ucs2(cs,s,slen,t,tlen,0); } @@ -1223,8 +1231,9 @@ int my_wildcmp_ucs2_bin(CHARSET_INFO *cs, static int my_strnncoll_ucs2_bin(CHARSET_INFO *cs, - const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *s, uint slen, + const uchar *t, uint tlen, + my_bool t_is_prefix) { int s_res,t_res; my_wc_t s_wc,t_wc; @@ -1249,7 +1258,14 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs, s+=s_res; t+=t_res; } - return ( (se-s) - (te-t) ); + return t_is_prefix ? t-te : ((se-s) - (te-t)); +} + +static int my_strnncollsp_ucs2_bin(CHARSET_INFO *cs, + const uchar *s, uint slen, + const uchar *t, uint tlen) +{ + return my_strnncoll_ucs2_bin(cs,s,slen,t,tlen,0); } @@ -1374,7 +1390,7 @@ static MY_COLLATION_HANDLER my_collation_ucs2_general_ci_handler = { NULL, /* init */ my_strnncoll_ucs2, - my_strnncoll_ucs2, + my_strnncollsp_ucs2, my_strnxfrm_ucs2, my_like_range_ucs2, my_wildcmp_ucs2_ci, @@ -1388,7 +1404,7 @@ static MY_COLLATION_HANDLER my_collation_ucs2_bin_handler = { NULL, /* init */ my_strnncoll_ucs2_bin, - my_strnncoll_ucs2_bin, + my_strnncollsp_ucs2_bin, my_strnxfrm_ucs2_bin, my_like_range_simple, my_wildcmp_ucs2_bin, @@ -1438,9 +1454,10 @@ CHARSET_INFO my_charset_ucs2_general_ci= to_lower_ucs2, /* to_lower */ to_upper_ucs2, /* to_upper */ to_upper_ucs2, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -1464,6 +1481,7 @@ CHARSET_INFO my_charset_ucs2_bin= to_lower_ucs2, /* to_lower */ to_upper_ucs2, /* to_upper */ to_upper_ucs2, /* sort_order */ + NULL, /* contractions */ NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ diff --git a/strings/ctype-ujis.c b/strings/ctype-ujis.c index 7f88a16cac6..3f53a07f527 100644 --- a/strings/ctype-ujis.c +++ b/strings/ctype-ujis.c @@ -8475,9 +8475,10 @@ CHARSET_INFO my_charset_ujis_japanese_ci= to_lower_ujis, to_upper_ujis, sort_order_ujis, + NULL, /* sort_order_big*/ + NULL, /* contractions */ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -8502,9 +8503,10 @@ CHARSET_INFO my_charset_ujis_bin= to_lower_ujis, to_upper_ujis, sort_order_ujis, + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 02918fcd10f..bf2d8a17fb4 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -1808,7 +1808,8 @@ static void my_casedn_str_utf8(CHARSET_INFO *cs, char * s) static int my_strnncoll_utf8(CHARSET_INFO *cs, const uchar *s, uint slen, - const uchar *t, uint tlen) + const uchar *t, uint tlen, + my_bool t_is_prefix) { int s_res,t_res; my_wc_t s_wc,t_wc; @@ -1839,7 +1840,7 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs, s+=s_res; t+=t_res; } - return ( (se-s) - (te-t) ); + return t_is_prefix ? t-te : ((se-s) - (te-t)); } @@ -2056,7 +2057,7 @@ static MY_COLLATION_HANDLER my_collation_ci_handler = my_hash_sort_utf8 }; -static MY_CHARSET_HANDLER my_charset_handler= +MY_CHARSET_HANDLER my_charset_utf8_handler= { NULL, /* init */ my_ismbchar_utf8, @@ -2097,9 +2098,10 @@ CHARSET_INFO my_charset_utf8_general_ci= to_lower_utf8, /* to_lower */ to_upper_utf8, /* to_upper */ to_upper_utf8, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -2107,7 +2109,7 @@ CHARSET_INFO my_charset_utf8_general_ci= 3, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ - &my_charset_handler, + &my_charset_utf8_handler, &my_collation_ci_handler }; @@ -2124,9 +2126,10 @@ CHARSET_INFO my_charset_utf8_bin= to_lower_utf8, /* to_lower */ to_upper_utf8, /* to_upper */ to_upper_utf8, /* sort_order */ + NULL, /* contractions */ + NULL, /* sort_order_big*/ NULL, /* tab_to_uni */ NULL, /* tab_from_uni */ - NULL, /* sort_order_big*/ NULL, /* state_map */ NULL, /* ident_map */ 1, /* strxfrm_multiply */ @@ -2134,13 +2137,12 @@ CHARSET_INFO my_charset_utf8_bin= 3, /* mbmaxlen */ 0, /* min_sort_char */ 255, /* max_sort_char */ - &my_charset_handler, + &my_charset_utf8_handler, &my_collation_mb_bin_handler }; #ifdef MY_TEST_UTF8 - #include static void test_mb(CHARSET_INFO *cs, uchar *s) @@ -2172,7 +2174,7 @@ int main() test_mb(cs,(uchar*)str); - pr1;2cintf("orig :'%s'\n",str); + printf("orig :'%s'\n",str); my_caseup_utf8(cs,str,15); printf("caseup :'%s'\n",str); diff --git a/strings/ctype-win1250ch.c b/strings/ctype-win1250ch.c index a2c5768b16c..b4dbda3e8ed 100644 --- a/strings/ctype-win1250ch.c +++ b/strings/ctype-win1250ch.c @@ -448,20 +448,25 @@ static struct wordvalue doubles[] = { static int my_strnncoll_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const uchar * s1, uint len1, - const uchar * s2, uint len2) + const uchar * s2, uint len2, + my_bool s2_is_prefix) { int v1, v2; const uchar * p1, * p2; int pass1 = 0, pass2 = 0; int diff; + if (s2_is_prefix && len1 > len2) + len1=len2; + p1 = s1; p2 = s2; - do { + do + { NEXT_CMP_VALUE(s1, p1, pass1, v1, (int)len1); NEXT_CMP_VALUE(s2, p2, pass2, v2, (int)len2); - diff = v1 - v2; - if (diff != 0) return diff; + if ((diff = v1 - v2)) + return diff; } while (v1); return 0; } @@ -478,7 +483,7 @@ int my_strnncollsp_win1250ch(CHARSET_INFO * cs, { for ( ; slen && s[slen-1] == ' ' ; slen--); for ( ; tlen && t[tlen-1] == ' ' ; tlen--); - return my_strnncoll_win1250ch(cs,s,slen,t,tlen); + return my_strnncoll_win1250ch(cs,s,slen,t,tlen,0); } @@ -629,6 +634,7 @@ CHARSET_INFO my_charset_cp1250_czech_ci = to_lower_win1250ch, to_upper_win1250ch, sort_order_win1250ch, + NULL, /* contractions */ NULL, /* sort_order_big*/ tab_cp1250_uni, /* tab_to_uni */ idx_uni_cp1250, /* tab_from_uni */ diff --git a/tests/client_test.c b/tests/client_test.c index 223f9edeebf..b4ba20dbf00 100644 --- a/tests/client_test.c +++ b/tests/client_test.c @@ -9729,7 +9729,7 @@ static void test_bug3796() MYSQL_STMT *stmt; MYSQL_BIND bind[1]; const char *concat_arg0= "concat_with_"; - const int OUT_BUFF_SIZE= 30; + enum { OUT_BUFF_SIZE= 30 }; char out_buff[OUT_BUFF_SIZE]; char canonical_buff[OUT_BUFF_SIZE]; ulong out_length;