Loading Docs/manual.texi +30 −0 Original line number Diff line number Diff line Loading @@ -39765,6 +39765,8 @@ though, so Version 3.23 is not released as a stable version yet. @appendixsubsec Changes in release 3.23.29 @itemize @bullet @item Remove not used BDB logs on shutdown. @item When creating a table, put @code{PRIMARY} keys first, followed by @code{UNIQUE} keys. @item Loading Loading @@ -44312,6 +44314,34 @@ You can't use temporary tables more than once in the same query. select * from temporary_table, temporary_table as t2; @end example @item The optimizer may handle @code{DISTINCT} differently if you are using 'hidden' columns in a join or not. In a join, hidden columns are counted as part of the result (even if they are not shown) while in normal queries hidden columns doesn't participate in the @code{DISTINCT} comparison. We will probably change this in the future to never compare the hidden columns when executing @code{DISTINCT} An example of this is: @example SELECT DISTINCT mp3id FROM band_downloads WHERE userid = 9 ORDER BY id DESC; and SELECT DISTINCT band_downloads.mp3id, FROM band_downloads,band_mp3 WHERE band_downloads.userid = 9 AND band_mp3.id = band_downloads.mp3id ORDER BY band_downloads.id DESC; @end example In the second case you may in @strong{MySQL} 3.23.x get two identical rows in the result set (because the hidden 'id' column may differ). Note that the this only happens for queries where you don't have the ORDER BY columns in the result, something that is you are not allowed to do in ANSI SQL. @item Because @strong{MySQL} allows you to work with table types that don't support transactions, and thus can't @code{rollback} data, some things include/my_sys.h +2 −0 Original line number Diff line number Diff line Loading @@ -332,6 +332,8 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *); #define my_b_tell(info) ((info)->pos_in_file + \ ((info)->rc_pos - (info)->rc_request_pos)) #define my_b_bytes_in_cache(info) ((uint) ((info)->rc_end - (info)->rc_pos)) typedef struct st_changeable_var { const char *name; /* Name of variable */ long *varptr; /* Pointer to variable */ Loading mysql-test/mysql-test-run +8 −8 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ else if [ -f ./mysql-test-run ] && [ -d ../sql ] ; then SOURCE_DIST=1 else echo "If you are using binary distirubution, run me from install root as \ echo "If you are using binary distribution, run me from install root as \ scripts/mysql-test-run. On source distribution run me from source root as \ mysql-test/mysql-test-run or from mysql-test as ./mysql-test-run" exit 1 Loading Loading @@ -100,18 +100,18 @@ fi #++ # Program Definitions #-- BASENAME=`which basename` BASENAME=`which basename | head -1` CAT=/bin/cat CUT=/usr/bin/cut ECHO=/bin/echo EXPR=`which expr` EXPR=`which expr | head -1` FIND=/usr/bin/find GCOV=`which gcov` GCOV=`which gcov | head -1` PRINTF=/usr/bin/printf RM=/bin/rm TIME=/usr/bin/time TR=/usr/bin/tr XARGS=`which xargs` XARGS=`which xargs | head -1` # on source dist, we pick up freshly build executables # on binary, use what is installed Loading @@ -130,7 +130,7 @@ fi SLAVE_MYSQLD=$MYSQLD #this will be changed later if we are doing gcov MYSQL_TEST="$MYSQL_TEST --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent" MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent" GDB_MASTER_INIT=/tmp/gdbinit.master GDB_SLAVE_INIT=/tmp/gdbinit.slave Loading Loading @@ -358,7 +358,7 @@ stop_slave () { if [ x$SLAVE_RUNNING = x1 ] then $MYSQLADMIN --socket=$SLAVE_MYSOCK -u root shutdown $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown SLAVE_RUNNING=0 fi } Loading @@ -367,7 +367,7 @@ stop_master () { if [ x$MASTER_RUNNING = x1 ] then $MYSQLADMIN --socket=$MASTER_MYSOCK -u root shutdown $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown MASTER_RUNNING=0 fi } Loading mysys/mf_iocache2.c +5 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ void my_b_seek(IO_CACHE *info,my_off_t pos) } /* ** Fill buffer ** Fill buffer. Note that this assumes that you have already used ** all characters in the CACHE, independent of the rc_pos value! ** return: 0 on error or EOF (info->error = -1 on error) ** number of characters */ Loading Loading @@ -102,8 +103,8 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length) uint length; max_length--; /* Save place for end \0 */ /* Calculate number of characters in buffer */ if (!(length= (uint) (info->rc_end - info->rc_pos))) if (!(length=my_b_fill(info))) if (!(length= my_b_bytes_in_cache(info)) && !(length= my_b_fill(info))) return 0; for (;;) { Loading sql/filesort.cc +5 −1 Original line number Diff line number Diff line Loading @@ -324,8 +324,12 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, file->rnd_init(); file->extra(HA_EXTRA_CACHE); /* Quicker reads */ } else if (quick_select) // QQ For FULLTEXT { // QQ Should be removed soon file->index_end(); select->quick->init(); } if (!error) for (;;) { if (quick_select) Loading Loading
Docs/manual.texi +30 −0 Original line number Diff line number Diff line Loading @@ -39765,6 +39765,8 @@ though, so Version 3.23 is not released as a stable version yet. @appendixsubsec Changes in release 3.23.29 @itemize @bullet @item Remove not used BDB logs on shutdown. @item When creating a table, put @code{PRIMARY} keys first, followed by @code{UNIQUE} keys. @item Loading Loading @@ -44312,6 +44314,34 @@ You can't use temporary tables more than once in the same query. select * from temporary_table, temporary_table as t2; @end example @item The optimizer may handle @code{DISTINCT} differently if you are using 'hidden' columns in a join or not. In a join, hidden columns are counted as part of the result (even if they are not shown) while in normal queries hidden columns doesn't participate in the @code{DISTINCT} comparison. We will probably change this in the future to never compare the hidden columns when executing @code{DISTINCT} An example of this is: @example SELECT DISTINCT mp3id FROM band_downloads WHERE userid = 9 ORDER BY id DESC; and SELECT DISTINCT band_downloads.mp3id, FROM band_downloads,band_mp3 WHERE band_downloads.userid = 9 AND band_mp3.id = band_downloads.mp3id ORDER BY band_downloads.id DESC; @end example In the second case you may in @strong{MySQL} 3.23.x get two identical rows in the result set (because the hidden 'id' column may differ). Note that the this only happens for queries where you don't have the ORDER BY columns in the result, something that is you are not allowed to do in ANSI SQL. @item Because @strong{MySQL} allows you to work with table types that don't support transactions, and thus can't @code{rollback} data, some things
include/my_sys.h +2 −0 Original line number Diff line number Diff line Loading @@ -332,6 +332,8 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *); #define my_b_tell(info) ((info)->pos_in_file + \ ((info)->rc_pos - (info)->rc_request_pos)) #define my_b_bytes_in_cache(info) ((uint) ((info)->rc_end - (info)->rc_pos)) typedef struct st_changeable_var { const char *name; /* Name of variable */ long *varptr; /* Pointer to variable */ Loading
mysql-test/mysql-test-run +8 −8 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ else if [ -f ./mysql-test-run ] && [ -d ../sql ] ; then SOURCE_DIST=1 else echo "If you are using binary distirubution, run me from install root as \ echo "If you are using binary distribution, run me from install root as \ scripts/mysql-test-run. On source distribution run me from source root as \ mysql-test/mysql-test-run or from mysql-test as ./mysql-test-run" exit 1 Loading Loading @@ -100,18 +100,18 @@ fi #++ # Program Definitions #-- BASENAME=`which basename` BASENAME=`which basename | head -1` CAT=/bin/cat CUT=/usr/bin/cut ECHO=/bin/echo EXPR=`which expr` EXPR=`which expr | head -1` FIND=/usr/bin/find GCOV=`which gcov` GCOV=`which gcov | head -1` PRINTF=/usr/bin/printf RM=/bin/rm TIME=/usr/bin/time TR=/usr/bin/tr XARGS=`which xargs` XARGS=`which xargs | head -1` # on source dist, we pick up freshly build executables # on binary, use what is installed Loading @@ -130,7 +130,7 @@ fi SLAVE_MYSQLD=$MYSQLD #this will be changed later if we are doing gcov MYSQL_TEST="$MYSQL_TEST --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent" MYSQL_TEST="$MYSQL_TEST --no-defaults --socket=$MASTER_MYSOCK --database=$DB --user=$DBUSER --password=$DBPASSWD --silent" GDB_MASTER_INIT=/tmp/gdbinit.master GDB_SLAVE_INIT=/tmp/gdbinit.slave Loading Loading @@ -358,7 +358,7 @@ stop_slave () { if [ x$SLAVE_RUNNING = x1 ] then $MYSQLADMIN --socket=$SLAVE_MYSOCK -u root shutdown $MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root shutdown SLAVE_RUNNING=0 fi } Loading @@ -367,7 +367,7 @@ stop_master () { if [ x$MASTER_RUNNING = x1 ] then $MYSQLADMIN --socket=$MASTER_MYSOCK -u root shutdown $MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK -u root shutdown MASTER_RUNNING=0 fi } Loading
mysys/mf_iocache2.c +5 −4 Original line number Diff line number Diff line Loading @@ -50,7 +50,8 @@ void my_b_seek(IO_CACHE *info,my_off_t pos) } /* ** Fill buffer ** Fill buffer. Note that this assumes that you have already used ** all characters in the CACHE, independent of the rc_pos value! ** return: 0 on error or EOF (info->error = -1 on error) ** number of characters */ Loading Loading @@ -102,8 +103,8 @@ uint my_b_gets(IO_CACHE *info, char *to, uint max_length) uint length; max_length--; /* Save place for end \0 */ /* Calculate number of characters in buffer */ if (!(length= (uint) (info->rc_end - info->rc_pos))) if (!(length=my_b_fill(info))) if (!(length= my_b_bytes_in_cache(info)) && !(length= my_b_fill(info))) return 0; for (;;) { Loading
sql/filesort.cc +5 −1 Original line number Diff line number Diff line Loading @@ -324,8 +324,12 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select, file->rnd_init(); file->extra(HA_EXTRA_CACHE); /* Quicker reads */ } else if (quick_select) // QQ For FULLTEXT { // QQ Should be removed soon file->index_end(); select->quick->init(); } if (!error) for (;;) { if (quick_select) Loading