Commit graph

103 commits

Author SHA1 Message Date
unknown
0bc3e69f92 A fix and a test case for Bug#25859 ALTER DATABASE works w/o parameters.
Fix the parser to make the database options not optional.


mysql-test/r/information_schema.result:
  Update results (Bug#25859)
mysql-test/t/information_schema.test:
  Add a test case for Bug#25859 "ALTER DATABASE works w/o parameters"
sql/sql_yacc.yy:
  Fix Bug#25859 ALTER DATABASE works w/o parameters - require
  parameters in the parser.
2007-07-12 01:10:29 +04:00
unknown
ce4e9f7580 Bug#28266 IS_UPDATABLE field on VIEWS table in I_S database is wrong
IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and
the algorithm is not 'temporary'.


mysql-test/r/information_schema.result:
  test result
mysql-test/r/view.result:
  test result
mysql-test/t/information_schema.test:
  test case
mysql-test/t/view.test:
  test case
sql/sql_show.cc:
  IS_UPDATABLE flag is set to 'yes' when the view has at least one updatable column and
  the algorithm is not 'temporary'.
2007-06-09 16:52:37 +05:00
unknown
2572c82621 Bug#24630 Subselect query crashes mysqld
The crash happens because second filling of the same I_S table happens in
case of subselect with order by. table->sort.io_cache previously allocated
in create_sort_index() is deleted during second filling
(function get_schema_tables_result). There are two places where
I_S table can be filled: JOIN::exec and create_sort_index().
To fix the bug we should check if the table was already filled
in one of these places and skip processing of the table in second.


mysql-test/r/information_schema.result:
  test case
mysql-test/t/information_schema.test:
  test case
sql/mysql_priv.h:
  added new parameter 'executed_place' to function get_schema_tables_result()
sql/sql_select.cc:
  added new parameter 'executed_place' to function get_schema_tables_result()
sql/sql_show.cc:
  added more accurate check for cases when we need to refresh I_S table
sql/table.cc:
  added more accurate check for cases when we need to refresh I_S table
sql/table.h:
  added more accurate check for cases when we need to refresh I_S table
2007-02-12 16:06:14 +04:00
unknown
a308304607 Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail
additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter


mysql-test/r/information_schema.result:
  test result
mysql-test/t/information_schema.test:
  test case
sql/sql_show.cc:
  additional call of file->extra() method with HA_EXTRA_NO_CACHE parameter
2007-02-01 19:12:45 +04:00
unknown
48595c284d Merge kpdesk.mysql.com:/home/thek/dev/bug22043/my50-bug22043
into  kpdesk.mysql.com:/home/thek/dev/mysql-5.0-maint


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/rpl_sp.test:
  Auto merged
sql/sql_parse.cc:
  Auto merged
mysql-test/r/rpl_sp.result:
  - Merged
2006-12-01 18:00:45 +01:00
unknown
2f0b1d6580 Bug#22043 MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS"
- Refactoring of duplicate code
- Modified bad test cases
- Changed expected error when operating on information_schema.


mysql-test/r/information_schema.result:
  - updated result file with new error code.
mysql-test/r/rpl_sp.result:
  - Modified test case
mysql-test/t/information_schema.test:
  - Changed error code for operations on information_schema
mysql-test/t/rpl_sp.test:
  - Modified test case
sql/sql_parse.cc:
  - Cleaned up code:
    * replace tab with space
    * simplified if/switch statements
    * refactored duplicated code
2006-12-01 12:50:57 +01:00
unknown
1ae9f3b985 Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
disable filling of I_S tables for EXPLAIN


mysql-test/r/information_schema.result:
  Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
  test case
mysql-test/t/information_schema.test:
  Bug#22413 EXPLAIN SELECT FROM view with ORDER BY yield server crash
  test case
2006-11-21 13:45:01 +04:00
unknown
29947efc62 Fix for bug#23037 Bug in field "Default" of query "SHOW COLUMNS FROM table"
To the documentor: The DEFAULT value in SHOW COLUMNS/SELECT FROM I_S.COLUMNS
was truncated to NAME_LEN (which effectively is 64) characters.


mysql-test/r/information_schema.result:
  Update result
  
  Because the length of I_S.COLUMNS.COLUMN_DEFAULT was increased to
  65535 the column changed it's type from varchar(64) to longtext
  The type is longtext if the length is > 65532 (the max varchar len)
mysql-test/t/information_schema.test:
  test case for bug#23037: Bug in field "Default" of
  query "SHOW COLUMNS FROM table"
  
  Both SHOW COLUMNS and I_S.COLUMNS is TESTED as well the
  value returned by both. Using --replace_regex is unfeasible
  as the repetition value cannot be > 255.
  --replace_regex /A{256}/VALUE/ doesn't work, not to talk about
    /A{65532}/VALUE/
  /(A{255}){255}/VALUE/ is awfully slow. Thus, simple function with
  cursor is used to extract the value.
sql/sql_show.cc:
  Default value can have TIMESTAMP, CHAR, VARCHAR, ENUM
  VARCHAR can have the longest value, up to 65535. However, because
  of table handler limitations the actual limit is 65532 characters,
  latin1 charset. However, here is used MAX_FIELD_VARCHARLENGTH macro,
  because there could be a storage engine without such limitation.
2006-10-23 13:12:30 +02:00
unknown
d64f605e48 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.


mysql-test/r/information_schema.result:
  Added a test case for bug #21231.
mysql-test/t/information_schema.test:
  Added a test case for bug #21231.
2006-07-24 19:05:46 -07:00
unknown
43df9fd34c 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.


mysql-test/r/information_schema.result:
  Added a test case for bug #18925.
mysql-test/t/information_schema.test:
  Added a test case for bug #18925.
sql/sql_show.cc:
  Fixed bug #18925.
  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 execitions 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
unknown
8368f437a7 Bug#20230: routine_definition is not null
SHOW CREATE PROCEDURE and SHOW CREATE FUNCTION are fixed as well as
INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME.


mysql-test/r/information_schema.result:
  Add result for bug#20230.
mysql-test/t/information_schema.test:
  Add test case for bug#20230.
sql/sp_head.cc:
  Return NULL for routine definition if the user doesn't have enough
  privilege to see it.
sql/sql_show.cc:
  Make INFORMATION_SCHEMA.ROUTINES.ROUTINE_NAME NULL-able.  Return
  NULL if the user doesn't have enough privilege to see routine
  definition.
2006-06-30 00:21:55 +04:00
unknown
57e7bc5513 Bug#18035 Information Schema: Output is not Sorted
added 'order by' to avoid result order difference
2006-06-06 12:57:50 +05:00
unknown
581d4d23a1 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.


mysql-test/r/information_schema.result:
  Bug#19599 duplication of information_schema column value in a CONCAT expr with user var
  test case
mysql-test/t/information_schema.test:
  Bug#19599 duplication of information_schema column value in a CONCAT expr with user var
  test case
2006-06-06 12:51:04 +05:00
unknown
1b32376ab8 Merge bk-internal:/home/bk/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


mysql-test/t/information_schema.test:
  Auto merged
2006-05-23 17:05:37 +02:00
unknown
022e12d4ad Move the requirement for "not running as root" to information_schema_chmod 2006-05-23 10:52:53 +02:00
unknown
2d98d2438b Bug#16681 information_schema shows forbidden VIEW details
show view definition to users that have the needed privilleges


mysql-test/r/information_schema.result:
  Bug#16681 information_schema shows forbidden VIEW details
  test case
mysql-test/t/information_schema.test:
  Bug#16681 information_schema shows forbidden VIEW details
  test case
2006-05-23 12:45:25 +05:00
unknown
9ffa09be96 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().


mysql-test/r/information_schema.result:
  Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
  test case
mysql-test/t/information_schema.test:
  Fix for bug#18177 any access to INFORMATION_SCHEMA.ROUTINES crashes
  test case
2006-05-12 17:34:36 +05:00
unknown
af797c16fe Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
mysql-test/r/information_schema.result:
  Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
  test case
mysql-test/r/join.result:
  Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
  result fix
mysql-test/t/information_schema.test:
  Fix for bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
  test case
2006-05-12 15:09:25 +05:00
unknown
0c7aa68d2a Bug#18474 Unlistable directories yield no info from information_schema, part2
- Move "chmod" part of information_schema test to separate file


mysql-test/r/information_schema.result:
  Move "chmod" part of information_schema test to separate file
mysql-test/t/information_schema.test:
  Move "chmod" part of information_schema test to separate file
mysql-test/r/information_schema_chmod.result:
  Move "chmod" part of information_schema test to separate file
mysql-test/t/information_schema_chmod.test:
  Move "chmod" part of information_schema test to separate file
2006-05-04 17:47:25 +02:00
unknown
fefc045274 Revert use of octal numbers for chmod 2006-04-24 21:42:44 +02:00
unknown
008da9b950 Test it it works better to set no read access for a file by using 000 instead of -r
Looks like the trigger.test works that way


mysql-test/t/information_schema.test:
  Test it it works better to set no read access for a file by using 000 instead of -r
2006-04-24 13:51:21 +02:00
unknown
1d16bc69cf Bug#17002 mysql-test-run as root user
- Add test to see if tests are running with root permissions
 - Disables tests that uses chmod if that is the case


mysql-test/mysql-test-run.pl:
  Add test to check if mysql-test-run is run with root permission. 
  Set environment variable MYSQL_TEST_ROOT to 'YES' or 'NO'.
mysql-test/t/information_schema.test:
  Disable test if running as root
mysql-test/t/rpl_rotate_logs.test:
  Disable test if running as root.
mysql-test/include/not_as_root.inc:
  New BitKeeper file ``mysql-test/include/not_as_root.inc''
mysql-test/r/not_as_root.require:
  New BitKeeper file ``mysql-test/r/not_as_root.require''
2006-04-24 10:21:09 +02:00
unknown
db7a88a2f4 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
unknown
ff3495c414 After merge fix for Bug#12076 --with-extra-charsets has no effect
mysql-test/r/information_schema.result:
  IS_COMPILED is not determenistic
mysql-test/t/information_schema.test:
  IS_COMPILED is not determenistic
strings/conf_to_src.c:
  Adding dumping of extra 5.0 fields
strings/ctype-extra.c:
  Recreating sources according to 5.0 XML files using conf_to_src.
2006-04-04 15:40:42 +05:00
unknown
53862e6060 Fix for bug#18224 VIEW on information_schema crashes the server
additional check for subselect


mysql-test/r/information_schema.result:
  Fix for bug#18224 VIEW on information_schema crashes the server
    test case
mysql-test/t/information_schema.test:
  Fix for bug#18224 VIEW on information_schema crashes the server
    test case
2006-03-20 14:17:47 +04:00
unknown
f300c89187 Use MYSQLTEST_VARDIR
mysql-test/t/information_schema.test:
  Use MYSQLTEST_VARDIR instead of MYSQL_TEST_DIR/var
2006-01-27 09:24:45 +01:00
unknown
333b1f8594 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


mysql-test/r/information_schema.result:
  Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
    test result
mysql-test/t/information_schema.test:
  Fix for bug#15307 GROUP_CONCAT() with ORDER BY returns empty set on information_schema(2nd ver)
    test case
2006-01-24 16:48:19 +04:00
unknown
fbc24f3376 Fix for bug#15851 Unlistable directories yield no info from information_schema
to skip directories which are not allowed for read


mysql-test/r/information_schema.result:
  Fix for bug#15851 Unlistable directories yield no info from information_schema
    test result
mysql-test/t/information_schema.test:
  Fix for bug#15851 Unlistable directories yield no info from information_schema
    test case
2006-01-24 15:59:08 +04:00
unknown
5e7cbbcbbc Fix for bug#15533 crash, information_schema, function, view
enable view prepared mode during getting metedata for I_S table


mysql-test/r/information_schema.result:
  Fix for bug#15533 crash, information_schema, function, view
    test case
mysql-test/t/information_schema.test:
  Fix for bug#15533 crash, information_schema, function, view
    test case
2006-01-03 14:25:19 +04:00
unknown
d920097af4 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


mysql-test/r/information_schema.result:
  Fix for bug#14271 I_S: columns has no size for (var)binary columns
    test case
mysql-test/t/information_schema.test:
  Fix for bug#14271 I_S: columns has no size for (var)binary columns
    test case
2005-12-19 16:21:02 +04:00
unknown
479a02fad5 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.


mysql-test/r/information_schema.result:
  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.
    test case
mysql-test/t/information_schema.test:
  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.
    test case
2005-12-19 14:46:54 +04:00
unknown
ba079bad06 Fix for bug#14476 information_schema.TABLES.TABLE_TYPE with empty value
store TABLES.TABLE_TYPE in case of error during table opening


mysql-test/r/information_schema.result:
  Fix for bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value
    test case
mysql-test/t/information_schema.test:
  Fix for bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value
    test case
2005-12-01 11:00:33 +04:00
unknown
534275921e 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


mysql-test/r/information_schema.result:
  Fix for bug#13818 SHOW CREATE VIEW / TABLE and information_schema.views fail 
                    for invalid view
   test case
mysql-test/t/information_schema.test:
  Fix for bug#13818 SHOW CREATE VIEW / TABLE and information_schema.views fail 
                    for invalid view
   test case
2005-11-11 13:39:46 +04:00
unknown
0ae18e4899 Merge neptunus.(none):/home/msvensson/mysql/ssl_test/my50-ssl_test
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/sp-security.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/structs.h:
  Auto merged
2005-10-28 11:00:54 +02:00
unknown
48765db2e5 Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.
sql/sql_show.cc:
  Fix for bug #14290: wrong CHARACTER_MAXIMUM_LENGTH value for some text fields.
  adjust CHARACTER_MAXIMUM_LENGTH value for text fields.
2005-10-25 17:22:58 +05:00
unknown
4c872f749b 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


mysql-test/r/information_schema.result:
  fix for bug#14089 FROM list subquery always fails when 
                    information_schema is current database
    test case
mysql-test/t/information_schema.test:
  fix for bug#14089 FROM list subquery always fails when 
                    information_schema is current database
    test case
2005-10-21 13:14:54 +05:00
unknown
efc190e7d9 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/ssl_test/my50-ssl_test


client/mysqltest.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/myisam.test:
  Auto merged
mysql-test/t/mysqltest.test:
  Auto merged
mysql-test/t/rpl_openssl.test:
  Auto merged
sql/mysqld.cc:
  Auto merged
mysql-test/t/sp-security.test:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/structs.h:
  Auto merged
mysql-test/r/mysqltest.result:
  SCCS merged
2005-10-12 13:59:00 +02:00
unknown
2bb0501d65 Always test ssl and compress
- Updated after review


client/mysqltest.c:
  Updated after review.
  Fix "connect" command to take SSL and/or COMPRESS as options instead of enable/disable_ssl and enable/disable_compress
  Commented do_connect, added test cases etc.
  Fix safe_get_param to make it possible to call it once for every argument without having any checks inbetween.
  Make a copy for query->first_argument  since safe_get_param will modify query string. Now connect works inside a while loop as well.
mysql-test/mysql-test-run.pl:
  Updated after review
mysql-test/r/connect.result:
  Enable test that was previolsy disabled because of "no error handling" in connect
mysql-test/r/mysqltest.result:
  Added tests for "connect"
mysql-test/t/compress.test:
  Updated after review, use the option argument to connect
mysql-test/t/connect.test:
  Enable test that was previolsy disabled because of "no error handling" in connect
  Now it's possible to use "--error" before connect, so let's use it.
mysql-test/t/information_schema.test:
  Connection user4 was already used
mysql-test/t/myisam.test:
  Disconnect con1 so the name can be reused
mysql-test/t/mysqltest.test:
  Added tests for "connect"
mysql-test/t/openssl_1.test:
  Updated after review, use the option argument to connect
mysql-test/t/sp-security.test:
  Disconnect user1 connection so the name can be reused
mysql-test/t/ssl.test:
  Updated after review, use the option argument to connect
mysql-test/t/ssl_compress.test:
  Updated after review, use the option argument to connect
sql/mysqld.cc:
  Updated after review, Compression variable is always available
sql/sql_show.cc:
  Updated after review, Compression variable is always available
sql/structs.h:
  Updated after review, Compression variable is always available
2005-10-12 13:56:07 +02:00
unknown
7d6d4c8355 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


BitKeeper/etc/ignore:
  added libmysqld/sql_cursor.h
mysql-test/r/information_schema.result:
  Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middlecd
mysql-test/r/information_schema_inno.result:
  Remove used tables at start
mysql-test/r/multi_statement.result:
  Remove used tables at start
mysql-test/r/temp_table.result:
  Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle
mysql-test/r/type_bit.result:
  More tests
mysql-test/t/information_schema.test:
  Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle
mysql-test/t/information_schema_inno.test:
  Remove used tables at start
mysql-test/t/multi_statement.test:
  Remove used tables at start
mysql-test/t/temp_table.test:
  Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle
mysql-test/t/type_bit.test:
  More tests
mysql-test/valgrind.supp:
  Removed some valgrind warnings that isn't errors
sql/ha_federated.cc:
  Fixed errors discovered by valgrind:
  - Socket was not initialized
  - share->scheme was deleted while there was still pointer into it from the hash
sql/item_func.h:
  Remove access to table object from cleanup() as the table object may have been dropped earlier (In case of temporary tables or of close_thread_tables() is run before cleanup())
  This fixed a bug with access to already freed memory
sql/sql_base.cc:
  Reset variables used by fulltext
sql/sql_select.cc:
  Fixed various problems with bit fields when used in internal temporary tables.
  Calculate space needed for bit fields correctly (previously we allocated more space than needed for rows in heap/myisam tables)
2005-09-22 03:23:07 +03:00
unknown
3764875ca6 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
unknown
48c3c329b3 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
unknown
a2d8ab0bb5 Fix for spelling miss and eol junk
client/mysqltest.c:
  Fix spelling error
mysql-test/t/information_schema.test:
  Eol junk detected, added #
mysql-test/t/rpl_slave_status.test:
  Missing ;
mysql-test/t/sp.test:
  Eol junk detected, added #
mysql-test/t/view.test:
  Eol junk detected, added #
2005-09-01 20:02:08 +02:00
unknown
8bd9992e49 Make test predictable
mysql-test/r/information_schema.result:
  Ensure that rows are in given order
mysql-test/t/information_schema.test:
  Ensure that rows are in given order
2005-08-25 12:03:19 +03:00
unknown
8b08f2fa44 Merge rurik.mysql.com:/home/igor/mysql-5.0
into rurik.mysql.com:/home/igor/dev/mysql-5.0-0


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/sql_show.cc:
  Auto merged
2005-08-22 17:46:21 -07:00
unknown
57f575b2e4 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.


mysql-test/r/information_schema.result:
  Added a test case for bug #12636.
mysql-test/t/information_schema.test:
  Added a test case for bug #12636.
sql/sql_show.cc:
  Database name was set incorrectly for any show command
  that used sunqueries in its where condition.
2005-08-22 17:32:02 -07:00
unknown
3eda70b270 Fixes during review of new pushed code
Fixed new bug when running a SP without a default database


mysql-test/r/information_schema.result:
  Added test to cover changes made in default handling
mysql-test/r/sp-security.result:
  Added test when executing SP without a default database
mysql-test/t/information_schema.test:
  Added test to cover changes made in default handling
mysql-test/t/sp-security.test:
  Added test when executing SP without a default database
sql/item_strfunc.cc:
  Removed wrong push
sql/mysqld.cc:
  Indentation fix
sql/sql_base.cc:
  Use share->db instead of share->table_cache_key
  Remove assert that can never fail (because of test in previous row)
sql/sql_db.cc:
  Allow empty database name when called from SP
  (To allow on run without a default database)
sql/sql_parse.cc:
  Added comment
sql/sql_show.cc:
  Indentation fixes
  Simplified code by checking for 'wrong' condition first and doing continue instead of going down one level
  Simplified precision and decimal handling
2005-08-20 11:00:00 +03:00
unknown
c1f1118335 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).


