Commit graph

245 commits

Author SHA1 Message Date
bar@mysql.com
6ff211329f WL#1324 table name to file name encoding
- Encoding itself, implemented as a charset
  "filename". Originally planned to use '.'
  as an escape character, but now changed to '@'
  for two reasons: "ls" does not return
  file names starting with '.' considering them
  as a kind of hidden files; some platforms
  do not allow several dots in a file name.
- replacing many calls of my_snprintf() and
  strnxmov() to the new build_table_filename().
- Adding MY_APPEND_EXT mysys flag, to append
  an extention rather that replace it.
- Replacing all numeric constants in fn_format
  flag arguments to their mysys definitions, e.g.
  MY_UNPACK_FILENAME,
- Predictability in several function/methods:
  when a table name can appear with or withot .frm
  extension. Some functions/methods were changed
  so accept names strictly with .frm, other - strictly
  without .frm extensions. Several DBUG_ASSERTs were
  added to check whether an extension is passed.
Many files:
  table name to file name encoding
mysql_priv.h:
  Prototypes for new table name encoding tools.
ctype-utf8.c:
  Implementing "filename" charset for
  table name to file name encoding.
row0mysql.c:
  Fixing table name prefix.
mf_format.c:
  Adding MY_APPEND_EXT processing.
Many files:
  Fixing tests.
my_sys.h:
  Adding new flag to append rather than replace an extension.
m_ctype.h:
  Adding "filename" charset definition.
2005-12-31 09:01:26 +04:00
jimw@mysql.com
00d29cd259 Merge mysql.com:/home/jimw/my/mysql-5.0-clean
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2005-12-12 11:57:07 -08:00
aivanov@mysql.com
a61b810508 Fixed BUG #14614: Replication of tables with trigger generates
error message if database is changed.
2005-12-11 17:06:36 +03:00
monty@mysql.com
e42c980967 Table definition cache, part 2
The table opening process now works the following way:
- Create common TABLE_SHARE object
- Read the .frm file and unpack it into the TABLE_SHARE object
- Create a TABLE object based on the information in the TABLE_SHARE
  object and open a handler to the table object

Other noteworthy changes:
- In TABLE_SHARE the most common strings are now LEX_STRING's
- Better error message when table is not found
- Variable table_cache is now renamed 'table_open_cache'
- New variable 'table_definition_cache' that is the number of table defintions that will be cached
- strxnmov() calls are now fixed to avoid overflows
- strxnmov() will now always add one end \0 to result
- engine objects are now created with a TABLE_SHARE object instead of a TABLE object.
- After creating a field object one must call field->init(table) before using it

