Commit graph

332 commits

Author SHA1 Message Date
evgen@sunlight.local
ef4f149536 Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
2006-07-30 00:33:24 +04:00
igor@olga.mysql.com
69856b29b2 Fixed bug #21231: wrong results for a simple query with a
a non-correlated single-row subquery over information schema.

The function get_all_tables filling all information schema
tables reset lex->sql_command to SQLCOM_SHOW_FIELDS. After
this the function could evaluate partial conditions related to
some columns. If these conditions contained a subquery over
information schema it led to a wrong evaluation and a wrong 
result set.
This bug was already fixed in 5.1.
This patch follows the way how it was done in 5.1 where
the value of lex->sql_command is set to SQLCOM_SHOW_FIELDS
in get_all_tables only for the calls of the function 
open_normal_and_derived_tables and is restored after these
calls.
2006-07-24 19:05:46 -07:00
igor@olga.mysql.com
66ecb7df81 Fixed bug #18925: wrong results for queries with
subqueries on information schema that use MIN/MAX aggregation.

Execution of some correlated subqueries may set the value
of null_row to 1 for tables used in the subquery.
If the the subquery is on information schema it causes
rejection of any row for the following executions of
the subquery in the case when an optimization filtering
by some condition is applied.

The fix restores the value of the null_row flag for 
each execution of a subquery on information schema.
2006-07-22 12:44:54 -07:00
kostja@bodhi.local
231565c206 Fix information_schema.result after a manual merge. 2006-07-15 03:08:56 +04:00
kostja@bodhi.local
99fefab169 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge-5.0
2006-07-13 11:43:52 +04:00
cmiller@zippy.(none)
512d1c7ff3 Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
2006-07-10 17:20:39 -04:00
kroki@mysql.com
1bcf6b1d09 Bug#20230: routine_definition is not null
SHOW CREATE PROCEDURE and SHOW CREATE FUNCTION are fixed as well as
INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME.
2006-06-30 00:21:55 +04:00
konstantin@mysql.com
5154bc6c47 A post-merge fix. 2006-06-29 16:31:08 +04:00
kroki@mysql.com
08f192f81b Bug#17203: "sql_no_cache sql_cache" in views created from prepared statement
The problem was that we restored SQL_CACHE, SQL_NO_CACHE flags in SELECT
statement from internal structures based on value set later at runtime, not
the original value set by the user.

The solution is to remember that original value.
2006-06-27 21:28:32 +04:00
konstantin@mysql.com
5e0a692723 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/opt/local/work/mysql-5.1-runtime
2006-06-26 18:45:46 +04:00
andrey@lmy004.
c59a58c4ba fix for bug#16992 (Events: Information_schema troubles)
Introduced EVENTS.EVENT_DEFINITION, like ROUTINES.ROUTINE_DEFINITION
Hence, the contents of the current EVENTS.EVENT_BODY become the contents
of EVENT_DEFINITION. EVENT_BODY will contain always, for now, "SQL" (wo
quotes).
2006-06-22 13:01:08 +02:00
monty@mysql.com
be269e56d2 SHOW STATUS does not anymore change local status variables (except com_show_status). Global status variables are still updated.
SHOW STATUS are not anymore put in slow query log because of no index usage.

Implemntation done by removing orig_sql_command and moving logic of SHOW STATUS to mysql_excute_command()
This simplifies code and allows us to remove some if statements all over the code.

Upgraded uc_update_queries[] to sql_command_flags and added more bitmaps to better categorize commands.
This allowed some overall simplifaction when testing sql_command.