sql/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).
mysql-test/r/information_schema.result:
  Fixed some test cases results (bug #12301).
mysql-test/t/information_schema.test:
  Added a comment line for a test case used for bug #12301.
2005-08-16 23:11:04 +04:00
unknown
2fc78cb3fd Bug#12518
"COLUMN_DEFAULT has wrong value if NOT NULL is set"
  Show NULL instead of empty string when no default value is set


mysql-test/r/information_schema.result:
  test for bug 12518
mysql-test/t/information_schema.test:
  test for bug 12518
sql/sql_show.cc:
  report NULL for information schema result when there is no default value
2005-08-15 17:14:55 +01:00
unknown
8103db27bb Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/dlenev/src/mysql-5.0-is


mysql-test/r/information_schema.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sp.h:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_prepare.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/sp.result:
  Manual merge
mysql-test/t/sp.test:
  Manual merge
sql/sql_class.h:
  Manual merge
2005-08-09 11:43:55 +04:00
unknown
39fda60043 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).


mysql-test/r/alter_table.result:
  Updated test results. This change was caused by the fact that now when
  we build contents of I_S tables (and thus output of SHOW INDEX) we
  don't use instances of tables which may be already opened and locked
  by thread (we always use new instance).
mysql-test/r/information_schema.result:
  Added test which checks how information about current auto-increment value for
  table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/r/sp.result:
  Added test for bug #10055 "Using stored function with information_schema causes
  empty result set".
