Loading acinclude.m4 +0 −18 Original line number Diff line number Diff line Loading @@ -1599,11 +1599,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ;; esac AC_ARG_WITH([ndb-shm], [ --with-ndb-shm Include the NDB Cluster shared memory transporter], [ndb_shm="$withval"], [ndb_shm=no]) AC_ARG_WITH([ndb-test], [ --with-ndb-test Include the NDB Cluster ndbapi test programs], Loading Loading @@ -1633,19 +1628,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ AC_MSG_CHECKING([for NDB Cluster options]) AC_MSG_RESULT([]) have_ndb_shm=no case "$ndb_shm" in yes ) AC_MSG_RESULT([-- including shared memory transporter]) AC_DEFINE([NDB_SHM_TRANSPORTER], [1], [Including Ndb Cluster DB shared memory transporter]) have_ndb_shm="yes" ;; * ) AC_MSG_RESULT([-- not including shared memory transporter]) ;; esac have_ndb_test=no case "$ndb_test" in yes ) Loading configure.in +15 −4 Original line number Diff line number Diff line Loading @@ -1923,7 +1923,9 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \ pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \ pthread_key_delete pthread_rwlock_rdlock pthread_setprio \ pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \ realpath rename rint rwlock_init setupterm sighold sigset sigthreadmask \ realpath rename rint rwlock_init setupterm \ shmget shmat shmdt shmctl \ sighold sigset sigthreadmask \ snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \ strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr) Loading Loading @@ -3078,10 +3080,19 @@ fi AC_SUBST([ndb_port_base]) ndb_transporter_opt_objs="" if test X"$have_ndb_shm" = Xyes then if test "$ac_cv_func_shmget" = "yes" && test "$ac_cv_func_shmat" = "yes" && test "$ac_cv_func_shmdt" = "yes" && test "$ac_cv_func_shmctl" = "yes" then AC_DEFINE([NDB_SHM_TRANSPORTER], [1], [Including Ndb Cluster DB shared memory transporter]) AC_MSG_RESULT([Including ndb shared memory transporter]) ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo" else AC_MSG_RESULT([Not including ndb shared memory transporter]) fi if test X"$have_ndb_sci" = Xyes then ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo" Loading myisam/mi_rnext_same.c +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ int mi_rnext_same(MI_INFO *info, byte *buf) if (my_errno == HA_ERR_KEY_NOT_FOUND) my_errno=HA_ERR_END_OF_FILE; } else if (!buf) { DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0); } else if (!(*info->read_record)(info,info->lastpos,buf)) { info->update|= HA_STATE_AKTIV; /* Record is read */ Loading myisammrg/myrg_rnext_same.c +22 −11 Original line number Diff line number Diff line Loading @@ -16,25 +16,36 @@ #include "myrg_def.h" int myrg_rnext_same(MYRG_INFO *info, byte *buf) { uint err; int err; MI_INFO *mi; if (!info->current_table) return (HA_ERR_KEY_NOT_FOUND); err=mi_rnext_same(info->current_table->table,buf); /* at first, do rnext for the table found before */ if ((err=mi_rnext_same(info->current_table->table,NULL))) { if (err == HA_ERR_END_OF_FILE) { queue_remove(&(info->by_key),0); if (!info->by_key.elements) return HA_ERR_END_OF_FILE; mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; mi->once_flags|= RRND_PRESERVE_LASTINX; return mi_rrnd(mi,buf,mi->lastpos); } else return err; } else { /* Found here, adding to queue */ queue_top(&(info->by_key))=(byte *)(info->current_table); queue_replaced(&(info->by_key)); } /* now, mymerge's read_next is as simple as one queue_top */ mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; return _myrg_mi_read_record(mi,buf); } mysql-test/r/func_concat.result +36 −0 Original line number Diff line number Diff line Loading @@ -32,3 +32,39 @@ select * from t1 where concat(A,C,B,D) = 'AAAA2003-03-011051'; a b c d AAAA 105 2003-03-01 1 drop table t1; select 'a' union select concat('a', -4); a a a-4 select 'a' union select concat('a', -4.5); a a a-4.5 select 'a' union select concat('a', -(4 + 1)); a a a-5 select 'a' union select concat('a', 4 - 5); a a a-1 select 'a' union select concat('a', -'3'); a a a-3 select 'a' union select concat('a', -concat('3',4)); a a a-34 select 'a' union select concat('a', -0); a a a0 select 'a' union select concat('a', -0.0); a a a-0.0 select 'a' union select concat('a', -0.0000); a a a-0.0000 Loading
acinclude.m4 +0 −18 Original line number Diff line number Diff line Loading @@ -1599,11 +1599,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ;; esac AC_ARG_WITH([ndb-shm], [ --with-ndb-shm Include the NDB Cluster shared memory transporter], [ndb_shm="$withval"], [ndb_shm=no]) AC_ARG_WITH([ndb-test], [ --with-ndb-test Include the NDB Cluster ndbapi test programs], Loading Loading @@ -1633,19 +1628,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ AC_MSG_CHECKING([for NDB Cluster options]) AC_MSG_RESULT([]) have_ndb_shm=no case "$ndb_shm" in yes ) AC_MSG_RESULT([-- including shared memory transporter]) AC_DEFINE([NDB_SHM_TRANSPORTER], [1], [Including Ndb Cluster DB shared memory transporter]) have_ndb_shm="yes" ;; * ) AC_MSG_RESULT([-- not including shared memory transporter]) ;; esac have_ndb_test=no case "$ndb_test" in yes ) Loading
configure.in +15 −4 Original line number Diff line number Diff line Loading @@ -1923,7 +1923,9 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \ pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \ pthread_key_delete pthread_rwlock_rdlock pthread_setprio \ pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \ realpath rename rint rwlock_init setupterm sighold sigset sigthreadmask \ realpath rename rint rwlock_init setupterm \ shmget shmat shmdt shmctl \ sighold sigset sigthreadmask \ snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \ strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr) Loading Loading @@ -3078,10 +3080,19 @@ fi AC_SUBST([ndb_port_base]) ndb_transporter_opt_objs="" if test X"$have_ndb_shm" = Xyes then if test "$ac_cv_func_shmget" = "yes" && test "$ac_cv_func_shmat" = "yes" && test "$ac_cv_func_shmdt" = "yes" && test "$ac_cv_func_shmctl" = "yes" then AC_DEFINE([NDB_SHM_TRANSPORTER], [1], [Including Ndb Cluster DB shared memory transporter]) AC_MSG_RESULT([Including ndb shared memory transporter]) ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo" else AC_MSG_RESULT([Not including ndb shared memory transporter]) fi if test X"$have_ndb_sci" = Xyes then ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo" Loading
myisam/mi_rnext_same.c +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ int mi_rnext_same(MI_INFO *info, byte *buf) if (my_errno == HA_ERR_KEY_NOT_FOUND) my_errno=HA_ERR_END_OF_FILE; } else if (!buf) { DBUG_RETURN(info->lastpos==HA_OFFSET_ERROR ? my_errno : 0); } else if (!(*info->read_record)(info,info->lastpos,buf)) { info->update|= HA_STATE_AKTIV; /* Record is read */ Loading
myisammrg/myrg_rnext_same.c +22 −11 Original line number Diff line number Diff line Loading @@ -16,25 +16,36 @@ #include "myrg_def.h" int myrg_rnext_same(MYRG_INFO *info, byte *buf) { uint err; int err; MI_INFO *mi; if (!info->current_table) return (HA_ERR_KEY_NOT_FOUND); err=mi_rnext_same(info->current_table->table,buf); /* at first, do rnext for the table found before */ if ((err=mi_rnext_same(info->current_table->table,NULL))) { if (err == HA_ERR_END_OF_FILE) { queue_remove(&(info->by_key),0); if (!info->by_key.elements) return HA_ERR_END_OF_FILE; mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; mi->once_flags|= RRND_PRESERVE_LASTINX; return mi_rrnd(mi,buf,mi->lastpos); } else return err; } else { /* Found here, adding to queue */ queue_top(&(info->by_key))=(byte *)(info->current_table); queue_replaced(&(info->by_key)); } /* now, mymerge's read_next is as simple as one queue_top */ mi=(info->current_table=(MYRG_TABLE *)queue_top(&(info->by_key)))->table; return _myrg_mi_read_record(mi,buf); }
mysql-test/r/func_concat.result +36 −0 Original line number Diff line number Diff line Loading @@ -32,3 +32,39 @@ select * from t1 where concat(A,C,B,D) = 'AAAA2003-03-011051'; a b c d AAAA 105 2003-03-01 1 drop table t1; select 'a' union select concat('a', -4); a a a-4 select 'a' union select concat('a', -4.5); a a a-4.5 select 'a' union select concat('a', -(4 + 1)); a a a-5 select 'a' union select concat('a', 4 - 5); a a a-1 select 'a' union select concat('a', -'3'); a a a-3 select 'a' union select concat('a', -concat('3',4)); a a a-34 select 'a' union select concat('a', -0); a a a0 select 'a' union select concat('a', -0.0); a a a-0.0 select 'a' union select concat('a', -0.0000); a a a-0.0000