Loading Docs/manual.texi +38 −7 Original line number Diff line number Diff line Loading @@ -597,7 +597,7 @@ Replication in MySQL * Replication Options:: Replication Options in my.cnf * Replication SQL:: SQL Commands related to replication * Replication FAQ:: Frequently Asked Questions about replication * Troubleshooting Replication:: Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. * Replication Problems:: Troubleshooting Replication. Getting Maximum Performance from MySQL Loading Loading @@ -20816,6 +20816,9 @@ only partly indexed. @code{NULL} if the entire key is indexed. For now, it tells whether index is FULLTEXT or not. @end multitable Note that as the @code{Cardinality} is counted based on statistics stored as integers, it's not necessarily accurate for small tables. @cindex displaying, table status @cindex tables, displaying status @cindex status, tables Loading Loading @@ -23669,9 +23672,24 @@ Change to not use page locks at all when we are scanning tables. @node BDB errors, , BDB TODO, BDB @subsection Errors You May Get When Using BDB Tables @itemize @bullet @item If you get the following error in the @code{hostname.err log} when starting @code{mysqld}: @example bdb: Ignoring log file: .../log.XXXXXXXXXX: unsupported log version # @end example it means that the new @code{BDB} version doesn't support the old log file format. In this case you have to delete all @code{BDB} log BDB from your database directory (the files that has the format @code{log.XXXXXXXXXX} ) and restart @code{mysqld}. We would also recommend you to do a @code{mysqldump --opt} of your old @code{BDB} tables, delete the old table and restore the dump. @item If you are running in not @code{auto_commit} mode and delete a table you are using you may get the following error messages in the @strong{MySQL} error file: are using by another thread you may get the following error messages in the @strong{MySQL} error file: @example 001119 23:43:56 bdb: Missing log fileid entry Loading @@ -23681,6 +23699,7 @@ error file: This is not fatal but we don't recommend that you delete tables if you are not in @code{auto_commit} mode, until this problem is fixed (the fix is not trivial). @end itemize @cindex tables, @code{GEMINI} @node GEMINI, INNOBASE, BDB, Table types Loading Loading @@ -26729,7 +26748,7 @@ tables}. * Replication Options:: Replication Options in my.cnf * Replication SQL:: SQL Commands related to replication * Replication FAQ:: Frequently Asked Questions about replication * Troubleshooting Replication:: Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. * Replication Problems:: Troubleshooting Replication. @end menu @node Replication Intro, Replication Implementation, Replication, Replication Loading Loading @@ -26947,6 +26966,14 @@ propagation. @code{LOAD LOCAL DATA INFILE} will be skipped. @item Update queries that use user variables are not replication-safe (yet). @item @code{FLUSH} commands are not stored in the binary log and are because of this not replicated to the slaves. This is not normally a problem as @code{FLUSH} doesn't change anything. This does however mean that if you update the @code{MySQL} privilege tables directly without using @code{GRANT} statement and you replicate the @code{MySQL} privilege database, you must do a @code{FLUSH PRIVILEGES} on your slaves to put the new privileges into effect. @item Temporary tables starting in 3.23.29 are replicated properly with the exception of the case when you shut down slave server ( not just slave thread), you have some temporary tables open, and the are used in subsequent updates. Loading Loading @@ -27293,7 +27320,7 @@ last log on the list), backup all the logs you are about to delete @end multitable @node Replication FAQ, Troubleshooting Replication, Replication SQL, Replication @node Replication FAQ, Replication Problems, Replication SQL, Replication @section Replication FAQ @cindex @code{Binlog_Dump} Loading Loading @@ -27546,7 +27573,7 @@ We are currently working on intergrating an automatic master election system into @strong{MySQL}, but until it is ready, you will have to create your own monitoring tools. @node Troubleshooting Replication, , Replication FAQ, Replication @node Replication Problems, , Replication FAQ, Replication @section Troubleshooting Replication If you have followed the instructions, and your replication setup is not Loading Loading @@ -42210,6 +42237,10 @@ Fixed wrong define @code{CLIENT_TRANSACTIONS}. Fixed bug in @code{SHOW VARIABLES} when using INNOBASE tables. @item Setting and using user variables in @code{SELECT DISTINCT} didn't work. @item Tuned @code{SHOW ANALYZE} for small tables. @item Fixed handling of arguments in the benchmark script @code{run-all-tests}. @end itemize @node News-3.23.34a, News-3.23.34, News-3.23.35, News-3.23.x myisam/mi_check.c +4 −6 Original line number Diff line number Diff line Loading @@ -580,9 +580,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, } if (param->testflag & T_STATISTICS) { if (*keys == 1L) /* first_key */ param->unique_count[keyinfo->keysegs]++; else if (*keys != 1L) /* not first_key */ { uint diff; _mi_key_cmp(keyinfo->seg,info->lastkey,key,USE_WHOLE_KEY,SEARCH_FIND, Loading Loading @@ -2520,10 +2518,11 @@ static int sort_key_write(SORT_INFO *sort_info, const void *a) { cmp=_mi_key_cmp(sort_info->keyseg,sort_info->key_block->lastkey,(uchar*) a, USE_WHOLE_KEY,SEARCH_FIND | SEARCH_UPDATE ,&diff_pos); sort_info->unique[diff_pos-1]++; } else { cmp= -1; diff_pos=sort_info->keyinfo->keysegs; cmp= -1; } if ((sort_info->keyinfo->flag & HA_NOSAME) && cmp == 0) { Loading @@ -2544,7 +2543,6 @@ static int sort_key_write(SORT_INFO *sort_info, const void *a) _mi_print_key(stdout,sort_info->keyseg,(uchar*) a, USE_WHOLE_KEY); return (sort_delete_record(param)); } sort_info->unique[diff_pos-1]++; #ifndef DBUG_OFF if (cmp > 0) { Loading Loading @@ -3099,7 +3097,7 @@ static void update_key_parts(MI_KEYDEF *keyinfo, if (count == 0) tmp=records; else tmp= (records+count/2) / count; tmp= (records + (count+1)/2) / (count+1); if (tmp >= (ulonglong) ~(ulong) 0) tmp=(ulonglong) ~(ulong) 0; *rec_per_key_part=(ulong) tmp; Loading mysql-test/r/show_check.result +16 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ c int(11) 0 select,insert,update,references Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 4 NULL NULL t1 1 b 1 b A 1 NULL NULL t1 1 b 2 c A 2 NULL NULL t1 1 b 2 c A 4 NULL NULL Table Op Msg_type Msg_text test.t1 check status Table is already up to date Table Op Msg_type Msg_text Loading @@ -39,7 +39,7 @@ test.t1 check status OK Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL t1 1 b 2 c A 2 NULL NULL t1 1 b 2 c A 5 NULL NULL Table Op Msg_type Msg_text test.t1 optimize status OK Table Op Msg_type Msg_text Loading @@ -53,3 +53,17 @@ mysql test Database (test%) test Table Op Msg_type Msg_text test.t1 analyze status OK Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 f1 A 1 NULL NULL t1 0 PRIMARY 2 f2 A 3 NULL NULL t1 0 PRIMARY 3 f3 A 9 NULL NULL t1 0 PRIMARY 4 f4 A 18 NULL NULL Table Op Msg_type Msg_text test.t1 repair status OK Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 f1 A 1 NULL NULL t1 0 PRIMARY 2 f2 A 3 NULL NULL t1 0 PRIMARY 3 f3 A 9 NULL NULL t1 0 PRIMARY 4 f4 A 18 NULL NULL mysql-test/r/user_var.result +8 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,11 @@ i i @vv1:=if(sv1.i,1,0) @vv2:=if(sv2.i,1,0) @vv3:=if(sv3.i,1,0) @vv1+@vv2+@vv3 1 1 0 1 2 2 1 0 0 1 table type possible_keys key key_len ref rows Extra t1 ref i i 4 const 1 where used table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 3 where used table type possible_keys key key_len ref rows Extra t1 index NULL i 4 NULL 3 where used; Using index table type possible_keys key key_len ref rows Extra t1 ref i i 4 const 1 where used mysql-test/t/show_check.test +13 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ lock tables t1 read; check table t2,t1; show columns from t1; show full columns from t1; show keys from t1; show index from t1; drop table t1,t2; create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); Loading @@ -25,7 +25,7 @@ insert into t1 values (5,5,5); check table t1 type=changed; check table t1 type=medium; check table t1 type=extended; show keys from t1; show index from t1; !$1062 insert into t1 values (5,5,5); optimize table t1; optimize table t1; Loading @@ -37,3 +37,14 @@ show variables like "this_doesn't_exists%"; show table status from test like "this_doesn't_exists%"; show databases; show databases like "test%"; # # Check of show index # create table t1 (f1 int not null, f2 int not null, f3 int not null, f4 int not null, primary key(f1,f2,f3,f4)); insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0),(1,3,1,0),(1,3,2,0),(1,3,3,0),(1,1,1,1),(1,1,2,1),(1,1,3,1),(1,2,1,1),(1,2,2,1),(1,2,3,1),(1,3,1,1),(1,3,2,1),(1,3,3,1); analyze table t1; show index from t1; repair table t1; show index from t1; drop table t1; Loading
Docs/manual.texi +38 −7 Original line number Diff line number Diff line Loading @@ -597,7 +597,7 @@ Replication in MySQL * Replication Options:: Replication Options in my.cnf * Replication SQL:: SQL Commands related to replication * Replication FAQ:: Frequently Asked Questions about replication * Troubleshooting Replication:: Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. * Replication Problems:: Troubleshooting Replication. Getting Maximum Performance from MySQL Loading Loading @@ -20816,6 +20816,9 @@ only partly indexed. @code{NULL} if the entire key is indexed. For now, it tells whether index is FULLTEXT or not. @end multitable Note that as the @code{Cardinality} is counted based on statistics stored as integers, it's not necessarily accurate for small tables. @cindex displaying, table status @cindex tables, displaying status @cindex status, tables Loading Loading @@ -23669,9 +23672,24 @@ Change to not use page locks at all when we are scanning tables. @node BDB errors, , BDB TODO, BDB @subsection Errors You May Get When Using BDB Tables @itemize @bullet @item If you get the following error in the @code{hostname.err log} when starting @code{mysqld}: @example bdb: Ignoring log file: .../log.XXXXXXXXXX: unsupported log version # @end example it means that the new @code{BDB} version doesn't support the old log file format. In this case you have to delete all @code{BDB} log BDB from your database directory (the files that has the format @code{log.XXXXXXXXXX} ) and restart @code{mysqld}. We would also recommend you to do a @code{mysqldump --opt} of your old @code{BDB} tables, delete the old table and restore the dump. @item If you are running in not @code{auto_commit} mode and delete a table you are using you may get the following error messages in the @strong{MySQL} error file: are using by another thread you may get the following error messages in the @strong{MySQL} error file: @example 001119 23:43:56 bdb: Missing log fileid entry Loading @@ -23681,6 +23699,7 @@ error file: This is not fatal but we don't recommend that you delete tables if you are not in @code{auto_commit} mode, until this problem is fixed (the fix is not trivial). @end itemize @cindex tables, @code{GEMINI} @node GEMINI, INNOBASE, BDB, Table types Loading Loading @@ -26729,7 +26748,7 @@ tables}. * Replication Options:: Replication Options in my.cnf * Replication SQL:: SQL Commands related to replication * Replication FAQ:: Frequently Asked Questions about replication * Troubleshooting Replication:: Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. Troubleshooting Replication. * Replication Problems:: Troubleshooting Replication. @end menu @node Replication Intro, Replication Implementation, Replication, Replication Loading Loading @@ -26947,6 +26966,14 @@ propagation. @code{LOAD LOCAL DATA INFILE} will be skipped. @item Update queries that use user variables are not replication-safe (yet). @item @code{FLUSH} commands are not stored in the binary log and are because of this not replicated to the slaves. This is not normally a problem as @code{FLUSH} doesn't change anything. This does however mean that if you update the @code{MySQL} privilege tables directly without using @code{GRANT} statement and you replicate the @code{MySQL} privilege database, you must do a @code{FLUSH PRIVILEGES} on your slaves to put the new privileges into effect. @item Temporary tables starting in 3.23.29 are replicated properly with the exception of the case when you shut down slave server ( not just slave thread), you have some temporary tables open, and the are used in subsequent updates. Loading Loading @@ -27293,7 +27320,7 @@ last log on the list), backup all the logs you are about to delete @end multitable @node Replication FAQ, Troubleshooting Replication, Replication SQL, Replication @node Replication FAQ, Replication Problems, Replication SQL, Replication @section Replication FAQ @cindex @code{Binlog_Dump} Loading Loading @@ -27546,7 +27573,7 @@ We are currently working on intergrating an automatic master election system into @strong{MySQL}, but until it is ready, you will have to create your own monitoring tools. @node Troubleshooting Replication, , Replication FAQ, Replication @node Replication Problems, , Replication FAQ, Replication @section Troubleshooting Replication If you have followed the instructions, and your replication setup is not Loading Loading @@ -42210,6 +42237,10 @@ Fixed wrong define @code{CLIENT_TRANSACTIONS}. Fixed bug in @code{SHOW VARIABLES} when using INNOBASE tables. @item Setting and using user variables in @code{SELECT DISTINCT} didn't work. @item Tuned @code{SHOW ANALYZE} for small tables. @item Fixed handling of arguments in the benchmark script @code{run-all-tests}. @end itemize @node News-3.23.34a, News-3.23.34, News-3.23.35, News-3.23.x
myisam/mi_check.c +4 −6 Original line number Diff line number Diff line Loading @@ -580,9 +580,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, } if (param->testflag & T_STATISTICS) { if (*keys == 1L) /* first_key */ param->unique_count[keyinfo->keysegs]++; else if (*keys != 1L) /* not first_key */ { uint diff; _mi_key_cmp(keyinfo->seg,info->lastkey,key,USE_WHOLE_KEY,SEARCH_FIND, Loading Loading @@ -2520,10 +2518,11 @@ static int sort_key_write(SORT_INFO *sort_info, const void *a) { cmp=_mi_key_cmp(sort_info->keyseg,sort_info->key_block->lastkey,(uchar*) a, USE_WHOLE_KEY,SEARCH_FIND | SEARCH_UPDATE ,&diff_pos); sort_info->unique[diff_pos-1]++; } else { cmp= -1; diff_pos=sort_info->keyinfo->keysegs; cmp= -1; } if ((sort_info->keyinfo->flag & HA_NOSAME) && cmp == 0) { Loading @@ -2544,7 +2543,6 @@ static int sort_key_write(SORT_INFO *sort_info, const void *a) _mi_print_key(stdout,sort_info->keyseg,(uchar*) a, USE_WHOLE_KEY); return (sort_delete_record(param)); } sort_info->unique[diff_pos-1]++; #ifndef DBUG_OFF if (cmp > 0) { Loading Loading @@ -3099,7 +3097,7 @@ static void update_key_parts(MI_KEYDEF *keyinfo, if (count == 0) tmp=records; else tmp= (records+count/2) / count; tmp= (records + (count+1)/2) / (count+1); if (tmp >= (ulonglong) ~(ulong) 0) tmp=(ulonglong) ~(ulong) 0; *rec_per_key_part=(ulong) tmp; Loading
mysql-test/r/show_check.result +16 −2 Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ c int(11) 0 select,insert,update,references Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 4 NULL NULL t1 1 b 1 b A 1 NULL NULL t1 1 b 2 c A 2 NULL NULL t1 1 b 2 c A 4 NULL NULL Table Op Msg_type Msg_text test.t1 check status Table is already up to date Table Op Msg_type Msg_text Loading @@ -39,7 +39,7 @@ test.t1 check status OK Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 a A 5 NULL NULL t1 1 b 1 b A 1 NULL NULL t1 1 b 2 c A 2 NULL NULL t1 1 b 2 c A 5 NULL NULL Table Op Msg_type Msg_text test.t1 optimize status OK Table Op Msg_type Msg_text Loading @@ -53,3 +53,17 @@ mysql test Database (test%) test Table Op Msg_type Msg_text test.t1 analyze status OK Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 f1 A 1 NULL NULL t1 0 PRIMARY 2 f2 A 3 NULL NULL t1 0 PRIMARY 3 f3 A 9 NULL NULL t1 0 PRIMARY 4 f4 A 18 NULL NULL Table Op Msg_type Msg_text test.t1 repair status OK Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Comment t1 0 PRIMARY 1 f1 A 1 NULL NULL t1 0 PRIMARY 2 f2 A 3 NULL NULL t1 0 PRIMARY 3 f3 A 9 NULL NULL t1 0 PRIMARY 4 f4 A 18 NULL NULL
mysql-test/r/user_var.result +8 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,11 @@ i i @vv1:=if(sv1.i,1,0) @vv2:=if(sv2.i,1,0) @vv3:=if(sv3.i,1,0) @vv1+@vv2+@vv3 1 1 0 1 2 2 1 0 0 1 table type possible_keys key key_len ref rows Extra t1 ref i i 4 const 1 where used table type possible_keys key key_len ref rows Extra t1 ALL NULL NULL NULL NULL 3 where used table type possible_keys key key_len ref rows Extra t1 index NULL i 4 NULL 3 where used; Using index table type possible_keys key key_len ref rows Extra t1 ref i i 4 const 1 where used
mysql-test/t/show_check.test +13 −2 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ lock tables t1 read; check table t2,t1; show columns from t1; show full columns from t1; show keys from t1; show index from t1; drop table t1,t2; create table t1 (a int not null primary key, b int not null,c int not null, key(b,c)); Loading @@ -25,7 +25,7 @@ insert into t1 values (5,5,5); check table t1 type=changed; check table t1 type=medium; check table t1 type=extended; show keys from t1; show index from t1; !$1062 insert into t1 values (5,5,5); optimize table t1; optimize table t1; Loading @@ -37,3 +37,14 @@ show variables like "this_doesn't_exists%"; show table status from test like "this_doesn't_exists%"; show databases; show databases like "test%"; # # Check of show index # create table t1 (f1 int not null, f2 int not null, f3 int not null, f4 int not null, primary key(f1,f2,f3,f4)); insert into t1 values (1,1,1,0),(1,1,2,0),(1,1,3,0),(1,2,1,0),(1,2,2,0),(1,2,3,0),(1,3,1,0),(1,3,2,0),(1,3,3,0),(1,1,1,1),(1,1,2,1),(1,1,3,1),(1,2,1,1),(1,2,2,1),(1,2,3,1),(1,3,1,1),(1,3,2,1),(1,3,3,1); analyze table t1; show index from t1; repair table t1; show index from t1; drop table t1;