Fixes bugs:
Bug#10210: running SHOW STATUS increments counters it shouldn't
Bug#19764: SHOW commands end up in the slow log as table scans
2006-06-20 13:20:32 +03:00
gluh@eagle.intranet.mysql.r18.ru
00a1b6857a after merege fix 2006-06-14 13:52:16 +05:00
gluh@mysql.com
a1020c6e4d post-merge fix 2006-06-14 10:54:56 +05:00
holyfoot@deer.(none)
f1ed5a40d6 bug #16832 (ALGORITHM missed in VIEW's information schema) 2006-06-13 17:23:43 +05:00
gluh@eagle.intranet.mysql.r18.ru
8acb6eeb80 Bug#18035 Information Schema: Output is not Sorted
added 'order by' to avoid result order difference
2006-06-06 12:57:50 +05:00
gluh@eagle.intranet.mysql.r18.ru
b1892278c7 Bug#19599 duplication of information_schema column value in a CONCAT expr with user var
mark result string using String::mark_as_const()
which prevents CONCAT from reusing it as a buffer
for concatenation result.
2006-06-06 12:51:04 +05:00
gluh@mysql.com
023317d68a after merge fix 2006-05-25 19:20:34 +05:00
gluh@eagle.intranet.mysql.r18.ru
457aea43fc Bug#16681 information_schema shows forbidden VIEW details
show view definition to users that have the needed privilleges
2006-05-23 12:45:25 +05:00
tulin@production.mysql.com
d4c739fda3 information_schema.result:
corrected merge
2006-05-16 12:00:17 +02:00
tomas@poseidon.ndb.mysql.com
6cb699d208 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-05-16 10:37:40 +02:00
gluh@eagle.intranet.mysql.r18.ru
a23a8780e4 Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
replaced get_field(MEM_ROOT *mem, Field *field) with 
get_field(MEM_ROOT *mem, Field *field, String *res).
It allows to avoid strlen().
2006-05-12 17:34:36 +05:00
gluh@eagle.intranet.mysql.r18.ru
c8944add73 Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH 2006-05-12 15:09:25 +05:00
jani@ua141d10.elisa.omakaista.fi
083f8455c7 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-new
2006-05-09 20:50:29 +03:00
msvensson@neptunus.(none)
4c866961ed Bug#18474 Unlistable directories yield no info from information_schema, part2
- Move "chmod" part of information_schema test to separate file
2006-05-04 17:47:25 +02:00
aivanov@mysql.com
2038e05bb4 Merge aivanov@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  mysql.com:/home/alexi/dev/mysql-5.1-wl3148
2006-05-04 02:58:11 +04:00
aivanov@mysql.com
f6073b2735 WL#3148: Modifying sizes of i_s.processlist columns ('time', 'info'). 2006-05-02 23:08:22 +04:00
gluh@eagle.intranet.mysql.r18.ru
19de86dd63 WL#2257 REFERENTIAL_CONSTRAINTS view
added I_S.REFARENTIAL_CONSTRAINTS table
2006-05-02 16:31:39 +05:00
hartmut@mysql.com
4a4c459fa3 Merge mysql.com:/home/hartmut/projects/mysql/dev/5.0
into  mysql.com:/home/hartmut/projects/mysql/dev/5.1
2006-04-07 11:23:55 +02:00
gluh@eagle.intranet.mysql.r18.ru
fe7ea20764 Bug#18469 make test fails on information_schema
move test case for bug 14290 to ctype_ucs test
2006-04-07 12:32:24 +05:00
bar@mysql.com
cbcd9cd575 Merge mysql.com:/usr/home/bar/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.1-new
2006-04-05 19:00:02 +05:00
bar@mysql.com
1c74e21809 After merge fix for Bug#12076 --with-extra-charsets has no effect 2006-04-04 15:40:42 +05:00
gluh@mysql.com
c9d4d6aa29 5.0 -> 5.1 merge 2006-03-21 16:26:47 +04:00
gluh@eagle.intranet.mysql.r18.ru
f78ae59f0f Fix for bug#18224 VIEW on information_schema crashes the server
additional check for subselect
2006-03-20 14:17:47 +04:00
anozdrin@mysql.com
c1ef46fcc7 Merge mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.0-tree
into  mysql.com:/home/alik/Documents/AllProgs/MySQL/devel/5.1-merged
2006-03-09 20:41:21 +03:00
msvensson@neptunus.(none)
40b3222b74 Merge neptunus.(none):/home/msvensson/mysql/bug10460/my51-bug10460
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1
2006-03-06 11:39:36 +01:00
anozdrin@mysql.com
fbb5920399 Implementation of WL#2897: Complete definer support in the stored routines.
The idea is to add DEFINER-clause in CREATE PROCEDURE and CREATE FUNCTION
statements. Almost all support of definer in stored routines had been already
done before this patch.

NOTE: this patch changes behaviour of dumping stored routines in mysqldump.
Before this patch, mysqldump did not dump DEFINER-clause for stored routines
and this was documented behaviour. In order to get full information about stored
routines, one should have dumped mysql.proc table. This patch changes this
behaviour, so that DEFINER-clause is dumped.

