Commit graph

3791 commits

Author SHA1 Message Date
Sergei Golubchik
84651126c0 MySQL-5.5.36 merge
(without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
2014-02-17 11:00:51 +01:00
Nirbhay Choubey
e6a7a3804d * mysqld_safe could not start server as it failed
trying to perform wsrep position recovery.
  Fixed by correcting the erroneous mysqld command
  by properly quoting it.

* Merged the changes made to Ubuntu rules in previous
  revision to Debian rules.
2014-02-14 17:03:44 -05:00
Kent Boortz
4f888fda53 Bug#11751526 / Bug#42421 - MYSQL_INSTALL_DB.PL NOT RELOCATABLE ON WINDOWS
Corrected how to find "resolveip"
2014-02-03 16:04:44 +01:00
Kent Boortz
88ae49a401 Bug#11751526 / Bug#42421 - MYSQL_INSTALL_DB.PL NOT RELOCATABLE ON WINDOWS
Corrected how to find "resolveip"
2014-02-03 16:04:44 +01:00
Sergei Golubchik
72c20282db 10.0-base merge 2014-02-03 15:22:39 +01:00
Sergei Golubchik
59d9d08e2b 5.5 merge 2014-02-01 00:54:03 +01:00
Nirbhay Choubey
4a6be51f78 * Merged revisions: 3431, 3435..3457, 3459, 3460 from maria-5.5-galera.
* Fixed Debian/Ubuntu dist files.
* Fixed some compiler warnings.
2014-01-30 12:45:38 -05:00
Jan Lindström
d43afb8828 Merge MariaDB-10.0.7 revision 3961. 2014-01-25 11:02:49 +02:00
Sergei Golubchik
37d240ecf9 MySQL-5.5.35 merge 2014-01-22 15:29:36 +01:00
Michael Widenius
04bee0af2e Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5.
mysql_upgrade --help now also prints out --default options and variable values.
mysql_upgrade now prints permission errors.
mysql_upgrade doesn't print some non essential info if --silent is used.
Added handler error message about incompatible versions
Fixed that mysqlbug and mysql_install_db have the executable flag set.
Removed executable flag for some non executable files.
Changed in mysql_install_db askmonty.org to mariadb.com.
Ensured that all client executables prints --default options the same way.
Allow REPAIR ... USE_FRM for old .frm files if the are still compatible.
Extended shown error for storage engine messages.


client/mysql.cc:
  print_defaults() should be first (as in all other programs)
client/mysql_upgrade.c:
  --help now also prints out --default options and variable values
  Print out error if wrong permissions
  Don't print info if --silent
client/mysqladmin.cc:
  print_defaults() should be first (as in all other programs)
client/mysqlbinlog.cc:
  Added print_defaults() to --help
client/mysqlcheck.c:
  Added empty line in --help
client/mysqlimport.c:
  Added empty line in --help
client/mysqlshow.c:
  Made --help compatible
client/mysqlslap.c:
  Made --help compatible
client/mysqltest.cc:
  Added print_defaults() to --help
include/handler_ername.h:
  Added handler error message
include/my_base.h:
  Added handler error message
mysql-test/r/mysql_upgrade.result:
  Updated results
mysql-test/r/repair.result:
  Added test case for better error messages
mysql-test/std_data/host_old.MYD:
  Added test case for better error messages
mysql-test/std_data/host_old.MYI:
  Added test case for better error messages
mysql-test/std_data/host_old.frm:
  Added test case for better error messages
mysql-test/t/repair.test:
  Added test case for better error messages
mysys/my_handler_errors.h:
  Added handler error message
scripts/CMakeLists.txt:
  Fixed that mysqlbug and mysql_install_db have the executable flag set
scripts/mysql_install_db.sh:
  askmonty.org -> mariadb.com
sql/ha_partition.cc:
  Sometimes table_type() can be called for errors even if partition didn't manage to open any files
sql/handler.cc:
  Write clear text for not handled, but defined error messages.
sql/share/errmsg-utf8.txt:
  Extended shown error for storage engine messages
sql/sql_admin.cc:
  Allow REPAIR ... USE_FRM for old .frm files if the are still compatible
storage/myisam/ha_myisam.cc:
  Use new error message
2014-01-22 15:16:57 +02:00
Murthy Narkedimilli
c92223e198 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Murthy Narkedimilli
496abd0814 Updated/added copyright headers 2014-01-06 10:52:35 +05:30
Sergei Golubchik
d28d3ba40d 10.0-base merge 2013-12-16 13:02:21 +01:00
Kent Boortz
afd24eb63d Bug#29716 : Bug#11746921 : MYSQL_INSTALL_DB REFERS TO THE (OBSOLETE) MYSQLBUG SCRIPT DURING INSTALLATION
Bug#68742 : Bug#16530527 : OBSOLETE BUGREPORT ADDRESSES
2013-12-14 13:05:36 +01:00
Kent Boortz
a5eccbc33a Bug#29716 : Bug#11746921 : MYSQL_INSTALL_DB REFERS TO THE (OBSOLETE) MYSQLBUG SCRIPT DURING INSTALLATION
Bug#68742 : Bug#16530527 : OBSOLETE BUGREPORT ADDRESSES
2013-12-14 13:05:36 +01:00
Seppo Jaakola
496e22cf3b merge with MariaDB 5.6 bzr merge lp:maria --rtag:mariadb-10.0.6
and a number of fixes to make this buildable. 
Run also few short multi-master high conflict rate tests, with no issues
2013-12-04 10:32:43 +02:00
Sergei Golubchik
c6d30805db 5.5 merge 2013-11-23 00:50:54 +01:00
Jan Lindström
66612e8fd3 MDEV-5010: InnoDB errors appearing in logs with upgrade from 10.0.0 to 10.0.4.
Analysis: In earlier MySQL 5.6 versions this table innodb_index_stats  used to have a foreign key referencing to innodb_table_stats. However, in newer MySQL 5.6 versions this foreign key is removed and if you upgrade, your innodb_table_stats is created by the earlier mariadb version, thus a newer version will complain that the table is incorrectly defined.

Added drop foreign key on mysql_system_tables_fix.sql to be executed on mysql_upgrade.
2013-11-20 14:28:07 +02:00
Sergei Golubchik
fa3f8a18b2 mysql-5.5.34 merge
(some patches reverted, test case added)
2013-11-19 13:16:25 +01:00
Sergei Golubchik
4157185f24 10.0-base merge 2013-11-13 23:03:48 +01:00
Sergei Golubchik
80137baf2f MDEV-5275 Problems upgrading from MySQL 5.1 to MariaDB
correct bugs in mysql_system_tables_fix.sql.
Update system_mysql_db_fix* tests
2013-11-13 22:58:10 +01:00
unknown
db453a99ce MDEV-5282: mysql_install_db fails to create mysql.gtid_slave_pos
Patch by Elena.

Move the table creation to the end of the file, so
mysql.innodb_stats_table has been created and the statement
does not fail.
2013-11-13 15:40:46 +01:00
Sergei Golubchik
bdd883ed9a 5.5. merge 2013-11-13 14:07:58 +01:00
Sergei Golubchik
41fc2493ed MDEV-5186 /usr/bin/mysqld_safe doesn't have NUMA options support
port mysqld_safe numa extensions from percona-server: --flush-caches and --numa-interleave
2013-11-11 09:31:13 +01:00
Sergei Golubchik
a30e87414c merge 10.0-base into 10.0 2013-11-04 08:43:56 +01:00
Sergei Golubchik
5c9d2c6c9f MDEV-4332 Increase username length from 16 characters
10.0 part of the task, fix system tables
2013-11-03 16:31:52 +01:00
Venkata Sidagam
186a9fc76b Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY
UPPER CASE HOST NAME ANYMORE
Merging from mysql-5.1 to mysql-5.5
2013-10-31 23:14:33 +05:30
Venkata Sidagam
35581bd8a4 Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY
UPPER CASE HOST NAME ANYMORE
Merging from mysql-5.1 to mysql-5.5
2013-10-31 23:14:33 +05:30
Venkata Sidagam
19990c9219 Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY
UPPER CASE HOST NAME ANYMORE

Description:
It is not possible to drop users with host names with upper case
letters in them. i.e DROP USER 'root'@'Tmp_Host_Name'; is failing
with error.

Analysis: Since the fix 11748570 we came up with lower case hostnames
as standard. But in the current bug the hostname is created by
mysql_install_db script is still having upper case hostnames. 
So, if we have the hostname with upper case letters like(Tmp_Host_Name)
then we will have as it is stored in the mysql.user table. 
In this case if use "'DROP USER 'root'@'Tmp_Host_Name';" it gives 
error because we do compare with the lower case of hostname since the 
11748570 fix.

Fix: We need to convert the hostname to lower case before storing into 
the mysql.user table when we run the mysql_install_db script.
2013-10-31 23:02:44 +05:30
Venkata Sidagam
46b617d24f Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY
UPPER CASE HOST NAME ANYMORE

Description:
It is not possible to drop users with host names with upper case
letters in them. i.e DROP USER 'root'@'Tmp_Host_Name'; is failing
with error.

Analysis: Since the fix 11748570 we came up with lower case hostnames
as standard. But in the current bug the hostname is created by
mysql_install_db script is still having upper case hostnames. 
So, if we have the hostname with upper case letters like(Tmp_Host_Name)
then we will have as it is stored in the mysql.user table. 
In this case if use "'DROP USER 'root'@'Tmp_Host_Name';" it gives 
error because we do compare with the lower case of hostname since the 
11748570 fix.

Fix: We need to convert the hostname to lower case before storing into 
the mysql.user table when we run the mysql_install_db script.
2013-10-31 23:02:44 +05:30
Sergei Golubchik
0fdb3bcfdb 10.0-base merge (roles) 2013-10-29 15:08:44 +01:00
Sergei Golubchik
d0db4f2261 add Admin_option column to mysql.roles_mapping. update tests/results 2013-10-18 12:21:10 -07:00
Sergei Golubchik
7dda698734 rename columns in mysql.roles_mapping to be consistent with other privilege tables 2013-10-18 12:19:37 -07:00
Vicențiu Ciorbaru
60f19cbc9a Added GRANT ROLE TO ... and REVOKE ROLE FROM ... functionality.
TODO:

Privilege checks are not done upon executing the command.
2013-10-18 09:25:42 -07:00
Sergei Golubchik
cdb5510204 fix mysql_upgrade to preserve the collation of mysql.user.is_role 2013-10-18 08:14:04 -07:00
Sergei Golubchik
72d8b533cc Fixes for mysql-test failures
mysql-test/r/acl_roles_show_grants.result:
  one can do SHOW GRANTS for himself
mysql-test/t/acl_roles_set_role-table-column-priv.test:
  correct error message
mysql-test/t/acl_roles_show_grants.test:
  one can SHOW GRANTS for himself
sql/sql_acl.cc:
  bugfixing:
  * don't assign with && - it can shortcut and the second assignment won't be executed
  * correct the test in check_grant_all_columns() - want_access should not be modified
  *
sql/sql_cmd.h.OTHER:
  add new commands at the end
sql/sql_db.cc:
  don't call acl_get() if all privileges are already satisfied
  (crashes when run with --skip-grants, because acl data stuctures aren't initialized)
sql/sql_parse.cc:
  * test for current_user in get_current_user()
  * map explicitly specified user@host to current_user
2013-10-18 08:10:51 -07:00
Vicențiu Ciorbaru
071c4ce88b Removed no longer needed RoleHostFK as it is not used to link to a Role.
Also removed code that loads that column into memory.
2013-10-17 15:06:09 -07:00
Vicențiu Ciorbaru
69a3deb58e Modify mysql.user table to contain a is_user column. 2013-10-17 15:02:47 -07:00
Vicențiu Ciorbaru
f401de7a4a Reordered entries to keep the had_user_table variable correct. 2013-10-17 14:57:10 -07:00
Vicențiu Ciorbaru
dc5fdacfe0 Added the new roles_mapping table to mysql_system_tables.sql script. 2013-10-17 14:57:06 -07:00
Sreedhar.S
d8bcc6215e BUG 17560050 - MYSQL_INSTALL_DB SCRIPT FAILING WITH RESOLVEIP ISSUES. 2013-10-09 17:08:45 +05:30
Sreedhar.S
b7f272ccaf BUG 17560050 - MYSQL_INSTALL_DB SCRIPT FAILING WITH RESOLVEIP ISSUES. 2013-10-09 17:08:45 +05:30
Seppo Jaakola
f222e7d471 Merge fixes, now at level 3430 in mariadb-galera-5.5 2013-10-07 11:35:19 +03:00
Seppo Jaakola
255e20a175 Merged revisions 3418..3424 from mariadb-galera-5.5 2013-10-07 08:57:23 +03:00
Seppo Jaakola
06a7eeb992 Merged revisions 3411..3417 from mariadb-galera-5.5 2013-10-07 00:18:26 +03:00
Seppo Jaakola
337fdb80f3 Merged revisions 3409..3411 from mariadb-galera-5.5 2013-10-06 23:59:20 +03:00
Sreedhar.S
99146a5056 Bug #16619754 - MYSQL_INSTALL_DB.PL FAILS TO CREATE DATABASE ON WINDOWS.
As this mysql_install_db.pl file has always generated lots of confusion on Windows.  This fix will make sure to get it removed only from Windows
2013-09-30 13:01:17 +05:30
Sreedhar.S
39a87704d8 Bug #16619754 - MYSQL_INSTALL_DB.PL FAILS TO CREATE DATABASE ON WINDOWS.
As this mysql_install_db.pl file has always generated lots of confusion on Windows.  This fix will make sure to get it removed only from Windows
2013-09-30 13:01:17 +05:30
Michael Widenius
9081c4dc6b Added information about the MariaDB foundation
Updated information in SHOW AUTHORS and SHOW CONTRIBUTORS
SHOW AUTHORS and SHOW CONTRIBUTORS are not depricated anymore.

CMakeLists.txt:
  Install TODO and CREDITS files
CREDITS:
  Information about the MariaDB foundation
README:
  Updated to include the MariaDB foundation
mysql-test/r/contributors.result:
  Updated contributors
mysql-test/r/show_check.result:
  SHOW AUTHORS and SHOW CONTRIBUTORS are not depricated anymore.
scripts/make_binary_distribution.sh:
  Added TODO and CREDITS
sql/authors.h:
  Updated list of active authors
sql/contributors.h:
  Updated list of active contributors and members of the MariaDB foundation
sql/sql_show.cc:
  Extend comment lengths
sql/sql_yacc.yy:
  SHOW AUTHORS and SHOW CONTRIBUTORS are not depricated anymore
2013-09-23 20:27:37 +03:00
Sergei Golubchik
2fe0836eed 5.5.33a merge 2013-09-20 11:29:01 +02:00
Sergei Golubchik
9af177042e 10.0-base merge.
Partitioning/InnoDB changes are *not* merged (they'll come from 5.6)
TokuDB does not compile (not updated to 10.0 SE API)
2013-09-21 10:14:42 +02:00
Sergei Golubchik
6e52631065 MDEV-4979 mysqld_safe section in my.cnf doesn't have mariadb equivalent
read also [mariadb_safe] section.
modify the manpage accordingly (and remove a netware-specific option from it)
2013-09-19 22:24:39 +02:00
Sergei Golubchik
4ec2e9d7ed 5.5 merge and fixes for compiler/test errors 2013-09-18 13:07:31 +02:00
Sergey Vojtovich
6c396aaf2a MDEV-4950 - mysql_upgrade fails with disabled InnoDB
Do not attempt to create innodb_index_stats and innodb_table_stats
if InnoDB is not available.
2013-09-13 12:44:51 +04:00
Venkata Sidagam
17eaef19d5 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Merging from 5.1 to 5.5
2013-09-09 21:31:50 +05:30
Venkata Sidagam
46c5e464c1 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Merging from 5.1 to 5.5
2013-09-09 21:31:50 +05:30
Venkata Sidagam
044a7d7c2f Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Reverting the patch. Because this change is not to me made for GA versions.
2013-09-09 20:32:50 +05:30
Venkata Sidagam
cdec34bcd0 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Reverting the patch. Because this change is not to me made for GA versions.
2013-09-09 20:32:50 +05:30
Venkata Sidagam
06bcc2a410 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Reverting the patch. Because this change is not to me made for GA versions.
2013-09-09 20:21:02 +05:30
Jan Lindström
9c85ced30d Merge fix. 2013-09-09 10:38:58 +03:00
Jan Lindström
ba3ff50ab2 Merge 10.0 to galera-10.0 2013-09-03 17:50:36 +03:00
Sergei Golubchik
6755944d08 remove PBXT 2013-08-30 11:25:49 +02:00
Sergei Golubchik
fcf87600a2 MDEV-4865 Change related to --log option/variable was merged partially
Complete the merge of magne.mahre@oracle.com-20101102115354-vxcaxminmzglzalk
(WL#5185 Remove deprecated 5.1 features)
2013-08-13 13:35:36 +02:00
Anirudh Mangipudi
793b5835fd Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Problem Description:
A mysqld_safe instance is started. An InnoDB crash recovery begins which takes
few seconds to complete. During this crash recovery process happening, another
mysqld_safe instance is started with the same server startup parameters. Since
the mysqld's pid file is absent during the crash recovery process the second
instance assumes there is no other process and tries to acquire a lock on the
ibdata files in the datadir.  But this step fails and the 2nd instance keeps 
retrying 100 times each with a delay of 1 second. Now after the 100 attempts, 
the server goes down, but while going down it hits the mysqld_safe script's 
cleanup section and without any check it blindly deletes the socket and pid 
files. Since no lock is placed on the socket file, it gets deleted.

Solution:
We create a mysqld_safe.pid file in the datadir, which protects the presence 
server instance resources by storing the mysqld_safe's process id in it. We
place a check if the mysqld_safe.pid file is existing in the datadir. If yes
then we check if the pid it contains is an active pid or not. If yes again,
then the scripts logs an error saying "A mysqld_safe instance is already 
running". Otherwise it will log the present mysqld_safe's pid into the 
mysqld_safe.pid file.
2013-08-12 23:06:58 +05:30
Anirudh Mangipudi
638dcdc3fb Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Problem Description:
A mysqld_safe instance is started. An InnoDB crash recovery begins which takes
few seconds to complete. During this crash recovery process happening, another
mysqld_safe instance is started with the same server startup parameters. Since
the mysqld's pid file is absent during the crash recovery process the second
instance assumes there is no other process and tries to acquire a lock on the
ibdata files in the datadir.  But this step fails and the 2nd instance keeps 
retrying 100 times each with a delay of 1 second. Now after the 100 attempts, 
the server goes down, but while going down it hits the mysqld_safe script's 
cleanup section and without any check it blindly deletes the socket and pid 
files. Since no lock is placed on the socket file, it gets deleted.

Solution:
We create a mysqld_safe.pid file in the datadir, which protects the presence 
server instance resources by storing the mysqld_safe's process id in it. We
place a check if the mysqld_safe.pid file is existing in the datadir. If yes
then we check if the pid it contains is an active pid or not. If yes again,
then the scripts logs an error saying "A mysqld_safe instance is already 
running". Otherwise it will log the present mysqld_safe's pid into the 
mysqld_safe.pid file.
2013-08-12 23:06:58 +05:30
Anirudh Mangipudi
8757f39543 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Problem Description:
A mysqld_safe instance is started. An InnoDB crash recovery begins which takes
few seconds to complete. During this crash recovery process happening, another
mysqld_safe instance is started with the same server startup parameters. Since
the mysqld's pid file is absent during the crash recovery process the second
instance assumes there is no other process and tries to acquire a lock on the
ibdata files in the datadir.  But this step fails and the 2nd instance keeps 
retrying 100 times each with a delay of 1 second. Now after the 100 attempts, 
the server goes down, but while going down it hits the mysqld_safe script's 
cleanup section and without any check it blindly deletes the socket and pid 
files. Since no lock is placed on the socket file, it gets deleted.

Solution:
We create a mysqld_safe.pid file in the datadir, which protects the presence 
server instance resources by storing the mysqld_safe's process id in it. We
place a check if the mysqld_safe.pid file is existing in the datadir. If yes
then we check if the pid it contains is an active pid or not. If yes again,
then the scripts logs an error saying "A mysqld_safe instance is already 
running". Otherwise it will log the present mysqld_safe's pid into the 
mysqld_safe.pid file.
2013-08-12 21:54:50 +05:30
Anirudh Mangipudi
8977c8fa98 Bug #16776528 RACE CONDITION CAN CAUSE MYSQLD TO REMOVE SOCKET FILE ERRANTLY
Problem Description:
A mysqld_safe instance is started. An InnoDB crash recovery begins which takes
few seconds to complete. During this crash recovery process happening, another
mysqld_safe instance is started with the same server startup parameters. Since
the mysqld's pid file is absent during the crash recovery process the second
instance assumes there is no other process and tries to acquire a lock on the
ibdata files in the datadir.  But this step fails and the 2nd instance keeps 
retrying 100 times each with a delay of 1 second. Now after the 100 attempts, 
the server goes down, but while going down it hits the mysqld_safe script's 
cleanup section and without any check it blindly deletes the socket and pid 
files. Since no lock is placed on the socket file, it gets deleted.

Solution:
We create a mysqld_safe.pid file in the datadir, which protects the presence 
server instance resources by storing the mysqld_safe's process id in it. We
place a check if the mysqld_safe.pid file is existing in the datadir. If yes
then we check if the pid it contains is an active pid or not. If yes again,
then the scripts logs an error saying "A mysqld_safe instance is already 
running". Otherwise it will log the present mysqld_safe's pid into the 
mysqld_safe.pid file.
2013-08-12 21:54:50 +05:30
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Sergei Golubchik
97e640b9ae 5.5 merge 2013-07-17 21:24:29 +02:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
Sergei Golubchik
33b7d10921 MDEV-4757 Change mysql.slow_log.event_time from TIMESTAMP to TIMESTAMP(6) 2013-07-15 22:50:06 +02:00
Seppo Jaakola
db0cfba638 Merged with lp:maria revision #3766 2013-07-13 13:30:03 +03:00
Seppo Jaakola
0a9216835f Initial merge result with mariaDB 10: lp:maria 2013-07-13 13:01:13 +03:00
Sergey Petrunya
34c7fe0750 Fix fix_priv_tables.test: make mysql_system_tables_fix.sql to not modify user.password_expired column. 2013-07-04 17:01:36 +04:00
Sergey Petrunya
f9a9309a77 Fix typo in scripts/mysql_system_tables_fix.sql 2013-07-04 16:36:43 +04:00
unknown
ecbf36a914 MDEV-4058
MySQL 5.6.10 performance schema: merge of host_cache table
2013-06-27 12:51:34 +03:00
Michael Widenius
2534521f9a Fixed some merge issues:
- temporary tables now works
- mysql-system_tables updated to not use temporary tables
- PASSWORD() function fixed
- Support for STATS_AUTO_RECALC, STATS_PERSISTENT and STATS_SAMPLE_PAGES table options
2013-06-18 02:01:34 +03:00
Michael Widenius
8075b05b7d More merge fixes:
- mdl.cc and mdl.h merged completely
- mysql_system_tables*.sql merged completely
- Fixed wrong merge of lock_tables
- Added some missing functions:
 - bool THD::notify_shared_lock()
 - Dynamic_array::pop, Dynamic_array::del
- Added MDL_context_owner to THD
- Added metadata_locks_hash_instances
2013-06-16 21:26:40 +03:00
unknown
7b6ab5638a MDEV-4483: CHANGE MASTER TO master_use_gtid=xxx looses old-style coordinates.
There was some old code that cleared the position in CHANGE MASTER,
it was forgotten to be removed.

In addition, add code that saves/restores the old-style position
when we nuke the old relay logs as part of GTID slave start.
Normally we will not use these, but it could be useful in case
the GTID connect fails and user wants to go back to the old-style
coordinates.
2013-06-07 08:43:21 +02:00
Sergei Golubchik
72ba95873a 10.0-base merge
(without InnoDB - all InnoDB changes were ignored)
2013-06-06 21:32:29 +02:00
Sergei Golubchik
4749d40c63 5.5 merge 2013-06-06 17:51:28 +02:00
unknown
a0fd7382bc Merge 10.0-base -> 10.0 2013-05-28 15:39:56 +02:00
unknown
1cd6eb5f94 MDEV-26: Global transaction ID.
Change of user interface to be more logical and more in line with expectations
to work similar to old-style replication.

User can now explicitly choose in CHANGE MASTER whether binlog position is
taken into account (master_gtid_pos=current_pos) or not (master_gtid_pos=
slave_pos) when slave connects to master.

@@gtid_pos is replaced by three separate variables @@gtid_slave_pos (can
be set by user, replicated GTIDs only), @@gtid_binlog_pos (read only), and
@@gtid_current_pos (a combination of the two, most recent GTID within each
domain). mysql.rpl_slave_state is renamed to mysql.gtid_slave_pos to match.

This fixes MDEV-4474.
2013-05-22 17:36:48 +02:00
Sergei Golubchik
b381cf843c mysql-5.5.31 merge 2013-05-07 13:05:09 +02:00
Igor Babaev
a1cd28e2e5 Merge 10.0-base -> 10.0 2013-04-17 10:18:04 -07:00
unknown
0e7410a154 Merge 10.0-base -> 10.0 (GTID). 2013-04-17 15:17:01 +02:00
Igor Babaev
f4cd2b37b1 Merge 10.0-base -> mwl253 2013-04-15 09:16:54 -07:00
Sergei Golubchik
a9035be5b7 10.0-base merge 2013-04-15 15:09:22 +02:00
unknown
665a31af2b MDEV-26: Global transaction ID. First alpha release.
Merge of 10.0-mdev26 feature tree into 10.0-base.

Global transaction ID is prepended to each event group in the binlog.

Slave connect can request to start from GTID position instead of specifying
file name/offset of master binlog. This facilitates easy switch to a new
master.

Slave GTID state is stored in a table mysql.rpl_slave_state, which can be
InnoDB to get crash-safe slave state.

GTID includes a replication domain ID, allowing to keep track of distinct
positions for each of multiple masters.
2013-04-15 10:55:27 +02:00
Igor Babaev
2713bab291 Merge 10.0-base -> mwl253. 2013-03-31 09:10:01 -07:00
Igor Babaev
9e1ca1053b Added the type of histogram for mwl #253.
Introduced double precision height-balanced histograms.
2013-03-30 18:57:07 -07:00
Sergei Golubchik
993ea79f2d 5.5 merge 2013-03-27 23:41:02 +01:00
Igor Babaev
1009832c13 Added histogams for table columns. 2013-03-25 23:48:29 -07:00
Nirbhay Choubey
3f14ac0406 Merge of patch for Bug#12671635 from mysql-5.1. 2013-03-21 23:40:25 +05:30
Nirbhay Choubey
27bce2a2ed Merge of patch for Bug#12671635 from mysql-5.1. 2013-03-21 23:40:25 +05:30
Nirbhay Choubey
04caf341b9 Bug#12671635 HELP-TABLEFORMAT DOESN'T MATCH HELP-FILES
As current size limit of 'url' field of help_topic
table is no longer sufficient for the contents of
the fill_help_tables-5.1.sql. So, loading the contents
in the table might result in warning (or error with
stricter modes).

Updated the type for 'url' field of help_topic as well
as help_category tables from char(128) to text.
2013-03-21 23:36:02 +05:30
Nirbhay Choubey
f8f88bee84 Bug#12671635 HELP-TABLEFORMAT DOESN'T MATCH HELP-FILES
As current size limit of 'url' field of help_topic
table is no longer sufficient for the contents of
the fill_help_tables-5.1.sql. So, loading the contents
in the table might result in warning (or error with
stricter modes).

Updated the type for 'url' field of help_topic as well
as help_category tables from char(128) to text.
2013-03-21 23:36:02 +05:30
Murthy Narkedimilli
8afe262ae5 Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
Murthy Narkedimilli
d978016d93 Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
Murthy Narkedimilli
fe85f54640 Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
Murthy Narkedimilli
d20a70fb55 Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
Sergei Golubchik
3bfd88d1d6 MDEV-4068 rpm scriptlet chown command dangerous
add --mysqld option to my_print_defaults
change server-postin script to use that
2013-03-06 09:32:13 +01:00
Michael Widenius
4cace76d4d Automatic merge 2013-03-01 18:09:06 +02:00
Sergei Golubchik
8161c6772d merge with mysql-5.5.30 minus few incorrect or not applicable changesets 2013-02-28 18:42:49 +01:00
Michael Widenius
2d78ef1d3b Added support for --crash-script in mysqld_safe.
Trivial cleanup

scripts/mysqld_safe.sh:
  Added support for --crash-script.
  Don't remove socket file (not needed as server will re-create it if needed)
  Patch by Eric Bergen
storage/maria/ha_maria.h:
  Removed not existing variable.
2013-02-28 08:42:05 +02:00
Murthy Narkedimilli
053d7e775c Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
Murthy Narkedimilli
69d8812a61 Updated/added copyright headers. 2013-02-25 15:26:00 +01:00
Sujatha Sivakumar
1048aed515 Merge from mysq-5.1 to mysql-5.5 2013-02-19 14:36:30 +05:30
Sujatha Sivakumar
92f81439a9 Merge from mysq-5.1 to mysql-5.5 2013-02-19 14:36:30 +05:30
Sujatha Sivakumar
4d494b1726 Bug#11746817:MYSQL_INSTALL_DB CREATES WILDCARD GRANTS WHEN
HOST HAS '_' IN THE HOSTNAME

Problem:
=======
'_' and '%' are treated as a wildcards by the ACL code and
this is documented in the manual. The problem with
mysql_install_db is that it does not take this into account
when creating the initial GRANT tables:

--- cut ---
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',
0,0,0,0 FROM dual WHERE LOWER( @current_hostname) != 'localhost';
--- cut ---

If @current_hostname contains any wildcard characters, then 
a wildcard entry will be defined for the 'root' user, 
which is a flaw.

Analysis:
========
As per the bug description when we have a hostname with a
wildcard character in it, it allows clients from several other
hosts with similar name pattern to connect to the server as root.
For example, if the hostname is like 'host_.com' then the same
name is logged in mysql.user table. This allows 'root' users
from other hosts like 'host1.com', 'host2.com' ... to connect
to the server as root user.

While creating the intial GRANT tables we do not have a check
for wildcard characters in hostname.

Fix:
===
As part of fix escape character "\" is added before wildcard
character to make it a plain character, so that the one and
only host with the exact name will be able to connect to the
server.

scripts/mysql_system_tables_data.sql:
  while creating default users get the hostname and
  replace the wildcard characters within the hostname after
  escaping them.
2013-02-19 14:31:11 +05:30
Sujatha Sivakumar
bda79b0564 Bug#11746817:MYSQL_INSTALL_DB CREATES WILDCARD GRANTS WHEN
HOST HAS '_' IN THE HOSTNAME

Problem:
=======
'_' and '%' are treated as a wildcards by the ACL code and
this is documented in the manual. The problem with
mysql_install_db is that it does not take this into account
when creating the initial GRANT tables:

--- cut ---
REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',
0,0,0,0 FROM dual WHERE LOWER( @current_hostname) != 'localhost';
--- cut ---

If @current_hostname contains any wildcard characters, then 
a wildcard entry will be defined for the 'root' user, 
which is a flaw.

Analysis:
========
As per the bug description when we have a hostname with a
wildcard character in it, it allows clients from several other
hosts with similar name pattern to connect to the server as root.
For example, if the hostname is like 'host_.com' then the same
name is logged in mysql.user table. This allows 'root' users
from other hosts like 'host1.com', 'host2.com' ... to connect
to the server as root user.

While creating the intial GRANT tables we do not have a check
for wildcard characters in hostname.

Fix:
===
As part of fix escape character "\" is added before wildcard
character to make it a plain character, so that the one and
only host with the exact name will be able to connect to the
server.
2013-02-19 14:31:11 +05:30
Sergei Golubchik
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
Sergei Golubchik
0af4b6c6ee 5.5 merge 2013-01-29 15:10:47 +01:00
unknown
132c266044 MDEV-26: Global transaction ID.
Ensure that mysql_install_db can create the rpl_slave_state with InnoDB storage engine.
2013-01-25 19:19:30 +01:00
Sergei Golubchik
faac8db6bd MDEV-3952 Incompatible change in MariaDB-5.5.28a-client rpm adds mytop when not in MariaDB-5.5.23-client (CentOS 5)
Same as for deb: don't add mytop to the client rpm.
2013-01-20 21:42:01 +01:00
Sergei Golubchik
d3935adf7a mysql-5.5.29 merge 2013-01-15 19:13:32 +01:00
Sergei Golubchik
aca8e7ed6b 5.3 merge 2013-01-15 19:07:46 +01:00
Igor Babaev
1ef07d0845 Merge 10.0-base -> 10.0.
Also fixed a bug in sql_update.cc: the code of mysql_update() lacked
a call of set_statistics_for_table().
2013-01-10 22:33:23 -08:00
Michael Widenius
edc89f7511 Buildbot fixes and cleanups:
- Added --verbose to BUILD scripts to get make to write out compile commands.
- Detect if AM_EXTRA_MAKEFLAGS=VERBOSE=1 was used with build scripts.
- Don't write warnings about replication variables when doing bootstrap.
- Fixed that mysql_cond_wait() and mysql_cond_timedwait() will report original source file in case of errors.
- Ignore some compiler warnings

BUILD/FINISH.sh:
  Detect if AM_EXTRA_MAKEFLAGS=VERBOSE=1 or --verbose was used
BUILD/SETUP.sh:
  Added --verbose to print out the full compile lines
  Updated help message
client/mysqltest.cc:
  Fixed that one can use 'replace' with cat_file
cmake/configure.pl:
  If --verbose is used, get make to write out compile commands
debian/dist/Debian/rules:
  Added $AM_EXTRA_MAKEFLAGS to get VERBOSE=1 on buildbot builds
debian/dist/Ubuntu/rules:
  Added $AM_EXTRA_MAKEFLAGS to get VERBOSE=1 on buildbot builds
include/my_pthread.h:
  Made set_timespec_time_nsec() more portable.
include/mysql/psi/mysql_thread.h:
  Fixed that mysql_cond_wait() and mysql_cond_timedwait() will report original source file in case of errors.
mysql-test/suite/innodb/r/auto_increment_dup.result:
  Fixed wrong DBUG_SYNC
mysql-test/suite/innodb/t/auto_increment_dup.test:
  Fixed wrong DBUG_SYNC
mysql-test/suite/perfschema/include/upgrade_check.inc:
  Make test more portable for changes in *.sql files
mysql-test/suite/perfschema/r/pfs_upgrade.result:
  Updated test results
mysql-test/valgrind.supp:
  Ignore running Aria checkpoint thread
scripts/mysqlaccess.sh:
  Changed reference of bugs database
  Ensure that also client-server group is read.
sql/handler.cc:
  Added missing syncpoint
sql/mysqld.cc:
  Don't write warnings about replication variables when doing bootstrap
sql/mysqld.h:
  Don't write warnings about replication variables when doing bootstrap
sql/rpl_rli.cc:
  Don't write warnings about replication variables when doing bootstrap
sql/sql_insert.cc:
  Don't mask SERVER_SHUTDOWN in insert_delayed
  This is done to be able to distingush between shutdown and interrupt errors
support-files/compiler_warnings.supp:
  Ignore some compiler warnings in xtradb,innobase, oqgraph, yassl, string3.h
2013-01-11 02:03:43 +02:00
Michael Widenius
5f68820cd4 Fixed problem with failing mysql_upgrade when proc table was not correct.
Moved out creation of performance schema tables from mysql_system_tables.sql as
the performance_tables creation scripts needs a working mysql.proc to work.

client/mysql_upgrade.c:
  Added option -V, --version
debian/dist/Debian/mariadb-server-5.5.files:
  Added mysql_performance_tables.sql
debian/dist/Ubuntu/mariadb-server-5.5.files:
  Added mysql_performance_tables.sql
mysql-test/lib/v1/mysql-test-run.pl:
  Added mysql_performance_tables.sql
mysql-test/mysql-test-run.pl:
  Added mysql_performance_tables.sql
scripts/CMakeLists.txt:
  Moved out creation of performance schema tables from mysql_system_tables.sql 
  as the performance_tables creation scripts needs a working mysql.proc to work
scripts/mysql_install_db.sh:
  Added mysql_performance_tables.sql
scripts/mysql_performance_tables.sql:
  Moved out creation of performance schema tables from mysql_system_tables.sql 
  as the performance_tables creation scripts needs a working mysql.proc to work
scripts/mysql_system_tables.sql:
  Move creation of performance schema tables to mysql_performance_tables.sql
  Added 'flush tables' to get things to work if someone deletes a table like mysql.proc before run
scripts/mysql_system_tables_fix.sql:
  ove performance table things to mysql_performance_tables.sql
storage/perfschema/pfs.cc:
  Fixed comment
2013-01-11 00:53:07 +02:00
Sergei Golubchik
4f67a14700 5.2->5.3 merge 2013-01-10 15:40:21 +01:00
Sergei Golubchik
bd87fed1dc 5.1 merge 2013-01-10 13:54:04 +01:00
Sergei Golubchik
2e11ca36f2 mysql-5.1.67 merge 2013-01-09 23:51:51 +01:00
Igor Babaev
7d9df8075e Merge 5.5 -> mwl248 2013-01-08 15:04:14 -08:00
Nirbhay Choubey
519daab67a Merge of patch for Bug#16046140 from mysql-5.1. 2012-12-27 17:36:11 +05:30
Nirbhay Choubey
4c03dd7e3a Merge of patch for Bug#16046140 from mysql-5.1. 2012-12-27 17:36:11 +05:30
Nirbhay Choubey
825459b8cd Bug#16046140 BIN/MYSQLD_SAFE: TEST: ARGUMENT EXPECTED
Some shell interpreters do not support '-e' test
primary to construct conditions.

man test 1 (on S10)
...skip...
-e file True if file exists. (Not available in sh.)
...skip...

Hence, check for the existence of a file using
'-e' might result in a syntax error on such
shell programs.

Fixed by replacing it by '-f'.
2012-12-27 17:33:34 +05:30
Nirbhay Choubey
3dbf1b3e5f Bug#16046140 BIN/MYSQLD_SAFE: TEST: ARGUMENT EXPECTED
Some shell interpreters do not support '-e' test
primary to construct conditions.

man test 1 (on S10)
...skip...
-e file True if file exists. (Not available in sh.)
...skip...

Hence, check for the existence of a file using
'-e' might result in a syntax error on such
shell programs.

Fixed by replacing it by '-f'.
2012-12-27 17:33:34 +05:30
unknown
701419b02f Merge MariaDB 10.0-base to MariaDB 10.0 2012-12-18 15:01:58 +01:00
Sergei Golubchik
fe7c2aaeea MDEV-3816 init-file stops getting executed if a long enough line is encountered; on a debug version, assertion `! is_set() || can_overwrite_status' fails
backport improved bootstrap error handling from 5.6

Was:
  revno: 3768.1.1
  committer: Christopher Powers <chris.powers@oracle.com>
  timestamp: Wed 2012-05-02 22:16:40 -0500
  message:
    Bug#11766342 INITIAL DB CREATION FAILS ON WINDOWS WITH AN ASSERT IN SQL_ERROR.CC
    Improved bootstrap error handling:
    - Detect and report file i/o errors
    - Report query size errors with nearest query text
2012-12-16 21:11:24 +01:00
Michael Widenius
a6a8f12fa3 Automatic merge 2012-12-16 12:04:26 +02:00
Michael Widenius
4ba960569b Removed extra '+' from some lines (remains of old merge) 2012-12-14 20:21:50 +02:00
Igor Babaev
b110132516 Changed the names of the system tables for statistical data:
table_stat  -> table_stats
  column_stat -> column_stats
  index_stat  -> index_stats
to be in line with the names of innodb statistical tables 
from mysql-5.6: innodb_table_stats and innodb_index_stats.
2012-12-05 00:31:05 -08:00
Igor Babaev
f8bfb65b13 Merge 5.5->mwl248 2012-12-04 19:04:25 -08:00
Sergei Golubchik
a48a91d90f 5.3->5.5 merge 2012-11-22 10:19:31 +01:00
Sergei Golubchik
3a1fdc9e7f MDEV-3826 compilation of client programs fail: m_string.h tries to include <mysql/plugin.h>
mysql_config:
- add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path,
  for #include <mysql/plugin.h> to work


scripts/mysql_config.sh:
  - don't support headers in */include anymore. only in */include/mysql
  - remove the incorrect "bug fix" (fixed correctly long time ago)
  - add not only $pkgincludedir, but also $pkgincludedir/.. to the header search path,
    for #include <mysql/plugin.h> to work
  - but don't do it, if $pkgincludedir/.. is /usr/include
2012-11-15 19:20:10 +01:00
unknown
bdbce30dee MDEV-26: Global transaction id: Intermediate commit.
Now slave can connect to master, sending start position as slave state
rather than old-style binlog name/position.

This enables to switch to a new master by changing just connection
information, replication slave GTID state ensures that slave starts
at the correct point in the new master.
2012-11-15 13:11:35 +01:00
unknown
3f59033536 Merge MariaDB 5.1.66 -> 5.2 -> 5.3 2012-11-09 10:11:20 +02:00
unknown
c5cef4b166 Merge MariaDB 5.1.66 -> 5.2.12 2012-11-08 15:24:35 +02:00
unknown
7c23d6d0c6 Merge MySQL 5.1.66 -> MariaDB 5.1.65 2012-11-06 11:52:55 +02:00
Sergei Golubchik
40e94a3734 merge with 5.5 2012-11-03 12:28:51 +01:00
Igor Babaev
8d612adf70 Merge 5.5 -> 5.5-mwl248. 2012-11-02 20:38:05 -07:00
Sergei Golubchik
32b70aeadf RPM fixes:
shared should provide libmysqlclient.so.18(libmysqlclient_16) too
  don't "use DBD::mysql" explicitly in mytop
2012-10-27 15:05:01 +02:00
Sergei Golubchik
e1f681c99b 10.0-base -> 10.0-monty 2012-10-19 20:38:59 +02:00
Joerg Bruehe
86b311fbdf Automerge into main 5.1 2012-10-19 20:09:29 +02:00
Joerg Bruehe
b1db7b1280 Automerge into main 5.1 2012-10-19 20:09:29 +02:00
Sergei Golubchik
797082ca71 Fix the incorrect merge 2012-10-19 11:21:35 +02:00
Sergei Golubchik
68baf07dcd 5.3 merge 2012-10-18 23:33:06 +02:00
Sergei Golubchik
bf106948e0 RPM fixes:
shared should provide libmysqlclient.so.18(libmysqlclient_16) too
  don't "use DBD::mysql" explicitly in mytop
2012-10-17 19:04:08 +02:00
Tatjana Azundris Nuernberg
b4a7756186 Bug#11764559: UMASK IS IGNORED BY ERROR LOG
mysqld_safe script did not heed MySQL specific environment variable
$UMASK, leading to divergent behavior between mysqld and mysqld_safe.

Patch adds an approximation of mysqld's behavior to mysqld_safe,
within the bounds dictated by attempt to have mysqld_safe run on
even the most basic of shells (proper '70s sh, not just bash
with a fancy symlink).

Patch also adds approximation of said behavior to mysqld_multi
(in perl).

(backport)

manual merge
2012-10-17 07:36:40 +01:00
Tatjana Azundris Nuernberg
61ab1a4ba9 Bug#11764559: UMASK IS IGNORED BY ERROR LOG
mysqld_safe script did not heed MySQL specific environment variable
$UMASK, leading to divergent behavior between mysqld and mysqld_safe.

Patch adds an approximation of mysqld's behavior to mysqld_safe,
within the bounds dictated by attempt to have mysqld_safe run on
even the most basic of shells (proper '70s sh, not just bash
with a fancy symlink).

Patch also adds approximation of said behavior to mysqld_multi
(in perl).

(backport)

manual merge
2012-10-17 07:36:40 +01:00
Tatjana Azundris Nuernberg
b86aea6ce5 Bug#11764559: UMASK IS IGNORED BY ERROR LOG
mysqld_safe script did not heed MySQL specific environment variable
$UMASK, leading to divergent behavior between mysqld and mysqld_safe.

Patch adds an approximation of mysqld's behavior to mysqld_safe,
within the bounds dictated by attempt to have mysqld_safe run on
even the most basic of shells (proper '70s sh, not just bash
with a fancy symlink).

Patch also adds approximation of said behavior to mysqld_multi
(in perl).
2012-10-17 07:22:06 +01:00
Tatjana Azundris Nuernberg
a5fa073727 Bug#11764559: UMASK IS IGNORED BY ERROR LOG
mysqld_safe script did not heed MySQL specific environment variable
$UMASK, leading to divergent behavior between mysqld and mysqld_safe.

Patch adds an approximation of mysqld's behavior to mysqld_safe,
within the bounds dictated by attempt to have mysqld_safe run on
even the most basic of shells (proper '70s sh, not just bash
with a fancy symlink).

Patch also adds approximation of said behavior to mysqld_multi
(in perl).
2012-10-17 07:22:06 +01:00
Sergei Golubchik
ee9afef271 mysql-5.5.28 2012-10-16 13:04:42 +02:00
Sergei Golubchik
d7e0499407 don't disable innodb in bootstrap anymore 2012-10-08 12:30:10 +02:00
Sergei Golubchik
474fe6d9d9 fixes for test failures
and small collateral changes

mysql-test/lib/My/Test.pm:
  somehow with "print" we get truncated writes sometimes
mysql-test/suite/perfschema/r/digest_table_full.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/dml_handler.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/information_schema.result:
  host table is not ported over yet
mysql-test/suite/perfschema/r/nesting.result:
  this differs, because we don't rewrite general log queries, and multi-statement
  packets are logged as a one entry. this result file is identical to what mysql-5.6.5
  produces with the --log-raw option.
mysql-test/suite/perfschema/r/relaylog.result:
  MariaDB modifies the binlog index file directly, while MySQL 5.6 has a feature "crash-safe binlog index" and modifies a special "crash-safe" shadow copy of the index file and then moves it over. That's why this test shows "NONE" index file writes in MySQL and "MANY" in MariaDB.
mysql-test/suite/perfschema/r/server_init.result:
  MariaDB initializes the "manager" resources from the "manager" thread, and starts this thread only when --flush-time is not 0. MySQL 5.6 initializes "manager" resources unconditionally on server startup.
mysql-test/suite/perfschema/r/stage_mdl_global.result:
  this differs, because MariaDB disables query cache when query_cache_size=0. MySQL does not
  do that, and this causes useless mutex locks and waits.
mysql-test/suite/perfschema/r/statement_digest.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_consumers.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/perfschema/r/statement_digest_long_query.result:
  md5 hashes of statement digests differ, because yacc token codes are different in mariadb
mysql-test/suite/rpl/r/rpl_mixed_drop_create_temp_table.result:
  will be updated to match 5.6 when alfranio.correia@oracle.com-20110512172919-c1b5kmum4h52g0ni and anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y are merged
mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
  will be updated to match 5.6 when anders.song@greatopensource.com-20110105052107-zoab0bsf5a6xxk2y is merged
2012-09-27 20:09:46 +02:00
Sergei Golubchik
352d7cad1b merge 2012-09-27 15:02:17 +02:00
Sergei Golubchik
95875780e7 merge 2012-09-26 18:49:38 +02:00
Sergei Golubchik
1f2f353cd6 always force the language in mysql_install_db 2012-09-26 11:59:49 +02:00
Sergei Golubchik
2f5f360f17 merge 2012-09-24 17:29:26 +02:00
Sergei Golubchik
9ae909643d merge 2012-09-24 13:57:45 +02:00
Sergei Golubchik
7d82c6fa04 MDEV-543 mysql_install_db doesn't work with blanks in either basedir or datadir path 2012-09-24 11:33:41 +02:00
Michael Widenius
79feec77ed Updated mytop to version 1.91
Fixed that 'Handler:' output gives correct result with MariaDB (not including temporary tables)
2012-09-22 14:19:02 +03:00
Joerg Bruehe
575a64c48e Backport this change from MySQL 5.5 to 5.1:
Bug #14181049: MYSQL_INSTALL_DB.PL CREATES EMPTY SYSTEM TABLES FOR MYSQL

  The script is different from what's used on unixes.
  It was not playing the table insertion script (mysql_system_tables_data.sql),
  although it was checking for the presence of this script.
  Fixed by re-enabling the lookup for this file and replaying it at bootstrap
  time. Note that on the Unixes "SELECT @@hostname" does return a fully qualified
  name, whereas on Windows it returns only a hostname.
  So by default we're filtering records in the mysql.user table until we ensure
  this is fixed.

The change was coded in 5.5 by Georgi Kodinov <Georgi.Kodinov@Oracle.com>
2012-09-11 20:56:22 +02:00
Joerg Bruehe
c0a1b2c891 Backport this change from MySQL 5.5 to 5.1:
Bug #14181049: MYSQL_INSTALL_DB.PL CREATES EMPTY SYSTEM TABLES FOR MYSQL

  The script is different from what's used on unixes.
  It was not playing the table insertion script (mysql_system_tables_data.sql),
  although it was checking for the presence of this script.
  Fixed by re-enabling the lookup for this file and replaying it at bootstrap
  time. Note that on the Unixes "SELECT @@hostname" does return a fully qualified
  name, whereas on Windows it returns only a hostname.
  So by default we're filtering records in the mysql.user table until we ensure
  this is fixed.

The change was coded in 5.5 by Georgi Kodinov <Georgi.Kodinov@Oracle.com>
2012-09-11 20:56:22 +02:00
Vladislav Vaintroub
ae325ec6ce Compile 10.0 on Windows 2012-08-30 11:36:24 +02:00
Igor Babaev
98f239a849 Merge 5.5->5.5-mwl248. 2012-08-29 18:50:38 -07:00
Alexey Botchkov
ac982b0a21 MDEV-471 update help tables.
the fill_help_table-5.5.sql file was copied into mariadb.

per-file comments:
  scripts/fill_help_tables.sql
        MDEV-471 update help tables.
2012-08-28 15:07:50 +05:00
Georgi Kodinov
4fb57747fe Bug #13548161: MYSQLD_SAFE IMPROVEMENTS FOR 5.5 ALLWAYS SETS PLUGIN_DIR
TO DEFAULT IGNOR

The test in mysqld_safe for the presence of the --plugin-dir and assigning a default
value to it were performed before the actual argument parsing.
This is wrong, as PLUGIN_DIR mysqld_safe code also uses MY_BASEDIR_VERSION to 
look for version specific plugin directory if present.
Fixed by moving the PLUGIN_DIR logic after the parse_arguments() call.
2012-08-27 15:30:58 +03:00
Georgi Kodinov
92d2f60e12 Bug #13548161: MYSQLD_SAFE IMPROVEMENTS FOR 5.5 ALLWAYS SETS PLUGIN_DIR
TO DEFAULT IGNOR

The test in mysqld_safe for the presence of the --plugin-dir and assigning a default
value to it were performed before the actual argument parsing.
This is wrong, as PLUGIN_DIR mysqld_safe code also uses MY_BASEDIR_VERSION to 
look for version specific plugin directory if present.
Fixed by moving the PLUGIN_DIR logic after the parse_arguments() call.
2012-08-27 15:30:58 +03:00
Georgi Kodinov
aa624daf8b Bug #14181049: MYSQL_INSTALL_DB.PL CREATES EMPTY SYSTEM TABLES FOR MYSQL
The script is different from what's used on unixes.
It was not playing the table insertion script (mysql_system_tables_data.sql),
although it was checking for the presence of this script.
Fixed by re-enabling the lookup for this file and replaying it at bootstrap
time. Note that on the Unixes "SELECT @@hostname" does return a fully qualified
name, whereas on Windows it returns only a hostname.
So by default we're filtering records in the mysql.user table until we ensure
this is fixed.
2012-08-24 15:01:31 +03:00
Georgi Kodinov
9c227f4f92 Bug #14181049: MYSQL_INSTALL_DB.PL CREATES EMPTY SYSTEM TABLES FOR MYSQL
The script is different from what's used on unixes.
It was not playing the table insertion script (mysql_system_tables_data.sql),
although it was checking for the presence of this script.
Fixed by re-enabling the lookup for this file and replaying it at bootstrap
time. Note that on the Unixes "SELECT @@hostname" does return a fully qualified
name, whereas on Windows it returns only a hostname.
So by default we're filtering records in the mysql.user table until we ensure
this is fixed.
2012-08-24 15:01:31 +03:00
Michael Widenius
f277f27ae2 Fixing test cases
Added missing system tables used in 5.6
2012-08-23 00:32:25 +03:00
Michael Widenius
60589aeee0 Next part of merge. See TODO for details 2012-08-14 17:23:34 +03:00
Venkata Sidagam
94bd7bd6b7 Bug #12992993 MYSQLHOTCOPY FAILS IF VIEW EXISTS
Problem description:
mysqlhotcopy fails if a view presents in the database.

Analysis:
Before 5.5 'FLUSH TABLES <tbl_name> ... WITH READ LOCK' will able 
to get lock for all tables (i.e. base tables and view tables). 
In 5.5 onwards 'FLUSH TABLES <tbl_name> ... WITH READ LOCK' for 
'view tables' will not work, because taking flush locks on view 
tables is not valid.

Fix:
Take flush lock for 'base tables' and read lock for 'view table' 
separately.

Note: most of the patch has been backported from bug#13006947's patch
2012-08-14 15:13:30 +05:30
Venkata Sidagam
37d22846c1 Bug #12992993 MYSQLHOTCOPY FAILS IF VIEW EXISTS
Problem description:
mysqlhotcopy fails if a view presents in the database.

Analysis:
Before 5.5 'FLUSH TABLES <tbl_name> ... WITH READ LOCK' will able 
to get lock for all tables (i.e. base tables and view tables). 
In 5.5 onwards 'FLUSH TABLES <tbl_name> ... WITH READ LOCK' for 
'view tables' will not work, because taking flush locks on view 
tables is not valid.

Fix:
Take flush lock for 'base tables' and read lock for 'view table' 
separately.

Note: most of the patch has been backported from bug#13006947's patch
2012-08-14 15:13:30 +05:30
Sergei Golubchik
9ed96f5f86 MDEV-286 mytop is not installed in 5.5
include mytop in bintars, rpms, and debs.
install mysqlbug.1 too.
2012-08-13 09:21:47 +02:00
Michael Widenius
1d0f70c2f8 Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6 2012-08-01 17:27:34 +03:00
Nirbhay Choubey
251545431d Merge of patch for Bug#13741677 from mysql-5.1. 2012-07-26 21:59:05 +05:30
Nirbhay Choubey
0f532388d2 Merge of patch for Bug#13741677 from mysql-5.1. 2012-07-26 21:59:05 +05:30
Nirbhay Choubey
55f3fd4d63 Bug#13741677 MYSQL_SECURE_INSTALLATION DOES NOT
WORK + SAVES ROOT PASSWORD TO DISK!

The secure installation scripts connect to the
server by storing the password in a temporary
option file. Now, if the script gets killed or
fails for some reason, the removal of the option
file may not take place.

This patch introduces following enhancements :
* (.sh) Made sure that cleanup happens at every
  call to 'exit 1'. This is performed implicitly
  by END{} in pl.in.
* (.pl.in) Added a warning in case unlink fails
  to delete the option/query files.
* (.sh/.pl.in) Added more signals to the signal
  handler list. SIG# 1, 3, 6, 15
2012-07-26 21:47:03 +05:30
Nirbhay Choubey
b89363de1d Bug#13741677 MYSQL_SECURE_INSTALLATION DOES NOT
WORK + SAVES ROOT PASSWORD TO DISK!

The secure installation scripts connect to the
server by storing the password in a temporary
option file. Now, if the script gets killed or
fails for some reason, the removal of the option
file may not take place.

This patch introduces following enhancements :
* (.sh) Made sure that cleanup happens at every
  call to 'exit 1'. This is performed implicitly
  by END{} in pl.in.
* (.pl.in) Added a warning in case unlink fails
  to delete the option/query files.
* (.sh/.pl.in) Added more signals to the signal
  handler list. SIG# 1, 3, 6, 15
2012-07-26 21:47:03 +05:30
Igor Babaev
4a6a08309c Merge 5.5 -> 5.5-mwl248. 2012-06-26 11:37:48 -07:00
Igor Babaev
4ff6fd34da Changed the type of all double columns in the system statistical tables
mysql.column_stat, mysql.table_stat for the type DECIMAL(12,4).
When cached the values from these columns are multiplied by factor 10^5
and stored as ulong numbers now.
2012-06-25 22:33:07 -07:00
Daniel Bartholomew
bdc68e5baf various documentation updates 2012-06-18 16:57:58 -04:00
Michael Widenius
d48f2e889d Moved init_log() to be later to not write log entries when one uses --example 2012-06-08 22:13:38 +03:00
Igor Babaev
27ab01243c Merge 2012-06-01 13:42:39 -07:00
Sergei Golubchik
ec586f529c Building RPMs with CPack
configure with cmake -DRPM=distro
2012-05-22 11:04:32 +02:00
Igor Babaev
9e74665a2d Merge 5.5 -> 5.5-mwl248. 2012-04-11 20:44:52 -07:00
Sergei Golubchik
f860b2aad4 merge 2012-04-07 15:58:46 +02:00
Sergei Golubchik
a3073ecd96 merge 2012-04-05 23:07:18 +02:00
Sergei Golubchik
cbd52a42ee merge 2012-04-05 12:01:52 +02:00
Sergei Golubchik
dea3544b2d mysql-5.1.62 merge 2012-04-05 10:49:38 +02:00
Michael Widenius
635598f19c automatic merge 2012-04-02 12:31:53 +03:00
Michael Widenius
2887bfbe9e Fixed lp:886484 "nowatch option for mysqld (allow systemd)"
Added a --nowatch (with aliases --no-watch and --no-auto-restart) option to mysqld_safe that causes it to exit after
spawning mysqld.  We don't need mysqld_safe to restart mysqld after a crash, because systemd can do that just fine.

Based on code from Maarten Vanraes

scripts/mysqld_safe.sh:
  Added option --nowatch (with aliases --no-watch and --no-auto-restart)
2012-04-02 12:09:22 +03:00
Sergei Golubchik
867296c3ed 5.3 merge 2012-03-28 20:25:31 +02:00
Sergei Golubchik
20e706689d mysql-5.5.22 merge
mysql-test/suite/innodb/t/group_commit_crash.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysql-test/suite/innodb/t/group_commit_crash_no_optimize_thread.test:
  remove autoincrement to avoid rbr being used for insert ... select
mysys/my_addr_resolve.c:
  a pointer to a buffer is returned to the caller -> the buffer cannot be on the stack
mysys/stacktrace.c:
  my_vsnprintf() is ok here, in 5.5
2012-03-28 01:04:46 +02:00
Michael Widenius
6131d708e8 Added feature request from lp:956585 "Feature request - prevent truncating query in mytop"
Added feature request 'reading of my.cnf files' to mytop
Thanks to Jean Weisbuch for the patch/suggestion.


scripts/mytop.sh:
  Added feature request from lp:956585 "Feature request - prevent truncating query in mytop"
  Added feature request 'reading of my.cnf files'
2012-03-27 16:06:00 +03:00
Igor Babaev
ff3d16fba8 Merge maria-5.3-mwl248 -> 5.5 = maria-5.5-mwl248. 2012-03-19 01:35:32 -07:00