mysql-test/t/information_schema.test:
  Added test which checks how information about current auto-increment value for
  table is reported in INFORMATION_SCHEMA.TABLES view.
mysql-test/t/sp.test:
  Added test for bug #10055 "Using stored function with information_schema causes
  empty result set".
sql/mysql_priv.h:
  close_thread_tables():
    Get rid of 'stopper' argument which is no longer used. Now when we need
    to open and then close some table without touching tables which are already
    opened we use THD::reset_n/restore_backup_open_tables_state() methods.
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sp.cc:
  close_proc_table/open_proc_table_for_read/db_find_routine():
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
  open_proc_table_for_read():
    Since now we can have several open tables states stacked up we can't rely
    rely on checking whether we have some tables open in previous state.
    Instead we always assume that some tables are open and we need to ignore
    flush while locking mysql.proc. We don't really need 
    MYSQL_LOCK_IGNORE_GLOBAL_READ_LOCK in this case since we open mysql.proc table
    only for reading.
sql/sp.h:
  Added declarations of open_proc_table_for_read()/close_proc_table() to be
  able to use them in sql_show.cc.
sql/sql_base.cc:
  close_thread_tables():
    Get rid of 'stopper' argument which is no longer used. Now when we need
    to open and then close some table without touching tables which are already
    opened we use THD::reset_n/restore_backup_open_tables_state() methods.
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_class.cc:
  Open_tables_state, THD:
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
sql/sql_class.h:
  Open_tables_state, THD:
    Replaced push_open_tables_state/pop_open_tables_state() methods which
    were saving/restoring current open tables state in/from THD::open_state_list
    with reset_n_backup_open_tables_state/restore_backup_open_tables_state()
    methods which assume that backup storage for this state is allocated on
    stack (or elsewhere) by their caller.
