Loading .bzrignore +3 −2 Original line number Diff line number Diff line Loading @@ -287,6 +287,7 @@ libmysqld/sql_command libmysqld/sql_crypt.cc libmysqld/sql_db.cc libmysqld/sql_delete.cc libmysqld/sql_do.cc libmysqld/sql_handler.cc libmysqld/sql_insert.cc libmysqld/sql_lex.cc Loading Loading @@ -367,6 +368,7 @@ scripts/mysql_config scripts/mysql_convert_table_format scripts/mysql_explain_log scripts/mysql_find_rows scripts/mysql_fix_extensions scripts/mysql_fix_privilege_tables scripts/mysql_install_db scripts/mysql_setpermission Loading Loading @@ -398,6 +400,7 @@ sql-bench/test-connect sql-bench/test-create sql-bench/test-insert sql-bench/test-select sql-bench/test-transactions sql-bench/test-wisconsin sql/.gdbinit sql/gen_lex_hash Loading Loading @@ -445,5 +448,3 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl sql-bench/test-transactions libmysqld/sql_do.cc Docs/manual.texi +38 −12 Original line number Diff line number Diff line Loading @@ -8050,6 +8050,10 @@ version 4.0; @itemize @bullet @item To use @code{MATCH ... AGAINST (... IN BOOLEAN MODE)} with your tables, you need to rebuild them with @code{ALTER TABLE table_name TYPE=MyISAM}, @strong{even} if they are of @code{MyISAM} type. @item @code{LOCATE()} and @code{INSTR()} are case sensitive if neither argument is a binary string. @item Loading Loading @@ -22090,8 +22094,12 @@ is @code{localhost}. Lock all tables before starting the dump. The tables are locked with @code{READ LOCAL} to allow concurrent inserts in the case of @code{MyISAM} tables. @item -K, --no-disable-keys. @code{/*!40000 ALTER TABLE tb_name DISABLE KEYS */;} and @code{/*!40000 ALTER TABLE tb_name ENABLE KEYS */;} will not be put in the output. @item -n, --no-create-db 'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the @code{CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;} will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given. @item -t, --no-create-info Loading Loading @@ -22140,6 +22148,10 @@ Verbose mode. Print out more information on what the program does. Print version information and exit. @item -w, --where='where-condition' Dump only selected records. Note that quotes are mandatory: @item -X, --xml Dumps a database as well formed XML @item -x, --first-slave Locks all tables across all databases. @example "--where=user='jimf'" "-wuserid>1" "-wuserid<1" Loading Loading @@ -34566,15 +34578,6 @@ options, MySQL simply renames the files that correspond to the table @code{tbl_name}. There is no need to create the temporary table. @xref{RENAME TABLE,, @code{RENAME TABLE}}. @item Since @strong{MySQL 4.0} the above feature can be activated explicitly. @code{ALTER TABLE ... DISABLE KEYS} makes MySQL to stop updating non-unique indexes for @code{MyISAM} table. @code{ALTER TABLE ... ENABLE KEYS} then should be used to recreate missing indexes. As MySQL does it with special algorithm which is much faster then inserting keys one by one, disabling keys could give a considerable speedup on bulk inserts. @item @code{create_definition} clauses use the same syntax for @code{ADD} and @code{CHANGE} as for @code{CREATE TABLE}. Note that this syntax includes Loading Loading @@ -34674,6 +34677,15 @@ If you use @code{ALTER TABLE} on a @code{MyISAM} table, all non-unique indexes are created in a separate batch (like in @code{REPAIR}). This should make @code{ALTER TABLE} much faster when you have many indexes. @item Since @strong{MySQL 4.0} the above feature can be activated explicitly. @code{ALTER TABLE ... DISABLE KEYS} makes MySQL to stop updating non-unique indexes for @code{MyISAM} table. @code{ALTER TABLE ... ENABLE KEYS} then should be used to recreate missing indexes. As MySQL does it with special algorithm which is much faster then inserting keys one by one, disabling keys could give a considerable speedup on bulk inserts. @item @findex mysql_info() With the C API function @code{mysql_info()}, you can find out how many Loading Loading @@ -35574,6 +35586,10 @@ In addition, a query may be seen as different if for instance one client is using a new communication protocol format or another character set than another client. Queries that uses different databases, uses different protocol versions or the uses different default character sets are considered different queries and cached separately. The cache does work for @code{SELECT CALC_ROWS ...} and @code{SELECT FOUND_ROWS() ...} type queries because the number of found rows is also stored in the cache. Loading Loading @@ -35612,8 +35628,12 @@ of the form @code{SELECT * FROM AUTOINCREMENT_FIELD IS NULL} However, @code{FOUND ROWS()} will return the correct value, even if the preceding query was fetched from the cache. Queries that don't use any tables are not cached. Queries that don't use any tables or if the user has a column privilege for any of the involved tables are not cached. Before a query is fetched from the query cache, MySQL will check that the user has SELECT privilege to all the involved databases and tables. If this is not the case, the cached result will not be used. @node Query Cache Configuration, Query Cache in SELECT, Query Cache How, Query Cache @subsection Query Cache Configuration Loading Loading @@ -46548,8 +46568,9 @@ variables. @cindex OLEDB @item OLEDB @itemize @bullet @item @uref{http://www.mysql.com/Downloads/Win32/MyOLEDB.exe} @item MyOLEDB 2.5: @uref{http://www.mysql.com/Downloads/Win32/MyOLEDB.exe} OLEDB handler for MySQL. By SWsoft. @item MyOLEDB 3.0: @uref{http://old.sw.com.sg/products/myoledb/form/} @item @uref{http://www.mysql.com/Downloads/Win32/MySamples.zip} Examples and documentation for MyOLEDB. By SWsoft. @item @uref{http://www.mysql.com/Downloads/Win32/Myoledb.zip} Loading Loading @@ -47828,6 +47849,11 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item @code{mysqldump} now puts @code{ALTER TABLE table_name DISABLE KEYS} and @code{ALTER TABLE table_name DISABLE KEYS} in the sql dump. @item Added @code{mysql_fix_extensions} script @item Fixed stack overrun problem @code{LOAD DATA FROM MASTER} on OSF1. @item Fixed shutdown problem on HPUX. client/mysqldump.c +56 −44 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick=0, extended_insert = 0, ignore=0,opt_drop=0,opt_keywords=0,opt_lock=0,opt_compress=0, opt_delayed=0,create_options=0,opt_quoted=0,opt_databases=0, opt_alldbs=0,opt_create_db=0,opt_first_slave=0, opt_autocommit=0, opt_master_data, opt_xml=0; opt_autocommit=0,opt_master_data,opt_disable_keys=0,opt_xml=0; static MYSQL mysql_connection,*sock=0; static char insert_pat[12 * 1024],*opt_password=0,*current_user=0, *current_host=0,*path=0,*fields_terminated=0, Loading Loading @@ -118,6 +118,7 @@ static struct option long_options[] = {"no-create-db", no_argument, 0, 'n'}, {"no-create-info", no_argument, 0, 't'}, {"no-data", no_argument, 0, 'd'}, {"no-disable-keys", no_argument, 0, 'K'}, {"opt", no_argument, 0, OPT_OPTIMIZE}, {"password", optional_argument, 0, 'p'}, #ifdef __WIN__ Loading Loading @@ -214,6 +215,9 @@ static void usage(void) puts("\ -l, --lock-tables Lock all tables for read.\n\ --no-autocommit Wrap tables with autocommit/commit statements.\n\ -K, --no-disable-keys '/*!40000 ALTER TABLE tb_name DISABLE KEYS */;\n\ and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */;\n\ will not be put in the output.\n\ -n, --no-create-db 'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;'\n\ will not be put in the output. The above line will\n\ be added otherwise, if --databases or\n\ Loading Loading @@ -305,7 +309,7 @@ static int get_options(int *argc,char ***argv) load_defaults("my",load_default_groups,argc,argv); set_all_changeable_vars(md_changeable_vars); while ((c=getopt_long(*argc,*argv, "#::p::h:u:O:P:r:S:T:EBaAcCdefFlnqtvVw:?IxX", "#::p::h:u:O:P:r:S:T:EBaAcCdefFKlnqtvVw:?IxX", long_options, &option_index)) != EOF) { switch(c) { Loading Loading @@ -341,6 +345,9 @@ static int get_options(int *argc,char ***argv) my_free(current_host,MYF(MY_ALLOW_ZERO_PTR)); current_host=my_strdup(optarg,MYF(MY_WME)); break; case 'K': opt_disable_keys=1; break; case 'n': opt_create_db = 1; break; Loading Loading @@ -408,7 +415,7 @@ static int get_options(int *argc,char ***argv) case 'w': where=optarg; break; case 'X': opt_xml = 1; break; case 'X': opt_xml = 1; opt_disable_keys=1; break; case 'x': opt_first_slave=1; break; Loading Loading @@ -883,6 +890,8 @@ static uint getTableStructure(char *table, char* db) fputs(";\n", sql_file); } } if (!opt_disable_keys) fprintf(sql_file,"\n/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",table_name); if (cFlag) { strpos=strmov(strpos,") VALUES "); Loading Loading @@ -982,7 +991,7 @@ static void dumpTable(uint numFields, char *table) end= add_load_option(end, lines_terminated, " LINES TERMINATED BY"); *end= '\0'; sprintf(buff," FROM %s",table); sprintf(buff," FROM %s",quote_name(table,table_buff)); end= strmov(end,buff); if (where) end= strxmov(end, " WHERE ",where,NullS); Loading Loading @@ -1189,6 +1198,9 @@ static void dumpTable(uint numFields, char *table) safe_exit(EX_CONSCHECK); return; } if (!opt_disable_keys) fprintf(md_result_file,"\n/*!40000 ALTER TABLE %s ENABLE KEYS */;\n", quote_name(table,table_buff)); if (opt_lock) fputs("UNLOCK TABLES;\n", md_result_file); if (opt_autocommit) Loading client/mysqltest.c +6 −3 Original line number Diff line number Diff line Loading @@ -1248,7 +1248,8 @@ int close_connection(struct st_query* q) } /* this one now is a hack - we may want to improve in in the /* This one now is a hack - we may want to improve in in the future to handle quotes. For now we assume that anything that is not a comma, a space or ) belongs to the argument. space is a chopper, comma or ) are delimiters/terminators Loading Loading @@ -1291,8 +1292,7 @@ int safe_connect(MYSQL* con, const char* host, const char* user, int i; for (i = 0; i < MAX_CON_TRIES; ++i) { if(mysql_real_connect(con, host,user, pass, db, port, sock, 0)) if (mysql_real_connect(con, host,user, pass, db, port, sock, 0)) { con_error = 0; break; Loading Loading @@ -1365,6 +1365,9 @@ int do_connect(struct st_query* q) con_sock=fn_format(buff, con_sock, TMPDIR, "",0); if (!con_db[0]) con_db=db; /* Special database to allow one to connect without a database name */ if (!strcmp(con_db,"*NO-ONE*")) con_db=0; if ((con_error = safe_connect(&next_con->mysql, con_host, con_user, con_pass, con_db, con_port, con_sock ? con_sock: 0))) Loading include/raid.h +3 −1 Original line number Diff line number Diff line Loading @@ -22,8 +22,10 @@ #define RAID_DEFAULT_CHUNKS 4 #define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */ extern const char *raid_type_string[]; C_MODE_START #define my_raid_type(raid_type) raid_type_string[(int)(raid_type)] extern const char *raid_type_string[]; C_MODE_END #if defined(USE_RAID) && !defined(DONT_USE_RAID) Loading Loading
.bzrignore +3 −2 Original line number Diff line number Diff line Loading @@ -287,6 +287,7 @@ libmysqld/sql_command libmysqld/sql_crypt.cc libmysqld/sql_db.cc libmysqld/sql_delete.cc libmysqld/sql_do.cc libmysqld/sql_handler.cc libmysqld/sql_insert.cc libmysqld/sql_lex.cc Loading Loading @@ -367,6 +368,7 @@ scripts/mysql_config scripts/mysql_convert_table_format scripts/mysql_explain_log scripts/mysql_find_rows scripts/mysql_fix_extensions scripts/mysql_fix_privilege_tables scripts/mysql_install_db scripts/mysql_setpermission Loading Loading @@ -398,6 +400,7 @@ sql-bench/test-connect sql-bench/test-create sql-bench/test-insert sql-bench/test-select sql-bench/test-transactions sql-bench/test-wisconsin sql/.gdbinit sql/gen_lex_hash Loading Loading @@ -445,5 +448,3 @@ vio/test-ssl vio/test-sslclient vio/test-sslserver vio/viotest-ssl sql-bench/test-transactions libmysqld/sql_do.cc
Docs/manual.texi +38 −12 Original line number Diff line number Diff line Loading @@ -8050,6 +8050,10 @@ version 4.0; @itemize @bullet @item To use @code{MATCH ... AGAINST (... IN BOOLEAN MODE)} with your tables, you need to rebuild them with @code{ALTER TABLE table_name TYPE=MyISAM}, @strong{even} if they are of @code{MyISAM} type. @item @code{LOCATE()} and @code{INSTR()} are case sensitive if neither argument is a binary string. @item Loading Loading @@ -22090,8 +22094,12 @@ is @code{localhost}. Lock all tables before starting the dump. The tables are locked with @code{READ LOCAL} to allow concurrent inserts in the case of @code{MyISAM} tables. @item -K, --no-disable-keys. @code{/*!40000 ALTER TABLE tb_name DISABLE KEYS */;} and @code{/*!40000 ALTER TABLE tb_name ENABLE KEYS */;} will not be put in the output. @item -n, --no-create-db 'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;' will not be put in the @code{CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;} will not be put in the output. The above line will be added otherwise, if --databases or --all-databases option was given. @item -t, --no-create-info Loading Loading @@ -22140,6 +22148,10 @@ Verbose mode. Print out more information on what the program does. Print version information and exit. @item -w, --where='where-condition' Dump only selected records. Note that quotes are mandatory: @item -X, --xml Dumps a database as well formed XML @item -x, --first-slave Locks all tables across all databases. @example "--where=user='jimf'" "-wuserid>1" "-wuserid<1" Loading Loading @@ -34566,15 +34578,6 @@ options, MySQL simply renames the files that correspond to the table @code{tbl_name}. There is no need to create the temporary table. @xref{RENAME TABLE,, @code{RENAME TABLE}}. @item Since @strong{MySQL 4.0} the above feature can be activated explicitly. @code{ALTER TABLE ... DISABLE KEYS} makes MySQL to stop updating non-unique indexes for @code{MyISAM} table. @code{ALTER TABLE ... ENABLE KEYS} then should be used to recreate missing indexes. As MySQL does it with special algorithm which is much faster then inserting keys one by one, disabling keys could give a considerable speedup on bulk inserts. @item @code{create_definition} clauses use the same syntax for @code{ADD} and @code{CHANGE} as for @code{CREATE TABLE}. Note that this syntax includes Loading Loading @@ -34674,6 +34677,15 @@ If you use @code{ALTER TABLE} on a @code{MyISAM} table, all non-unique indexes are created in a separate batch (like in @code{REPAIR}). This should make @code{ALTER TABLE} much faster when you have many indexes. @item Since @strong{MySQL 4.0} the above feature can be activated explicitly. @code{ALTER TABLE ... DISABLE KEYS} makes MySQL to stop updating non-unique indexes for @code{MyISAM} table. @code{ALTER TABLE ... ENABLE KEYS} then should be used to recreate missing indexes. As MySQL does it with special algorithm which is much faster then inserting keys one by one, disabling keys could give a considerable speedup on bulk inserts. @item @findex mysql_info() With the C API function @code{mysql_info()}, you can find out how many Loading Loading @@ -35574,6 +35586,10 @@ In addition, a query may be seen as different if for instance one client is using a new communication protocol format or another character set than another client. Queries that uses different databases, uses different protocol versions or the uses different default character sets are considered different queries and cached separately. The cache does work for @code{SELECT CALC_ROWS ...} and @code{SELECT FOUND_ROWS() ...} type queries because the number of found rows is also stored in the cache. Loading Loading @@ -35612,8 +35628,12 @@ of the form @code{SELECT * FROM AUTOINCREMENT_FIELD IS NULL} However, @code{FOUND ROWS()} will return the correct value, even if the preceding query was fetched from the cache. Queries that don't use any tables are not cached. Queries that don't use any tables or if the user has a column privilege for any of the involved tables are not cached. Before a query is fetched from the query cache, MySQL will check that the user has SELECT privilege to all the involved databases and tables. If this is not the case, the cached result will not be used. @node Query Cache Configuration, Query Cache in SELECT, Query Cache How, Query Cache @subsection Query Cache Configuration Loading Loading @@ -46548,8 +46568,9 @@ variables. @cindex OLEDB @item OLEDB @itemize @bullet @item @uref{http://www.mysql.com/Downloads/Win32/MyOLEDB.exe} @item MyOLEDB 2.5: @uref{http://www.mysql.com/Downloads/Win32/MyOLEDB.exe} OLEDB handler for MySQL. By SWsoft. @item MyOLEDB 3.0: @uref{http://old.sw.com.sg/products/myoledb/form/} @item @uref{http://www.mysql.com/Downloads/Win32/MySamples.zip} Examples and documentation for MyOLEDB. By SWsoft. @item @uref{http://www.mysql.com/Downloads/Win32/Myoledb.zip} Loading Loading @@ -47828,6 +47849,11 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. @itemize @bullet @item @code{mysqldump} now puts @code{ALTER TABLE table_name DISABLE KEYS} and @code{ALTER TABLE table_name DISABLE KEYS} in the sql dump. @item Added @code{mysql_fix_extensions} script @item Fixed stack overrun problem @code{LOAD DATA FROM MASTER} on OSF1. @item Fixed shutdown problem on HPUX.
client/mysqldump.c +56 −44 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick=0, extended_insert = 0, ignore=0,opt_drop=0,opt_keywords=0,opt_lock=0,opt_compress=0, opt_delayed=0,create_options=0,opt_quoted=0,opt_databases=0, opt_alldbs=0,opt_create_db=0,opt_first_slave=0, opt_autocommit=0, opt_master_data, opt_xml=0; opt_autocommit=0,opt_master_data,opt_disable_keys=0,opt_xml=0; static MYSQL mysql_connection,*sock=0; static char insert_pat[12 * 1024],*opt_password=0,*current_user=0, *current_host=0,*path=0,*fields_terminated=0, Loading Loading @@ -118,6 +118,7 @@ static struct option long_options[] = {"no-create-db", no_argument, 0, 'n'}, {"no-create-info", no_argument, 0, 't'}, {"no-data", no_argument, 0, 'd'}, {"no-disable-keys", no_argument, 0, 'K'}, {"opt", no_argument, 0, OPT_OPTIMIZE}, {"password", optional_argument, 0, 'p'}, #ifdef __WIN__ Loading Loading @@ -214,6 +215,9 @@ static void usage(void) puts("\ -l, --lock-tables Lock all tables for read.\n\ --no-autocommit Wrap tables with autocommit/commit statements.\n\ -K, --no-disable-keys '/*!40000 ALTER TABLE tb_name DISABLE KEYS */;\n\ and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */;\n\ will not be put in the output.\n\ -n, --no-create-db 'CREATE DATABASE /*!32312 IF NOT EXISTS*/ db_name;'\n\ will not be put in the output. The above line will\n\ be added otherwise, if --databases or\n\ Loading Loading @@ -305,7 +309,7 @@ static int get_options(int *argc,char ***argv) load_defaults("my",load_default_groups,argc,argv); set_all_changeable_vars(md_changeable_vars); while ((c=getopt_long(*argc,*argv, "#::p::h:u:O:P:r:S:T:EBaAcCdefFlnqtvVw:?IxX", "#::p::h:u:O:P:r:S:T:EBaAcCdefFKlnqtvVw:?IxX", long_options, &option_index)) != EOF) { switch(c) { Loading Loading @@ -341,6 +345,9 @@ static int get_options(int *argc,char ***argv) my_free(current_host,MYF(MY_ALLOW_ZERO_PTR)); current_host=my_strdup(optarg,MYF(MY_WME)); break; case 'K': opt_disable_keys=1; break; case 'n': opt_create_db = 1; break; Loading Loading @@ -408,7 +415,7 @@ static int get_options(int *argc,char ***argv) case 'w': where=optarg; break; case 'X': opt_xml = 1; break; case 'X': opt_xml = 1; opt_disable_keys=1; break; case 'x': opt_first_slave=1; break; Loading Loading @@ -883,6 +890,8 @@ static uint getTableStructure(char *table, char* db) fputs(";\n", sql_file); } } if (!opt_disable_keys) fprintf(sql_file,"\n/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",table_name); if (cFlag) { strpos=strmov(strpos,") VALUES "); Loading Loading @@ -982,7 +991,7 @@ static void dumpTable(uint numFields, char *table) end= add_load_option(end, lines_terminated, " LINES TERMINATED BY"); *end= '\0'; sprintf(buff," FROM %s",table); sprintf(buff," FROM %s",quote_name(table,table_buff)); end= strmov(end,buff); if (where) end= strxmov(end, " WHERE ",where,NullS); Loading Loading @@ -1189,6 +1198,9 @@ static void dumpTable(uint numFields, char *table) safe_exit(EX_CONSCHECK); return; } if (!opt_disable_keys) fprintf(md_result_file,"\n/*!40000 ALTER TABLE %s ENABLE KEYS */;\n", quote_name(table,table_buff)); if (opt_lock) fputs("UNLOCK TABLES;\n", md_result_file); if (opt_autocommit) Loading
client/mysqltest.c +6 −3 Original line number Diff line number Diff line Loading @@ -1248,7 +1248,8 @@ int close_connection(struct st_query* q) } /* this one now is a hack - we may want to improve in in the /* This one now is a hack - we may want to improve in in the future to handle quotes. For now we assume that anything that is not a comma, a space or ) belongs to the argument. space is a chopper, comma or ) are delimiters/terminators Loading Loading @@ -1291,8 +1292,7 @@ int safe_connect(MYSQL* con, const char* host, const char* user, int i; for (i = 0; i < MAX_CON_TRIES; ++i) { if(mysql_real_connect(con, host,user, pass, db, port, sock, 0)) if (mysql_real_connect(con, host,user, pass, db, port, sock, 0)) { con_error = 0; break; Loading Loading @@ -1365,6 +1365,9 @@ int do_connect(struct st_query* q) con_sock=fn_format(buff, con_sock, TMPDIR, "",0); if (!con_db[0]) con_db=db; /* Special database to allow one to connect without a database name */ if (!strcmp(con_db,"*NO-ONE*")) con_db=0; if ((con_error = safe_connect(&next_con->mysql, con_host, con_user, con_pass, con_db, con_port, con_sock ? con_sock: 0))) Loading
include/raid.h +3 −1 Original line number Diff line number Diff line Loading @@ -22,8 +22,10 @@ #define RAID_DEFAULT_CHUNKS 4 #define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */ extern const char *raid_type_string[]; C_MODE_START #define my_raid_type(raid_type) raid_type_string[(int)(raid_type)] extern const char *raid_type_string[]; C_MODE_END #if defined(USE_RAID) && !defined(DONT_USE_RAID) Loading