Commit graph

32 commits

Author SHA1 Message Date
Brian Wolff
8e98f9e3e6 Double check its safe before dropping new table during db cloning
parserTests.php just killed my user table :(

Bug: 65654
Change-Id: Idcf1c6af6a513c9e6dc650237863db8d61519886
2014-06-25 10:56:53 +00:00
Brian Wolff
0b32b01adb Make CloneDatabase error out on shared tables.
Due to the way prefixes are handled, this doesn't work properly.

Make it quit early to prevent confusion. I don't think there's
many people who need shared table support, so I don't know if
its worth the effort to actually fix.

Bug: 65654
Change-Id: I6cd701998fc9066d8c7a4fc86d93a4282cc7f9bd
2014-06-19 09:36:12 +00:00
Alexandre Emsenhuber
449ee32451 Add missing line breaks to wfDebug() calls
Also removed true as second parameter to it from CloneDatabase.php
since it is the default value of that parameter.

Change-Id: I727ebae2bd4df0e26019985ce8c7ce73381c5642
2014-03-29 11:52:07 +01:00
Ladsgroup
1ba0445c12 Changing URLs of mediawiki.org in scripts to the SSL-based website
http://www.mediawiki.org --> https://www.mediawiki.org

Part 2

Change-Id: I3be61fe3dfb502cc20180486eb1a8016eac151df
2014-03-12 23:24:03 +00:00
Siebrand Mazeland
e22a70a103 Update documentation for database related classes
Change-Id: I364e192e2624f89a91dcb19e371ce3412142a95f
2014-01-06 19:45:40 +01:00
Siebrand Mazeland
b547395796 Break long lines and formatting updates for includes/db/
Fix all line length related CodeSniffer warnings.

Change-Id: Id0fd8f4c7276185f51489659ee3cd06962fbc16d
2013-11-21 16:43:40 +00:00
Siebrand Mazeland
1e10dcd3aa Update formatting on database-related classes
Change-Id: I91f83e28ae25f80ba9e36c612f1ad050ffa1573c
2013-11-21 16:39:38 +00:00
Chad Horohoe
fc2218288c Remove pointless vertical alignment
Change-Id: I57926bfb718fdb7e4f55a08f39fc6af9f2e4adf6
2013-05-06 08:54:20 -04:00
umherirrender
892ee7a4af Fixed spacing in db/debug/diff/externalstore/objectcache folder
Added spaces before if, foreach
Added some braces for one line statements

Change-Id: I32a43c547630ce31b6b25cc1bc9eedc50e67b2d7
2013-04-20 22:28:52 +02:00
Tyler Anthony Romeo
4dcc7961df Fixed @param tags to conform with Doxygen format.
Doxygen expects parameter types to come before the
parameter name in @param tags. Used a quick regex
to switch everything around where possible. This
only fixes cases where a primitve variable (or a
primitive followed by other types) is the variable
type. Other cases will need to be fixed manually.

Change-Id: Ic59fd20856eb0489d70f3469a56ebce0efb3db13
2013-03-11 13:15:01 -04:00
umherirrender
f97a3a4027 fix some spacing
Change-Id: I670a7baf3ba1e70d18346bb00938d518ba2063bd
2013-02-04 19:59:14 +00:00
umherirrender
85d8ee1f87 Remove a bunch of trailing spaces and unneeded newlines
Change-Id: I00f369641320acd7f087427ef031f3ee7efa0997
2012-10-10 20:14:40 +02:00
Alexandre Emsenhuber
e7ab34cf1d Added missing GPLv2 headers in some places.
Also made file/class documentation more consistent.

Change-Id: If65d7313e1e05163ce6cc46d17daa310cb41888c
2012-04-28 20:41:55 +02:00
Aaron Schulz
5a6559d8b1 Reverted r108743 per CR comment. This should at least be discussed first. 2012-01-12 19:41:18 +00:00
Sam Reed
a5c200a25b Kill "* @return void" 2012-01-12 19:12:24 +00:00
Jure Kajzer
5933586266 some more oracle-phpunit-fu (should not affect non-oracle)
* CloneDatabase - already droping tables in internal function, removed duplicate action
* DatabaseOracle - stopped ignoring "temporary" parameter
* added two parameters to phpunit (use-normal-tables & reuse-db), default actions stay the same
* with reuse-db oracle phpunit test run on oracle down to 1m 20s ;)
2011-11-10 13:29:32 +00:00
Chad Horohoe
70430650e9 Followup r96369: update child classes and a few callers 2011-09-06 20:51:10 +00:00
Chad Horohoe
ba9d7db94d $newTablePrefix must be passed. All callers are ok 2011-05-30 02:06:12 +00:00
Sam Reed
51a0d53758 More documentation stuffs 2011-05-25 18:58:02 +00:00
Platonides
f524482f2d Change the duplicateTableStructure() to use the original names.
It is now duplicateTableStructure() duty to addIdentifierQuotes() them.
Fixed bug for mysql < 4.1 where the new name would be quoted twice.

Always quote identifier in Oracle, doing otherwise seems a bug (can someone confirm?)
2011-04-12 18:54:51 +00:00
Antoine Musso
0d2baed222 correct wfDebug() calls added in r79272 & r79368 2011-03-20 11:39:44 +00:00
X!
1b7bfdee49 I made MySQL work, and broke SQLite in the process. I fix SQLite, and made MySQL break. Fixing MySQL again, hoping that SQLite works too. :) 2010-12-31 21:01:17 +00:00
X!
dd68f3947a More work on getting SQLite to work with unit tests. DB Prefix changing is now static to allow for external classes to change it. 2010-12-31 20:42:39 +00:00
Platonides
666ee2902a Follow up r79314.
The table to drop is the NEW one, the one that is going to be recreated.
Sure, the prefix was changed, which means that we need just the table base.

The r79314 behavior was to perform the following:
 DROP /* CloneDatabase::cloneTableStructure  */ TABLE IF EXISTS `archive`
 CREATE /* DatabaseMysql::duplicateTableStructure  */ TEMPORARY  TABLE `unittest_archive` (LIKE `archive`)

Luckily, it failed there as it didn't find the table it had just dropped.
2010-12-31 14:08:10 +00:00
X!
f70c2b987c Use $oldTableName in CloneDatabase. The dropTable() appends the prefix, so $oldTableName becomes $newTableName 2010-12-31 02:18:25 +00:00
X!
1993c83277 -Destroy the DB automatically when initting the DB
-Add $force option to wfSetVar
-More work on getting SQLite to work
2010-12-30 17:30:35 +00:00
Sam Reed
490367210b Add function return type hint to wfGetLBFactory
More parameter documentation to CloneDatabase
2010-12-30 02:44:26 +00:00
Sam Reed
43ca0f0974 Array to array
Add some function documentation
2010-12-30 02:41:20 +00:00
OverlordQ
91307ea896 Followup to r79094, PG handles temporary tables correctly so you dont need to do cleanup 2010-12-28 22:26:45 +00:00
Chad Horohoe
f636dd473a Fix hardcoded debugging from r79093 2010-12-28 22:20:01 +00:00
Chad Horohoe
3a9a451e8c Followup r79093: Move DROP TABLE code to Database classes and properly rename back to original table prefix in destroyDatabase() 2010-12-28 01:19:16 +00:00
Chad Horohoe
4a5e562591 Refactor table cloning code into its own class so it can maybe be used by things other than the parser tests 2010-12-28 00:44:16 +00:00