sql/sql_handler.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_prepare.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
sql/sql_show.cc:
  get_all_tables():
    Now we use THD::reset_n_/restore_backup_open_tables_state() for 
    saving/restoring open tables state instead of working with it directly
    (This also allows us to have proper content of I_S system tables in
    statements with stored functions and in stored functions). We also
    ignore possible flushes when opening tables (we may create deadlock
    otherwise). Also we do all needed manipulations with LEX in this function
    and not in get_schema_tables_result() now.
  get_schema_tables_record():
    Let us use handler::info() method with HA_STATUS_AUTO flag for obtaining
    information about table's auto-increment value. This allows to avoid locking
    of tables which is needed when we use handler::update_auto_increment() method.
  fill_schema_proc():
    Now we use open_proc_table_for_read/close_proc_table() for access to
    mysql.proc table (so we won't cause deadlock if we already have some
    tables open and locked, this also allows us to have proper content in
    ROUTINES system table in statements using stored functions/in stored
    functions).
  get_schema_tables_result():
    Moved all manipulations with Open_tables_state and LEX needed for
    safe opening of tables to ST_SCHEMA_TABLE::fill_table functions
    (i.e. get_all_tables() and fill_schema_proc()).
sql/sql_update.cc:
  open_tables()/open_normal_and_derived_tables():
    Added 'flags' argument to be able open tables even if some has done
    a flush or hold namelock on them.
2005-08-08 17:46:06 +04:00