Since DEFINER-clause is not supported in CREATE PROCEDURE | FUNCTION statements
before this patch, the clause is covered by additional version-specific comments.
2006-03-02 15:18:49 +03:00
tomas@poseidon.ndb.mysql.com
df6bb1994b Bug #17805 Cluster_replication database should be renamed to just cluster 2006-03-01 13:31:21 +01:00
msvensson@neptunus.(none)
c4b1fb68b4 Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower case 2006-02-22 10:09:59 +01:00
jimw@mysql.com
cdad081fbe Merge mysql.com:/home/jimw/my/mysql-5.1-13883
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-02-17 11:06:05 -08:00
aivanov@mysql.com
14633e0532 The patch adds PROCESSLIST information schema 2006-02-16 16:45:05 +03:00
konstantin@mysql.com
30ddc47ab0 Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-07 15:26:58 +03:00
konstantin@mysql.com
a55b7a9f13 A post-merge fix. 2006-02-03 23:21:17 +03:00
konstantin@mysql.com
9f0bb47f87 Merge mysql.com:/home/kostja/mysql/tmp_merge
into  mysql.com:/home/kostja/mysql/mysql-5.1-merge
2006-02-02 23:27:06 +03:00
jimw@mysql.com
95f1b04929 Remove extra space in SHOW CREATE TABLE output. (Bug #13883) 2006-02-02 11:39:28 -08:00
stewart@mysql.com
72b9f287df Merge mysql.com:/home/stewart/Documents/MySQL/5.1/wl1359
into  mysql.com:/home/stewart/Documents/MySQL/5.1/tmp_merge
2006-02-02 00:52:32 +11:00
stewart@mysql.com
d590dd5682 some fixes from review of WL1359.
fix up test cases.
2006-02-02 00:47:08 +11:00
anozdrin@mysql.com
0a1f7e921b Fix for BUG#9412: Triggers: should have trigger privilege.
Implement table-level TRIGGER privilege to control access to triggers.
Before this path global SUPER privilege was used for this purpose, that
was the big security problem.

In details, before this patch SUPER privilege was required:
  - for the user at CREATE TRIGGER time to create a new trigger;
  - for the user at DROP TRIGGER time to drop the existing trigger;
  - for the definer at trigger activation time to execute the trigger (if the
    definer loses SUPER privilege, all its triggers become unavailable);

This patch changes the behaviour in the following way:
  - TRIGGER privilege on the subject table for trigger is required:
    - for the user at CREATE TRIGGER time to create a new trigger;
    - for the user at DROP TRIGGER time to drop the existing trigger;
    - for the definer at trigger activation time to execute the trigger
      (if the definer loses TRIGGER privilege on the subject table, all its
      triggers on this table become unavailable).
  - SUPER privilege is still required:
    - for the user at CREATE TRIGGER time to explicitly set the trigger
      definer to the user other than CURRENT_USER().

When the server works with database of the previous version (w/o TRIGGER
privilege), or if the database is being upgraded from the previous versions,
TRIGGER privilege is granted to whose users, who have CREATE privilege.
2006-02-01 13:28:45 +03:00
andrey@lmy004.
d847ac54ca fix for bug#16642 (Events: No INFORMATION_SCHEMA.EVENTS table)
post-review change - use pointer instead of copy on the stack.
WL#1034 (Internal CRON)
 This patch adds INFORMATION_SCHEMA.EVENTS table with the following format:
  EVENT_CATALOG  - MYSQL_TYPE_STRING  (Always NULL)
  EVENT_SCHEMA   - MYSQL_TYPE_STRING  (the database)
  EVENT_NAME     - MYSQL_TYPE_STRING  (the name)
  DEFINER        - MYSQL_TYPE_STRING  (user@host)
  EVENT_BODY     - MYSQL_TYPE_STRING  (the body from mysql.event)
  EVENT_TYPE     - MYSQL_TYPE_STRING  ("ONE TIME" | "RECURRING")
  EXECUTE_AT     - MYSQL_TYPE_TIMESTAMP (set for "ONE TIME" otherwise NULL)
  INTERVAL_VALUE - MYSQL_TYPE_LONG    (set for RECURRING otherwise NULL)
  INTERVAL_FIELD - MYSQL_TYPE_STRING  (set for RECURRING otherwise NULL)
  SQL_MODE       - MYSQL_TYPE_STRING  (for now NULL)
  STARTS         - MYSQL_TYPE_TIMESTAMP (starts from mysql.event)
  ENDS           - MYSQL_TYPE_TIMESTAMP (ends from mysql.event)
  STATUS         - MYSQL_TYPE_STRING  (ENABLED | DISABLED)
  ON_COMPLETION  - MYSQL_TYPE_STRING  (NOT PRESERVE | PRESERVE)
  CREATED        - MYSQL_TYPE_TIMESTAMP
  LAST_ALTERED   - MYSQL_TYPE_TIMESTAMP
  LAST_EXECUTED  - MYSQL_TYPE_TIMESTAMP
  EVENT_COMMENT  - MYSQL_TYPE_STRING

  SQL_MODE is NULL for now, because the value is still not stored in mysql.event .
Support will be added as a fix for another bug.

 This patch also adds SHOW [FULL] EVENTS [FROM db] [LIKE pattern]
1. SHOW EVENTS shows always only the events on the same user,
   because the PK of mysql.event is (definer, db, name) several 
   users may have event with the same name -> no information disclosure.
2. SHOW FULL EVENTS - shows the events (in the current db as SHOW EVENTS)
   of all users. The user has to have PROCESS privilege, if not then
   SHOW FULL EVENTS behave like SHOW EVENTS.
3. If [FROM db] is specified then this db is considered.
4. Event names can be filtered with LIKE pattern.
  SHOW EVENTS returns table with the following columns, which are subset of
  the data which is returned by SELECT * FROM I_S.EVENTS
   Db
   Name
   Definer 
   Type
   Execute at
   Interval value
   Interval field 
   Starts 
   Ends
   Status
2006-01-30 13:15:23 +01:00
paul@snake-hub.snake.net
b4f8b1b376 information_schema_db.result, information_schema.result:
Fix test result.
table.h, sql_show.cc:
  Put I_S tables in lexical order.
2006-01-28 19:44:51 -06:00
gluh@eagle.intranet.mysql.r18.ru
b4f7c9bbd5 Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
Fill schema tables with data before filesort if it's necessary
2006-01-24 16:48:19 +04:00
gluh@eagle.intranet.mysql.r18.ru
fa776a6f67 Fix for bug#15851 Unlistable directories yield no info from information_schema
to skip directories which are not allowed for read
2006-01-24 15:59:08 +04:00
cps@outpost.site
ce2eb6d8cb WL1019: complete patch. Reapplied patch to the clean
tree to get rid of multiple typos in CS comments and
unify the patch.
2006-01-19 05:56:06 +03:00
anozdrin@mysql.com
4e1ccbe244 Merge mysql.com:/home/alik/MySQL/devel/5.0-bug15103
into  mysql.com:/home/alik/MySQL/devel/5.1-tree
2006-01-13 19:46:39 +03:00
tomas@poseidon.ndb.mysql.com
4b731ddfb4 wl2325 wl2324 2006-01-12 19:51:02 +01:00
anozdrin@mysql.com
dae00c191f Fix for BUG#15103: SHOW TRIGGERS: small output alignment problem. 2006-01-12 03:02:52 +03:00
andrey@lmy004.
c326d96535 WL #1034 (Internal CRON) pre-push fixes
after another merge fixes.
2006-01-11 12:49:56 +01:00
andrey@lmy004.
7c049782fa WL #1034 (Internal CRON)
merge before push
2006-01-10 21:02:19 +01:00
andrey@lmy004.
d2f0002e77 WL #1034 (Internal CRON) pre-push updates
- fixed test results
- fixed bug caught by information_schema.test . Bison temporal
  variables are very nice but extremely error-prone (Count one more
  time just to be sure).
2006-01-10 19:16:58 +01:00
gluh@eagle.intranet.mysql.r18.ru
be4ebd9038 WL#2506: Information Schema tables for PARTITIONing
added I_S 'PARTITIONS' table
2006-01-10 19:44:04 +04:00
konstantin@mysql.com
f4cc6c4d15 Merge mysql.com:/opt/local/work/mysql-5.0-merge
into  mysql.com:/opt/local/work/mysql-5.1-merge
2006-01-05 00:38:51 +03:00
gluh@eagle.intranet.mysql.r18.ru
8ce6f3e6ca Fix for bug#15533 crash, information_schema, function, view
enable view prepared mode during getting metedata for I_S table
2006-01-03 14:25:19 +04:00
dlenev@mysql.com
15c86158a7 Merge mysql.com:/home/dlenev/src/mysql-5.0-bg14836
into  mysql.com:/home/dlenev/src/mysql-5.1-merges
2005-12-24 20:13:51 +03:00
brian@zim.(none)
56fd453c5d Fix for Antony's push. I've also changed from using the zlib off_t pointer type to my_off_t to fix issues around buggy zlib versions and to make sure file sizes are consistent through out mysql. 2005-12-23 12:22:31 -08:00
brian@zim.(none)
3c23f4dca9 Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into  zim.(none):/home/brian/mysql/cluster-5.1
2005-12-22 01:12:40 -08:00
brian@zim.(none)
fe7ecfd5f1 This patch does the following:
1) Fixes breakage in embedded server build for XMLPath push.
2) Hides PARTITION engine from view.
3) Add ENGINES information schema (and it should now be clear from this patch on how to turn any show command into an information schema).
2005-12-22 01:07:47 -08:00
acurtis@xiphis.org
9d4d1e81b8 Merge xiphis.org:/home/antony/work2/mysql-5.1
into  xiphis.org:/home/antony/work3/mysql-5.1-plugable-2
2005-12-21 10:26:39 -08:00
acurtis@xiphis.org
13a776778c Finalize storage engine plugins
Give BerkeleyDB savepoints
Remove "enum db_type" from most of the code
2005-12-21 10:18:40 -08:00
gluh@eagle.intranet.mysql.r18.ru
f9ef0df0d3 Fix for bug#14271 I_S: columns has no size for (var)binary columns
set character_octet_length, character_maximum_length for
  binary and varbinary field types