- For a busy system this change will give you:
 - Less memory usage for table object
 - Faster opening of tables (if it's has been in use or is in table definition cache)
 - Allow you to cache many table definitions objects
 - Faster drop of table
2005-11-23 22:45:02 +02:00
SergeyV@selena.
dbb29d11ee Fixes bug #14569. When no db is selected as current and we do create procedure db.sp()...
we changing current db temporarily and restore it when sp is created. however thd->db
in this case becomes empty string rather than NULL and so all checks of thd->db == NULL 
will be false. So if after this we'll issue create procedure sp2()... without specifying
db it will succeed and create sp with db=NULL, which causes mysqldto crash on 
show procedure status statement.

This patch fixes the problem.
2005-11-11 21:01:48 +03:00
msvensson@neptunus.(none)
92b1d080c9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/bug13231/my50-bug13231
2005-09-30 16:51:35 +02:00
msvensson@neptunus.(none)
0581a7f23c Bug #13231 mysqltest: fails to dectect when mysql_next_result fails
- Added functionality to check errors returned from mysql_next_result
 - Exit from mysqltest when and unexpected error occurs.
 - The above fixes reveal problems with rpl000009, sp-error and query_cache-
 - Fix sp-error by adding an expected error
 - Fix rpl000009 by not sending "ok" from mysql_create_db when called with silent flag from load_master_data
 - Fix query_cache in separate patch
2005-09-21 15:28:28 +02:00
bell@sanja.is.com.ua
c1b185f5ff WL#2787 (Add view definer/owner to the view definition (.frm) to check privileges on used tables and stored routines when using a VIEW.)
Part 2 postreview fixes.
2005-09-20 21:20:38 +03:00
bell@sanja.is.com.ua
aec371f910 WL#2787 (part 2, ver 3 (merged)) changed securety context switching 2005-09-15 22:29:07 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
01ce8a8aa9 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
2005-09-12 20:18:49 +03:00
gluh@eagle.intranet.mysql.r18.ru
d9bd3c11e4 Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
produce warning for 'create database if not exists' if database exists
  do not update database options in this case  
  produce warning for 'create table if not exists' if table exists
2005-09-12 17:09:19 +05:00
serg@sergbook.mysql.com
78a0585cea after merge fix 2005-08-26 15:28:08 +04:00
serg@sergbook.mysql.com
d591705e69 merged 2005-08-26 13:24:59 +04:00
monty@mishka.local
f16c7b3c5c After merge fixes 2005-08-25 09:38:06 +03:00
monty@mishka.local
f384e08277 Merge mishka.local:/home/my/mysql-4.1
into  mishka.local:/home/my/mysql-5.0
2005-08-25 06:55:48 +03:00
serg@sergbook.mysql.com
714b27c71c merged 2005-08-25 00:08:02 +04:00
monty@mishka.local
8e6aa0e7ea Review fixes 2005-08-24 19:37:27 +03:00
serg@sergbook.mysql.com
eadb86d56f after pull cleanup 2005-08-22 13:20:02 +04:00
monty@mishka.local
1c1f26d5e2 Fixes during review of new pushed code
Fixed new bug when running a SP without a default database
2005-08-20 11:00:00 +03:00
sasha@asksasha.com
c594ab7921 updated patch for BUG#4680 (incomplete DROP DATABASE breaking replication).
We binlog the DROP TABLE for each table that was actually dropped. Per Sergei's 
suggestion a fixed buffer for the DROP TABLE query is pre-allocated from THD pool, and 
logging now is done in batches - new batch is started if the buffer becomes full.
Reduced memory usage by reusing the table list instead of accumulating a list of 
dropped table names. Also fixed the problem if the table was not actually dropped, eg
due to permissions. Extended the test case to make sure batched query 
logging does work.
2005-08-18 21:40:14 -06:00
jimw@mysql.com
3a815f45bd Avoid spurious error when restoring INFORMATION_SCHEMA as the current
database after failing to execute a stored procedure in an inaccessible
database. (Bug #12318)
2005-08-11 17:04:16 -07:00
sasha@asksasha.com
c44fe70d02 patch for BUG#4680 - drop database breaking replication if there were extra files
in the database directory on the master
2005-08-03 18:08:20 -06:00
reggie@mdk10.(none)
21133df02a fixed conflicts 2005-05-20 16:34:59 -05:00
reggie@mdk10.(none)
48c584537d BUG# 9148: Denial of service
The problem was that on Windows the access method indicates that access to file 
such as "com1" and "lpt1" is allowed (since they are device names) and
this causes mysql to attempt to open them as databases or tables.

The fix was to write our own my_access method that uses other Win32 functions
to determine if the given argument is indeed a file and has to requested
mode.
2005-05-20 16:04:10 -05:00
msvensson@neptunus.(none)
f1496eb6f7 BUG#9455 mysqladmin status crash the server
- Send error to client when mysql_change_db fails.
2005-04-14 11:56:13 +02:00
jimw@mysql.com
ee2b4ec959 Eliminate warnings noticed by VC7. This includes fixing my_mmap() on
Windows to call CreateFileMapping() with correct arguments, and
propogating the introduction of query_id_t to everywhere query ids are
passed around. (Bug #8826)
2005-03-18 16:12:25 -08:00
monty@mysql.com
3839e443a4 merge with 4.1 2005-02-28 12:18:39 +02:00
monty@mysql.com
7e5f74f8f2 Merge with global tree 2005-02-25 17:12:06 +02:00
monty@mysql.com
0a6b7aedb2 Remove compiler warnings and remove not used variables
(Found during build process)
2005-02-25 16:53:22 +02:00
bell@51.0.168.192.in-addr.arpa
a9b40a8c0b Merge 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/mysql-5.0
into 51.0.168.192.in-addr.arpa:/Users/bell/mysql/bk/work-repl-5.0
2005-02-22 14:52:26 +02:00
bell@51.0.168.192.in-addr.arpa
a867465e88 changed return value to boolean 2005-02-22 14:46:21 +02:00
monty@mysql.com
cab35adf7e Review of new pushed code (XA & other)
Portability fixes and cleanups
Fixed setting of 'res' in mysql_execute_command()
2005-02-21 14:47:57 +02:00
ramil@mysql.com
8cf2b82f94 After review fixes 2005-02-02 15:52:19 +04:00
ramil@mysql.com
7f68f132fd Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b4802
2005-02-02 15:06:36 +04:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
monty@mysql.com
d35140a851 First stage of table definition cache
Split TABLE to TABLE and TABLE_SHARE (TABLE_SHARE is still allocated as part of table, will be fixed soon)
Created Field::make_field() and made Field_num::make_field() to call this
Added 'TABLE_SHARE->db' that points to database name; Changed all usage of table_cache_key as database name to use this instead
Changed field->table_name to point to pointer to alias. This allows us to change alias for a table by just updating one pointer.
Renamed TABLE_SHARE->real_name to table_name
Renamed TABLE->table_name to alias
Renamed TABLE_LIST->real_name to table_name
2005-01-06 13:00:13 +02:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
gluh@gluh.mysql.r18.ru
2e912bbbe8 Don't display 'usage' privilege in TABLE_PRIVILEGES if we have columns privileges
mysqldump skips information_schema db
'use' now can use information_schema db
changed value of column 'Null' to 'NO' if column is not nullable
2004-12-10 12:07:11 +03:00
dlenev@mysql.com
611abb882b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
2004-12-09 14:14:03 +03:00
monty@mysql.com
01e4740f4c Ensure that we free memory used with --order-by-primary (in mysqldump)
Simple, non critical, fix to mysql_fix_privilege_tables
2004-12-09 12:47:20 +02:00
dlenev@mysql.com
62a6d9749b Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/dlenev/src/mysql-4.1-bg6765
2004-12-09 13:33:12 +03:00
dlenev@brandersnatch.localdomain
4b0882e0a6 Fix for bug #6765 "Implicit access to time zone description
tables requires privileges for them if some table or column level grants
present" (with after-review fixes).

We should set SELECT_ACL for implicitly opened tables in 
my_tz_check_n_skip_implicit_tables() to be able to bypass privilege
checking in check_grant(). Also we should exclude those tables from
privilege checking in multi-update.
2004-12-09 13:31:46 +03:00
monty@mysql.com
0de4777187 Merge with 4.1 2004-12-06 11:38:56 +02:00
mats@mysql.com
2bbdf2403d Bug#6391 (binlog-do-db rules ignored)
CREATE DATABASE statement used the current database instead of the
  database created when checking conditions for replication.
  CREATE/DROP/ALTER DATABASE statements are now replicated based on
  the manipulated database.
2004-12-03 12:13:51 +01:00
bell@sanja.is.com.ua
7210195f1e now my_printf_error is not better then my_error, but my_error call is shorter
used only one implementation of format parser of (printf)
fixed multistatement
2004-11-13 19:35:51 +02:00
bell@sanja.is.com.ua
1555469b64 merge 2004-11-12 15:36:31 +02:00
bell@sanja.is.com.ua
31f7811183 post-review fixes 2004-11-12 14:34:00 +02:00
brian@avenger.(none)
f05daf02ba Resolved merge from 4.1 -> 5.0 (mainly Guilhem's work with mysqldump) 2004-11-11 18:58:57 -08:00
acurtis@pcgem.rdg.cyberkinetica.com
dd1cd8aa46 Bug#6031 - To drop database you have to execute DROP DATABASE command twice.
DROP DATABASE failed because of file ext not in TYPELIB of known extensions.
  General solution - construct a TYPELIB at runtime instead of a static list.
2004-11-10 15:07:11 +00:00