Commit c85c33a5 authored by monty@mashka.mysql.fi's avatar monty@mashka.mysql.fi
Browse files

Added CREATE TEMPORARY TABLES and LOCK TABLES to db and host tables

Fixed bug in SELECT ... ORDER BY ... LIMIT
Fixed bug in ALTER TABLE and RENAME TABLE with --lower-case-table-names
Fixed hang when using --with-openssl
parent 3a03bb1d
Loading
Loading
Loading
Loading
+146 −94
Original line number Diff line number Diff line
@@ -19751,24 +19751,27 @@ The output resembles that shown here, though the format and numbers may
differ somewhat:
@example
+------------------------------+---------------------------+
+---------------------------------+------------------------------+
| Variable_name                   | Value                        |
+------------------------------+---------------------------+
| ansi_mode                    | OFF                       |
+---------------------------------+------------------------------|
| back_log                        | 50                           |
| basedir                      | /my/monty/                |
| bdb_cache_size               | 16777216                  |
| basedir                         | /usr/local/mysql             |
| bdb_cache_size                  | 8388572                      |
| bdb_log_buffer_size             | 32768                        |
| bdb_home                     | /my/monty/data/           |
| bdb_home                        | /usr/local/mysql             |
| bdb_max_lock                    | 10000                        |
| bdb_logdir                      |                              |
| bdb_shared_data                 | OFF                          |
| bdb_tmpdir                      | /tmp/                        |
| bdb_version                     | Sleepycat Software: ...	 |
| binlog_cache_size               | 32768                        |
| bulk_insert_buffer_size         | 8388608                      |
| character_set                   | latin1                       |
| character_sets                  | latin1 big5 czech euc_kr	 |
| concurrent_insert               | ON                           |
| connect_timeout                 | 5                            |
| datadir                      | /my/monty/data/           |
| convert_character_set           |                              |
| datadir                         | /usr/local/mysql/data/       |
| delay_key_write                 | ON                           |
| delayed_insert_limit            | 100                          |
| delayed_insert_timeout          | 300                          |
@@ -19778,65 +19781,100 @@ differ somewhat:
| ft_min_word_len                 | 4                            |
| ft_max_word_len                 | 254                          |
| ft_max_word_len_for_sort        | 20                           |
| ft_boolean_syntax            | + -><()~*                 |
| ft_boolean_syntax               | + -><()~*:""&|               |
| have_bdb                        | YES                          |
| have_innodb                     | YES                          |
| have_raid                    | YES                       |
| have_openssl                 | NO                        |
| have_isam                       | YES                          |
| have_raid                       | NO                           |
| have_symlink                    | DISABLED                     |
| have_openssl                    | YES                          |
| have_query_cache                | YES                          |
| init_file                       |                              |
| innodb_additional_mem_pool_size | 1048576                      |
| innodb_buffer_pool_size         | 8388608                      |
| innodb_data_file_path           | ibdata1:10M:autoextend       |
| innodb_data_home_dir            |                              |
| innodb_file_io_threads          | 4                            |
| innodb_force_recovery           | 0                            |
| innodb_thread_concurrency       | 8                            |
| innodb_flush_log_at_trx_commit  | 0                            |
| innodb_fast_shutdown            | ON                           |
| innodb_flush_method             |                              |
| innodb_lock_wait_timeout        | 50                           |
| innodb_log_arch_dir             |                              |
| innodb_log_archive              | OFF                          |
| innodb_log_buffer_size          | 1048576                      |
| innodb_log_file_size            | 5242880                      |
| innodb_log_files_in_group       | 2                            |
| innodb_log_group_home_dir       | ./                           |
| innodb_mirrored_log_groups      | 1                            |
| interactive_timeout             | 28800                        |
| join_buffer_size                | 131072                       |
| key_buffer_size              | 16776192                  |
| language                     | /my/monty/share/english/  |
| key_buffer_size                 | 16773120                     |
| language                        | /usr/local/mysql/share/...   |
| large_files_support             | ON                           |
| local_infile                    | ON                           |
| locked_in_memory                | OFF                          |
| log                             | OFF                          |
| log_update                      | OFF                          |
| log_bin                         | OFF                          |
| log_slave_updates               | OFF                          |
| log_slow_queries                | OFF                          |
| log_warnings                    | OFF                          |
| long_query_time                 | 10                           |
| low_priority_updates            | OFF                          |
| lower_case_table_names       | 0                         |
| max_allowed_packet           | 1048576                   |
| lower_case_table_names          | OFF                          |
| max_allowed_packet              | 1047552                      |
| max_binlog_cache_size           | 4294967295                   |
| max_binlog_size                 | 1073741824                   |
| max_connections                 | 100                          |
| max_connect_errors              | 10                           |
| max_delayed_threads             | 20                           |
| max_heap_table_size             | 16777216                     |
| max_join_size                   | 4294967295                   |
| max_sort_length                 | 1024                         |
| max_user_connections            | 0                            |
| max_tmp_tables                  | 32                           |
| max_write_lock_count            | 4294967295                   |
| myisam_recover_options       | DEFAULT                   |
| myisam_max_extra_sort_file_size | 268435456                    |
| myisam_max_sort_file_size       | 2147483647                   |
| myisam_recover_options          | force                        |
| myisam_sort_buffer_size         | 8388608                      |
| net_buffer_length               | 16384                        |
| net_read_timeout                | 30                           |
| net_retry_count                 | 10                           |
| net_write_timeout               | 60                           |
| open_files_limit                | 0                            |
| pid_file                     | /my/monty/data/donna.pid  |
| pid_file                        | /usr/local/mysql/name.pid    |
| port                            | 3306                         |
| protocol_version                | 10                           |
| read_buffer_size                | 131072                       |
| read_rnd_buffer_size            | 262144                       |
| rpl_recovery_rank               | 0                            |
| query_cache_limit               | 1048576                      |
| query_cache_size             | 16768060                  |
| query_cache_type	       | 1                         |
| query_cache_size                | 0                            |
| query_cache_type                | ON                           |
| safe_show_database              | OFF                          |
| server_id                       | 0                            |
| skip_locking                 | ON                        |
| slave_net_timeout               | 3600                         |
| skip_external_locking           | ON                           |
| skip_networking                 | OFF                          |
| skip_show_database              | OFF                          |
| slow_launch_time                | 2                            |
| socket                          | /tmp/mysql.sock              |
| sort_buffer                  | 2097116                   |
| sort_buffer_size                | 2097116                      |
| sql_mode                        | 0                            |
| table_cache                     | 64                           |
| table_type                      | MYISAM                       |
| thread_cache_size            | 4                         |
| thread_stack                 | 65536                     |
| tmp_table_size               | 1048576                   |
| thread_cache_size               | 3                            |
| thread_stack                    | 131072                       |
| tx_isolation                    | READ-COMMITTED               |
| timezone                        | EEST                         |
| tmp_table_size                  | 33554432                     |
| tmpdir                          | /tmp/                        |
| version                      | 3.23.29a-gamma-debug      |
| version                         | 4.0.4-beta                   |
| wait_timeout                    | 28800                        |
+------------------------------+---------------------------+
+---------------------------------+------------------------------+
@end example
Each option is described here. Values for buffer sizes, lengths, and stack
@@ -20339,8 +20377,13 @@ The directory used for temporary files and temporary tables.
The version number for the server.
@item @code{wait_timeout}
The number of seconds the server waits for activity on a connection before
closing it. See also @code{interactive_timeout}.
The number of seconds the server waits for activity on a not interactive
connection before closing it.
On thread startup @code{SESSION.WAIT_TIMEOUT} is initialised from
@code{GLOBAL.WAIT_TIMEOUT} or @code{GLOBAL.INTERACTIVE_TIMEOUT} depending
on the type of client (as defined by the @code{CLIENT_INTERACTIVE} connect
option). See also @code{interactive_timeout}.
@end itemize
The manual section that describes tuning MySQL contains some
@@ -47935,12 +47978,6 @@ check whether things that work for others crash for you. Please try
the following things:
@itemize @bullet
@item
Cleaned up @code{NULL} handling for default values in @code{DESCRIBE
table_name}.
@item
Fixed @code{truncate()} to round up negative values to the nearest integer.
@item
Take down the @code{mysqld} daemon with @code{mysqladmin shutdown}, run
@code{myisamchk --silent --force */*.MYI} on all tables, and restart the
@code{mysqld} daemon.  This will ensure that you are running from a clean
@@ -50401,6 +50438,13 @@ each individual 4.0.x release.
@itemize @bullet
@item
Added @code{LOCK TABLES} and @code{CREATE TEMPORARY TABLES} privilege on
the database level.  One must run the @code{ mysql_fix_privilege_tables}
script on old installations to activate these.
@item
In @code{SHOW TABLE ... STATUS} compressed tables showed sometimes up as
@code{dynamic}.
@item
@code{SELECT @@@@[global|session].var_name} didn't report
@code{global | session} in the result column name.
@item
@@ -50616,6 +50660,11 @@ other databases. It is synonymous with @code{LOG(X)}.
@itemize @bullet
@item
Cleaned up @code{NULL} handling for default values in @code{DESCRIBE
table_name}.
@item
Fixed @code{truncate()} to round up negative values to the nearest integer.
@item
Changed @code{--chroot=path} option to execute @code{chroot()} immediately
after all options have been parsed.
@item
@@ -51195,6 +51244,9 @@ Multithreaded stress tests for InnoDB.
@appendixsubsec Changes in release 3.23.52 (14 Aug 2002)
@itemize @bullet
@item
Wrap @code{BEGIN}/@code{COMMIT} around transaction in the binary log.
This makes replication honour transactions.
@item
Fixed security bug when having an empty database name in the @code{user.db}
table.
@item
+1 −1
Original line number Diff line number Diff line
@@ -175,7 +175,7 @@ struct st_VioSSLConnectorFd
};

void sslaccept(struct st_VioSSLAcceptorFd*, Vio*, long timeout);
void sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout);
int sslconnect(struct st_VioSSLConnectorFd*, Vio*, long timeout);

struct st_VioSSLConnectorFd
*new_VioSSLConnectorFd(const char* key_file, const char* cert_file,
+1 −0
Original line number Diff line number Diff line
@@ -514,6 +514,7 @@ int STDCALL mysql_server_init(int argc, char **argv, char **groups)
  if (!opt_noacl)
    (void) grant_init();
  init_max_user_conn();
  init_update_queries();

#ifdef HAVE_DLOPEN
  if (!opt_noacl)
+7 −3
Original line number Diff line number Diff line
#!/bin/sh
# Copyright (C) 1997, 1998, 1999 TCX DataKonsult AB & Monty Program KB & Detron HB
# Copyright (C) 1997-2002 MySQL AB
# For a more info consult the file COPYRIGHT distributed with this file

# This scripts creates the privilege tables db, host, user, tables_priv,
@@ -85,13 +85,15 @@ then
  c_d="$c_d   References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d   Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_d="$c_d PRIMARY KEY Host (Host,Db,User),"
  c_d="$c_d KEY User (User)"
  c_d="$c_d )"
  c_d="$c_d comment='Database privileges';"
  
  i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
  INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');"
  i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');
  INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y');"
fi

if test ! -f $mdata/host.frm
@@ -109,6 +111,8 @@ then
  c_h="$c_h  References_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Index_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Alter_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
  c_h="$c_h  PRIMARY KEY Host (Host,Db)"
  c_h="$c_h )"
  c_h="$c_h comment='Host privileges;  Merged with database privileges';"
+24 −0
Original line number Diff line number Diff line
@@ -34,3 +34,27 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' REQUIRE ISSUER 'MySQL AB' SUBJECT 'testsubject' CIPHER 'EDH-RSA-DES-CBC3-SHA'
delete from mysql.user where user='mysqltest_1';
flush privileges;
grant CREATE TEMPORARY TABLES, LOCK TABLES on mysqltest.* to mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
flush privileges;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT CREATE TEMPORARY TABLES, LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
revoke CREATE TEMPORARY TABLES on mysqltest.* from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT LOCK TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
grant ALL PRIVILEGES on mysqltest.* to mysqltest_1@localhost with GRANT OPTION;
flush privileges;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost;
show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES ON `mysqltest`.* TO 'mysqltest_1'@'localhost' WITH GRANT OPTION
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1';
flush privileges;
Loading