2005-12-19 16:21:02 +04:00
gluh@eagle.intranet.mysql.r18.ru
c8631b414b Bug#12770 DESC cannot display the info. about temporary table
Bug#14387 SHOW COLUMNS doesn't work on temporary tables.
Bug#15224 SHOW INDEX from temporary table doesn't work.
  Restore thd->temporary_tables to be able to process
  temporary tables(only for 'show index' & 'show columns').
  This should be changed when processing of temporary tables for
  I_S tables will be done.
2005-12-19 14:46:54 +04:00
gluh@mysql.com
55ee78ed86 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into mysql.com:/home/gluh/MySQL/Merge/5.1-new
2005-12-01 11:08:13 +04:00
gluh@eagle.intranet.mysql.r18.ru
1faac904f5 Fix for bug#14476 information_schema.TABLES.TABLE_TYPE with empty value
store TABLES.TABLE_TYPE in case of error during table opening
2005-12-01 11:00:33 +04: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
guilhem@mysql.com
2f95fc2701 Merge mysql.com:/home/mysql_src/mysql-5.0
into  mysql.com:/home/mysql_src/mysql-5.1-merge-of-5.0 (not all files are good,
I'll fix; I'll ask some devs to check their part)
2005-11-18 16:38:01 +01:00
gluh@eagle.intranet.mysql.r18.ru
7803d80aa4 Fix for bug#13818 SHOW CREATE VIEW / TABLE and information_schema.views fail
for invalid view
 Permit SHOW CREATE VIEW, SHOW CREATE TABLE, and retrieval of metadata from
 information_schema for invalid views
2005-11-11 13:39:46 +04:00
anozdrin@mysql.com
491e4f89f5 WL#2818 (Add creator to the trigger definition for privilege
checks on trigger activation)
2005-11-10 22:25:03 +03:00
svoj@poseidon.ndb.mysql.com
3791197f0d WL#2575 - Fulltext: Parser plugin for FTS
WL#2763 - MySQL plugin interface: step 1
Manual merge from CNET tree.
2005-11-06 13:13:06 +01:00
bell@sanja.is.com.ua
6143c6543e Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-owner7-5.0
2005-10-28 00:24:13 +03:00
bell@sanja.is.com.ua
1b164c7b83 support of view underlying tables and SP functions security check added (BUG#9505) (WL#2787) 2005-10-28 00:18:23 +03:00
ramil@mysql.com
c06673d49b Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields. 2005-10-25 17:22:58 +05:00
gluh@eagle.intranet.mysql.r18.ru
e8d52711ad fix for bug#14089 FROM list subquery always fails when
information_schema is current database
  skip the check of I_S tables if table is derived table
2005-10-21 13:14:54 +05:00
konstantin@mysql.com
2d4c54ba1b Merge mysqldev@production.mysql.com:my/mysql-5.0-release
into  mysql.com:/opt/local/work/mysql-5.0-root
2005-09-23 00:46:59 +04:00
monty@mysql.com
82fc54781b Fixed problems found by valgrind
Fixed problems in test suite where some test failed
Fixed access to not initialized memory in federated
Fixed access to not initialized memory when using BIT fields in internal temporary tables
2005-09-22 03:23:07 +03:00
bell@sanja.is.com.ua
27aa2ae30c fixed length detection 2005-09-16 09:15:45 +03:00
bell@sanja.is.com.ua
630cdd7d0c Information schema fix for WL#2787 2005-09-15 11:56:06 +03:00
gluh@eagle.intranet.mysql.r18.ru
cc395fc0c2 Bug#9683 INFORMATION_SCH: Creation of temporary table allowed in
Information_schema DB 
Bug#9846 Inappropriate error displayed while
         dropping table from 'INFORMATION_SCHEMA'
Bug#10734 Grant of privileges other than 'select' and 
         'create view' should fail on schema 
Bug#10708 SP's can use INFORMATION_SCHEMA as ROUTINE_SCHEMA

 cumulative fix for bugs above(after review, 2nd version)
 added privilege check for information schema db & tables
2005-09-13 16:07:38 +05:00
gluh@eagle.intranet.mysql.r18.ru
f077477dca Fix for bug#12905 show fields from view behaving erratically with current database
use saved view db name in case of view
2005-09-07 16:11:53 +05:00
andrey@lmy004.
950a277988 retest the fix for bug #10362 (SHOW PROCEDURE always qualifies name with database)
(already approved)
2005-08-27 12:29:36 +02:00
monty@mishka.mysql.com
aa18382680 Make test predictable 2005-08-25 12:03:19 +03:00
georg@lmy002.wdf.sap.corp
adc603a930 Merge lmy002.wdf.sap.corp:/home/georg/work/mysql/bugs/mysql-5.0-master
into lmy002.wdf.sap.corp:/home/georg/work/mysql/bugs/mysql-5.0_5501
2005-08-25 07:02:37 +02:00
georg@lmy002.wdf.sap.corp
254db48603 Fix for bug#5501 (SHOW TABLE STATUS should show "view" in upper case) 2005-08-24 12:51:00 +02:00
igor@rurik.mysql.com
21b63441f5 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0
2005-08-22 17:46:21 -07:00
igor@rurik.mysql.com
94166de5f3 sql_show.cc:
Database name was set incorrectly for any show command
  that used sunqueries in its where condition.
information_schema.test, information_schema.result:
  Added a test case for bug #12636.
2005-08-22 17:32:02 -07:00
monty@mishka.local
49413542bd Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mishka.local:/home/my/mysql-5.0
2005-08-22 16:06:00 +03: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
jimw@mysql.com
dd1e0fb8c7 Merge mysql.com:/home/jimw/my/mysql-5.0-11711
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-19 11:40:39 -07:00
aivanov@mysql.com
ed6cd805dc information_schema.test:
Added a comment line for a test case used for bug #12301.
information_schema.result:
  Fixed some test cases results (bug #12301).
sql_show.cc:
  Fixed bug #12301.
  The bug was due to a missing value setting for the NUMERIC_SCALE column
   in the get_schema_column_record() function (sql_show.cc).
2005-08-16 23:11:04 +04:00
acurtis@xiphis.org
c414bb1520 Bug#12518
"COLUMN_DEFAULT has wrong value if NOT NULL is set"
  Show NULL instead of empty string when no default value is set
2005-08-15 17:14:55 +01:00
dlenev@mysql.com
0c38d33507 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is
2005-08-09 11:43:55 +04:00
jimw@mysql.com
2b04134439 Report 'SYSTEM VIEW' as table_type of INFORMATION_SCHEMA views. (Bug #11711) 2005-08-08 12:59:04 -07:00
dlenev@mysql.com
615baa9f23 Fix for bug #10055 "Using stored function with information_schema causes empty
result set".

To enable full access to contents of I_S tables from stored functions
or statements that use them, we manipulate with thread's open tables
state and ensure that we won't cause deadlock when we open tables by
ignoring flushes and name-locks.
Building of contents of I_S.TABLES no longer requires locking of tables
since we use use handler::info() method with HA_STATUS_AUTO flag instead
of handler::update_auto_increment() for obtaining information about
auto-increment values. But this also means that handlers have to implement
support for HA_STATUS_AUTO flag (particularly InnoDB needs it).
2005-08-08 17:46:06 +04:00
andrey@lmy004.
3a52916436 fix for bug #12315 - SHOW TABLE STATUS FROM information_schema; does not sort tablenames 2005-08-05 11:01:29 +02:00
jimw@mysql.com
6557fca0bd Update out-of-date test result 2005-08-02 18:27:05 -07:00
jimw@mysql.com
698f209917 Fix test to avoid spurious failure message. (Bug #11233) 2005-08-02 16:50:10 -07:00
bell@sanja.is.com.ua
4a0d64af89 Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into  sanja.is.com.ua:/home/bell/mysql/bk/work-trigger-5.0
2005-07-29 23:43:07 +03:00
bell@sanja.is.com.ua
b220fc47ef store/restore sql_mode which was in force during ctrigger creation (BUG#5891)
other sql_mode fixes
2005-07-28 22:39:11 +03:00
gluh@eagle.intranet.mysql.r18.ru
ef2c7812f3 Fix for bug#12127 triggers do not show in info_schema before they are used if set to the database(2nd version)
use db name of table which trigger belongs to
  instead of thd->db name during trigger body parsing
2005-07-27 16:17:05 +05:00
gluh@eagle.intranet.mysql.r18.ru
c1c504abf4 merge fix 2005-07-21 18:43:55 +05:00
dlenev@mysql.com
b141437ad3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-tn
2005-07-19 20:55:09 +04:00
dlenev@mysql.com
8a3e723b74 Fix for bugs #5892/6182/8751/8758/10994 (based on Antony's patch)
"Triggers have the wrong namespace"
  "Triggers: duplicate names allowed"
  "Triggers: CREATE TRIGGER does not accept fully qualified names"
  "SHOW TRIGGERS"
2005-07-19 20:06:49 +04:00
gluh@eagle.intranet.mysql.r18.ru
d1bc1b7c0e Fix for bug#11057 information_schema: columns table has some questionable contents
fixed BLOB, TEXT(wrong maximum length), BIT and integer types(wrong numeric_precision value)
2005-07-19 14:30:32 +05:00
gluh@eagle.intranet.mysql.r18.ru
d59ff2764c Bug#11577 'show procedure/function status' doesn't work for user with limited access
changed 'SHOW PROCEDURE' behavoiur to be like INFORMATION_SCHEMA.routines
2005-07-19 13:49:43 +05:00
gluh@eagle.intranet.mysql.r18.ru
9c3349f5c6 Fix for bug#11685 SHOW TABLES; doesn't update Com_show_tables 2005-07-13 13:30:39 +05:00
jimw@mysql.com
a2244a9094 Merge jwinstead@production.mysql.com:my/mysql-5.0-10844
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-07-05 15:24:35 -07:00
monty@mysql.com
ec420bfb43 Fixes during review of new code
- Mostly indentation fixes
- Added missing test
- Ensure that Item_func_case() checks for stack overruns
- Use real_item() instead of (Item_ref*) item
- Fixed wrong error handling
2005-07-04 03:42:33 +03:00
jimw@mysql.com
01c690b79b Fix information_schema test on Windows. (Bug #10844) 2005-06-18 03:02:27 +02:00
gluh@eagle.intranet.mysql.r18.ru
c7dde629b7 Fix for bug#9434 SHOW CREATE DATABASE information_schema;
added ability to do SHOW CREATE DATABASE `information_schema`
2005-06-16 13:27:22 +05:00
gluh@eagle.intranet.mysql.r18.ru
a851311d77 Fix for bug#11055: information_schema: routines.sql_data_access has wrong value 2005-06-16 12:12:47 +05:00
gluh@mysql.com
ac76e6db6a Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/gluh/MySQL/Bugs/5.0.10964
2005-06-07 11:31:07 +05:00
gluh@eagle.intranet.mysql.r18.ru
477feba00f Fix for bug#10964: Information Schema:Authorization check on(2nd version, after review)
privilege tables is improper
    added privilege check for USER_PRIVILEGES, SCHEMA_PRIVILEGES,
    TABLE_PRIVILEGES, COLUMN_PRIVILEGES tables
2005-06-02 15:33:53 +05:00
monty@mysql.com
a69f432115 Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge
2005-06-01 16:35:09 +03:00
gluh@eagle.intranet.mysql.r18.ru
ddf91f0689 Fix for bug#10059: SHOW TABLE STATUS FROM information_schema; reports uppercase table names
information schema table names are always upper case table names
2005-05-31 13:15:23 +05:00
gluh@gluh.mysql.r18.ru
68317fcb0c addition of "REFERENCED_TABLE_SCHEMA",
"REFERENCED_TABLE_NAME", "REFERENCED_COLUMN_NAME" fields into
  KEY_COLUMN_USAGE table
2005-05-20 16:39:28 +04:00
gluh@mysql.com
828237909f after merge fix 2005-05-09 18:18:59 +00:00
gluh@mysql.com
03234c48cf manual merge 2005-05-09 17:21:44 +00:00
gluh@mysql.com
12085567de Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries 2005-05-09 16:22:49 +00:00
gluh@mysql.com
f6bf2680b2 Fix for bug#10261: INFORMATION_SCHEMA.COLUMNS, incomplete result for non root user
I_S table columns information is available for any user
2005-05-07 15:14:34 +00:00
gluh@mysql.com
64cbbf1463 Fix for bug #9838: INFORMATION_SCHEMA.COLUMNS columns of granted views missing 2005-05-07 13:55:46 +00:00
gluh@mysql.com
f285b4fcee Fix for bug#8998: information_schema: Table SCHEMATA should report default collations
DEFAULT_COLLTION_NAME field is added to SCHEMATA table
2005-05-06 20:14:22 +00:00
igor@rurik.mysql.com
b622aba19f information_schema.result, information_schema.test:
Added a test in connection with the fix for
  bug #6106.
view.result, view.test:
  Added test cases for bugs #6106/6107.
sql_show.cc:
  The addition of the case for items of the type REF_ITEM in the
  function uses_only_table_name_fields became necessary after
  the fix for bug #6106.
sql_base.cc:
  The problem was due to the fact that two different column
  references were glued together though one of them belonged to
  a subquery while another to an outer query. This caused
  eventually a wrong calculation of values for the used_tables
  attribute.
2005-04-13 23:06:37 -07:00
gluh@eagle.intranet.mysql.r18.ru
6c8c2d22b9 Fix for bug#7214: information_schema: unauthorized user can see metadata
the fix for 'columns' table only
    Rights check for 'routines' table is already done
    (see WL2131 Access control for SHOW ... PROCEDURE|FUNCTION ...)
    rename 'testtets' database to 'mysqltest' to keep number of
      DBs which created by mysql-test as small as possible
2005-04-05 15:12:15 +05:00
gluh@eagle.intranet.mysql.r18.ru
1f38b5bdd1 Fix for bug #9344 INFORMATION_SCHEMA, wrong content, numeric columns
The columns CHARACTER_MAXIMUM_LENGTH and CHARACTER_OCTET_LENGTH 
  of INFORMATION_SCHEMA.COLUMNS must be NULL for numeric columns
2005-03-31 13:44:42 +05:00
gluh@gluh.mysql.r18.ru
fe0b425e0a Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL-BUGS/mysql-5.0.8941
2005-03-25 15:09:22 +03:00
gluh@gluh.mysql.r18.ru
d5e448870d Fix for bug #8941: garbage MAX_ROWS=# from SHOW CREATE TABLE INFORMATION_SCHEMA.*
-skip the print of 'MAX_ROWS=#' for 'SHOW CRETAE TABLE' with information schema tables
2005-03-25 12:19:11 +03:00
gluh@gluh.mysql.r18.ru
6ec480910d Bug #9317: Wrong count for tables in INFORMATION_SCHEMA
there was no check of result of 
  table->file->write_row() function. When count of rows was
  more than table max_rows(HEAP table) the following recodrs
  were not inserted to the table
  -'schema_table_store_record' function is added. 
    The function checks result of write_row function
    and convert HEAP table to MyISAM if necessary
  - Result check after write_row is added into all 
    I_S function which store the records to I_S tables
2005-03-24 16:32:11 +03:00
monty@mysql.com
cc56005130 Hack to ensure that CHAR's created in 5.0 are not converted to VARCHAR even if the row type is dynamic
(For 4.1 tables old 'VARCHAR' fields are converted to true VARCHAR in the next ALTER TABLE)

This ensures that one can use MySQL 5.0 privilege tables with MySQL 4.1
2005-03-22 15:48:06 +02:00
gluh@gluh.mysql.r18.ru
fcd50af3c7 Fix for bug #8790:Test 'information_schema': 'Max_data_length' shows 10 * (2 giga - 1) + 9 2005-03-15 20:54:44 +03:00
jimw@mysql.com
f463143158 Update tests and test results after merge, disable broken NDB tests 2005-03-11 15:06:03 -08:00
acurtis@pcgem.rdg.cyberkinetica.com
e354c75113 Fix test after merge 2005-03-09 01:13:11 +00:00
acurtis@ltantony.rdg.cyberkinetica.homeunix.net
be3c863ba0 Merge in fix Bug#3788 2005-03-08 22:32:09 +00:00
gluh@gluh.mysql.r18.ru
df2b38913f WL2131: Access control for SHOW ... PROCEDURE|FUNCTION ... 2005-03-05 14:35:32 +03:00
acurtis@pcgem.rdg.cyberkinetica.com
5e1d2ad68c Bug#3788
Crashes with stored procedure return non-string values
  Also fixes Bug#2773
2005-03-04 21:14:35 +00:00
gluh@gluh.mysql.r18.ru
104072f154 Fix for bug #8164: subquery with INFORMATION_SCHEMA.COLUMNS, 100 % CPU 2005-03-03 19:20:16 +03:00
gluh@gluh.mysql.r18.ru
3e9bf3af34 Fix for bug #7217: information_schema: columns are varbinary() instead of timestamp &
bug #7215: information_schema: columns are longtext instead of varchar
2005-02-23 15:15:36 +03:00
gluh@gluh.mysql.r18.ru
4ea9835455 Fix for bug #7476: crash on SELECT * FROM INFORMATION_SCHEMA.TABLES(after review) 2005-02-22 14:42:44 +03:00
jimw@mysql.com
e9a5b7d500 Clean up merge from 4.1, including making several enum fields
in the grant tables case-insensitive and updating test results.
2005-02-17 18:07:14 -08:00
gluh@gluh.mysql.r18.ru
638dc7d9e9 Fix for bug#7915: crash,JOIN VIEW, subquery, SELECT .. FROM INFORMATION_SCHEMA.COLUMNS 2005-02-16 13:00:03 +03:00
pem@mysql.comhem.se
2c26ebe359 WL#2130: Table locking for stored FUNCTIONs
Collect all tables and SPs refered by a statement, and open all tables
with an implicit LOCK TABLES. Do find things refered by triggers and views,
we open them first (and then repeat this until nothing new is found), before
doing the actual lock tables.
2005-02-08 20:52:50 +01:00
gluh@gluh.mysql.r18.ru
6afbb3d627 Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-5.0
into gluh.mysql.r18.ru:/home/gluh/MySQL/mysql-5.0
2005-01-27 20:01:37 +03:00
gluh@gluh.mysql.r18.ru
ac14d40dde A fix: information_schema test fails on Mac OSX 2005-01-27 13:16:51 +03:00
gluh@gluh.mysql.r18.ru
e492c1b44e Additional fix for WL#1629: SHOW with WHERE(discussed with PeterG)
- Do not allow a column list as part of SHOW WITH WHERE task.
 - The WHERE clause must accept field names which are
   valid in SHOW, not INFORMATION_SCHEMA names.
2005-01-24 18:44:54 +03:00
gluh@gluh.mysql.r18.ru
c965dc34cd Fix for bug #7981: SHOW GLOBAL STATUS crashes server 2005-01-18 17:37:45 +03:00
jimw@mysql.com
3998da80e9 Output 'MEMORY' as table type for tables using the memory (nee heap) storage
engine, except when running with sql_mode & MYSQL323. (Bug #6659)
2005-01-13 17:38:13 -08:00
dlenev@mysql.com
536cb92195 Manual merge. 2004-12-31 12:48:27 +03:00
gluh@gluh.mysql.r18.ru
50266af38c wl#1629 SHOW with WHERE(final part, after review)
added syntax:
  'show variables where', 'show status where', 'show open tables where'
2004-12-30 15:20:40 +03:00
dlenev@brandersnatch.localdomain
e35694802b WL#1339. More post-merge fixes.
Updated test results after adding max_user_connections column
to mysql.user table.
2004-12-29 23:39:44 +03:00
gluh@gluh.mysql.r18.ru
ddba51e6ec Fix for bug: #7218: information_schema: errors in "tables" 2004-12-24 12:16:47 +03:00
acurtis@pcgem.rdg.cyberkinetica.com
b051e8bb94 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into pcgem.rdg.cyberkinetica.com:/usr/home/acurtis/work/wl925.4
2004-12-23 10:49:28 +00:00
acurtis@pcgem.rdg.cyberkinetica.com
b1e30904d5 WL#925 - Privileges for stored routines
Implement fine-grained control over access to stored procedures
  Privileges are cached (same way as existing table/column privs)
2004-12-23 10:46:24 +00:00
gluh@gluh.mysql.r18.ru
4ba850cab0 Bug#7219 information_schema: errors in "columns"
changed field names in 'collations' table(discussed with PGulutzan)
2004-12-23 13:35:34 +03:00
monty@mysql.com
2a215c17bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
2004-12-18 12:49:14 +02:00
gluh@gluh.mysql.r18.ru
bc7860c80c Fix for bug #7213: information_schema: redundant non-standard TABLE_NAMES table 2004-12-18 13:49:13 +03:00
gluh@gluh.mysql.r18.ru
bf0104045d Fix for bug #7210: information_schema: can't access when table-name = reserved word 2004-12-18 12:48:01 +03:00
monty@mysql.com
f37fd31ddc Merge with global tree 2004-12-18 06:05:16 +02:00
monty@mysql.com
3fb088a075 Add 0x before pointers (to help with debugging)
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
2004-12-18 05:19:21 +02:00
gluh@gluh.mysql.r18.ru
6a4d28c096 Fix for bug#7211: information_schema: crash if bad view(after review) 2004-12-16 17:44:36 +03:00
gluh@gluh.mysql.r18.ru
6372efa7da Fix for bug#7212: information_schema: "Can't find file" errors if storage engine gone(after review) 2004-12-16 16:31:36 +03:00
gluh@gluh.mysql.r18.ru
e552c5c403 Fix for bug #7220: information_schema: errors in "character_sets" 2004-12-14 16:18:59 +03:00
gluh@gluh.mysql.r18.ru
4c4352e5e7 Fx for bug#7221: information_schema: errors in "key_column_usage" 2004-12-14 15:20:46 +03:00
gluh@gluh.mysql.r18.ru
7a38322f3f Fix bug#7222 information_schema: errors in "routines" 2004-12-14 14:55:28 +03:00
gluh@gluh.mysql.r18.ru
21ee3fc93f Fix for bug #7223: information_schema: error in "views" 2004-12-14 13:41:32 +03: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
monty@mysql.com
563500994a Update results for new varchar handling
Fixed compiler warnings
String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length
2004-12-07 15:47:00 +02:00
gluh@gluh.mysql.r18.ru
a67b4a5b1c portability fix(for powermac)
Fix for bug#6756: Crash if SHOW INDEX
2004-11-26 18:26:52 +03:00
gluh@gluh.mysql.r18.ru
3256fd704e Fixed bug related to lower case table names on Power Mac
'information_schema' test is splitted because of innodb
2004-11-24 19:32:10 +03:00
gluh@gluh.mysql.r18.ru
22e76af9df More test cases are added
Fixed bug 'using of alias with information schema tables in views'
removed compiler warnings
2004-11-23 17:41:39 +03:00
gluh@gluh.mysql.r18.ru
15ada105ac changed field names, fields order according to WL description
fixed bug: "create view v7 as select * from information_schema.tables;" failed
2004-11-20 01:17:18 +03:00
gluh@gluh.mysql.r18.ru
a68a9fe268 remove unused parts of code
fix for 'show create schema_table'
fix for usage schema tables in subselect
'wrong schema table charset' fix
2004-11-18 12:16:06 +03:00
gluh@gluh.mysql.r18.ru
a288f3b3e1 Fix for Auto_increment filed value in 'show table status'
code cleanup
2004-11-17 18:48:12 +03:00
gluh@gluh.mysql.r18.ru
cfc6e6dc4b valgrind error fix 2004-11-16 00:29:49 +03:00
gluh@gluh.mysql.r18.ru
c67d479918 Fixes for information_schema 2004-11-15 19:20:45 +03:00
gluh@gluh.mysql.r18.ru
321f803784 WL#1629: SHOW with WHERE(partially) &
WL#173:  Create Data Dictionary Tables for SHOW Commands
2004-11-13 13:56:39 +03:00